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,280 @@
|
|
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 TransactionalSMSApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Get all the SMS activity (unaggregated events)
|
24
|
+
#
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
27
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report
|
28
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report
|
29
|
+
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
30
|
+
# @option opts [Integer] :days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
|
31
|
+
# @option opts [String] :phone_number Filter the report for a specific phone number
|
32
|
+
# @option opts [String] :event Filter the report for specific events
|
33
|
+
# @option opts [String] :tags Filter the report for specific tags passed as a serialized urlencoded array
|
34
|
+
# @return [GetSmsEventReport]
|
35
|
+
def get_sms_events(opts = {})
|
36
|
+
data, _status_code, _headers = get_sms_events_with_http_info(opts)
|
37
|
+
return data
|
38
|
+
end
|
39
|
+
|
40
|
+
# Get all the SMS activity (unaggregated events)
|
41
|
+
#
|
42
|
+
# @param [Hash] opts the optional parameters
|
43
|
+
# @option opts [Integer] :limit Number of documents per page
|
44
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report
|
45
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report
|
46
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
47
|
+
# @option opts [Integer] :days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
|
48
|
+
# @option opts [String] :phone_number Filter the report for a specific phone number
|
49
|
+
# @option opts [String] :event Filter the report for specific events
|
50
|
+
# @option opts [String] :tags Filter the report for specific tags passed as a serialized urlencoded array
|
51
|
+
# @return [Array<(GetSmsEventReport, Fixnum, Hash)>] GetSmsEventReport data, response status code and response headers
|
52
|
+
def get_sms_events_with_http_info(opts = {})
|
53
|
+
if @api_client.config.debugging
|
54
|
+
@api_client.config.logger.debug "Calling API: TransactionalSMSApi.get_sms_events ..."
|
55
|
+
end
|
56
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
57
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalSMSApi.get_sms_events, must be smaller than or equal to 100.'
|
58
|
+
end
|
59
|
+
|
60
|
+
if @api_client.config.client_side_validation && opts[:'event'] && !['bounces', 'hardBounces', 'softBounces', 'delivered', 'sent', 'accepted', 'unsubscription', 'replies', 'blocked'].include?(opts[:'event'])
|
61
|
+
fail ArgumentError, 'invalid value for "event", must be one of bounces, hardBounces, softBounces, delivered, sent, accepted, unsubscription, replies, blocked'
|
62
|
+
end
|
63
|
+
# resource path
|
64
|
+
local_var_path = "/transactionalSMS/statistics/events"
|
65
|
+
|
66
|
+
# query parameters
|
67
|
+
query_params = {}
|
68
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
69
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
70
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
71
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
72
|
+
query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil?
|
73
|
+
query_params[:'phoneNumber'] = opts[:'phone_number'] if !opts[:'phone_number'].nil?
|
74
|
+
query_params[:'event'] = opts[:'event'] if !opts[:'event'].nil?
|
75
|
+
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
|
76
|
+
|
77
|
+
# header parameters
|
78
|
+
header_params = {}
|
79
|
+
# HTTP header 'Accept' (if needed)
|
80
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
81
|
+
# HTTP header 'Content-Type'
|
82
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
83
|
+
|
84
|
+
# form parameters
|
85
|
+
form_params = {}
|
86
|
+
|
87
|
+
# http body (model)
|
88
|
+
post_body = nil
|
89
|
+
auth_names = ['api-key']
|
90
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
91
|
+
:header_params => header_params,
|
92
|
+
:query_params => query_params,
|
93
|
+
:form_params => form_params,
|
94
|
+
:body => post_body,
|
95
|
+
:auth_names => auth_names,
|
96
|
+
:return_type => 'GetSmsEventReport')
|
97
|
+
if @api_client.config.debugging
|
98
|
+
@api_client.config.logger.debug "API called: TransactionalSMSApi#get_sms_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
99
|
+
end
|
100
|
+
return data, status_code, headers
|
101
|
+
end
|
102
|
+
|
103
|
+
# Get your SMS activity aggregated over a period of time
|
104
|
+
#
|
105
|
+
# @param [Hash] opts the optional parameters
|
106
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report
|
107
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report
|
108
|
+
# @option opts [Integer] :days Number of days in the past including today (positive integer). Not compatible with startDate and endDate
|
109
|
+
# @option opts [String] :tag Filter on a tag
|
110
|
+
# @return [GetTransacAggregatedSmsReport]
|
111
|
+
def get_transac_aggregated_sms_report(opts = {})
|
112
|
+
data, _status_code, _headers = get_transac_aggregated_sms_report_with_http_info(opts)
|
113
|
+
return data
|
114
|
+
end
|
115
|
+
|
116
|
+
# Get your SMS activity aggregated over a period of time
|
117
|
+
#
|
118
|
+
# @param [Hash] opts the optional parameters
|
119
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report
|
120
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report
|
121
|
+
# @option opts [Integer] :days Number of days in the past including today (positive integer). Not compatible with startDate and endDate
|
122
|
+
# @option opts [String] :tag Filter on a tag
|
123
|
+
# @return [Array<(GetTransacAggregatedSmsReport, Fixnum, Hash)>] GetTransacAggregatedSmsReport data, response status code and response headers
|
124
|
+
def get_transac_aggregated_sms_report_with_http_info(opts = {})
|
125
|
+
if @api_client.config.debugging
|
126
|
+
@api_client.config.logger.debug "Calling API: TransactionalSMSApi.get_transac_aggregated_sms_report ..."
|
127
|
+
end
|
128
|
+
# resource path
|
129
|
+
local_var_path = "/transactionalSMS/statistics/aggregatedReport"
|
130
|
+
|
131
|
+
# query parameters
|
132
|
+
query_params = {}
|
133
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
134
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
135
|
+
query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil?
|
136
|
+
query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
|
137
|
+
|
138
|
+
# header parameters
|
139
|
+
header_params = {}
|
140
|
+
# HTTP header 'Accept' (if needed)
|
141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
142
|
+
# HTTP header 'Content-Type'
|
143
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
144
|
+
|
145
|
+
# form parameters
|
146
|
+
form_params = {}
|
147
|
+
|
148
|
+
# http body (model)
|
149
|
+
post_body = nil
|
150
|
+
auth_names = ['api-key']
|
151
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
152
|
+
:header_params => header_params,
|
153
|
+
:query_params => query_params,
|
154
|
+
:form_params => form_params,
|
155
|
+
:body => post_body,
|
156
|
+
:auth_names => auth_names,
|
157
|
+
:return_type => 'GetTransacAggregatedSmsReport')
|
158
|
+
if @api_client.config.debugging
|
159
|
+
@api_client.config.logger.debug "API called: TransactionalSMSApi#get_transac_aggregated_sms_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
160
|
+
end
|
161
|
+
return data, status_code, headers
|
162
|
+
end
|
163
|
+
|
164
|
+
# Get your SMS activity aggregated per day
|
165
|
+
#
|
166
|
+
# @param [Hash] opts the optional parameters
|
167
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report
|
168
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report
|
169
|
+
# @option opts [Integer] :days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
|
170
|
+
# @option opts [String] :tag Filter on a tag
|
171
|
+
# @return [GetTransacSmsReport]
|
172
|
+
def get_transac_sms_report(opts = {})
|
173
|
+
data, _status_code, _headers = get_transac_sms_report_with_http_info(opts)
|
174
|
+
return data
|
175
|
+
end
|
176
|
+
|
177
|
+
# Get your SMS activity aggregated per day
|
178
|
+
#
|
179
|
+
# @param [Hash] opts the optional parameters
|
180
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report
|
181
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report
|
182
|
+
# @option opts [Integer] :days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
|
183
|
+
# @option opts [String] :tag Filter on a tag
|
184
|
+
# @return [Array<(GetTransacSmsReport, Fixnum, Hash)>] GetTransacSmsReport data, response status code and response headers
|
185
|
+
def get_transac_sms_report_with_http_info(opts = {})
|
186
|
+
if @api_client.config.debugging
|
187
|
+
@api_client.config.logger.debug "Calling API: TransactionalSMSApi.get_transac_sms_report ..."
|
188
|
+
end
|
189
|
+
# resource path
|
190
|
+
local_var_path = "/transactionalSMS/statistics/reports"
|
191
|
+
|
192
|
+
# query parameters
|
193
|
+
query_params = {}
|
194
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
195
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
196
|
+
query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil?
|
197
|
+
query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
|
198
|
+
|
199
|
+
# header parameters
|
200
|
+
header_params = {}
|
201
|
+
# HTTP header 'Accept' (if needed)
|
202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
203
|
+
# HTTP header 'Content-Type'
|
204
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
205
|
+
|
206
|
+
# form parameters
|
207
|
+
form_params = {}
|
208
|
+
|
209
|
+
# http body (model)
|
210
|
+
post_body = nil
|
211
|
+
auth_names = ['api-key']
|
212
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
213
|
+
:header_params => header_params,
|
214
|
+
:query_params => query_params,
|
215
|
+
:form_params => form_params,
|
216
|
+
:body => post_body,
|
217
|
+
:auth_names => auth_names,
|
218
|
+
:return_type => 'GetTransacSmsReport')
|
219
|
+
if @api_client.config.debugging
|
220
|
+
@api_client.config.logger.debug "API called: TransactionalSMSApi#get_transac_sms_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
221
|
+
end
|
222
|
+
return data, status_code, headers
|
223
|
+
end
|
224
|
+
|
225
|
+
# Send the SMS campaign to the specified mobile number
|
226
|
+
#
|
227
|
+
# @param send_transac_sms Values to send a transactional SMS
|
228
|
+
# @param [Hash] opts the optional parameters
|
229
|
+
# @return [SendSms]
|
230
|
+
def send_transac_sms(send_transac_sms, opts = {})
|
231
|
+
data, _status_code, _headers = send_transac_sms_with_http_info(send_transac_sms, opts)
|
232
|
+
return data
|
233
|
+
end
|
234
|
+
|
235
|
+
# Send the SMS campaign to the specified mobile number
|
236
|
+
#
|
237
|
+
# @param send_transac_sms Values to send a transactional SMS
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [Array<(SendSms, Fixnum, Hash)>] SendSms data, response status code and response headers
|
240
|
+
def send_transac_sms_with_http_info(send_transac_sms, opts = {})
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug "Calling API: TransactionalSMSApi.send_transac_sms ..."
|
243
|
+
end
|
244
|
+
# verify the required parameter 'send_transac_sms' is set
|
245
|
+
if @api_client.config.client_side_validation && send_transac_sms.nil?
|
246
|
+
fail ArgumentError, "Missing the required parameter 'send_transac_sms' when calling TransactionalSMSApi.send_transac_sms"
|
247
|
+
end
|
248
|
+
# resource path
|
249
|
+
local_var_path = "/transactionalSMS/sms"
|
250
|
+
|
251
|
+
# query parameters
|
252
|
+
query_params = {}
|
253
|
+
|
254
|
+
# header parameters
|
255
|
+
header_params = {}
|
256
|
+
# HTTP header 'Accept' (if needed)
|
257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
258
|
+
# HTTP header 'Content-Type'
|
259
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
260
|
+
|
261
|
+
# form parameters
|
262
|
+
form_params = {}
|
263
|
+
|
264
|
+
# http body (model)
|
265
|
+
post_body = @api_client.object_to_http_body(send_transac_sms)
|
266
|
+
auth_names = ['api-key']
|
267
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
268
|
+
:header_params => header_params,
|
269
|
+
:query_params => query_params,
|
270
|
+
:form_params => form_params,
|
271
|
+
:body => post_body,
|
272
|
+
:auth_names => auth_names,
|
273
|
+
:return_type => 'SendSms')
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug "API called: TransactionalSMSApi#send_transac_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
276
|
+
end
|
277
|
+
return data, status_code, headers
|
278
|
+
end
|
279
|
+
end
|
280
|
+
end
|
@@ -0,0 +1,302 @@
|
|
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 WebhooksApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create a webhook
|
24
|
+
#
|
25
|
+
# @param create_webhook Values to create a webhook
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [CreateModel]
|
28
|
+
def create_webhook(create_webhook, opts = {})
|
29
|
+
data, _status_code, _headers = create_webhook_with_http_info(create_webhook, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a webhook
|
34
|
+
#
|
35
|
+
# @param create_webhook Values to create a webhook
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
38
|
+
def create_webhook_with_http_info(create_webhook, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: WebhooksApi.create_webhook ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'create_webhook' is set
|
43
|
+
if @api_client.config.client_side_validation && create_webhook.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'create_webhook' when calling WebhooksApi.create_webhook"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/webhooks"
|
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_webhook)
|
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: WebhooksApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# Delete a webhook
|
79
|
+
#
|
80
|
+
# @param webhook_id Id of the webhook
|
81
|
+
# @param [Hash] opts the optional parameters
|
82
|
+
# @return [nil]
|
83
|
+
def delete_webhook(webhook_id, opts = {})
|
84
|
+
delete_webhook_with_http_info(webhook_id, opts)
|
85
|
+
return nil
|
86
|
+
end
|
87
|
+
|
88
|
+
# Delete a webhook
|
89
|
+
#
|
90
|
+
# @param webhook_id Id of the webhook
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
93
|
+
def delete_webhook_with_http_info(webhook_id, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug "Calling API: WebhooksApi.delete_webhook ..."
|
96
|
+
end
|
97
|
+
# verify the required parameter 'webhook_id' is set
|
98
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.delete_webhook"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = "/webhooks/{webhookId}".sub('{' + 'webhookId' + '}', webhook_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: WebhooksApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
128
|
+
end
|
129
|
+
return data, status_code, headers
|
130
|
+
end
|
131
|
+
|
132
|
+
# Get a webhook details
|
133
|
+
#
|
134
|
+
# @param webhook_id Id of the webhook
|
135
|
+
# @param [Hash] opts the optional parameters
|
136
|
+
# @return [GetWebhook]
|
137
|
+
def get_webhook(webhook_id, opts = {})
|
138
|
+
data, _status_code, _headers = get_webhook_with_http_info(webhook_id, opts)
|
139
|
+
return data
|
140
|
+
end
|
141
|
+
|
142
|
+
# Get a webhook details
|
143
|
+
#
|
144
|
+
# @param webhook_id Id of the webhook
|
145
|
+
# @param [Hash] opts the optional parameters
|
146
|
+
# @return [Array<(GetWebhook, Fixnum, Hash)>] GetWebhook data, response status code and response headers
|
147
|
+
def get_webhook_with_http_info(webhook_id, opts = {})
|
148
|
+
if @api_client.config.debugging
|
149
|
+
@api_client.config.logger.debug "Calling API: WebhooksApi.get_webhook ..."
|
150
|
+
end
|
151
|
+
# verify the required parameter 'webhook_id' is set
|
152
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
153
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.get_webhook"
|
154
|
+
end
|
155
|
+
# resource path
|
156
|
+
local_var_path = "/webhooks/{webhookId}".sub('{' + 'webhookId' + '}', webhook_id.to_s)
|
157
|
+
|
158
|
+
# query parameters
|
159
|
+
query_params = {}
|
160
|
+
|
161
|
+
# header parameters
|
162
|
+
header_params = {}
|
163
|
+
# HTTP header 'Accept' (if needed)
|
164
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
165
|
+
# HTTP header 'Content-Type'
|
166
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
167
|
+
|
168
|
+
# form parameters
|
169
|
+
form_params = {}
|
170
|
+
|
171
|
+
# http body (model)
|
172
|
+
post_body = nil
|
173
|
+
auth_names = ['api-key']
|
174
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
175
|
+
:header_params => header_params,
|
176
|
+
:query_params => query_params,
|
177
|
+
:form_params => form_params,
|
178
|
+
:body => post_body,
|
179
|
+
:auth_names => auth_names,
|
180
|
+
:return_type => 'GetWebhook')
|
181
|
+
if @api_client.config.debugging
|
182
|
+
@api_client.config.logger.debug "API called: WebhooksApi#get_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
183
|
+
end
|
184
|
+
return data, status_code, headers
|
185
|
+
end
|
186
|
+
|
187
|
+
# Get all webhooks
|
188
|
+
#
|
189
|
+
# @param [Hash] opts the optional parameters
|
190
|
+
# @option opts [String] :type Filter on webhook type (default to transactional)
|
191
|
+
# @return [GetWebhooks]
|
192
|
+
def get_webhooks(opts = {})
|
193
|
+
data, _status_code, _headers = get_webhooks_with_http_info(opts)
|
194
|
+
return data
|
195
|
+
end
|
196
|
+
|
197
|
+
# Get all webhooks
|
198
|
+
#
|
199
|
+
# @param [Hash] opts the optional parameters
|
200
|
+
# @option opts [String] :type Filter on webhook type
|
201
|
+
# @return [Array<(GetWebhooks, Fixnum, Hash)>] GetWebhooks data, response status code and response headers
|
202
|
+
def get_webhooks_with_http_info(opts = {})
|
203
|
+
if @api_client.config.debugging
|
204
|
+
@api_client.config.logger.debug "Calling API: WebhooksApi.get_webhooks ..."
|
205
|
+
end
|
206
|
+
if @api_client.config.client_side_validation && opts[:'type'] && !['marketing', 'transactional'].include?(opts[:'type'])
|
207
|
+
fail ArgumentError, 'invalid value for "type", must be one of marketing, transactional'
|
208
|
+
end
|
209
|
+
# resource path
|
210
|
+
local_var_path = "/webhooks"
|
211
|
+
|
212
|
+
# query parameters
|
213
|
+
query_params = {}
|
214
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
215
|
+
|
216
|
+
# header parameters
|
217
|
+
header_params = {}
|
218
|
+
# HTTP header 'Accept' (if needed)
|
219
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
220
|
+
# HTTP header 'Content-Type'
|
221
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
222
|
+
|
223
|
+
# form parameters
|
224
|
+
form_params = {}
|
225
|
+
|
226
|
+
# http body (model)
|
227
|
+
post_body = nil
|
228
|
+
auth_names = ['api-key']
|
229
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
230
|
+
:header_params => header_params,
|
231
|
+
:query_params => query_params,
|
232
|
+
:form_params => form_params,
|
233
|
+
:body => post_body,
|
234
|
+
:auth_names => auth_names,
|
235
|
+
:return_type => 'GetWebhooks')
|
236
|
+
if @api_client.config.debugging
|
237
|
+
@api_client.config.logger.debug "API called: WebhooksApi#get_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
238
|
+
end
|
239
|
+
return data, status_code, headers
|
240
|
+
end
|
241
|
+
|
242
|
+
# Update a webhook
|
243
|
+
#
|
244
|
+
# @param webhook_id Id of the webhook
|
245
|
+
# @param update_webhook Values to update a webhook
|
246
|
+
# @param [Hash] opts the optional parameters
|
247
|
+
# @return [nil]
|
248
|
+
def update_webhook(webhook_id, update_webhook, opts = {})
|
249
|
+
update_webhook_with_http_info(webhook_id, update_webhook, opts)
|
250
|
+
return nil
|
251
|
+
end
|
252
|
+
|
253
|
+
# Update a webhook
|
254
|
+
#
|
255
|
+
# @param webhook_id Id of the webhook
|
256
|
+
# @param update_webhook Values to update a webhook
|
257
|
+
# @param [Hash] opts the optional parameters
|
258
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
259
|
+
def update_webhook_with_http_info(webhook_id, update_webhook, opts = {})
|
260
|
+
if @api_client.config.debugging
|
261
|
+
@api_client.config.logger.debug "Calling API: WebhooksApi.update_webhook ..."
|
262
|
+
end
|
263
|
+
# verify the required parameter 'webhook_id' is set
|
264
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
265
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.update_webhook"
|
266
|
+
end
|
267
|
+
# verify the required parameter 'update_webhook' is set
|
268
|
+
if @api_client.config.client_side_validation && update_webhook.nil?
|
269
|
+
fail ArgumentError, "Missing the required parameter 'update_webhook' when calling WebhooksApi.update_webhook"
|
270
|
+
end
|
271
|
+
# resource path
|
272
|
+
local_var_path = "/webhooks/{webhookId}".sub('{' + 'webhookId' + '}', webhook_id.to_s)
|
273
|
+
|
274
|
+
# query parameters
|
275
|
+
query_params = {}
|
276
|
+
|
277
|
+
# header parameters
|
278
|
+
header_params = {}
|
279
|
+
# HTTP header 'Accept' (if needed)
|
280
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
281
|
+
# HTTP header 'Content-Type'
|
282
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
283
|
+
|
284
|
+
# form parameters
|
285
|
+
form_params = {}
|
286
|
+
|
287
|
+
# http body (model)
|
288
|
+
post_body = @api_client.object_to_http_body(update_webhook)
|
289
|
+
auth_names = ['api-key']
|
290
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
291
|
+
:header_params => header_params,
|
292
|
+
:query_params => query_params,
|
293
|
+
:form_params => form_params,
|
294
|
+
:body => post_body,
|
295
|
+
:auth_names => auth_names)
|
296
|
+
if @api_client.config.debugging
|
297
|
+
@api_client.config.logger.debug "API called: WebhooksApi#update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
298
|
+
end
|
299
|
+
return data, status_code, headers
|
300
|
+
end
|
301
|
+
end
|
302
|
+
end
|