sib-api-v3-sdk 2.1.5 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -6
- data/docs/ContactsApi.md +4 -4
- data/docs/CreateContact.md +1 -0
- data/docs/CreateEmailCampaign.md +4 -4
- data/docs/CreateSmsCampaign.md +1 -1
- data/docs/CreateSmtpTemplate.md +3 -3
- data/docs/EmailCampaignsApi.md +10 -10
- data/docs/GetAccount.md +2 -2
- data/docs/GetAccountRelay.md +1 -1
- data/docs/GetCampaignRecipients.md +2 -2
- data/docs/GetEmailCampaign.md +1 -1
- data/docs/GetExtendedCampaignOverview.md +1 -1
- data/docs/GetExtendedClient.md +1 -1
- data/docs/GetExtendedContactDetails.md +1 -1
- data/docs/GetReportsReports.md +0 -1
- data/docs/GetSmsEventReportEvents.md +2 -2
- data/docs/GetSmtpTemplateOverview.md +1 -1
- data/docs/GetTransacSmsReportReports.md +0 -1
- data/docs/ListsApi.md +2 -2
- data/docs/PostContactInfo.md +1 -1
- data/docs/RemainingCreditModel.md +2 -2
- data/docs/RequestSMSRecipientExport.md +1 -1
- data/docs/SMSCampaignsApi.md +7 -7
- data/docs/SendEmail.md +2 -2
- data/docs/SendReport.md +1 -1
- data/docs/SendSmtpEmail.md +2 -2
- data/docs/UpdateContact.md +1 -0
- data/docs/UpdateEmailCampaign.md +3 -3
- data/docs/UpdateSmsCampaign.md +1 -1
- data/docs/UpdateSmtpTemplate.md +2 -2
- data/lib/sib-api-v3-sdk/api/account_api.rb +1 -1
- data/lib/sib-api-v3-sdk/api/attributes_api.rb +1 -1
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +5 -5
- data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +14 -14
- data/lib/sib-api-v3-sdk/api/folders_api.rb +1 -1
- data/lib/sib-api-v3-sdk/api/lists_api.rb +3 -3
- data/lib/sib-api-v3-sdk/api/process_api.rb +1 -1
- data/lib/sib-api-v3-sdk/api/reseller_api.rb +1 -1
- data/lib/sib-api-v3-sdk/api/senders_api.rb +1 -1
- data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +9 -9
- data/lib/sib-api-v3-sdk/api/smtp_api.rb +1 -1
- data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +1 -1
- data/lib/sib-api-v3-sdk/api/webhooks_api.rb +1 -1
- data/lib/sib-api-v3-sdk/api_client.rb +2 -2
- data/lib/sib-api-v3-sdk/api_error.rb +1 -1
- data/lib/sib-api-v3-sdk/configuration.rb +1 -1
- data/lib/sib-api-v3-sdk/models/add_credits.rb +2 -2
- data/lib/sib-api-v3-sdk/models/add_remove_contact_to_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_attribute.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_attribute_enumeration.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_child.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_contact.rb +18 -6
- data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +10 -5
- data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_email_campaign_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_model.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_sender_ips.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_sender_model.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +3 -3
- data/lib/sib-api-v3-sdk/models/create_sms_campaign_recipients.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_smtp_email.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_smtp_template.rb +9 -4
- data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_update_folder.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_webhook.rb +2 -2
- data/lib/sib-api-v3-sdk/models/created_process_id.rb +2 -2
- data/lib/sib-api-v3-sdk/models/delete_hardbounces.rb +2 -2
- data/lib/sib-api-v3-sdk/models/email_export_recipients.rb +2 -2
- data/lib/sib-api-v3-sdk/models/error_model.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_account.rb +12 -2
- data/lib/sib-api-v3-sdk/models/get_account_marketing_automation.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_account_plan.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_account_relay.rb +7 -2
- data/lib/sib-api-v3-sdk/models/get_account_relay_data.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_aggregated_report.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_attributes.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_attributes_attributes.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_attributes_enumeration.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_campaign_overview.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_campaign_recipients.rb +4 -6
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_child_info.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_child_info_credits.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_child_info_ips.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_child_info_statistics.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_children_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_client.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_clicked.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_opened.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_transac_attributes.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_contact_details.rb +3 -3
- data/lib/sib-api-v3-sdk/models/get_contacts.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +7 -2
- data/lib/sib-api-v3-sdk/models/get_email_campaigns.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_email_event_report.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +7 -2
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats.rb +3 -3
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats_links_stats.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_client.rb +7 -2
- data/lib/sib-api-v3-sdk/models/get_extended_client_address.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +8 -3
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_clicked.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_links.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_messages_sent.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_opened.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_extended_list_campaign_stats.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_folder.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_folder_lists.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_folders.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_ip.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_ip_from_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_ips.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_ips_from_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_lists.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_process.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_processes.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_reports.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_reports_reports.rb +3 -18
- data/lib/sib-api-v3-sdk/models/get_senders_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_senders_list_ips.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_senders_list_senders.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_sms_campaign_overview.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_sms_campaign_stats.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_sms_campaigns.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_sms_event_report.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +2 -12
- data/lib/sib-api-v3-sdk/models/get_smtp_template_overview.rb +7 -2
- data/lib/sib-api-v3-sdk/models/get_smtp_template_overview_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_smtp_templates.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_stats_by_domain.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_transac_aggregated_sms_report.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_transac_sms_report.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_transac_sms_report_reports.rb +3 -18
- data/lib/sib-api-v3-sdk/models/get_webhook.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_webhooks.rb +2 -2
- data/lib/sib-api-v3-sdk/models/manage_ip.rb +2 -2
- data/lib/sib-api-v3-sdk/models/post_contact_info.rb +7 -2
- data/lib/sib-api-v3-sdk/models/post_contact_info_contacts.rb +2 -2
- data/lib/sib-api-v3-sdk/models/post_send_failed.rb +2 -2
- data/lib/sib-api-v3-sdk/models/post_send_sms_test_failed.rb +2 -2
- data/lib/sib-api-v3-sdk/models/remaining_credit_model.rb +12 -2
- data/lib/sib-api-v3-sdk/models/remaining_credit_model_child.rb +2 -2
- data/lib/sib-api-v3-sdk/models/remaining_credit_model_reseller.rb +2 -2
- data/lib/sib-api-v3-sdk/models/remove_credits.rb +2 -2
- data/lib/sib-api-v3-sdk/models/request_contact_export.rb +2 -2
- data/lib/sib-api-v3-sdk/models/request_contact_import.rb +2 -2
- data/lib/sib-api-v3-sdk/models/request_contact_import_new_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/request_sms_recipient_export.rb +3 -3
- data/lib/sib-api-v3-sdk/models/send_email.rb +6 -6
- data/lib/sib-api-v3-sdk/models/send_email_attachment.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_report.rb +7 -2
- data/lib/sib-api-v3-sdk/models/send_report_email.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_sms.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +9 -4
- data/lib/sib-api-v3-sdk/models/send_smtp_email_attachment.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_smtp_email_bcc.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_smtp_email_cc.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_smtp_email_reply_to.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_smtp_email_to.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_template_email.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_test_email.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_test_sms.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_attribute.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_attribute_enumeration.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_campaign_status.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_child.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_contact.rb +19 -7
- data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +5 -5
- data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_email_campaign_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +3 -3
- data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +4 -4
- data/lib/sib-api-v3-sdk/models/update_smtp_template_sender.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_webhook.rb +2 -2
- data/lib/sib-api-v3-sdk/version.rb +2 -2
- data/lib/sib-api-v3-sdk.rb +1 -3
- data/sib-api-v3-sdk.gemspec +1 -1
- data/spec/api/account_api_spec.rb +1 -1
- data/spec/api/attributes_api_spec.rb +1 -1
- data/spec/api/contacts_api_spec.rb +3 -3
- data/spec/api/email_campaigns_api_spec.rb +5 -5
- data/spec/api/folders_api_spec.rb +1 -1
- data/spec/api/lists_api_spec.rb +2 -2
- data/spec/api/process_api_spec.rb +1 -1
- data/spec/api/reseller_api_spec.rb +1 -1
- data/spec/api/senders_api_spec.rb +1 -1
- data/spec/api/sms_campaigns_api_spec.rb +4 -4
- data/spec/api/smtp_api_spec.rb +1 -1
- data/spec/api/transactional_sms_api_spec.rb +1 -1
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/add_credits_spec.rb +1 -1
- data/spec/models/add_remove_contact_to_list_spec.rb +1 -1
- data/spec/models/create_attribute_enumeration_spec.rb +1 -1
- data/spec/models/create_attribute_spec.rb +1 -1
- data/spec/models/create_child_spec.rb +1 -1
- data/spec/models/create_contact_spec.rb +7 -1
- data/spec/models/create_email_campaign_recipients_spec.rb +1 -1
- data/spec/models/create_email_campaign_sender_spec.rb +1 -1
- data/spec/models/create_email_campaign_spec.rb +1 -1
- data/spec/models/create_list_spec.rb +1 -1
- data/spec/models/create_model_spec.rb +1 -1
- data/spec/models/create_sender_ips_spec.rb +1 -1
- data/spec/models/create_sender_model_spec.rb +1 -1
- data/spec/models/create_sender_spec.rb +1 -1
- data/spec/models/create_sms_campaign_recipients_spec.rb +1 -1
- data/spec/models/create_sms_campaign_spec.rb +1 -1
- data/spec/models/create_smtp_email_spec.rb +1 -1
- data/spec/models/create_smtp_template_sender_spec.rb +1 -1
- data/spec/models/create_smtp_template_spec.rb +1 -1
- data/spec/models/create_update_folder_spec.rb +1 -1
- data/spec/models/create_webhook_spec.rb +1 -1
- data/spec/models/created_process_id_spec.rb +1 -1
- data/spec/models/delete_hardbounces_spec.rb +1 -1
- data/spec/models/email_export_recipients_spec.rb +1 -1
- data/spec/models/error_model_spec.rb +1 -1
- data/spec/models/get_account_marketing_automation_spec.rb +1 -1
- data/spec/models/get_account_plan_spec.rb +1 -1
- data/spec/models/get_account_relay_data_spec.rb +1 -1
- data/spec/models/get_account_relay_spec.rb +1 -1
- data/spec/models/get_account_spec.rb +1 -1
- data/spec/models/get_aggregated_report_spec.rb +1 -1
- data/spec/models/get_attributes_attributes_spec.rb +1 -1
- data/spec/models/get_attributes_enumeration_spec.rb +1 -1
- data/spec/models/get_attributes_spec.rb +1 -1
- data/spec/models/get_campaign_overview_spec.rb +1 -1
- data/spec/models/get_campaign_recipients_spec.rb +1 -1
- data/spec/models/get_campaign_stats_spec.rb +1 -1
- data/spec/models/get_child_info_api_keys_spec.rb +1 -1
- data/spec/models/get_child_info_credits_spec.rb +1 -1
- data/spec/models/get_child_info_ips_spec.rb +1 -1
- data/spec/models/get_child_info_spec.rb +1 -1
- data/spec/models/get_child_info_statistics_spec.rb +1 -1
- data/spec/models/get_children_list_spec.rb +1 -1
- data/spec/models/get_client_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_clicked_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_opened_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_transac_attributes_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_unsubscriptions_spec.rb +1 -1
- data/spec/models/get_contact_details_spec.rb +1 -1
- data/spec/models/get_contacts_spec.rb +1 -1
- data/spec/models/get_email_campaign_spec.rb +1 -1
- data/spec/models/get_email_campaigns_spec.rb +1 -1
- data/spec/models/get_email_event_report_events_spec.rb +1 -1
- data/spec/models/get_email_event_report_spec.rb +1 -1
- data/spec/models/get_extended_campaign_overview_sender_spec.rb +1 -1
- data/spec/models/get_extended_campaign_overview_spec.rb +1 -1
- data/spec/models/get_extended_campaign_stats_links_stats_spec.rb +1 -1
- data/spec/models/get_extended_campaign_stats_spec.rb +1 -1
- data/spec/models/get_extended_client_address_spec.rb +1 -1
- data/spec/models/get_extended_client_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_clicked_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_links_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_messages_sent_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_opened_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_unsubscriptions_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription_spec.rb +1 -1
- data/spec/models/get_extended_list_campaign_stats_spec.rb +1 -1
- data/spec/models/get_extended_list_spec.rb +1 -1
- data/spec/models/get_folder_lists_spec.rb +1 -1
- data/spec/models/get_folder_spec.rb +1 -1
- data/spec/models/get_folders_spec.rb +1 -1
- data/spec/models/get_ip_from_sender_spec.rb +1 -1
- data/spec/models/get_ip_spec.rb +1 -1
- data/spec/models/get_ips_from_sender_spec.rb +1 -1
- data/spec/models/get_ips_spec.rb +1 -1
- data/spec/models/get_list_spec.rb +1 -1
- data/spec/models/get_lists_spec.rb +1 -1
- data/spec/models/get_process_spec.rb +1 -1
- data/spec/models/get_processes_spec.rb +1 -1
- data/spec/models/get_reports_reports_spec.rb +1 -7
- data/spec/models/get_reports_spec.rb +1 -1
- data/spec/models/get_senders_list_ips_spec.rb +1 -1
- data/spec/models/get_senders_list_senders_spec.rb +1 -1
- data/spec/models/get_senders_list_spec.rb +1 -1
- data/spec/models/get_sms_campaign_overview_spec.rb +1 -1
- data/spec/models/get_sms_campaign_spec.rb +1 -1
- data/spec/models/get_sms_campaign_stats_spec.rb +1 -1
- data/spec/models/get_sms_campaigns_spec.rb +1 -1
- data/spec/models/get_sms_event_report_events_spec.rb +1 -1
- data/spec/models/get_sms_event_report_spec.rb +1 -1
- data/spec/models/get_smtp_template_overview_sender_spec.rb +1 -1
- data/spec/models/get_smtp_template_overview_spec.rb +1 -1
- data/spec/models/get_smtp_templates_spec.rb +1 -1
- data/spec/models/get_stats_by_domain_spec.rb +1 -1
- data/spec/models/get_transac_aggregated_sms_report_spec.rb +1 -1
- data/spec/models/get_transac_sms_report_reports_spec.rb +1 -7
- data/spec/models/get_transac_sms_report_spec.rb +1 -1
- data/spec/models/get_webhook_spec.rb +1 -1
- data/spec/models/get_webhooks_spec.rb +1 -1
- data/spec/models/manage_ip_spec.rb +1 -1
- data/spec/models/post_contact_info_contacts_spec.rb +1 -1
- data/spec/models/post_contact_info_spec.rb +1 -1
- data/spec/models/post_send_failed_spec.rb +1 -1
- data/spec/models/post_send_sms_test_failed_spec.rb +1 -1
- data/spec/models/remaining_credit_model_child_spec.rb +1 -1
- data/spec/models/remaining_credit_model_reseller_spec.rb +1 -1
- data/spec/models/remaining_credit_model_spec.rb +1 -1
- data/spec/models/remove_credits_spec.rb +1 -1
- data/spec/models/request_contact_export_spec.rb +1 -1
- data/spec/models/request_contact_import_new_list_spec.rb +1 -1
- data/spec/models/request_contact_import_spec.rb +1 -1
- data/spec/models/request_sms_recipient_export_spec.rb +7 -7
- data/spec/models/send_email_attachment_spec.rb +1 -1
- data/spec/models/send_email_spec.rb +1 -1
- data/spec/models/send_report_email_spec.rb +1 -1
- data/spec/models/send_report_spec.rb +1 -1
- data/spec/models/send_sms_spec.rb +1 -1
- data/spec/models/send_smtp_email_attachment_spec.rb +1 -1
- data/spec/models/send_smtp_email_bcc_spec.rb +1 -1
- data/spec/models/send_smtp_email_cc_spec.rb +1 -1
- data/spec/models/send_smtp_email_reply_to_spec.rb +1 -1
- data/spec/models/send_smtp_email_sender_spec.rb +1 -1
- data/spec/models/send_smtp_email_spec.rb +1 -1
- data/spec/models/send_smtp_email_to_spec.rb +1 -1
- data/spec/models/send_template_email_spec.rb +1 -1
- data/spec/models/send_test_email_spec.rb +1 -1
- data/spec/models/send_test_sms_spec.rb +1 -1
- data/spec/models/send_transac_sms_spec.rb +1 -1
- data/spec/models/update_attribute_enumeration_spec.rb +1 -1
- data/spec/models/update_attribute_spec.rb +1 -1
- data/spec/models/update_campaign_status_spec.rb +1 -1
- data/spec/models/update_child_spec.rb +1 -1
- data/spec/models/update_contact_spec.rb +7 -1
- data/spec/models/update_email_campaign_recipients_spec.rb +1 -1
- data/spec/models/update_email_campaign_sender_spec.rb +1 -1
- data/spec/models/update_email_campaign_spec.rb +1 -1
- data/spec/models/update_list_spec.rb +1 -1
- data/spec/models/update_sender_spec.rb +1 -1
- data/spec/models/update_sms_campaign_spec.rb +1 -1
- data/spec/models/update_smtp_template_sender_spec.rb +1 -1
- data/spec/models/update_smtp_template_spec.rb +1 -1
- data/spec/models/update_webhook_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +2 -10
- data/docs/GetCampaignRecipientsExclusionLists.md +0 -9
- data/docs/GetCampaignRecipientsLists.md +0 -9
- data/lib/sib-api-v3-sdk/models/get_campaign_recipients_exclusion_lists.rb +0 -209
- data/lib/sib-api-v3-sdk/models/get_campaign_recipients_lists.rb +0 -209
- data/spec/models/get_campaign_recipients_exclusion_lists_spec.rb +0 -48
- data/spec/models/get_campaign_recipients_lists_spec.rb +0 -48
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 3.0.0
|
7
7
|
Contact: contact@sendinblue.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -62,5 +62,11 @@ describe 'UpdateContact' do
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
describe 'test attribute "smtp_blacklist_sender"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
65
71
|
end
|
66
72
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sib-api-v3-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SendinBlue Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -242,8 +242,6 @@ files:
|
|
242
242
|
- docs/GetAttributesEnumeration.md
|
243
243
|
- docs/GetCampaignOverview.md
|
244
244
|
- docs/GetCampaignRecipients.md
|
245
|
-
- docs/GetCampaignRecipientsExclusionLists.md
|
246
|
-
- docs/GetCampaignRecipientsLists.md
|
247
245
|
- docs/GetCampaignStats.md
|
248
246
|
- docs/GetChildInfo.md
|
249
247
|
- docs/GetChildInfoApiKeys.md
|
@@ -415,8 +413,6 @@ files:
|
|
415
413
|
- lib/sib-api-v3-sdk/models/get_attributes_enumeration.rb
|
416
414
|
- lib/sib-api-v3-sdk/models/get_campaign_overview.rb
|
417
415
|
- lib/sib-api-v3-sdk/models/get_campaign_recipients.rb
|
418
|
-
- lib/sib-api-v3-sdk/models/get_campaign_recipients_exclusion_lists.rb
|
419
|
-
- lib/sib-api-v3-sdk/models/get_campaign_recipients_lists.rb
|
420
416
|
- lib/sib-api-v3-sdk/models/get_campaign_stats.rb
|
421
417
|
- lib/sib-api-v3-sdk/models/get_child_info.rb
|
422
418
|
- lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb
|
@@ -579,8 +575,6 @@ files:
|
|
579
575
|
- spec/models/get_attributes_enumeration_spec.rb
|
580
576
|
- spec/models/get_attributes_spec.rb
|
581
577
|
- spec/models/get_campaign_overview_spec.rb
|
582
|
-
- spec/models/get_campaign_recipients_exclusion_lists_spec.rb
|
583
|
-
- spec/models/get_campaign_recipients_lists_spec.rb
|
584
578
|
- spec/models/get_campaign_recipients_spec.rb
|
585
579
|
- spec/models/get_campaign_stats_spec.rb
|
586
580
|
- spec/models/get_child_info_api_keys_spec.rb
|
@@ -768,8 +762,6 @@ test_files:
|
|
768
762
|
- spec/models/get_attributes_enumeration_spec.rb
|
769
763
|
- spec/models/get_attributes_spec.rb
|
770
764
|
- spec/models/get_campaign_overview_spec.rb
|
771
|
-
- spec/models/get_campaign_recipients_exclusion_lists_spec.rb
|
772
|
-
- spec/models/get_campaign_recipients_lists_spec.rb
|
773
765
|
- spec/models/get_campaign_recipients_spec.rb
|
774
766
|
- spec/models/get_campaign_stats_spec.rb
|
775
767
|
- spec/models/get_child_info_api_keys_spec.rb
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# SibApiV3Sdk::GetCampaignRecipientsExclusionLists
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
Name | Type | Description | Notes
|
5
|
-
------------ | ------------- | ------------- | -------------
|
6
|
-
**id** | **Integer** | ID of the list excluded of the campaign |
|
7
|
-
**name** | **String** | Name of the list excluded of the campaign |
|
8
|
-
|
9
|
-
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# SibApiV3Sdk::GetCampaignRecipientsLists
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
Name | Type | Description | Notes
|
5
|
-
------------ | ------------- | ------------- | -------------
|
6
|
-
**id** | **Integer** | ID of the list included in the campaign |
|
7
|
-
**name** | **String** | Name of the list included in the campaign |
|
8
|
-
|
9
|
-
|
@@ -1,209 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#SendinBlue API
|
3
|
-
|
4
|
-
#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
5
|
-
|
6
|
-
OpenAPI spec version: 3.0.0
|
7
|
-
Contact: contact@sendinblue.com
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module SibApiV3Sdk
|
16
|
-
|
17
|
-
class GetCampaignRecipientsExclusionLists
|
18
|
-
# ID of the list excluded of the campaign
|
19
|
-
attr_accessor :id
|
20
|
-
|
21
|
-
# Name of the list excluded of the campaign
|
22
|
-
attr_accessor :name
|
23
|
-
|
24
|
-
|
25
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
-
def self.attribute_map
|
27
|
-
{
|
28
|
-
:'id' => :'id',
|
29
|
-
:'name' => :'name'
|
30
|
-
}
|
31
|
-
end
|
32
|
-
|
33
|
-
# Attribute type mapping.
|
34
|
-
def self.swagger_types
|
35
|
-
{
|
36
|
-
:'id' => :'Integer',
|
37
|
-
:'name' => :'String'
|
38
|
-
}
|
39
|
-
end
|
40
|
-
|
41
|
-
# Initializes the object
|
42
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
-
def initialize(attributes = {})
|
44
|
-
return unless attributes.is_a?(Hash)
|
45
|
-
|
46
|
-
# convert string to symbol for hash key
|
47
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
48
|
-
|
49
|
-
if attributes.has_key?(:'id')
|
50
|
-
self.id = attributes[:'id']
|
51
|
-
end
|
52
|
-
|
53
|
-
if attributes.has_key?(:'name')
|
54
|
-
self.name = attributes[:'name']
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
|
59
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
-
# @return Array for valid properies with the reasons
|
61
|
-
def list_invalid_properties
|
62
|
-
invalid_properties = Array.new
|
63
|
-
if @id.nil?
|
64
|
-
invalid_properties.push("invalid value for 'id', id cannot be nil.")
|
65
|
-
end
|
66
|
-
|
67
|
-
if @name.nil?
|
68
|
-
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
69
|
-
end
|
70
|
-
|
71
|
-
return invalid_properties
|
72
|
-
end
|
73
|
-
|
74
|
-
# Check to see if the all the properties in the model are valid
|
75
|
-
# @return true if the model is valid
|
76
|
-
def valid?
|
77
|
-
return false if @id.nil?
|
78
|
-
return false if @name.nil?
|
79
|
-
return true
|
80
|
-
end
|
81
|
-
|
82
|
-
# Checks equality by comparing each attribute.
|
83
|
-
# @param [Object] Object to be compared
|
84
|
-
def ==(o)
|
85
|
-
return true if self.equal?(o)
|
86
|
-
self.class == o.class &&
|
87
|
-
id == o.id &&
|
88
|
-
name == o.name
|
89
|
-
end
|
90
|
-
|
91
|
-
# @see the `==` method
|
92
|
-
# @param [Object] Object to be compared
|
93
|
-
def eql?(o)
|
94
|
-
self == o
|
95
|
-
end
|
96
|
-
|
97
|
-
# Calculates hash code according to all attributes.
|
98
|
-
# @return [Fixnum] Hash code
|
99
|
-
def hash
|
100
|
-
[id, name].hash
|
101
|
-
end
|
102
|
-
|
103
|
-
# Builds the object from hash
|
104
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
-
# @return [Object] Returns the model itself
|
106
|
-
def build_from_hash(attributes)
|
107
|
-
return nil unless attributes.is_a?(Hash)
|
108
|
-
self.class.swagger_types.each_pair do |key, type|
|
109
|
-
if type =~ /\AArray<(.*)>/i
|
110
|
-
# check to ensure the input is an array given that the the attribute
|
111
|
-
# is documented as an array but the input is not
|
112
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
113
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
114
|
-
end
|
115
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
116
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
117
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
118
|
-
end
|
119
|
-
|
120
|
-
self
|
121
|
-
end
|
122
|
-
|
123
|
-
# Deserializes the data based on type
|
124
|
-
# @param string type Data type
|
125
|
-
# @param string value Value to be deserialized
|
126
|
-
# @return [Object] Deserialized data
|
127
|
-
def _deserialize(type, value)
|
128
|
-
case type.to_sym
|
129
|
-
when :DateTime
|
130
|
-
DateTime.parse(value)
|
131
|
-
when :Date
|
132
|
-
Date.parse(value)
|
133
|
-
when :String
|
134
|
-
value.to_s
|
135
|
-
when :Integer
|
136
|
-
value.to_i
|
137
|
-
when :Float
|
138
|
-
value.to_f
|
139
|
-
when :BOOLEAN
|
140
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
141
|
-
true
|
142
|
-
else
|
143
|
-
false
|
144
|
-
end
|
145
|
-
when :Object
|
146
|
-
# generic object (usually a Hash), return directly
|
147
|
-
value
|
148
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
149
|
-
inner_type = Regexp.last_match[:inner_type]
|
150
|
-
value.map { |v| _deserialize(inner_type, v) }
|
151
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
152
|
-
k_type = Regexp.last_match[:k_type]
|
153
|
-
v_type = Regexp.last_match[:v_type]
|
154
|
-
{}.tap do |hash|
|
155
|
-
value.each do |k, v|
|
156
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
157
|
-
end
|
158
|
-
end
|
159
|
-
else # model
|
160
|
-
temp_model = SibApiV3Sdk.const_get(type).new
|
161
|
-
temp_model.build_from_hash(value)
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
# Returns the string representation of the object
|
166
|
-
# @return [String] String presentation of the object
|
167
|
-
def to_s
|
168
|
-
to_hash.to_s
|
169
|
-
end
|
170
|
-
|
171
|
-
# to_body is an alias to to_hash (backward compatibility)
|
172
|
-
# @return [Hash] Returns the object in the form of hash
|
173
|
-
def to_body
|
174
|
-
to_hash
|
175
|
-
end
|
176
|
-
|
177
|
-
# Returns the object in the form of hash
|
178
|
-
# @return [Hash] Returns the object in the form of hash
|
179
|
-
def to_hash
|
180
|
-
hash = {}
|
181
|
-
self.class.attribute_map.each_pair do |attr, param|
|
182
|
-
value = self.send(attr)
|
183
|
-
next if value.nil?
|
184
|
-
hash[param] = _to_hash(value)
|
185
|
-
end
|
186
|
-
hash
|
187
|
-
end
|
188
|
-
|
189
|
-
# Outputs non-array value in the form of hash
|
190
|
-
# For object, use to_hash. Otherwise, just return the value
|
191
|
-
# @param [Object] value Any valid value
|
192
|
-
# @return [Hash] Returns the value in the form of hash
|
193
|
-
def _to_hash(value)
|
194
|
-
if value.is_a?(Array)
|
195
|
-
value.compact.map{ |v| _to_hash(v) }
|
196
|
-
elsif value.is_a?(Hash)
|
197
|
-
{}.tap do |hash|
|
198
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
-
end
|
200
|
-
elsif value.respond_to? :to_hash
|
201
|
-
value.to_hash
|
202
|
-
else
|
203
|
-
value
|
204
|
-
end
|
205
|
-
end
|
206
|
-
|
207
|
-
end
|
208
|
-
|
209
|
-
end
|
@@ -1,209 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#SendinBlue API
|
3
|
-
|
4
|
-
#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
5
|
-
|
6
|
-
OpenAPI spec version: 3.0.0
|
7
|
-
Contact: contact@sendinblue.com
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module SibApiV3Sdk
|
16
|
-
|
17
|
-
class GetCampaignRecipientsLists
|
18
|
-
# ID of the list included in the campaign
|
19
|
-
attr_accessor :id
|
20
|
-
|
21
|
-
# Name of the list included in the campaign
|
22
|
-
attr_accessor :name
|
23
|
-
|
24
|
-
|
25
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
-
def self.attribute_map
|
27
|
-
{
|
28
|
-
:'id' => :'id',
|
29
|
-
:'name' => :'name'
|
30
|
-
}
|
31
|
-
end
|
32
|
-
|
33
|
-
# Attribute type mapping.
|
34
|
-
def self.swagger_types
|
35
|
-
{
|
36
|
-
:'id' => :'Integer',
|
37
|
-
:'name' => :'String'
|
38
|
-
}
|
39
|
-
end
|
40
|
-
|
41
|
-
# Initializes the object
|
42
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
-
def initialize(attributes = {})
|
44
|
-
return unless attributes.is_a?(Hash)
|
45
|
-
|
46
|
-
# convert string to symbol for hash key
|
47
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
48
|
-
|
49
|
-
if attributes.has_key?(:'id')
|
50
|
-
self.id = attributes[:'id']
|
51
|
-
end
|
52
|
-
|
53
|
-
if attributes.has_key?(:'name')
|
54
|
-
self.name = attributes[:'name']
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
|
59
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
-
# @return Array for valid properies with the reasons
|
61
|
-
def list_invalid_properties
|
62
|
-
invalid_properties = Array.new
|
63
|
-
if @id.nil?
|
64
|
-
invalid_properties.push("invalid value for 'id', id cannot be nil.")
|
65
|
-
end
|
66
|
-
|
67
|
-
if @name.nil?
|
68
|
-
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
69
|
-
end
|
70
|
-
|
71
|
-
return invalid_properties
|
72
|
-
end
|
73
|
-
|
74
|
-
# Check to see if the all the properties in the model are valid
|
75
|
-
# @return true if the model is valid
|
76
|
-
def valid?
|
77
|
-
return false if @id.nil?
|
78
|
-
return false if @name.nil?
|
79
|
-
return true
|
80
|
-
end
|
81
|
-
|
82
|
-
# Checks equality by comparing each attribute.
|
83
|
-
# @param [Object] Object to be compared
|
84
|
-
def ==(o)
|
85
|
-
return true if self.equal?(o)
|
86
|
-
self.class == o.class &&
|
87
|
-
id == o.id &&
|
88
|
-
name == o.name
|
89
|
-
end
|
90
|
-
|
91
|
-
# @see the `==` method
|
92
|
-
# @param [Object] Object to be compared
|
93
|
-
def eql?(o)
|
94
|
-
self == o
|
95
|
-
end
|
96
|
-
|
97
|
-
# Calculates hash code according to all attributes.
|
98
|
-
# @return [Fixnum] Hash code
|
99
|
-
def hash
|
100
|
-
[id, name].hash
|
101
|
-
end
|
102
|
-
|
103
|
-
# Builds the object from hash
|
104
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
-
# @return [Object] Returns the model itself
|
106
|
-
def build_from_hash(attributes)
|
107
|
-
return nil unless attributes.is_a?(Hash)
|
108
|
-
self.class.swagger_types.each_pair do |key, type|
|
109
|
-
if type =~ /\AArray<(.*)>/i
|
110
|
-
# check to ensure the input is an array given that the the attribute
|
111
|
-
# is documented as an array but the input is not
|
112
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
113
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
114
|
-
end
|
115
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
116
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
117
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
118
|
-
end
|
119
|
-
|
120
|
-
self
|
121
|
-
end
|
122
|
-
|
123
|
-
# Deserializes the data based on type
|
124
|
-
# @param string type Data type
|
125
|
-
# @param string value Value to be deserialized
|
126
|
-
# @return [Object] Deserialized data
|
127
|
-
def _deserialize(type, value)
|
128
|
-
case type.to_sym
|
129
|
-
when :DateTime
|
130
|
-
DateTime.parse(value)
|
131
|
-
when :Date
|
132
|
-
Date.parse(value)
|
133
|
-
when :String
|
134
|
-
value.to_s
|
135
|
-
when :Integer
|
136
|
-
value.to_i
|
137
|
-
when :Float
|
138
|
-
value.to_f
|
139
|
-
when :BOOLEAN
|
140
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
141
|
-
true
|
142
|
-
else
|
143
|
-
false
|
144
|
-
end
|
145
|
-
when :Object
|
146
|
-
# generic object (usually a Hash), return directly
|
147
|
-
value
|
148
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
149
|
-
inner_type = Regexp.last_match[:inner_type]
|
150
|
-
value.map { |v| _deserialize(inner_type, v) }
|
151
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
152
|
-
k_type = Regexp.last_match[:k_type]
|
153
|
-
v_type = Regexp.last_match[:v_type]
|
154
|
-
{}.tap do |hash|
|
155
|
-
value.each do |k, v|
|
156
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
157
|
-
end
|
158
|
-
end
|
159
|
-
else # model
|
160
|
-
temp_model = SibApiV3Sdk.const_get(type).new
|
161
|
-
temp_model.build_from_hash(value)
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
# Returns the string representation of the object
|
166
|
-
# @return [String] String presentation of the object
|
167
|
-
def to_s
|
168
|
-
to_hash.to_s
|
169
|
-
end
|
170
|
-
|
171
|
-
# to_body is an alias to to_hash (backward compatibility)
|
172
|
-
# @return [Hash] Returns the object in the form of hash
|
173
|
-
def to_body
|
174
|
-
to_hash
|
175
|
-
end
|
176
|
-
|
177
|
-
# Returns the object in the form of hash
|
178
|
-
# @return [Hash] Returns the object in the form of hash
|
179
|
-
def to_hash
|
180
|
-
hash = {}
|
181
|
-
self.class.attribute_map.each_pair do |attr, param|
|
182
|
-
value = self.send(attr)
|
183
|
-
next if value.nil?
|
184
|
-
hash[param] = _to_hash(value)
|
185
|
-
end
|
186
|
-
hash
|
187
|
-
end
|
188
|
-
|
189
|
-
# Outputs non-array value in the form of hash
|
190
|
-
# For object, use to_hash. Otherwise, just return the value
|
191
|
-
# @param [Object] value Any valid value
|
192
|
-
# @return [Hash] Returns the value in the form of hash
|
193
|
-
def _to_hash(value)
|
194
|
-
if value.is_a?(Array)
|
195
|
-
value.compact.map{ |v| _to_hash(v) }
|
196
|
-
elsif value.is_a?(Hash)
|
197
|
-
{}.tap do |hash|
|
198
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
-
end
|
200
|
-
elsif value.respond_to? :to_hash
|
201
|
-
value.to_hash
|
202
|
-
else
|
203
|
-
value
|
204
|
-
end
|
205
|
-
end
|
206
|
-
|
207
|
-
end
|
208
|
-
|
209
|
-
end
|