sib-api-v3-sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,343 @@
|
|
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 "uri"
|
14
|
+
|
15
|
+
module SibApiV3Sdk
|
16
|
+
class SendersApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create a new sender
|
24
|
+
#
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [CreateSender] :sender sender's name
|
27
|
+
# @return [CreateSenderModel]
|
28
|
+
def create_sender(opts = {})
|
29
|
+
data, _status_code, _headers = create_sender_with_http_info(opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a new sender
|
34
|
+
#
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [CreateSender] :sender sender's name
|
37
|
+
# @return [Array<(CreateSenderModel, Fixnum, Hash)>] CreateSenderModel data, response status code and response headers
|
38
|
+
def create_sender_with_http_info(opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: SendersApi.create_sender ..."
|
41
|
+
end
|
42
|
+
# resource path
|
43
|
+
local_var_path = "/senders"
|
44
|
+
|
45
|
+
# query parameters
|
46
|
+
query_params = {}
|
47
|
+
|
48
|
+
# header parameters
|
49
|
+
header_params = {}
|
50
|
+
# HTTP header 'Accept' (if needed)
|
51
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
52
|
+
# HTTP header 'Content-Type'
|
53
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
54
|
+
|
55
|
+
# form parameters
|
56
|
+
form_params = {}
|
57
|
+
|
58
|
+
# http body (model)
|
59
|
+
post_body = @api_client.object_to_http_body(opts[:'sender'])
|
60
|
+
auth_names = ['api-key']
|
61
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
62
|
+
:header_params => header_params,
|
63
|
+
:query_params => query_params,
|
64
|
+
:form_params => form_params,
|
65
|
+
:body => post_body,
|
66
|
+
:auth_names => auth_names,
|
67
|
+
:return_type => 'CreateSenderModel')
|
68
|
+
if @api_client.config.debugging
|
69
|
+
@api_client.config.logger.debug "API called: SendersApi#create_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
70
|
+
end
|
71
|
+
return data, status_code, headers
|
72
|
+
end
|
73
|
+
|
74
|
+
# Delete a sender
|
75
|
+
#
|
76
|
+
# @param sender_id Id of the sender
|
77
|
+
# @param [Hash] opts the optional parameters
|
78
|
+
# @return [nil]
|
79
|
+
def delete_sender(sender_id, opts = {})
|
80
|
+
delete_sender_with_http_info(sender_id, opts)
|
81
|
+
return nil
|
82
|
+
end
|
83
|
+
|
84
|
+
# Delete a sender
|
85
|
+
#
|
86
|
+
# @param sender_id Id of the sender
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
89
|
+
def delete_sender_with_http_info(sender_id, opts = {})
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug "Calling API: SendersApi.delete_sender ..."
|
92
|
+
end
|
93
|
+
# verify the required parameter 'sender_id' is set
|
94
|
+
if @api_client.config.client_side_validation && sender_id.nil?
|
95
|
+
fail ArgumentError, "Missing the required parameter 'sender_id' when calling SendersApi.delete_sender"
|
96
|
+
end
|
97
|
+
# resource path
|
98
|
+
local_var_path = "/senders/{senderId}".sub('{' + 'senderId' + '}', sender_id.to_s)
|
99
|
+
|
100
|
+
# query parameters
|
101
|
+
query_params = {}
|
102
|
+
|
103
|
+
# header parameters
|
104
|
+
header_params = {}
|
105
|
+
# HTTP header 'Accept' (if needed)
|
106
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
107
|
+
# HTTP header 'Content-Type'
|
108
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
109
|
+
|
110
|
+
# form parameters
|
111
|
+
form_params = {}
|
112
|
+
|
113
|
+
# http body (model)
|
114
|
+
post_body = nil
|
115
|
+
auth_names = ['api-key']
|
116
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
117
|
+
:header_params => header_params,
|
118
|
+
:query_params => query_params,
|
119
|
+
:form_params => form_params,
|
120
|
+
:body => post_body,
|
121
|
+
:auth_names => auth_names)
|
122
|
+
if @api_client.config.debugging
|
123
|
+
@api_client.config.logger.debug "API called: SendersApi#delete_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
124
|
+
end
|
125
|
+
return data, status_code, headers
|
126
|
+
end
|
127
|
+
|
128
|
+
# Return all the dedicated IPs for your account
|
129
|
+
#
|
130
|
+
# @param [Hash] opts the optional parameters
|
131
|
+
# @return [GetIps]
|
132
|
+
def get_ips(opts = {})
|
133
|
+
data, _status_code, _headers = get_ips_with_http_info(opts)
|
134
|
+
return data
|
135
|
+
end
|
136
|
+
|
137
|
+
# Return all the dedicated IPs for your account
|
138
|
+
#
|
139
|
+
# @param [Hash] opts the optional parameters
|
140
|
+
# @return [Array<(GetIps, Fixnum, Hash)>] GetIps data, response status code and response headers
|
141
|
+
def get_ips_with_http_info(opts = {})
|
142
|
+
if @api_client.config.debugging
|
143
|
+
@api_client.config.logger.debug "Calling API: SendersApi.get_ips ..."
|
144
|
+
end
|
145
|
+
# resource path
|
146
|
+
local_var_path = "/senders/ips"
|
147
|
+
|
148
|
+
# query parameters
|
149
|
+
query_params = {}
|
150
|
+
|
151
|
+
# header parameters
|
152
|
+
header_params = {}
|
153
|
+
# HTTP header 'Accept' (if needed)
|
154
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
155
|
+
# HTTP header 'Content-Type'
|
156
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
157
|
+
|
158
|
+
# form parameters
|
159
|
+
form_params = {}
|
160
|
+
|
161
|
+
# http body (model)
|
162
|
+
post_body = nil
|
163
|
+
auth_names = ['api-key']
|
164
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
165
|
+
:header_params => header_params,
|
166
|
+
:query_params => query_params,
|
167
|
+
:form_params => form_params,
|
168
|
+
:body => post_body,
|
169
|
+
:auth_names => auth_names,
|
170
|
+
:return_type => 'GetIps')
|
171
|
+
if @api_client.config.debugging
|
172
|
+
@api_client.config.logger.debug "API called: SendersApi#get_ips\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
173
|
+
end
|
174
|
+
return data, status_code, headers
|
175
|
+
end
|
176
|
+
|
177
|
+
# Return all the dedicated IPs for a sender
|
178
|
+
#
|
179
|
+
# @param sender_id Id of the sender
|
180
|
+
# @param [Hash] opts the optional parameters
|
181
|
+
# @return [GetIpsFromSender]
|
182
|
+
def get_ips_from_sender(sender_id, opts = {})
|
183
|
+
data, _status_code, _headers = get_ips_from_sender_with_http_info(sender_id, opts)
|
184
|
+
return data
|
185
|
+
end
|
186
|
+
|
187
|
+
# Return all the dedicated IPs for a sender
|
188
|
+
#
|
189
|
+
# @param sender_id Id of the sender
|
190
|
+
# @param [Hash] opts the optional parameters
|
191
|
+
# @return [Array<(GetIpsFromSender, Fixnum, Hash)>] GetIpsFromSender data, response status code and response headers
|
192
|
+
def get_ips_from_sender_with_http_info(sender_id, opts = {})
|
193
|
+
if @api_client.config.debugging
|
194
|
+
@api_client.config.logger.debug "Calling API: SendersApi.get_ips_from_sender ..."
|
195
|
+
end
|
196
|
+
# verify the required parameter 'sender_id' is set
|
197
|
+
if @api_client.config.client_side_validation && sender_id.nil?
|
198
|
+
fail ArgumentError, "Missing the required parameter 'sender_id' when calling SendersApi.get_ips_from_sender"
|
199
|
+
end
|
200
|
+
# resource path
|
201
|
+
local_var_path = "/senders/{senderId}/ips".sub('{' + 'senderId' + '}', sender_id.to_s)
|
202
|
+
|
203
|
+
# query parameters
|
204
|
+
query_params = {}
|
205
|
+
|
206
|
+
# header parameters
|
207
|
+
header_params = {}
|
208
|
+
# HTTP header 'Accept' (if needed)
|
209
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
210
|
+
# HTTP header 'Content-Type'
|
211
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
212
|
+
|
213
|
+
# form parameters
|
214
|
+
form_params = {}
|
215
|
+
|
216
|
+
# http body (model)
|
217
|
+
post_body = nil
|
218
|
+
auth_names = ['api-key']
|
219
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
220
|
+
:header_params => header_params,
|
221
|
+
:query_params => query_params,
|
222
|
+
:form_params => form_params,
|
223
|
+
:body => post_body,
|
224
|
+
:auth_names => auth_names,
|
225
|
+
:return_type => 'GetIpsFromSender')
|
226
|
+
if @api_client.config.debugging
|
227
|
+
@api_client.config.logger.debug "API called: SendersApi#get_ips_from_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
228
|
+
end
|
229
|
+
return data, status_code, headers
|
230
|
+
end
|
231
|
+
|
232
|
+
# Get the list of all your senders
|
233
|
+
#
|
234
|
+
# @param [Hash] opts the optional parameters
|
235
|
+
# @option opts [String] :ip Filter your senders for a specific ip (available for dedicated IP usage only)
|
236
|
+
# @option opts [String] :domain Filter your senders for a specific domain
|
237
|
+
# @return [GetSendersList]
|
238
|
+
def get_senders(opts = {})
|
239
|
+
data, _status_code, _headers = get_senders_with_http_info(opts)
|
240
|
+
return data
|
241
|
+
end
|
242
|
+
|
243
|
+
# Get the list of all your senders
|
244
|
+
#
|
245
|
+
# @param [Hash] opts the optional parameters
|
246
|
+
# @option opts [String] :ip Filter your senders for a specific ip (available for dedicated IP usage only)
|
247
|
+
# @option opts [String] :domain Filter your senders for a specific domain
|
248
|
+
# @return [Array<(GetSendersList, Fixnum, Hash)>] GetSendersList data, response status code and response headers
|
249
|
+
def get_senders_with_http_info(opts = {})
|
250
|
+
if @api_client.config.debugging
|
251
|
+
@api_client.config.logger.debug "Calling API: SendersApi.get_senders ..."
|
252
|
+
end
|
253
|
+
# resource path
|
254
|
+
local_var_path = "/senders"
|
255
|
+
|
256
|
+
# query parameters
|
257
|
+
query_params = {}
|
258
|
+
query_params[:'ip'] = opts[:'ip'] if !opts[:'ip'].nil?
|
259
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
260
|
+
|
261
|
+
# header parameters
|
262
|
+
header_params = {}
|
263
|
+
# HTTP header 'Accept' (if needed)
|
264
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
265
|
+
# HTTP header 'Content-Type'
|
266
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
267
|
+
|
268
|
+
# form parameters
|
269
|
+
form_params = {}
|
270
|
+
|
271
|
+
# http body (model)
|
272
|
+
post_body = nil
|
273
|
+
auth_names = ['api-key']
|
274
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
275
|
+
:header_params => header_params,
|
276
|
+
:query_params => query_params,
|
277
|
+
:form_params => form_params,
|
278
|
+
:body => post_body,
|
279
|
+
:auth_names => auth_names,
|
280
|
+
:return_type => 'GetSendersList')
|
281
|
+
if @api_client.config.debugging
|
282
|
+
@api_client.config.logger.debug "API called: SendersApi#get_senders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
283
|
+
end
|
284
|
+
return data, status_code, headers
|
285
|
+
end
|
286
|
+
|
287
|
+
# Update a sender
|
288
|
+
#
|
289
|
+
# @param sender_id Id of the sender
|
290
|
+
# @param [Hash] opts the optional parameters
|
291
|
+
# @option opts [UpdateSender] :sender sender's name
|
292
|
+
# @return [nil]
|
293
|
+
def update_sender(sender_id, opts = {})
|
294
|
+
update_sender_with_http_info(sender_id, opts)
|
295
|
+
return nil
|
296
|
+
end
|
297
|
+
|
298
|
+
# Update a sender
|
299
|
+
#
|
300
|
+
# @param sender_id Id of the sender
|
301
|
+
# @param [Hash] opts the optional parameters
|
302
|
+
# @option opts [UpdateSender] :sender sender's name
|
303
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
304
|
+
def update_sender_with_http_info(sender_id, opts = {})
|
305
|
+
if @api_client.config.debugging
|
306
|
+
@api_client.config.logger.debug "Calling API: SendersApi.update_sender ..."
|
307
|
+
end
|
308
|
+
# verify the required parameter 'sender_id' is set
|
309
|
+
if @api_client.config.client_side_validation && sender_id.nil?
|
310
|
+
fail ArgumentError, "Missing the required parameter 'sender_id' when calling SendersApi.update_sender"
|
311
|
+
end
|
312
|
+
# resource path
|
313
|
+
local_var_path = "/senders/{senderId}".sub('{' + 'senderId' + '}', sender_id.to_s)
|
314
|
+
|
315
|
+
# query parameters
|
316
|
+
query_params = {}
|
317
|
+
|
318
|
+
# header parameters
|
319
|
+
header_params = {}
|
320
|
+
# HTTP header 'Accept' (if needed)
|
321
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
322
|
+
# HTTP header 'Content-Type'
|
323
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
324
|
+
|
325
|
+
# form parameters
|
326
|
+
form_params = {}
|
327
|
+
|
328
|
+
# http body (model)
|
329
|
+
post_body = @api_client.object_to_http_body(opts[:'sender'])
|
330
|
+
auth_names = ['api-key']
|
331
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
332
|
+
:header_params => header_params,
|
333
|
+
:query_params => query_params,
|
334
|
+
:form_params => form_params,
|
335
|
+
:body => post_body,
|
336
|
+
:auth_names => auth_names)
|
337
|
+
if @api_client.config.debugging
|
338
|
+
@api_client.config.logger.debug "API called: SendersApi#update_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
339
|
+
end
|
340
|
+
return data, status_code, headers
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|
@@ -0,0 +1,609 @@
|
|
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 "uri"
|
14
|
+
|
15
|
+
module SibApiV3Sdk
|
16
|
+
class SMSCampaignsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Creates a SMS campaign
|
24
|
+
#
|
25
|
+
# @param create_sms_campaign Values to create an SMS Campaign
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [CreateModel]
|
28
|
+
def create_sms_campaign(create_sms_campaign, opts = {})
|
29
|
+
data, _status_code, _headers = create_sms_campaign_with_http_info(create_sms_campaign, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Creates a SMS campaign
|
34
|
+
#
|
35
|
+
# @param create_sms_campaign Values to create an SMS Campaign
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
38
|
+
def create_sms_campaign_with_http_info(create_sms_campaign, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.create_sms_campaign ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'create_sms_campaign' is set
|
43
|
+
if @api_client.config.client_side_validation && create_sms_campaign.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'create_sms_campaign' when calling SMSCampaignsApi.create_sms_campaign"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/smsCampaigns"
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = @api_client.object_to_http_body(create_sms_campaign)
|
64
|
+
auth_names = ['api-key']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'CreateModel')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#create_sms_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# Delete the SMS campaign
|
79
|
+
#
|
80
|
+
# @param campaign_id id of the SMS campaign
|
81
|
+
# @param [Hash] opts the optional parameters
|
82
|
+
# @return [nil]
|
83
|
+
def delete_sms_campaigns(campaign_id, opts = {})
|
84
|
+
delete_sms_campaigns_with_http_info(campaign_id, opts)
|
85
|
+
return nil
|
86
|
+
end
|
87
|
+
|
88
|
+
# Delete the SMS campaign
|
89
|
+
#
|
90
|
+
# @param campaign_id id of the SMS campaign
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
93
|
+
def delete_sms_campaigns_with_http_info(campaign_id, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.delete_sms_campaigns ..."
|
96
|
+
end
|
97
|
+
# verify the required parameter 'campaign_id' is set
|
98
|
+
if @api_client.config.client_side_validation && campaign_id.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling SMSCampaignsApi.delete_sms_campaigns"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = "/smsCampaigns/{campaignId}".sub('{' + 'campaignId' + '}', campaign_id.to_s)
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = {}
|
109
|
+
# HTTP header 'Accept' (if needed)
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
111
|
+
# HTTP header 'Content-Type'
|
112
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
113
|
+
|
114
|
+
# form parameters
|
115
|
+
form_params = {}
|
116
|
+
|
117
|
+
# http body (model)
|
118
|
+
post_body = nil
|
119
|
+
auth_names = ['api-key']
|
120
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names)
|
126
|
+
if @api_client.config.debugging
|
127
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#delete_sms_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
128
|
+
end
|
129
|
+
return data, status_code, headers
|
130
|
+
end
|
131
|
+
|
132
|
+
# Get a SMS campaign
|
133
|
+
#
|
134
|
+
# @param campaign_id id of the SMS campaign
|
135
|
+
# @param get_sms_campaign Values to update an SMS Campaign
|
136
|
+
# @param [Hash] opts the optional parameters
|
137
|
+
# @return [GetSmsCampaign]
|
138
|
+
def get_sms_campaign(campaign_id, get_sms_campaign, opts = {})
|
139
|
+
data, _status_code, _headers = get_sms_campaign_with_http_info(campaign_id, get_sms_campaign, opts)
|
140
|
+
return data
|
141
|
+
end
|
142
|
+
|
143
|
+
# Get a SMS campaign
|
144
|
+
#
|
145
|
+
# @param campaign_id id of the SMS campaign
|
146
|
+
# @param get_sms_campaign Values to update an SMS Campaign
|
147
|
+
# @param [Hash] opts the optional parameters
|
148
|
+
# @return [Array<(GetSmsCampaign, Fixnum, Hash)>] GetSmsCampaign data, response status code and response headers
|
149
|
+
def get_sms_campaign_with_http_info(campaign_id, get_sms_campaign, opts = {})
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.get_sms_campaign ..."
|
152
|
+
end
|
153
|
+
# verify the required parameter 'campaign_id' is set
|
154
|
+
if @api_client.config.client_side_validation && campaign_id.nil?
|
155
|
+
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling SMSCampaignsApi.get_sms_campaign"
|
156
|
+
end
|
157
|
+
# verify the required parameter 'get_sms_campaign' is set
|
158
|
+
if @api_client.config.client_side_validation && get_sms_campaign.nil?
|
159
|
+
fail ArgumentError, "Missing the required parameter 'get_sms_campaign' when calling SMSCampaignsApi.get_sms_campaign"
|
160
|
+
end
|
161
|
+
# resource path
|
162
|
+
local_var_path = "/smsCampaigns/{campaignId}".sub('{' + 'campaignId' + '}', campaign_id.to_s)
|
163
|
+
|
164
|
+
# query parameters
|
165
|
+
query_params = {}
|
166
|
+
|
167
|
+
# header parameters
|
168
|
+
header_params = {}
|
169
|
+
# HTTP header 'Accept' (if needed)
|
170
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
171
|
+
# HTTP header 'Content-Type'
|
172
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
173
|
+
|
174
|
+
# form parameters
|
175
|
+
form_params = {}
|
176
|
+
|
177
|
+
# http body (model)
|
178
|
+
post_body = @api_client.object_to_http_body(get_sms_campaign)
|
179
|
+
auth_names = ['api-key']
|
180
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
181
|
+
:header_params => header_params,
|
182
|
+
:query_params => query_params,
|
183
|
+
:form_params => form_params,
|
184
|
+
:body => post_body,
|
185
|
+
:auth_names => auth_names,
|
186
|
+
:return_type => 'GetSmsCampaign')
|
187
|
+
if @api_client.config.debugging
|
188
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#get_sms_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
189
|
+
end
|
190
|
+
return data, status_code, headers
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the informations for all your created SMS campaigns
|
194
|
+
#
|
195
|
+
# @param [Hash] opts the optional parameters
|
196
|
+
# @option opts [String] :status Status of campaign.
|
197
|
+
# @option opts [Integer] :limit Number limitation for the result returned (default to 500)
|
198
|
+
# @option opts [Integer] :offset Beginning point in the list to retrieve from. (default to 0)
|
199
|
+
# @return [GetSmsCampaigns]
|
200
|
+
def get_sms_campaigns(opts = {})
|
201
|
+
data, _status_code, _headers = get_sms_campaigns_with_http_info(opts)
|
202
|
+
return data
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the informations for all your created SMS campaigns
|
206
|
+
#
|
207
|
+
# @param [Hash] opts the optional parameters
|
208
|
+
# @option opts [String] :status Status of campaign.
|
209
|
+
# @option opts [Integer] :limit Number limitation for the result returned
|
210
|
+
# @option opts [Integer] :offset Beginning point in the list to retrieve from.
|
211
|
+
# @return [Array<(GetSmsCampaigns, Fixnum, Hash)>] GetSmsCampaigns data, response status code and response headers
|
212
|
+
def get_sms_campaigns_with_http_info(opts = {})
|
213
|
+
if @api_client.config.debugging
|
214
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.get_sms_campaigns ..."
|
215
|
+
end
|
216
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !['suspended', 'archived', 'darchived', 'sent', 'queued', 'replicate', 'draft', 'inProcess'].include?(opts[:'status'])
|
217
|
+
fail ArgumentError, 'invalid value for "status", must be one of suspended, archived, darchived, sent, queued, replicate, draft, inProcess'
|
218
|
+
end
|
219
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
220
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSCampaignsApi.get_sms_campaigns, must be smaller than or equal to 1000.'
|
221
|
+
end
|
222
|
+
|
223
|
+
# resource path
|
224
|
+
local_var_path = "/smsCampaigns"
|
225
|
+
|
226
|
+
# query parameters
|
227
|
+
query_params = {}
|
228
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
229
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
230
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
231
|
+
|
232
|
+
# header parameters
|
233
|
+
header_params = {}
|
234
|
+
# HTTP header 'Accept' (if needed)
|
235
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
236
|
+
# HTTP header 'Content-Type'
|
237
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
238
|
+
|
239
|
+
# form parameters
|
240
|
+
form_params = {}
|
241
|
+
|
242
|
+
# http body (model)
|
243
|
+
post_body = nil
|
244
|
+
auth_names = ['api-key']
|
245
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
246
|
+
:header_params => header_params,
|
247
|
+
:query_params => query_params,
|
248
|
+
:form_params => form_params,
|
249
|
+
:body => post_body,
|
250
|
+
:auth_names => auth_names,
|
251
|
+
:return_type => 'GetSmsCampaigns')
|
252
|
+
if @api_client.config.debugging
|
253
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#get_sms_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
254
|
+
end
|
255
|
+
return data, status_code, headers
|
256
|
+
end
|
257
|
+
|
258
|
+
# Exports the recipients of the specified campaign.
|
259
|
+
# It returns the background process ID which on completion calls the notify URL that you have set in the input.
|
260
|
+
# @param campaign_id id of the campaign
|
261
|
+
# @param [Hash] opts the optional parameters
|
262
|
+
# @option opts [RequestSMSRecipientExport] :recipient_export Values to send for a recipient export request
|
263
|
+
# @return [CreatedProcessId]
|
264
|
+
def request_sms_recipient_export(campaign_id, opts = {})
|
265
|
+
data, _status_code, _headers = request_sms_recipient_export_with_http_info(campaign_id, opts)
|
266
|
+
return data
|
267
|
+
end
|
268
|
+
|
269
|
+
# Exports the recipients of the specified campaign.
|
270
|
+
# It returns the background process ID which on completion calls the notify URL that you have set in the input.
|
271
|
+
# @param campaign_id id of the campaign
|
272
|
+
# @param [Hash] opts the optional parameters
|
273
|
+
# @option opts [RequestSMSRecipientExport] :recipient_export Values to send for a recipient export request
|
274
|
+
# @return [Array<(CreatedProcessId, Fixnum, Hash)>] CreatedProcessId data, response status code and response headers
|
275
|
+
def request_sms_recipient_export_with_http_info(campaign_id, opts = {})
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.request_sms_recipient_export ..."
|
278
|
+
end
|
279
|
+
# verify the required parameter 'campaign_id' is set
|
280
|
+
if @api_client.config.client_side_validation && campaign_id.nil?
|
281
|
+
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling SMSCampaignsApi.request_sms_recipient_export"
|
282
|
+
end
|
283
|
+
# resource path
|
284
|
+
local_var_path = "/smsCampaigns/{campaignId}/exportRecipients".sub('{' + 'campaignId' + '}', campaign_id.to_s)
|
285
|
+
|
286
|
+
# query parameters
|
287
|
+
query_params = {}
|
288
|
+
|
289
|
+
# header parameters
|
290
|
+
header_params = {}
|
291
|
+
# HTTP header 'Accept' (if needed)
|
292
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
293
|
+
# HTTP header 'Content-Type'
|
294
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
295
|
+
|
296
|
+
# form parameters
|
297
|
+
form_params = {}
|
298
|
+
|
299
|
+
# http body (model)
|
300
|
+
post_body = @api_client.object_to_http_body(opts[:'recipient_export'])
|
301
|
+
auth_names = ['api-key']
|
302
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
303
|
+
:header_params => header_params,
|
304
|
+
:query_params => query_params,
|
305
|
+
:form_params => form_params,
|
306
|
+
:body => post_body,
|
307
|
+
:auth_names => auth_names,
|
308
|
+
:return_type => 'CreatedProcessId')
|
309
|
+
if @api_client.config.debugging
|
310
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#request_sms_recipient_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
311
|
+
end
|
312
|
+
return data, status_code, headers
|
313
|
+
end
|
314
|
+
|
315
|
+
# Send your SMS campaign immediately
|
316
|
+
#
|
317
|
+
# @param campaign_id id of the campaign
|
318
|
+
# @param [Hash] opts the optional parameters
|
319
|
+
# @return [nil]
|
320
|
+
def send_sms_campaign_now(campaign_id, opts = {})
|
321
|
+
send_sms_campaign_now_with_http_info(campaign_id, opts)
|
322
|
+
return nil
|
323
|
+
end
|
324
|
+
|
325
|
+
# Send your SMS campaign immediately
|
326
|
+
#
|
327
|
+
# @param campaign_id id of the campaign
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
330
|
+
def send_sms_campaign_now_with_http_info(campaign_id, opts = {})
|
331
|
+
if @api_client.config.debugging
|
332
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.send_sms_campaign_now ..."
|
333
|
+
end
|
334
|
+
# verify the required parameter 'campaign_id' is set
|
335
|
+
if @api_client.config.client_side_validation && campaign_id.nil?
|
336
|
+
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling SMSCampaignsApi.send_sms_campaign_now"
|
337
|
+
end
|
338
|
+
# resource path
|
339
|
+
local_var_path = "/smsCampaigns/{campaignId}/sendNow".sub('{' + 'campaignId' + '}', campaign_id.to_s)
|
340
|
+
|
341
|
+
# query parameters
|
342
|
+
query_params = {}
|
343
|
+
|
344
|
+
# header parameters
|
345
|
+
header_params = {}
|
346
|
+
# HTTP header 'Accept' (if needed)
|
347
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
348
|
+
# HTTP header 'Content-Type'
|
349
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
350
|
+
|
351
|
+
# form parameters
|
352
|
+
form_params = {}
|
353
|
+
|
354
|
+
# http body (model)
|
355
|
+
post_body = nil
|
356
|
+
auth_names = ['api-key']
|
357
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
358
|
+
:header_params => header_params,
|
359
|
+
:query_params => query_params,
|
360
|
+
:form_params => form_params,
|
361
|
+
:body => post_body,
|
362
|
+
:auth_names => auth_names)
|
363
|
+
if @api_client.config.debugging
|
364
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#send_sms_campaign_now\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
365
|
+
end
|
366
|
+
return data, status_code, headers
|
367
|
+
end
|
368
|
+
|
369
|
+
# Send report of SMS campaigns
|
370
|
+
# Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.
|
371
|
+
# @param campaign_id id of the campaign
|
372
|
+
# @param send_report Values for send a report
|
373
|
+
# @param [Hash] opts the optional parameters
|
374
|
+
# @return [nil]
|
375
|
+
def send_sms_report(campaign_id, send_report, opts = {})
|
376
|
+
send_sms_report_with_http_info(campaign_id, send_report, opts)
|
377
|
+
return nil
|
378
|
+
end
|
379
|
+
|
380
|
+
# Send report of SMS campaigns
|
381
|
+
# Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.
|
382
|
+
# @param campaign_id id of the campaign
|
383
|
+
# @param send_report Values for send a report
|
384
|
+
# @param [Hash] opts the optional parameters
|
385
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
386
|
+
def send_sms_report_with_http_info(campaign_id, send_report, opts = {})
|
387
|
+
if @api_client.config.debugging
|
388
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.send_sms_report ..."
|
389
|
+
end
|
390
|
+
# verify the required parameter 'campaign_id' is set
|
391
|
+
if @api_client.config.client_side_validation && campaign_id.nil?
|
392
|
+
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling SMSCampaignsApi.send_sms_report"
|
393
|
+
end
|
394
|
+
# verify the required parameter 'send_report' is set
|
395
|
+
if @api_client.config.client_side_validation && send_report.nil?
|
396
|
+
fail ArgumentError, "Missing the required parameter 'send_report' when calling SMSCampaignsApi.send_sms_report"
|
397
|
+
end
|
398
|
+
# resource path
|
399
|
+
local_var_path = "/smsCampaigns/{campaignId}/sendReport".sub('{' + 'campaignId' + '}', campaign_id.to_s)
|
400
|
+
|
401
|
+
# query parameters
|
402
|
+
query_params = {}
|
403
|
+
|
404
|
+
# header parameters
|
405
|
+
header_params = {}
|
406
|
+
# HTTP header 'Accept' (if needed)
|
407
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
408
|
+
# HTTP header 'Content-Type'
|
409
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
410
|
+
|
411
|
+
# form parameters
|
412
|
+
form_params = {}
|
413
|
+
|
414
|
+
# http body (model)
|
415
|
+
post_body = @api_client.object_to_http_body(send_report)
|
416
|
+
auth_names = ['api-key']
|
417
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
418
|
+
:header_params => header_params,
|
419
|
+
:query_params => query_params,
|
420
|
+
:form_params => form_params,
|
421
|
+
:body => post_body,
|
422
|
+
:auth_names => auth_names)
|
423
|
+
if @api_client.config.debugging
|
424
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#send_sms_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
425
|
+
end
|
426
|
+
return data, status_code, headers
|
427
|
+
end
|
428
|
+
|
429
|
+
# Send an SMS
|
430
|
+
#
|
431
|
+
# @param campaign_id Id of the SMS campaign
|
432
|
+
# @param send_test_sms Mobile number to which send the test
|
433
|
+
# @param [Hash] opts the optional parameters
|
434
|
+
# @return [nil]
|
435
|
+
def send_test_sms(campaign_id, send_test_sms, opts = {})
|
436
|
+
send_test_sms_with_http_info(campaign_id, send_test_sms, opts)
|
437
|
+
return nil
|
438
|
+
end
|
439
|
+
|
440
|
+
# Send an SMS
|
441
|
+
#
|
442
|
+
# @param campaign_id Id of the SMS campaign
|
443
|
+
# @param send_test_sms Mobile number to which send the test
|
444
|
+
# @param [Hash] opts the optional parameters
|
445
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
446
|
+
def send_test_sms_with_http_info(campaign_id, send_test_sms, opts = {})
|
447
|
+
if @api_client.config.debugging
|
448
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.send_test_sms ..."
|
449
|
+
end
|
450
|
+
# verify the required parameter 'campaign_id' is set
|
451
|
+
if @api_client.config.client_side_validation && campaign_id.nil?
|
452
|
+
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling SMSCampaignsApi.send_test_sms"
|
453
|
+
end
|
454
|
+
# verify the required parameter 'send_test_sms' is set
|
455
|
+
if @api_client.config.client_side_validation && send_test_sms.nil?
|
456
|
+
fail ArgumentError, "Missing the required parameter 'send_test_sms' when calling SMSCampaignsApi.send_test_sms"
|
457
|
+
end
|
458
|
+
# resource path
|
459
|
+
local_var_path = "/smsCampaigns/{campaignId}/sendTest".sub('{' + 'campaignId' + '}', campaign_id.to_s)
|
460
|
+
|
461
|
+
# query parameters
|
462
|
+
query_params = {}
|
463
|
+
|
464
|
+
# header parameters
|
465
|
+
header_params = {}
|
466
|
+
# HTTP header 'Accept' (if needed)
|
467
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
468
|
+
# HTTP header 'Content-Type'
|
469
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
470
|
+
|
471
|
+
# form parameters
|
472
|
+
form_params = {}
|
473
|
+
|
474
|
+
# http body (model)
|
475
|
+
post_body = @api_client.object_to_http_body(send_test_sms)
|
476
|
+
auth_names = ['api-key']
|
477
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
478
|
+
:header_params => header_params,
|
479
|
+
:query_params => query_params,
|
480
|
+
:form_params => form_params,
|
481
|
+
:body => post_body,
|
482
|
+
:auth_names => auth_names)
|
483
|
+
if @api_client.config.debugging
|
484
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#send_test_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
485
|
+
end
|
486
|
+
return data, status_code, headers
|
487
|
+
end
|
488
|
+
|
489
|
+
# Updates a SMS campaign
|
490
|
+
#
|
491
|
+
# @param campaign_id id of the SMS campaign
|
492
|
+
# @param update_sms_campaign Values to update an SMS Campaign
|
493
|
+
# @param [Hash] opts the optional parameters
|
494
|
+
# @return [nil]
|
495
|
+
def update_sms_campaign(campaign_id, update_sms_campaign, opts = {})
|
496
|
+
update_sms_campaign_with_http_info(campaign_id, update_sms_campaign, opts)
|
497
|
+
return nil
|
498
|
+
end
|
499
|
+
|
500
|
+
# Updates a SMS campaign
|
501
|
+
#
|
502
|
+
# @param campaign_id id of the SMS campaign
|
503
|
+
# @param update_sms_campaign Values to update an SMS Campaign
|
504
|
+
# @param [Hash] opts the optional parameters
|
505
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
506
|
+
def update_sms_campaign_with_http_info(campaign_id, update_sms_campaign, opts = {})
|
507
|
+
if @api_client.config.debugging
|
508
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.update_sms_campaign ..."
|
509
|
+
end
|
510
|
+
# verify the required parameter 'campaign_id' is set
|
511
|
+
if @api_client.config.client_side_validation && campaign_id.nil?
|
512
|
+
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling SMSCampaignsApi.update_sms_campaign"
|
513
|
+
end
|
514
|
+
# verify the required parameter 'update_sms_campaign' is set
|
515
|
+
if @api_client.config.client_side_validation && update_sms_campaign.nil?
|
516
|
+
fail ArgumentError, "Missing the required parameter 'update_sms_campaign' when calling SMSCampaignsApi.update_sms_campaign"
|
517
|
+
end
|
518
|
+
# resource path
|
519
|
+
local_var_path = "/smsCampaigns/{campaignId}".sub('{' + 'campaignId' + '}', campaign_id.to_s)
|
520
|
+
|
521
|
+
# query parameters
|
522
|
+
query_params = {}
|
523
|
+
|
524
|
+
# header parameters
|
525
|
+
header_params = {}
|
526
|
+
# HTTP header 'Accept' (if needed)
|
527
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
528
|
+
# HTTP header 'Content-Type'
|
529
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
530
|
+
|
531
|
+
# form parameters
|
532
|
+
form_params = {}
|
533
|
+
|
534
|
+
# http body (model)
|
535
|
+
post_body = @api_client.object_to_http_body(update_sms_campaign)
|
536
|
+
auth_names = ['api-key']
|
537
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
538
|
+
:header_params => header_params,
|
539
|
+
:query_params => query_params,
|
540
|
+
:form_params => form_params,
|
541
|
+
:body => post_body,
|
542
|
+
:auth_names => auth_names)
|
543
|
+
if @api_client.config.debugging
|
544
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#update_sms_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
545
|
+
end
|
546
|
+
return data, status_code, headers
|
547
|
+
end
|
548
|
+
|
549
|
+
# Update the campaign status
|
550
|
+
#
|
551
|
+
# @param campaign_id id of the campaign
|
552
|
+
# @param status Status of the campaign.
|
553
|
+
# @param [Hash] opts the optional parameters
|
554
|
+
# @return [nil]
|
555
|
+
def update_sms_campaign_status(campaign_id, status, opts = {})
|
556
|
+
update_sms_campaign_status_with_http_info(campaign_id, status, opts)
|
557
|
+
return nil
|
558
|
+
end
|
559
|
+
|
560
|
+
# Update the campaign status
|
561
|
+
#
|
562
|
+
# @param campaign_id id of the campaign
|
563
|
+
# @param status Status of the campaign.
|
564
|
+
# @param [Hash] opts the optional parameters
|
565
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
566
|
+
def update_sms_campaign_status_with_http_info(campaign_id, status, opts = {})
|
567
|
+
if @api_client.config.debugging
|
568
|
+
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.update_sms_campaign_status ..."
|
569
|
+
end
|
570
|
+
# verify the required parameter 'campaign_id' is set
|
571
|
+
if @api_client.config.client_side_validation && campaign_id.nil?
|
572
|
+
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling SMSCampaignsApi.update_sms_campaign_status"
|
573
|
+
end
|
574
|
+
# verify the required parameter 'status' is set
|
575
|
+
if @api_client.config.client_side_validation && status.nil?
|
576
|
+
fail ArgumentError, "Missing the required parameter 'status' when calling SMSCampaignsApi.update_sms_campaign_status"
|
577
|
+
end
|
578
|
+
# resource path
|
579
|
+
local_var_path = "/smsCampaigns/{campaignId}/status".sub('{' + 'campaignId' + '}', campaign_id.to_s)
|
580
|
+
|
581
|
+
# query parameters
|
582
|
+
query_params = {}
|
583
|
+
|
584
|
+
# header parameters
|
585
|
+
header_params = {}
|
586
|
+
# HTTP header 'Accept' (if needed)
|
587
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
588
|
+
# HTTP header 'Content-Type'
|
589
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
590
|
+
|
591
|
+
# form parameters
|
592
|
+
form_params = {}
|
593
|
+
|
594
|
+
# http body (model)
|
595
|
+
post_body = @api_client.object_to_http_body(status)
|
596
|
+
auth_names = ['api-key']
|
597
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
598
|
+
:header_params => header_params,
|
599
|
+
:query_params => query_params,
|
600
|
+
:form_params => form_params,
|
601
|
+
:body => post_body,
|
602
|
+
:auth_names => auth_names)
|
603
|
+
if @api_client.config.debugging
|
604
|
+
@api_client.config.logger.debug "API called: SMSCampaignsApi#update_sms_campaign_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
605
|
+
end
|
606
|
+
return data, status_code, headers
|
607
|
+
end
|
608
|
+
end
|
609
|
+
end
|