sib-api-v3-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/LICENSE.md +21 -0
- data/README.md +349 -0
- data/Rakefile +8 -0
- data/docs/AccountApi.md +55 -0
- data/docs/AddCredits.md +9 -0
- data/docs/AddRemoveContactToList.md +8 -0
- data/docs/AttributesApi.md +160 -0
- data/docs/ContactsApi.md +1310 -0
- data/docs/CreaUpdateFolder.md +8 -0
- data/docs/CreateAttribute.md +12 -0
- data/docs/CreateAttributeEnumemaration.md +9 -0
- data/docs/CreateChild.md +12 -0
- data/docs/CreateContact.md +12 -0
- data/docs/CreateEmailCampaign.md +25 -0
- data/docs/CreateEmailCampaignRecipients.md +9 -0
- data/docs/CreateEmailCampaignSender.md +9 -0
- data/docs/CreateList.md +9 -0
- data/docs/CreateModel.md +8 -0
- data/docs/CreateSender.md +10 -0
- data/docs/CreateSenderIps.md +10 -0
- data/docs/CreateSenderModel.md +10 -0
- data/docs/CreateSmsCampaign.md +12 -0
- data/docs/CreateSmsCampaignRecipients.md +9 -0
- data/docs/CreateSmtpEmail.md +8 -0
- data/docs/CreateSmtpTemplate.md +17 -0
- data/docs/CreateSmtpTemplateSender.md +9 -0
- data/docs/CreateWebhook.md +11 -0
- data/docs/CreatedProcessId.md +8 -0
- data/docs/DeleteHardbounces.md +10 -0
- data/docs/EmailCampaignsApi.md +557 -0
- data/docs/EmailExportRecipients.md +9 -0
- data/docs/ErrorModel.md +9 -0
- data/docs/FoldersApi.md +336 -0
- data/docs/GetAccount.md +15 -0
- data/docs/GetAccountMarketingAutomation.md +9 -0
- data/docs/GetAccountPlan.md +10 -0
- data/docs/GetAccountRelay.md +9 -0
- data/docs/GetAccountRelayData.md +10 -0
- data/docs/GetAggregatedReport.md +19 -0
- data/docs/GetAttributes.md +8 -0
- data/docs/GetAttributesAttributes.md +13 -0
- data/docs/GetAttributesEnumeration.md +9 -0
- data/docs/GetCampaignOverview.md +13 -0
- data/docs/GetCampaignRecipients.md +9 -0
- data/docs/GetCampaignRecipientsExclusionLists.md +9 -0
- data/docs/GetCampaignRecipientsLists.md +9 -0
- data/docs/GetCampaignStats.md +19 -0
- data/docs/GetChildInfo.md +16 -0
- data/docs/GetChildInfoApiKeys.md +10 -0
- data/docs/GetChildInfoCredits.md +9 -0
- data/docs/GetChildInfoIps.md +9 -0
- data/docs/GetChildInfoStatistics.md +10 -0
- data/docs/GetChildrenList.md +8 -0
- data/docs/GetClient.md +11 -0
- data/docs/GetContactCampaignStats.md +15 -0
- data/docs/GetContactCampaignStatsClicked.md +9 -0
- data/docs/GetContactCampaignStatsLinks.md +11 -0
- data/docs/GetContactCampaignStatsMessagesSent.md +9 -0
- data/docs/GetContactCampaignStatsOpened.md +11 -0
- data/docs/GetContactCampaignStatsTransacAttributes.md +10 -0
- data/docs/GetContactCampaignStatsUnsubscriptions.md +9 -0
- data/docs/GetContactCampaignStatsUnsubscriptionsAdminUnsubscription.md +9 -0
- data/docs/GetContactCampaignStatsUnsubscriptionsUserUnsubscription.md +10 -0
- data/docs/GetContactDetails.md +15 -0
- data/docs/GetContacts.md +9 -0
- data/docs/GetEmailCampaign.md +27 -0
- data/docs/GetEmailCampaigns.md +9 -0
- data/docs/GetEmailEventReport.md +8 -0
- data/docs/GetEmailEventReportEvents.md +14 -0
- data/docs/GetExtendedCampaignOverview.md +27 -0
- data/docs/GetExtendedCampaignOverviewSender.md +9 -0
- data/docs/GetExtendedCampaignStats.md +12 -0
- data/docs/GetExtendedCampaignStatsLinksStats.md +8 -0
- data/docs/GetExtendedClient.md +12 -0
- data/docs/GetExtendedClientAddress.md +11 -0
- data/docs/GetExtendedContactDetails.md +15 -0
- data/docs/GetExtendedList.md +15 -0
- data/docs/GetExtendedListCampaignStats.md +9 -0
- data/docs/GetFolder.md +12 -0
- data/docs/GetFolderLists.md +9 -0
- data/docs/GetFolders.md +9 -0
- data/docs/GetIp.md +11 -0
- data/docs/GetIpFromSender.md +11 -0
- data/docs/GetIps.md +8 -0
- data/docs/GetIpsFromSender.md +8 -0
- data/docs/GetList.md +11 -0
- data/docs/GetLists.md +9 -0
- data/docs/GetListsFolder.md +9 -0
- data/docs/GetListsLists.md +8 -0
- data/docs/GetProcess.md +11 -0
- data/docs/GetProcesses.md +9 -0
- data/docs/GetReports.md +8 -0
- data/docs/GetReportsReports.md +20 -0
- data/docs/GetSendersList.md +8 -0
- data/docs/GetSendersListIps.md +10 -0
- data/docs/GetSendersListSenders.md +12 -0
- data/docs/GetSmsCampaign.md +16 -0
- data/docs/GetSmsCampaignOverview.md +16 -0
- data/docs/GetSmsCampaignStats.md +14 -0
- data/docs/GetSmsCampaigns.md +9 -0
- data/docs/GetSmsEventReport.md +8 -0
- data/docs/GetSmsEventReportEvents.md +14 -0
- data/docs/GetSmtpTemplateOverview.md +19 -0
- data/docs/GetSmtpTemplateOverviewSender.md +9 -0
- data/docs/GetSmtpTemplates.md +9 -0
- data/docs/GetStatsByDomain.md +7 -0
- data/docs/GetTransacAggregatedSmsReport.md +17 -0
- data/docs/GetTransacSmsReport.md +8 -0
- data/docs/GetTransacSmsReportReports.md +18 -0
- data/docs/GetWebhook.md +14 -0
- data/docs/GetWebhooks.md +8 -0
- data/docs/ListsApi.md +509 -0
- data/docs/ManageIp.md +8 -0
- data/docs/PostContactInfo.md +8 -0
- data/docs/PostContactInfoContacts.md +9 -0
- data/docs/PostSendFailed.md +12 -0
- data/docs/PostSendSmsTestFailed.md +11 -0
- data/docs/ProcessApi.md +117 -0
- data/docs/RemainingCreditModel.md +9 -0
- data/docs/RemainingCreditModelChild.md +9 -0
- data/docs/RemainingCreditModelReseller.md +9 -0
- data/docs/RemoveCredits.md +9 -0
- data/docs/RequestContactExport.md +10 -0
- data/docs/RequestContactImport.md +12 -0
- data/docs/RequestContactImportNewList.md +9 -0
- data/docs/RequestSMSRecipientExport.md +9 -0
- data/docs/ResellerApi.md +491 -0
- data/docs/SMSCampaignsApi.md +560 -0
- data/docs/SMTPApi.md +642 -0
- data/docs/SendEmail.md +15 -0
- data/docs/SendEmailAttachment.md +9 -0
- data/docs/SendReport.md +9 -0
- data/docs/SendReportEmail.md +13 -0
- data/docs/SendSms.md +8 -0
- data/docs/SendSmtpEmail.md +17 -0
- data/docs/SendSmtpEmailAttachment.md +10 -0
- data/docs/SendSmtpEmailBcc.md +9 -0
- data/docs/SendSmtpEmailCc.md +9 -0
- data/docs/SendSmtpEmailReplyTo.md +9 -0
- data/docs/SendSmtpEmailSender.md +9 -0
- data/docs/SendSmtpEmailTo.md +9 -0
- data/docs/SendTemplateEmail.md +8 -0
- data/docs/SendTestEmail.md +8 -0
- data/docs/SendTestSms.md +8 -0
- data/docs/SendTransacSms.md +12 -0
- data/docs/SendersApi.md +326 -0
- data/docs/TransactionalSMSApi.md +249 -0
- data/docs/UpdateCampaignStatus.md +8 -0
- data/docs/UpdateChild.md +13 -0
- data/docs/UpdateContact.md +12 -0
- data/docs/UpdateEmailCampaign.md +24 -0
- data/docs/UpdateEmailCampaignRecipients.md +9 -0
- data/docs/UpdateEmailCampaignSender.md +9 -0
- data/docs/UpdateList.md +9 -0
- data/docs/UpdateSender.md +10 -0
- data/docs/UpdateSmsCampaign.md +12 -0
- data/docs/UpdateSmtpTemplate.md +17 -0
- data/docs/UpdateSmtpTemplateSender.md +9 -0
- data/docs/UpdateWebhook.md +10 -0
- data/docs/WebhooksApi.md +275 -0
- data/git_push.sh +55 -0
- data/lib/sib-api-v3-sdk.rb +196 -0
- data/lib/sib-api-v3-sdk/api/account_api.rb +72 -0
- data/lib/sib-api-v3-sdk/api/attributes_api.rb +181 -0
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +1408 -0
- data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +609 -0
- data/lib/sib-api-v3-sdk/api/folders_api.rb +379 -0
- data/lib/sib-api-v3-sdk/api/lists_api.rb +565 -0
- data/lib/sib-api-v3-sdk/api/process_api.rb +137 -0
- data/lib/sib-api-v3-sdk/api/reseller_api.rb +534 -0
- data/lib/sib-api-v3-sdk/api/senders_api.rb +343 -0
- data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +609 -0
- data/lib/sib-api-v3-sdk/api/smtp_api.rb +699 -0
- data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +280 -0
- data/lib/sib-api-v3-sdk/api/webhooks_api.rb +302 -0
- data/lib/sib-api-v3-sdk/api_client.rb +389 -0
- data/lib/sib-api-v3-sdk/api_error.rb +38 -0
- data/lib/sib-api-v3-sdk/configuration.rb +209 -0
- data/lib/sib-api-v3-sdk/models/add_credits.rb +199 -0
- data/lib/sib-api-v3-sdk/models/add_remove_contact_to_list.rb +191 -0
- data/lib/sib-api-v3-sdk/models/crea_update_folder.rb +189 -0
- data/lib/sib-api-v3-sdk/models/create_attribute.rb +291 -0
- data/lib/sib-api-v3-sdk/models/create_attribute_enumemaration.rb +199 -0
- data/lib/sib-api-v3-sdk/models/create_child.rb +254 -0
- data/lib/sib-api-v3-sdk/models/create_contact.rb +231 -0
- data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +425 -0
- data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +203 -0
- data/lib/sib-api-v3-sdk/models/create_email_campaign_sender.rb +204 -0
- data/lib/sib-api-v3-sdk/models/create_list.rb +209 -0
- data/lib/sib-api-v3-sdk/models/create_model.rb +194 -0
- data/lib/sib-api-v3-sdk/models/create_sender.rb +221 -0
- data/lib/sib-api-v3-sdk/models/create_sender_ips.rb +244 -0
- data/lib/sib-api-v3-sdk/models/create_sender_model.rb +214 -0
- data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +273 -0
- data/lib/sib-api-v3-sdk/models/create_sms_campaign_recipients.rb +213 -0
- data/lib/sib-api-v3-sdk/models/create_smtp_email.rb +194 -0
- data/lib/sib-api-v3-sdk/models/create_smtp_template.rb +288 -0
- data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +204 -0
- data/lib/sib-api-v3-sdk/models/create_webhook.rb +261 -0
- data/lib/sib-api-v3-sdk/models/created_process_id.rb +194 -0
- data/lib/sib-api-v3-sdk/models/delete_hardbounces.rb +209 -0
- data/lib/sib-api-v3-sdk/models/email_export_recipients.rb +237 -0
- data/lib/sib-api-v3-sdk/models/error_model.rb +242 -0
- data/lib/sib-api-v3-sdk/models/get_account.rb +283 -0
- data/lib/sib-api-v3-sdk/models/get_account_marketing_automation.rb +204 -0
- data/lib/sib-api-v3-sdk/models/get_account_plan.rb +269 -0
- data/lib/sib-api-v3-sdk/models/get_account_relay.rb +203 -0
- data/lib/sib-api-v3-sdk/models/get_account_relay_data.rb +224 -0
- data/lib/sib-api-v3-sdk/models/get_aggregated_report.rb +359 -0
- data/lib/sib-api-v3-sdk/models/get_attributes.rb +196 -0
- data/lib/sib-api-v3-sdk/models/get_attributes_attributes.rb +301 -0
- data/lib/sib-api-v3-sdk/models/get_attributes_enumeration.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_overview.rb +325 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_recipients.rb +213 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_recipients_exclusion_lists.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_recipients_lists.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +359 -0
- data/lib/sib-api-v3-sdk/models/get_child_info.rb +296 -0
- data/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb +219 -0
- data/lib/sib-api-v3-sdk/models/get_child_info_credits.rb +199 -0
- data/lib/sib-api-v3-sdk/models/get_child_info_ips.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_child_info_statistics.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_children_list.rb +191 -0
- data/lib/sib-api-v3-sdk/models/get_client.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +265 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_clicked.rb +210 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_links.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_messages_sent.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_opened.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_transac_attributes.rb +224 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions.rb +213 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions_admin_unsubscription.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions_user_unsubscription.rb +224 -0
- data/lib/sib-api-v3-sdk/models/get_contact_details.rb +316 -0
- data/lib/sib-api-v3-sdk/models/get_contacts.rb +210 -0
- data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +552 -0
- data/lib/sib-api-v3-sdk/models/get_email_campaigns.rb +205 -0
- data/lib/sib-api-v3-sdk/models/get_email_event_report.rb +190 -0
- data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +312 -0
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +552 -0
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview_sender.rb +199 -0
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats.rb +255 -0
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats_links_stats.rb +194 -0
- data/lib/sib-api-v3-sdk/models/get_extended_client.rb +248 -0
- data/lib/sib-api-v3-sdk/models/get_extended_client_address.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +316 -0
- data/lib/sib-api-v3-sdk/models/get_extended_list.rb +309 -0
- data/lib/sib-api-v3-sdk/models/get_extended_list_campaign_stats.rb +208 -0
- data/lib/sib-api-v3-sdk/models/get_folder.rb +254 -0
- data/lib/sib-api-v3-sdk/models/get_folder_lists.rb +210 -0
- data/lib/sib-api-v3-sdk/models/get_folders.rb +200 -0
- data/lib/sib-api-v3-sdk/models/get_ip.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_ip_from_sender.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_ips.rb +196 -0
- data/lib/sib-api-v3-sdk/models/get_ips_from_sender.rb +196 -0
- data/lib/sib-api-v3-sdk/models/get_list.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_lists.rb +211 -0
- data/lib/sib-api-v3-sdk/models/get_lists_folder.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_lists_lists.rb +188 -0
- data/lib/sib-api-v3-sdk/models/get_process.rb +267 -0
- data/lib/sib-api-v3-sdk/models/get_processes.rb +206 -0
- data/lib/sib-api-v3-sdk/models/get_reports.rb +190 -0
- data/lib/sib-api-v3-sdk/models/get_reports_reports.rb +374 -0
- data/lib/sib-api-v3-sdk/models/get_senders_list.rb +191 -0
- data/lib/sib-api-v3-sdk/models/get_senders_list_ips.rb +224 -0
- data/lib/sib-api-v3-sdk/models/get_senders_list_senders.rb +251 -0
- data/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +404 -0
- data/lib/sib-api-v3-sdk/models/get_sms_campaign_overview.rb +404 -0
- data/lib/sib-api-v3-sdk/models/get_sms_campaign_stats.rb +284 -0
- data/lib/sib-api-v3-sdk/models/get_sms_campaigns.rb +205 -0
- data/lib/sib-api-v3-sdk/models/get_sms_event_report.rb +190 -0
- data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +311 -0
- data/lib/sib-api-v3-sdk/models/get_smtp_template_overview.rb +391 -0
- data/lib/sib-api-v3-sdk/models/get_smtp_template_overview_sender.rb +199 -0
- data/lib/sib-api-v3-sdk/models/get_smtp_templates.rb +200 -0
- data/lib/sib-api-v3-sdk/models/get_stats_by_domain.rb +179 -0
- data/lib/sib-api-v3-sdk/models/get_transac_aggregated_sms_report.rb +329 -0
- data/lib/sib-api-v3-sdk/models/get_transac_sms_report.rb +190 -0
- data/lib/sib-api-v3-sdk/models/get_transac_sms_report_reports.rb +344 -0
- data/lib/sib-api-v3-sdk/models/get_webhook.rb +356 -0
- data/lib/sib-api-v3-sdk/models/get_webhooks.rb +195 -0
- data/lib/sib-api-v3-sdk/models/manage_ip.rb +189 -0
- data/lib/sib-api-v3-sdk/models/post_contact_info.rb +188 -0
- data/lib/sib-api-v3-sdk/models/post_contact_info_contacts.rb +206 -0
- data/lib/sib-api-v3-sdk/models/post_send_failed.rb +242 -0
- data/lib/sib-api-v3-sdk/models/post_send_sms_test_failed.rb +231 -0
- data/lib/sib-api-v3-sdk/models/remaining_credit_model.rb +197 -0
- data/lib/sib-api-v3-sdk/models/remaining_credit_model_child.rb +209 -0
- data/lib/sib-api-v3-sdk/models/remaining_credit_model_reseller.rb +209 -0
- data/lib/sib-api-v3-sdk/models/remove_credits.rb +199 -0
- data/lib/sib-api-v3-sdk/models/request_contact_export.rb +216 -0
- data/lib/sib-api-v3-sdk/models/request_contact_import.rb +230 -0
- data/lib/sib-api-v3-sdk/models/request_contact_import_new_list.rb +199 -0
- data/lib/sib-api-v3-sdk/models/request_sms_recipient_export.rb +239 -0
- data/lib/sib-api-v3-sdk/models/send_email.rb +274 -0
- data/lib/sib-api-v3-sdk/models/send_email_attachment.rb +215 -0
- data/lib/sib-api-v3-sdk/models/send_report.rb +233 -0
- data/lib/sib-api-v3-sdk/models/send_report_email.rb +278 -0
- data/lib/sib-api-v3-sdk/models/send_sms.rb +193 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +301 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_attachment.rb +225 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_bcc.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_cc.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_reply_to.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_to.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_template_email.rb +194 -0
- data/lib/sib-api-v3-sdk/models/send_test_email.rb +191 -0
- data/lib/sib-api-v3-sdk/models/send_test_sms.rb +191 -0
- data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +282 -0
- data/lib/sib-api-v3-sdk/models/update_campaign_status.rb +221 -0
- data/lib/sib-api-v3-sdk/models/update_child.rb +240 -0
- data/lib/sib-api-v3-sdk/models/update_contact.rb +234 -0
- data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +367 -0
- data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +203 -0
- data/lib/sib-api-v3-sdk/models/update_email_campaign_sender.rb +199 -0
- data/lib/sib-api-v3-sdk/models/update_list.rb +199 -0
- data/lib/sib-api-v3-sdk/models/update_sender.rb +211 -0
- data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +260 -0
- data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +278 -0
- data/lib/sib-api-v3-sdk/models/update_smtp_template_sender.rb +199 -0
- data/lib/sib-api-v3-sdk/models/update_webhook.rb +211 -0
- data/lib/sib-api-v3-sdk/version.rb +15 -0
- data/sib-api-v3-sdk.gemspec +45 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/attributes_api_spec.rb +70 -0
- data/spec/api/contacts_api_spec.rb +335 -0
- data/spec/api/email_campaigns_api_spec.rb +163 -0
- data/spec/api/folders_api_spec.rb +111 -0
- data/spec/api/lists_api_spec.rb +152 -0
- data/spec/api/process_api_spec.rb +60 -0
- data/spec/api/reseller_api_spec.rb +147 -0
- data/spec/api/senders_api_spec.rb +108 -0
- data/spec/api/sms_campaigns_api_spec.rb +163 -0
- data/spec/api/smtp_api_spec.rb +189 -0
- data/spec/api/transactional_sms_api_spec.rb +96 -0
- data/spec/api/webhooks_api_spec.rb +96 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/add_credits_spec.rb +48 -0
- data/spec/models/add_remove_contact_to_list_spec.rb +42 -0
- data/spec/models/crea_update_folder_spec.rb +42 -0
- data/spec/models/create_attribute_enumemaration_spec.rb +48 -0
- data/spec/models/create_attribute_spec.rb +74 -0
- data/spec/models/create_child_spec.rb +66 -0
- data/spec/models/create_contact_spec.rb +66 -0
- data/spec/models/create_email_campaign_recipients_spec.rb +48 -0
- data/spec/models/create_email_campaign_sender_spec.rb +48 -0
- data/spec/models/create_email_campaign_spec.rb +148 -0
- data/spec/models/create_list_spec.rb +48 -0
- data/spec/models/create_model_spec.rb +42 -0
- data/spec/models/create_sender_ips_spec.rb +54 -0
- data/spec/models/create_sender_model_spec.rb +54 -0
- data/spec/models/create_sender_spec.rb +54 -0
- data/spec/models/create_sms_campaign_recipients_spec.rb +48 -0
- data/spec/models/create_sms_campaign_spec.rb +66 -0
- data/spec/models/create_smtp_email_spec.rb +42 -0
- data/spec/models/create_smtp_template_sender_spec.rb +48 -0
- data/spec/models/create_smtp_template_spec.rb +96 -0
- data/spec/models/create_webhook_spec.rb +64 -0
- data/spec/models/created_process_id_spec.rb +42 -0
- data/spec/models/delete_hardbounces_spec.rb +54 -0
- data/spec/models/email_export_recipients_spec.rb +52 -0
- data/spec/models/error_model_spec.rb +52 -0
- data/spec/models/get_account_marketing_automation_spec.rb +48 -0
- data/spec/models/get_account_plan_spec.rb +62 -0
- data/spec/models/get_account_relay_data_spec.rb +54 -0
- data/spec/models/get_account_relay_spec.rb +48 -0
- data/spec/models/get_account_spec.rb +84 -0
- data/spec/models/get_aggregated_report_spec.rb +108 -0
- data/spec/models/get_attributes_attributes_spec.rb +80 -0
- data/spec/models/get_attributes_enumeration_spec.rb +48 -0
- data/spec/models/get_attributes_spec.rb +42 -0
- data/spec/models/get_campaign_overview_spec.rb +80 -0
- data/spec/models/get_campaign_recipients_exclusion_lists_spec.rb +48 -0
- data/spec/models/get_campaign_recipients_lists_spec.rb +48 -0
- data/spec/models/get_campaign_recipients_spec.rb +48 -0
- data/spec/models/get_campaign_stats_spec.rb +108 -0
- data/spec/models/get_child_info_api_keys_spec.rb +54 -0
- data/spec/models/get_child_info_credits_spec.rb +48 -0
- data/spec/models/get_child_info_ips_spec.rb +48 -0
- data/spec/models/get_child_info_spec.rb +90 -0
- data/spec/models/get_child_info_statistics_spec.rb +54 -0
- data/spec/models/get_children_list_spec.rb +42 -0
- data/spec/models/get_client_spec.rb +60 -0
- data/spec/models/get_contact_campaign_stats_clicked_spec.rb +48 -0
- data/spec/models/get_contact_campaign_stats_links_spec.rb +60 -0
- data/spec/models/get_contact_campaign_stats_messages_sent_spec.rb +48 -0
- data/spec/models/get_contact_campaign_stats_opened_spec.rb +60 -0
- data/spec/models/get_contact_campaign_stats_spec.rb +84 -0
- data/spec/models/get_contact_campaign_stats_transac_attributes_spec.rb +54 -0
- data/spec/models/get_contact_campaign_stats_unsubscriptions_admin_unsubscription_spec.rb +48 -0
- data/spec/models/get_contact_campaign_stats_unsubscriptions_spec.rb +48 -0
- data/spec/models/get_contact_campaign_stats_unsubscriptions_user_unsubscription_spec.rb +54 -0
- data/spec/models/get_contact_details_spec.rb +84 -0
- data/spec/models/get_contacts_spec.rb +48 -0
- data/spec/models/get_email_campaign_spec.rb +164 -0
- data/spec/models/get_email_campaigns_spec.rb +48 -0
- data/spec/models/get_email_event_report_events_spec.rb +82 -0
- data/spec/models/get_email_event_report_spec.rb +42 -0
- data/spec/models/get_extended_campaign_overview_sender_spec.rb +48 -0
- data/spec/models/get_extended_campaign_overview_spec.rb +164 -0
- data/spec/models/get_extended_campaign_stats_links_stats_spec.rb +42 -0
- data/spec/models/get_extended_campaign_stats_spec.rb +66 -0
- data/spec/models/get_extended_client_address_spec.rb +60 -0
- data/spec/models/get_extended_client_spec.rb +66 -0
- data/spec/models/get_extended_contact_details_spec.rb +84 -0
- data/spec/models/get_extended_list_campaign_stats_spec.rb +48 -0
- data/spec/models/get_extended_list_spec.rb +84 -0
- data/spec/models/get_folder_lists_spec.rb +48 -0
- data/spec/models/get_folder_spec.rb +66 -0
- data/spec/models/get_folders_spec.rb +48 -0
- data/spec/models/get_ip_from_sender_spec.rb +60 -0
- data/spec/models/get_ip_spec.rb +60 -0
- data/spec/models/get_ips_from_sender_spec.rb +42 -0
- data/spec/models/get_ips_spec.rb +42 -0
- data/spec/models/get_list_spec.rb +60 -0
- data/spec/models/get_lists_folder_spec.rb +48 -0
- data/spec/models/get_lists_lists_spec.rb +42 -0
- data/spec/models/get_lists_spec.rb +48 -0
- data/spec/models/get_process_spec.rb +64 -0
- data/spec/models/get_processes_spec.rb +48 -0
- data/spec/models/get_reports_reports_spec.rb +114 -0
- data/spec/models/get_reports_spec.rb +42 -0
- data/spec/models/get_senders_list_ips_spec.rb +54 -0
- data/spec/models/get_senders_list_senders_spec.rb +66 -0
- data/spec/models/get_senders_list_spec.rb +42 -0
- data/spec/models/get_sms_campaign_overview_spec.rb +94 -0
- data/spec/models/get_sms_campaign_spec.rb +94 -0
- data/spec/models/get_sms_campaign_stats_spec.rb +78 -0
- data/spec/models/get_sms_campaigns_spec.rb +48 -0
- data/spec/models/get_sms_event_report_events_spec.rb +82 -0
- data/spec/models/get_sms_event_report_spec.rb +42 -0
- data/spec/models/get_smtp_template_overview_sender_spec.rb +48 -0
- data/spec/models/get_smtp_template_overview_spec.rb +108 -0
- data/spec/models/get_smtp_templates_spec.rb +48 -0
- data/spec/models/get_stats_by_domain_spec.rb +36 -0
- data/spec/models/get_transac_aggregated_sms_report_spec.rb +96 -0
- data/spec/models/get_transac_sms_report_reports_spec.rb +102 -0
- data/spec/models/get_transac_sms_report_spec.rb +42 -0
- data/spec/models/get_webhook_spec.rb +82 -0
- data/spec/models/get_webhooks_spec.rb +42 -0
- data/spec/models/manage_ip_spec.rb +42 -0
- data/spec/models/post_contact_info_contacts_spec.rb +48 -0
- data/spec/models/post_contact_info_spec.rb +42 -0
- data/spec/models/post_send_failed_spec.rb +66 -0
- data/spec/models/post_send_sms_test_failed_spec.rb +60 -0
- data/spec/models/remaining_credit_model_child_spec.rb +48 -0
- data/spec/models/remaining_credit_model_reseller_spec.rb +48 -0
- data/spec/models/remaining_credit_model_spec.rb +48 -0
- data/spec/models/remove_credits_spec.rb +48 -0
- data/spec/models/request_contact_export_spec.rb +54 -0
- data/spec/models/request_contact_import_new_list_spec.rb +48 -0
- data/spec/models/request_contact_import_spec.rb +66 -0
- data/spec/models/request_sms_recipient_export_spec.rb +52 -0
- data/spec/models/send_email_attachment_spec.rb +48 -0
- data/spec/models/send_email_spec.rb +84 -0
- data/spec/models/send_report_email_spec.rb +76 -0
- data/spec/models/send_report_spec.rb +52 -0
- data/spec/models/send_sms_spec.rb +42 -0
- data/spec/models/send_smtp_email_attachment_spec.rb +54 -0
- data/spec/models/send_smtp_email_bcc_spec.rb +48 -0
- data/spec/models/send_smtp_email_cc_spec.rb +48 -0
- data/spec/models/send_smtp_email_reply_to_spec.rb +48 -0
- data/spec/models/send_smtp_email_sender_spec.rb +48 -0
- data/spec/models/send_smtp_email_spec.rb +96 -0
- data/spec/models/send_smtp_email_to_spec.rb +48 -0
- data/spec/models/send_template_email_spec.rb +42 -0
- data/spec/models/send_test_email_spec.rb +42 -0
- data/spec/models/send_test_sms_spec.rb +42 -0
- data/spec/models/send_transac_sms_spec.rb +66 -0
- data/spec/models/update_campaign_status_spec.rb +46 -0
- data/spec/models/update_child_spec.rb +72 -0
- data/spec/models/update_contact_spec.rb +66 -0
- data/spec/models/update_email_campaign_recipients_spec.rb +48 -0
- data/spec/models/update_email_campaign_sender_spec.rb +48 -0
- data/spec/models/update_email_campaign_spec.rb +138 -0
- data/spec/models/update_list_spec.rb +48 -0
- data/spec/models/update_sender_spec.rb +54 -0
- data/spec/models/update_sms_campaign_spec.rb +66 -0
- data/spec/models/update_smtp_template_sender_spec.rb +48 -0
- data/spec/models/update_smtp_template_spec.rb +96 -0
- data/spec/models/update_webhook_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +869 -0
|
@@ -0,0 +1,213 @@
|
|
|
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 CreateSmsCampaignRecipients
|
|
18
|
+
# Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty
|
|
19
|
+
attr_accessor :list_ids
|
|
20
|
+
|
|
21
|
+
# List ids which have to be excluded from a campaign
|
|
22
|
+
attr_accessor :exclusion_list_ids
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'list_ids' => :'listIds',
|
|
29
|
+
:'exclusion_list_ids' => :'exclusionListIds'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.swagger_types
|
|
35
|
+
{
|
|
36
|
+
:'list_ids' => :'Array<Integer>',
|
|
37
|
+
:'exclusion_list_ids' => :'Array<Integer>'
|
|
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?(:'listIds')
|
|
50
|
+
if (value = attributes[:'listIds']).is_a?(Array)
|
|
51
|
+
self.list_ids = value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
if attributes.has_key?(:'exclusionListIds')
|
|
56
|
+
if (value = attributes[:'exclusionListIds']).is_a?(Array)
|
|
57
|
+
self.exclusion_list_ids = value
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
64
|
+
# @return Array for valid properies with the reasons
|
|
65
|
+
def list_invalid_properties
|
|
66
|
+
invalid_properties = Array.new
|
|
67
|
+
if @list_ids.nil?
|
|
68
|
+
invalid_properties.push("invalid value for 'list_ids', list_ids cannot be nil.")
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
if @exclusion_list_ids.nil?
|
|
72
|
+
invalid_properties.push("invalid value for 'exclusion_list_ids', exclusion_list_ids cannot be nil.")
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
return invalid_properties
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Check to see if the all the properties in the model are valid
|
|
79
|
+
# @return true if the model is valid
|
|
80
|
+
def valid?
|
|
81
|
+
return false if @list_ids.nil?
|
|
82
|
+
return false if @exclusion_list_ids.nil?
|
|
83
|
+
return true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checks equality by comparing each attribute.
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def ==(o)
|
|
89
|
+
return true if self.equal?(o)
|
|
90
|
+
self.class == o.class &&
|
|
91
|
+
list_ids == o.list_ids &&
|
|
92
|
+
exclusion_list_ids == o.exclusion_list_ids
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @see the `==` method
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def eql?(o)
|
|
98
|
+
self == o
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Calculates hash code according to all attributes.
|
|
102
|
+
# @return [Fixnum] Hash code
|
|
103
|
+
def hash
|
|
104
|
+
[list_ids, exclusion_list_ids].hash
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Builds the object from hash
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
# @return [Object] Returns the model itself
|
|
110
|
+
def build_from_hash(attributes)
|
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
|
112
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
113
|
+
if type =~ /\AArray<(.*)>/i
|
|
114
|
+
# check to ensure the input is an array given that the the attribute
|
|
115
|
+
# is documented as an array but the input is not
|
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
118
|
+
end
|
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
121
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
self
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Deserializes the data based on type
|
|
128
|
+
# @param string type Data type
|
|
129
|
+
# @param string value Value to be deserialized
|
|
130
|
+
# @return [Object] Deserialized data
|
|
131
|
+
def _deserialize(type, value)
|
|
132
|
+
case type.to_sym
|
|
133
|
+
when :DateTime
|
|
134
|
+
DateTime.parse(value)
|
|
135
|
+
when :Date
|
|
136
|
+
Date.parse(value)
|
|
137
|
+
when :String
|
|
138
|
+
value.to_s
|
|
139
|
+
when :Integer
|
|
140
|
+
value.to_i
|
|
141
|
+
when :Float
|
|
142
|
+
value.to_f
|
|
143
|
+
when :BOOLEAN
|
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
145
|
+
true
|
|
146
|
+
else
|
|
147
|
+
false
|
|
148
|
+
end
|
|
149
|
+
when :Object
|
|
150
|
+
# generic object (usually a Hash), return directly
|
|
151
|
+
value
|
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
|
158
|
+
{}.tap do |hash|
|
|
159
|
+
value.each do |k, v|
|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
else # model
|
|
164
|
+
temp_model = SibApiV3Sdk.const_get(type).new
|
|
165
|
+
temp_model.build_from_hash(value)
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Returns the string representation of the object
|
|
170
|
+
# @return [String] String presentation of the object
|
|
171
|
+
def to_s
|
|
172
|
+
to_hash.to_s
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
|
177
|
+
def to_body
|
|
178
|
+
to_hash
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Returns the object in the form of hash
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_hash
|
|
184
|
+
hash = {}
|
|
185
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
186
|
+
value = self.send(attr)
|
|
187
|
+
next if value.nil?
|
|
188
|
+
hash[param] = _to_hash(value)
|
|
189
|
+
end
|
|
190
|
+
hash
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Outputs non-array value in the form of hash
|
|
194
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
195
|
+
# @param [Object] value Any valid value
|
|
196
|
+
# @return [Hash] Returns the value in the form of hash
|
|
197
|
+
def _to_hash(value)
|
|
198
|
+
if value.is_a?(Array)
|
|
199
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
200
|
+
elsif value.is_a?(Hash)
|
|
201
|
+
{}.tap do |hash|
|
|
202
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
203
|
+
end
|
|
204
|
+
elsif value.respond_to? :to_hash
|
|
205
|
+
value.to_hash
|
|
206
|
+
else
|
|
207
|
+
value
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
end
|
|
@@ -0,0 +1,194 @@
|
|
|
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 CreateSmtpEmail
|
|
18
|
+
# Message ID of the SMTP Email sent
|
|
19
|
+
attr_accessor :message_id
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'message_id' => :'messageId'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.swagger_types
|
|
31
|
+
{
|
|
32
|
+
:'message_id' => :'String'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Initializes the object
|
|
37
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
38
|
+
def initialize(attributes = {})
|
|
39
|
+
return unless attributes.is_a?(Hash)
|
|
40
|
+
|
|
41
|
+
# convert string to symbol for hash key
|
|
42
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
43
|
+
|
|
44
|
+
if attributes.has_key?(:'messageId')
|
|
45
|
+
self.message_id = attributes[:'messageId']
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
51
|
+
# @return Array for valid properies with the reasons
|
|
52
|
+
def list_invalid_properties
|
|
53
|
+
invalid_properties = Array.new
|
|
54
|
+
if @message_id.nil?
|
|
55
|
+
invalid_properties.push("invalid value for 'message_id', message_id cannot be nil.")
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
return invalid_properties
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Check to see if the all the properties in the model are valid
|
|
62
|
+
# @return true if the model is valid
|
|
63
|
+
def valid?
|
|
64
|
+
return false if @message_id.nil?
|
|
65
|
+
return true
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Checks equality by comparing each attribute.
|
|
69
|
+
# @param [Object] Object to be compared
|
|
70
|
+
def ==(o)
|
|
71
|
+
return true if self.equal?(o)
|
|
72
|
+
self.class == o.class &&
|
|
73
|
+
message_id == o.message_id
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# @see the `==` method
|
|
77
|
+
# @param [Object] Object to be compared
|
|
78
|
+
def eql?(o)
|
|
79
|
+
self == o
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Calculates hash code according to all attributes.
|
|
83
|
+
# @return [Fixnum] Hash code
|
|
84
|
+
def hash
|
|
85
|
+
[message_id].hash
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Builds the object from hash
|
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
90
|
+
# @return [Object] Returns the model itself
|
|
91
|
+
def build_from_hash(attributes)
|
|
92
|
+
return nil unless attributes.is_a?(Hash)
|
|
93
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
94
|
+
if type =~ /\AArray<(.*)>/i
|
|
95
|
+
# check to ensure the input is an array given that the the attribute
|
|
96
|
+
# is documented as an array but the input is not
|
|
97
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
99
|
+
end
|
|
100
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
101
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
102
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
self
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Deserializes the data based on type
|
|
109
|
+
# @param string type Data type
|
|
110
|
+
# @param string value Value to be deserialized
|
|
111
|
+
# @return [Object] Deserialized data
|
|
112
|
+
def _deserialize(type, value)
|
|
113
|
+
case type.to_sym
|
|
114
|
+
when :DateTime
|
|
115
|
+
DateTime.parse(value)
|
|
116
|
+
when :Date
|
|
117
|
+
Date.parse(value)
|
|
118
|
+
when :String
|
|
119
|
+
value.to_s
|
|
120
|
+
when :Integer
|
|
121
|
+
value.to_i
|
|
122
|
+
when :Float
|
|
123
|
+
value.to_f
|
|
124
|
+
when :BOOLEAN
|
|
125
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
126
|
+
true
|
|
127
|
+
else
|
|
128
|
+
false
|
|
129
|
+
end
|
|
130
|
+
when :Object
|
|
131
|
+
# generic object (usually a Hash), return directly
|
|
132
|
+
value
|
|
133
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
134
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
135
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
136
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
137
|
+
k_type = Regexp.last_match[:k_type]
|
|
138
|
+
v_type = Regexp.last_match[:v_type]
|
|
139
|
+
{}.tap do |hash|
|
|
140
|
+
value.each do |k, v|
|
|
141
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
else # model
|
|
145
|
+
temp_model = SibApiV3Sdk.const_get(type).new
|
|
146
|
+
temp_model.build_from_hash(value)
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Returns the string representation of the object
|
|
151
|
+
# @return [String] String presentation of the object
|
|
152
|
+
def to_s
|
|
153
|
+
to_hash.to_s
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
|
158
|
+
def to_body
|
|
159
|
+
to_hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Returns the object in the form of hash
|
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
|
164
|
+
def to_hash
|
|
165
|
+
hash = {}
|
|
166
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
167
|
+
value = self.send(attr)
|
|
168
|
+
next if value.nil?
|
|
169
|
+
hash[param] = _to_hash(value)
|
|
170
|
+
end
|
|
171
|
+
hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Outputs non-array value in the form of hash
|
|
175
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
176
|
+
# @param [Object] value Any valid value
|
|
177
|
+
# @return [Hash] Returns the value in the form of hash
|
|
178
|
+
def _to_hash(value)
|
|
179
|
+
if value.is_a?(Array)
|
|
180
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
181
|
+
elsif value.is_a?(Hash)
|
|
182
|
+
{}.tap do |hash|
|
|
183
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
184
|
+
end
|
|
185
|
+
elsif value.respond_to? :to_hash
|
|
186
|
+
value.to_hash
|
|
187
|
+
else
|
|
188
|
+
value
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
end
|
|
@@ -0,0 +1,288 @@
|
|
|
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 CreateSmtpTemplate
|
|
18
|
+
# Tag of the template
|
|
19
|
+
attr_accessor :tag
|
|
20
|
+
|
|
21
|
+
attr_accessor :sender
|
|
22
|
+
|
|
23
|
+
# Name of the template
|
|
24
|
+
attr_accessor :template_name
|
|
25
|
+
|
|
26
|
+
# Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty
|
|
27
|
+
attr_accessor :html_content
|
|
28
|
+
|
|
29
|
+
# Url which contents the body of the email message. REQUIRED if htmlContent is empty
|
|
30
|
+
attr_accessor :html_url
|
|
31
|
+
|
|
32
|
+
# Subject of the template
|
|
33
|
+
attr_accessor :subject
|
|
34
|
+
|
|
35
|
+
# Email on which campaign recipients will be able to reply to
|
|
36
|
+
attr_accessor :reply_to
|
|
37
|
+
|
|
38
|
+
# This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [FNAME] [LNAME]. To use the contact attributes here, these must already exist in SendinBlue account
|
|
39
|
+
attr_accessor :to_field
|
|
40
|
+
|
|
41
|
+
# Absolute url of the attachment (no local file). Extensions allowed xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff and rtf
|
|
42
|
+
attr_accessor :attachment_url
|
|
43
|
+
|
|
44
|
+
# Status of template. isActive = true means template is active and isActive = false means template is inactive
|
|
45
|
+
attr_accessor :is_active
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
|
+
def self.attribute_map
|
|
50
|
+
{
|
|
51
|
+
:'tag' => :'tag',
|
|
52
|
+
:'sender' => :'sender',
|
|
53
|
+
:'template_name' => :'templateName',
|
|
54
|
+
:'html_content' => :'htmlContent',
|
|
55
|
+
:'html_url' => :'htmlUrl',
|
|
56
|
+
:'subject' => :'subject',
|
|
57
|
+
:'reply_to' => :'replyTo',
|
|
58
|
+
:'to_field' => :'toField',
|
|
59
|
+
:'attachment_url' => :'attachmentUrl',
|
|
60
|
+
:'is_active' => :'isActive'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Attribute type mapping.
|
|
65
|
+
def self.swagger_types
|
|
66
|
+
{
|
|
67
|
+
:'tag' => :'String',
|
|
68
|
+
:'sender' => :'CreateSmtpTemplateSender',
|
|
69
|
+
:'template_name' => :'String',
|
|
70
|
+
:'html_content' => :'String',
|
|
71
|
+
:'html_url' => :'String',
|
|
72
|
+
:'subject' => :'String',
|
|
73
|
+
:'reply_to' => :'String',
|
|
74
|
+
:'to_field' => :'String',
|
|
75
|
+
:'attachment_url' => :'String',
|
|
76
|
+
:'is_active' => :'BOOLEAN'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
return unless attributes.is_a?(Hash)
|
|
84
|
+
|
|
85
|
+
# convert string to symbol for hash key
|
|
86
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
87
|
+
|
|
88
|
+
if attributes.has_key?(:'tag')
|
|
89
|
+
self.tag = attributes[:'tag']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.has_key?(:'sender')
|
|
93
|
+
self.sender = attributes[:'sender']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.has_key?(:'templateName')
|
|
97
|
+
self.template_name = attributes[:'templateName']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.has_key?(:'htmlContent')
|
|
101
|
+
self.html_content = attributes[:'htmlContent']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.has_key?(:'htmlUrl')
|
|
105
|
+
self.html_url = attributes[:'htmlUrl']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.has_key?(:'subject')
|
|
109
|
+
self.subject = attributes[:'subject']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.has_key?(:'replyTo')
|
|
113
|
+
self.reply_to = attributes[:'replyTo']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.has_key?(:'toField')
|
|
117
|
+
self.to_field = attributes[:'toField']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.has_key?(:'attachmentUrl')
|
|
121
|
+
self.attachment_url = attributes[:'attachmentUrl']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.has_key?(:'isActive')
|
|
125
|
+
self.is_active = attributes[:'isActive']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
131
|
+
# @return Array for valid properies with the reasons
|
|
132
|
+
def list_invalid_properties
|
|
133
|
+
invalid_properties = Array.new
|
|
134
|
+
if @template_name.nil?
|
|
135
|
+
invalid_properties.push("invalid value for 'template_name', template_name cannot be nil.")
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @subject.nil?
|
|
139
|
+
invalid_properties.push("invalid value for 'subject', subject cannot be nil.")
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
return invalid_properties
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Check to see if the all the properties in the model are valid
|
|
146
|
+
# @return true if the model is valid
|
|
147
|
+
def valid?
|
|
148
|
+
return false if @template_name.nil?
|
|
149
|
+
return false if @subject.nil?
|
|
150
|
+
return true
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Checks equality by comparing each attribute.
|
|
154
|
+
# @param [Object] Object to be compared
|
|
155
|
+
def ==(o)
|
|
156
|
+
return true if self.equal?(o)
|
|
157
|
+
self.class == o.class &&
|
|
158
|
+
tag == o.tag &&
|
|
159
|
+
sender == o.sender &&
|
|
160
|
+
template_name == o.template_name &&
|
|
161
|
+
html_content == o.html_content &&
|
|
162
|
+
html_url == o.html_url &&
|
|
163
|
+
subject == o.subject &&
|
|
164
|
+
reply_to == o.reply_to &&
|
|
165
|
+
to_field == o.to_field &&
|
|
166
|
+
attachment_url == o.attachment_url &&
|
|
167
|
+
is_active == o.is_active
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @see the `==` method
|
|
171
|
+
# @param [Object] Object to be compared
|
|
172
|
+
def eql?(o)
|
|
173
|
+
self == o
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Calculates hash code according to all attributes.
|
|
177
|
+
# @return [Fixnum] Hash code
|
|
178
|
+
def hash
|
|
179
|
+
[tag, sender, template_name, html_content, html_url, subject, reply_to, to_field, attachment_url, is_active].hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Builds the object from hash
|
|
183
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
184
|
+
# @return [Object] Returns the model itself
|
|
185
|
+
def build_from_hash(attributes)
|
|
186
|
+
return nil unless attributes.is_a?(Hash)
|
|
187
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
188
|
+
if type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
192
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
195
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
196
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
self
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Deserializes the data based on type
|
|
203
|
+
# @param string type Data type
|
|
204
|
+
# @param string value Value to be deserialized
|
|
205
|
+
# @return [Object] Deserialized data
|
|
206
|
+
def _deserialize(type, value)
|
|
207
|
+
case type.to_sym
|
|
208
|
+
when :DateTime
|
|
209
|
+
DateTime.parse(value)
|
|
210
|
+
when :Date
|
|
211
|
+
Date.parse(value)
|
|
212
|
+
when :String
|
|
213
|
+
value.to_s
|
|
214
|
+
when :Integer
|
|
215
|
+
value.to_i
|
|
216
|
+
when :Float
|
|
217
|
+
value.to_f
|
|
218
|
+
when :BOOLEAN
|
|
219
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
220
|
+
true
|
|
221
|
+
else
|
|
222
|
+
false
|
|
223
|
+
end
|
|
224
|
+
when :Object
|
|
225
|
+
# generic object (usually a Hash), return directly
|
|
226
|
+
value
|
|
227
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
228
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
229
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
230
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
231
|
+
k_type = Regexp.last_match[:k_type]
|
|
232
|
+
v_type = Regexp.last_match[:v_type]
|
|
233
|
+
{}.tap do |hash|
|
|
234
|
+
value.each do |k, v|
|
|
235
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
else # model
|
|
239
|
+
temp_model = SibApiV3Sdk.const_get(type).new
|
|
240
|
+
temp_model.build_from_hash(value)
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Returns the string representation of the object
|
|
245
|
+
# @return [String] String presentation of the object
|
|
246
|
+
def to_s
|
|
247
|
+
to_hash.to_s
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_body
|
|
253
|
+
to_hash
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Returns the object in the form of hash
|
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
|
258
|
+
def to_hash
|
|
259
|
+
hash = {}
|
|
260
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
261
|
+
value = self.send(attr)
|
|
262
|
+
next if value.nil?
|
|
263
|
+
hash[param] = _to_hash(value)
|
|
264
|
+
end
|
|
265
|
+
hash
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Outputs non-array value in the form of hash
|
|
269
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
270
|
+
# @param [Object] value Any valid value
|
|
271
|
+
# @return [Hash] Returns the value in the form of hash
|
|
272
|
+
def _to_hash(value)
|
|
273
|
+
if value.is_a?(Array)
|
|
274
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
275
|
+
elsif value.is_a?(Hash)
|
|
276
|
+
{}.tap do |hash|
|
|
277
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
278
|
+
end
|
|
279
|
+
elsif value.respond_to? :to_hash
|
|
280
|
+
value.to_hash
|
|
281
|
+
else
|
|
282
|
+
value
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
end
|