sib-api-v3-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/LICENSE.md +21 -0
- data/README.md +349 -0
- data/Rakefile +8 -0
- data/docs/AccountApi.md +55 -0
- data/docs/AddCredits.md +9 -0
- data/docs/AddRemoveContactToList.md +8 -0
- data/docs/AttributesApi.md +160 -0
- data/docs/ContactsApi.md +1310 -0
- data/docs/CreaUpdateFolder.md +8 -0
- data/docs/CreateAttribute.md +12 -0
- data/docs/CreateAttributeEnumemaration.md +9 -0
- data/docs/CreateChild.md +12 -0
- data/docs/CreateContact.md +12 -0
- data/docs/CreateEmailCampaign.md +25 -0
- data/docs/CreateEmailCampaignRecipients.md +9 -0
- data/docs/CreateEmailCampaignSender.md +9 -0
- data/docs/CreateList.md +9 -0
- data/docs/CreateModel.md +8 -0
- data/docs/CreateSender.md +10 -0
- data/docs/CreateSenderIps.md +10 -0
- data/docs/CreateSenderModel.md +10 -0
- data/docs/CreateSmsCampaign.md +12 -0
- data/docs/CreateSmsCampaignRecipients.md +9 -0
- data/docs/CreateSmtpEmail.md +8 -0
- data/docs/CreateSmtpTemplate.md +17 -0
- data/docs/CreateSmtpTemplateSender.md +9 -0
- data/docs/CreateWebhook.md +11 -0
- data/docs/CreatedProcessId.md +8 -0
- data/docs/DeleteHardbounces.md +10 -0
- data/docs/EmailCampaignsApi.md +557 -0
- data/docs/EmailExportRecipients.md +9 -0
- data/docs/ErrorModel.md +9 -0
- data/docs/FoldersApi.md +336 -0
- data/docs/GetAccount.md +15 -0
- data/docs/GetAccountMarketingAutomation.md +9 -0
- data/docs/GetAccountPlan.md +10 -0
- data/docs/GetAccountRelay.md +9 -0
- data/docs/GetAccountRelayData.md +10 -0
- data/docs/GetAggregatedReport.md +19 -0
- data/docs/GetAttributes.md +8 -0
- data/docs/GetAttributesAttributes.md +13 -0
- data/docs/GetAttributesEnumeration.md +9 -0
- data/docs/GetCampaignOverview.md +13 -0
- data/docs/GetCampaignRecipients.md +9 -0
- data/docs/GetCampaignRecipientsExclusionLists.md +9 -0
- data/docs/GetCampaignRecipientsLists.md +9 -0
- data/docs/GetCampaignStats.md +19 -0
- data/docs/GetChildInfo.md +16 -0
- data/docs/GetChildInfoApiKeys.md +10 -0
- data/docs/GetChildInfoCredits.md +9 -0
- data/docs/GetChildInfoIps.md +9 -0
- data/docs/GetChildInfoStatistics.md +10 -0
- data/docs/GetChildrenList.md +8 -0
- data/docs/GetClient.md +11 -0
- data/docs/GetContactCampaignStats.md +15 -0
- data/docs/GetContactCampaignStatsClicked.md +9 -0
- data/docs/GetContactCampaignStatsLinks.md +11 -0
- data/docs/GetContactCampaignStatsMessagesSent.md +9 -0
- data/docs/GetContactCampaignStatsOpened.md +11 -0
- data/docs/GetContactCampaignStatsTransacAttributes.md +10 -0
- data/docs/GetContactCampaignStatsUnsubscriptions.md +9 -0
- data/docs/GetContactCampaignStatsUnsubscriptionsAdminUnsubscription.md +9 -0
- data/docs/GetContactCampaignStatsUnsubscriptionsUserUnsubscription.md +10 -0
- data/docs/GetContactDetails.md +15 -0
- data/docs/GetContacts.md +9 -0
- data/docs/GetEmailCampaign.md +27 -0
- data/docs/GetEmailCampaigns.md +9 -0
- data/docs/GetEmailEventReport.md +8 -0
- data/docs/GetEmailEventReportEvents.md +14 -0
- data/docs/GetExtendedCampaignOverview.md +27 -0
- data/docs/GetExtendedCampaignOverviewSender.md +9 -0
- data/docs/GetExtendedCampaignStats.md +12 -0
- data/docs/GetExtendedCampaignStatsLinksStats.md +8 -0
- data/docs/GetExtendedClient.md +12 -0
- data/docs/GetExtendedClientAddress.md +11 -0
- data/docs/GetExtendedContactDetails.md +15 -0
- data/docs/GetExtendedList.md +15 -0
- data/docs/GetExtendedListCampaignStats.md +9 -0
- data/docs/GetFolder.md +12 -0
- data/docs/GetFolderLists.md +9 -0
- data/docs/GetFolders.md +9 -0
- data/docs/GetIp.md +11 -0
- data/docs/GetIpFromSender.md +11 -0
- data/docs/GetIps.md +8 -0
- data/docs/GetIpsFromSender.md +8 -0
- data/docs/GetList.md +11 -0
- data/docs/GetLists.md +9 -0
- data/docs/GetListsFolder.md +9 -0
- data/docs/GetListsLists.md +8 -0
- data/docs/GetProcess.md +11 -0
- data/docs/GetProcesses.md +9 -0
- data/docs/GetReports.md +8 -0
- data/docs/GetReportsReports.md +20 -0
- data/docs/GetSendersList.md +8 -0
- data/docs/GetSendersListIps.md +10 -0
- data/docs/GetSendersListSenders.md +12 -0
- data/docs/GetSmsCampaign.md +16 -0
- data/docs/GetSmsCampaignOverview.md +16 -0
- data/docs/GetSmsCampaignStats.md +14 -0
- data/docs/GetSmsCampaigns.md +9 -0
- data/docs/GetSmsEventReport.md +8 -0
- data/docs/GetSmsEventReportEvents.md +14 -0
- data/docs/GetSmtpTemplateOverview.md +19 -0
- data/docs/GetSmtpTemplateOverviewSender.md +9 -0
- data/docs/GetSmtpTemplates.md +9 -0
- data/docs/GetStatsByDomain.md +7 -0
- data/docs/GetTransacAggregatedSmsReport.md +17 -0
- data/docs/GetTransacSmsReport.md +8 -0
- data/docs/GetTransacSmsReportReports.md +18 -0
- data/docs/GetWebhook.md +14 -0
- data/docs/GetWebhooks.md +8 -0
- data/docs/ListsApi.md +509 -0
- data/docs/ManageIp.md +8 -0
- data/docs/PostContactInfo.md +8 -0
- data/docs/PostContactInfoContacts.md +9 -0
- data/docs/PostSendFailed.md +12 -0
- data/docs/PostSendSmsTestFailed.md +11 -0
- data/docs/ProcessApi.md +117 -0
- data/docs/RemainingCreditModel.md +9 -0
- data/docs/RemainingCreditModelChild.md +9 -0
- data/docs/RemainingCreditModelReseller.md +9 -0
- data/docs/RemoveCredits.md +9 -0
- data/docs/RequestContactExport.md +10 -0
- data/docs/RequestContactImport.md +12 -0
- data/docs/RequestContactImportNewList.md +9 -0
- data/docs/RequestSMSRecipientExport.md +9 -0
- data/docs/ResellerApi.md +491 -0
- data/docs/SMSCampaignsApi.md +560 -0
- data/docs/SMTPApi.md +642 -0
- data/docs/SendEmail.md +15 -0
- data/docs/SendEmailAttachment.md +9 -0
- data/docs/SendReport.md +9 -0
- data/docs/SendReportEmail.md +13 -0
- data/docs/SendSms.md +8 -0
- data/docs/SendSmtpEmail.md +17 -0
- data/docs/SendSmtpEmailAttachment.md +10 -0
- data/docs/SendSmtpEmailBcc.md +9 -0
- data/docs/SendSmtpEmailCc.md +9 -0
- data/docs/SendSmtpEmailReplyTo.md +9 -0
- data/docs/SendSmtpEmailSender.md +9 -0
- data/docs/SendSmtpEmailTo.md +9 -0
- data/docs/SendTemplateEmail.md +8 -0
- data/docs/SendTestEmail.md +8 -0
- data/docs/SendTestSms.md +8 -0
- data/docs/SendTransacSms.md +12 -0
- data/docs/SendersApi.md +326 -0
- data/docs/TransactionalSMSApi.md +249 -0
- data/docs/UpdateCampaignStatus.md +8 -0
- data/docs/UpdateChild.md +13 -0
- data/docs/UpdateContact.md +12 -0
- data/docs/UpdateEmailCampaign.md +24 -0
- data/docs/UpdateEmailCampaignRecipients.md +9 -0
- data/docs/UpdateEmailCampaignSender.md +9 -0
- data/docs/UpdateList.md +9 -0
- data/docs/UpdateSender.md +10 -0
- data/docs/UpdateSmsCampaign.md +12 -0
- data/docs/UpdateSmtpTemplate.md +17 -0
- data/docs/UpdateSmtpTemplateSender.md +9 -0
- data/docs/UpdateWebhook.md +10 -0
- data/docs/WebhooksApi.md +275 -0
- data/git_push.sh +55 -0
- data/lib/sib-api-v3-sdk.rb +196 -0
- data/lib/sib-api-v3-sdk/api/account_api.rb +72 -0
- data/lib/sib-api-v3-sdk/api/attributes_api.rb +181 -0
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +1408 -0
- data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +609 -0
- data/lib/sib-api-v3-sdk/api/folders_api.rb +379 -0
- data/lib/sib-api-v3-sdk/api/lists_api.rb +565 -0
- data/lib/sib-api-v3-sdk/api/process_api.rb +137 -0
- data/lib/sib-api-v3-sdk/api/reseller_api.rb +534 -0
- data/lib/sib-api-v3-sdk/api/senders_api.rb +343 -0
- data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +609 -0
- data/lib/sib-api-v3-sdk/api/smtp_api.rb +699 -0
- data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +280 -0
- data/lib/sib-api-v3-sdk/api/webhooks_api.rb +302 -0
- data/lib/sib-api-v3-sdk/api_client.rb +389 -0
- data/lib/sib-api-v3-sdk/api_error.rb +38 -0
- data/lib/sib-api-v3-sdk/configuration.rb +209 -0
- data/lib/sib-api-v3-sdk/models/add_credits.rb +199 -0
- data/lib/sib-api-v3-sdk/models/add_remove_contact_to_list.rb +191 -0
- data/lib/sib-api-v3-sdk/models/crea_update_folder.rb +189 -0
- data/lib/sib-api-v3-sdk/models/create_attribute.rb +291 -0
- data/lib/sib-api-v3-sdk/models/create_attribute_enumemaration.rb +199 -0
- data/lib/sib-api-v3-sdk/models/create_child.rb +254 -0
- data/lib/sib-api-v3-sdk/models/create_contact.rb +231 -0
- data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +425 -0
- data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +203 -0
- data/lib/sib-api-v3-sdk/models/create_email_campaign_sender.rb +204 -0
- data/lib/sib-api-v3-sdk/models/create_list.rb +209 -0
- data/lib/sib-api-v3-sdk/models/create_model.rb +194 -0
- data/lib/sib-api-v3-sdk/models/create_sender.rb +221 -0
- data/lib/sib-api-v3-sdk/models/create_sender_ips.rb +244 -0
- data/lib/sib-api-v3-sdk/models/create_sender_model.rb +214 -0
- data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +273 -0
- data/lib/sib-api-v3-sdk/models/create_sms_campaign_recipients.rb +213 -0
- data/lib/sib-api-v3-sdk/models/create_smtp_email.rb +194 -0
- data/lib/sib-api-v3-sdk/models/create_smtp_template.rb +288 -0
- data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +204 -0
- data/lib/sib-api-v3-sdk/models/create_webhook.rb +261 -0
- data/lib/sib-api-v3-sdk/models/created_process_id.rb +194 -0
- data/lib/sib-api-v3-sdk/models/delete_hardbounces.rb +209 -0
- data/lib/sib-api-v3-sdk/models/email_export_recipients.rb +237 -0
- data/lib/sib-api-v3-sdk/models/error_model.rb +242 -0
- data/lib/sib-api-v3-sdk/models/get_account.rb +283 -0
- data/lib/sib-api-v3-sdk/models/get_account_marketing_automation.rb +204 -0
- data/lib/sib-api-v3-sdk/models/get_account_plan.rb +269 -0
- data/lib/sib-api-v3-sdk/models/get_account_relay.rb +203 -0
- data/lib/sib-api-v3-sdk/models/get_account_relay_data.rb +224 -0
- data/lib/sib-api-v3-sdk/models/get_aggregated_report.rb +359 -0
- data/lib/sib-api-v3-sdk/models/get_attributes.rb +196 -0
- data/lib/sib-api-v3-sdk/models/get_attributes_attributes.rb +301 -0
- data/lib/sib-api-v3-sdk/models/get_attributes_enumeration.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_overview.rb +325 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_recipients.rb +213 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_recipients_exclusion_lists.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_recipients_lists.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +359 -0
- data/lib/sib-api-v3-sdk/models/get_child_info.rb +296 -0
- data/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb +219 -0
- data/lib/sib-api-v3-sdk/models/get_child_info_credits.rb +199 -0
- data/lib/sib-api-v3-sdk/models/get_child_info_ips.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_child_info_statistics.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_children_list.rb +191 -0
- data/lib/sib-api-v3-sdk/models/get_client.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +265 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_clicked.rb +210 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_links.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_messages_sent.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_opened.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_transac_attributes.rb +224 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions.rb +213 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions_admin_unsubscription.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions_user_unsubscription.rb +224 -0
- data/lib/sib-api-v3-sdk/models/get_contact_details.rb +316 -0
- data/lib/sib-api-v3-sdk/models/get_contacts.rb +210 -0
- data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +552 -0
- data/lib/sib-api-v3-sdk/models/get_email_campaigns.rb +205 -0
- data/lib/sib-api-v3-sdk/models/get_email_event_report.rb +190 -0
- data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +312 -0
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +552 -0
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview_sender.rb +199 -0
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats.rb +255 -0
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats_links_stats.rb +194 -0
- data/lib/sib-api-v3-sdk/models/get_extended_client.rb +248 -0
- data/lib/sib-api-v3-sdk/models/get_extended_client_address.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +316 -0
- data/lib/sib-api-v3-sdk/models/get_extended_list.rb +309 -0
- data/lib/sib-api-v3-sdk/models/get_extended_list_campaign_stats.rb +208 -0
- data/lib/sib-api-v3-sdk/models/get_folder.rb +254 -0
- data/lib/sib-api-v3-sdk/models/get_folder_lists.rb +210 -0
- data/lib/sib-api-v3-sdk/models/get_folders.rb +200 -0
- data/lib/sib-api-v3-sdk/models/get_ip.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_ip_from_sender.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_ips.rb +196 -0
- data/lib/sib-api-v3-sdk/models/get_ips_from_sender.rb +196 -0
- data/lib/sib-api-v3-sdk/models/get_list.rb +239 -0
- data/lib/sib-api-v3-sdk/models/get_lists.rb +211 -0
- data/lib/sib-api-v3-sdk/models/get_lists_folder.rb +209 -0
- data/lib/sib-api-v3-sdk/models/get_lists_lists.rb +188 -0
- data/lib/sib-api-v3-sdk/models/get_process.rb +267 -0
- data/lib/sib-api-v3-sdk/models/get_processes.rb +206 -0
- data/lib/sib-api-v3-sdk/models/get_reports.rb +190 -0
- data/lib/sib-api-v3-sdk/models/get_reports_reports.rb +374 -0
- data/lib/sib-api-v3-sdk/models/get_senders_list.rb +191 -0
- data/lib/sib-api-v3-sdk/models/get_senders_list_ips.rb +224 -0
- data/lib/sib-api-v3-sdk/models/get_senders_list_senders.rb +251 -0
- data/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +404 -0
- data/lib/sib-api-v3-sdk/models/get_sms_campaign_overview.rb +404 -0
- data/lib/sib-api-v3-sdk/models/get_sms_campaign_stats.rb +284 -0
- data/lib/sib-api-v3-sdk/models/get_sms_campaigns.rb +205 -0
- data/lib/sib-api-v3-sdk/models/get_sms_event_report.rb +190 -0
- data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +311 -0
- data/lib/sib-api-v3-sdk/models/get_smtp_template_overview.rb +391 -0
- data/lib/sib-api-v3-sdk/models/get_smtp_template_overview_sender.rb +199 -0
- data/lib/sib-api-v3-sdk/models/get_smtp_templates.rb +200 -0
- data/lib/sib-api-v3-sdk/models/get_stats_by_domain.rb +179 -0
- data/lib/sib-api-v3-sdk/models/get_transac_aggregated_sms_report.rb +329 -0
- data/lib/sib-api-v3-sdk/models/get_transac_sms_report.rb +190 -0
- data/lib/sib-api-v3-sdk/models/get_transac_sms_report_reports.rb +344 -0
- data/lib/sib-api-v3-sdk/models/get_webhook.rb +356 -0
- data/lib/sib-api-v3-sdk/models/get_webhooks.rb +195 -0
- data/lib/sib-api-v3-sdk/models/manage_ip.rb +189 -0
- data/lib/sib-api-v3-sdk/models/post_contact_info.rb +188 -0
- data/lib/sib-api-v3-sdk/models/post_contact_info_contacts.rb +206 -0
- data/lib/sib-api-v3-sdk/models/post_send_failed.rb +242 -0
- data/lib/sib-api-v3-sdk/models/post_send_sms_test_failed.rb +231 -0
- data/lib/sib-api-v3-sdk/models/remaining_credit_model.rb +197 -0
- data/lib/sib-api-v3-sdk/models/remaining_credit_model_child.rb +209 -0
- data/lib/sib-api-v3-sdk/models/remaining_credit_model_reseller.rb +209 -0
- data/lib/sib-api-v3-sdk/models/remove_credits.rb +199 -0
- data/lib/sib-api-v3-sdk/models/request_contact_export.rb +216 -0
- data/lib/sib-api-v3-sdk/models/request_contact_import.rb +230 -0
- data/lib/sib-api-v3-sdk/models/request_contact_import_new_list.rb +199 -0
- data/lib/sib-api-v3-sdk/models/request_sms_recipient_export.rb +239 -0
- data/lib/sib-api-v3-sdk/models/send_email.rb +274 -0
- data/lib/sib-api-v3-sdk/models/send_email_attachment.rb +215 -0
- data/lib/sib-api-v3-sdk/models/send_report.rb +233 -0
- data/lib/sib-api-v3-sdk/models/send_report_email.rb +278 -0
- data/lib/sib-api-v3-sdk/models/send_sms.rb +193 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +301 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_attachment.rb +225 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_bcc.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_cc.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_reply_to.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email_to.rb +204 -0
- data/lib/sib-api-v3-sdk/models/send_template_email.rb +194 -0
- data/lib/sib-api-v3-sdk/models/send_test_email.rb +191 -0
- data/lib/sib-api-v3-sdk/models/send_test_sms.rb +191 -0
- data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +282 -0
- data/lib/sib-api-v3-sdk/models/update_campaign_status.rb +221 -0
- data/lib/sib-api-v3-sdk/models/update_child.rb +240 -0
- data/lib/sib-api-v3-sdk/models/update_contact.rb +234 -0
- data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +367 -0
- data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +203 -0
- data/lib/sib-api-v3-sdk/models/update_email_campaign_sender.rb +199 -0
- data/lib/sib-api-v3-sdk/models/update_list.rb +199 -0
- data/lib/sib-api-v3-sdk/models/update_sender.rb +211 -0
- data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +260 -0
- data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +278 -0
- data/lib/sib-api-v3-sdk/models/update_smtp_template_sender.rb +199 -0
- data/lib/sib-api-v3-sdk/models/update_webhook.rb +211 -0
- data/lib/sib-api-v3-sdk/version.rb +15 -0
- data/sib-api-v3-sdk.gemspec +45 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/attributes_api_spec.rb +70 -0
- data/spec/api/contacts_api_spec.rb +335 -0
- data/spec/api/email_campaigns_api_spec.rb +163 -0
- data/spec/api/folders_api_spec.rb +111 -0
- data/spec/api/lists_api_spec.rb +152 -0
- data/spec/api/process_api_spec.rb +60 -0
- data/spec/api/reseller_api_spec.rb +147 -0
- data/spec/api/senders_api_spec.rb +108 -0
- data/spec/api/sms_campaigns_api_spec.rb +163 -0
- data/spec/api/smtp_api_spec.rb +189 -0
- data/spec/api/transactional_sms_api_spec.rb +96 -0
- data/spec/api/webhooks_api_spec.rb +96 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/add_credits_spec.rb +48 -0
- data/spec/models/add_remove_contact_to_list_spec.rb +42 -0
- data/spec/models/crea_update_folder_spec.rb +42 -0
- data/spec/models/create_attribute_enumemaration_spec.rb +48 -0
- data/spec/models/create_attribute_spec.rb +74 -0
- data/spec/models/create_child_spec.rb +66 -0
- data/spec/models/create_contact_spec.rb +66 -0
- data/spec/models/create_email_campaign_recipients_spec.rb +48 -0
- data/spec/models/create_email_campaign_sender_spec.rb +48 -0
- data/spec/models/create_email_campaign_spec.rb +148 -0
- data/spec/models/create_list_spec.rb +48 -0
- data/spec/models/create_model_spec.rb +42 -0
- data/spec/models/create_sender_ips_spec.rb +54 -0
- data/spec/models/create_sender_model_spec.rb +54 -0
- data/spec/models/create_sender_spec.rb +54 -0
- data/spec/models/create_sms_campaign_recipients_spec.rb +48 -0
- data/spec/models/create_sms_campaign_spec.rb +66 -0
- data/spec/models/create_smtp_email_spec.rb +42 -0
- data/spec/models/create_smtp_template_sender_spec.rb +48 -0
- data/spec/models/create_smtp_template_spec.rb +96 -0
- data/spec/models/create_webhook_spec.rb +64 -0
- data/spec/models/created_process_id_spec.rb +42 -0
- data/spec/models/delete_hardbounces_spec.rb +54 -0
- data/spec/models/email_export_recipients_spec.rb +52 -0
- data/spec/models/error_model_spec.rb +52 -0
- data/spec/models/get_account_marketing_automation_spec.rb +48 -0
- data/spec/models/get_account_plan_spec.rb +62 -0
- data/spec/models/get_account_relay_data_spec.rb +54 -0
- data/spec/models/get_account_relay_spec.rb +48 -0
- data/spec/models/get_account_spec.rb +84 -0
- data/spec/models/get_aggregated_report_spec.rb +108 -0
- data/spec/models/get_attributes_attributes_spec.rb +80 -0
- data/spec/models/get_attributes_enumeration_spec.rb +48 -0
- data/spec/models/get_attributes_spec.rb +42 -0
- data/spec/models/get_campaign_overview_spec.rb +80 -0
- data/spec/models/get_campaign_recipients_exclusion_lists_spec.rb +48 -0
- data/spec/models/get_campaign_recipients_lists_spec.rb +48 -0
- data/spec/models/get_campaign_recipients_spec.rb +48 -0
- data/spec/models/get_campaign_stats_spec.rb +108 -0
- data/spec/models/get_child_info_api_keys_spec.rb +54 -0
- data/spec/models/get_child_info_credits_spec.rb +48 -0
- data/spec/models/get_child_info_ips_spec.rb +48 -0
- data/spec/models/get_child_info_spec.rb +90 -0
- data/spec/models/get_child_info_statistics_spec.rb +54 -0
- data/spec/models/get_children_list_spec.rb +42 -0
- data/spec/models/get_client_spec.rb +60 -0
- data/spec/models/get_contact_campaign_stats_clicked_spec.rb +48 -0
- data/spec/models/get_contact_campaign_stats_links_spec.rb +60 -0
- data/spec/models/get_contact_campaign_stats_messages_sent_spec.rb +48 -0
- data/spec/models/get_contact_campaign_stats_opened_spec.rb +60 -0
- data/spec/models/get_contact_campaign_stats_spec.rb +84 -0
- data/spec/models/get_contact_campaign_stats_transac_attributes_spec.rb +54 -0
- data/spec/models/get_contact_campaign_stats_unsubscriptions_admin_unsubscription_spec.rb +48 -0
- data/spec/models/get_contact_campaign_stats_unsubscriptions_spec.rb +48 -0
- data/spec/models/get_contact_campaign_stats_unsubscriptions_user_unsubscription_spec.rb +54 -0
- data/spec/models/get_contact_details_spec.rb +84 -0
- data/spec/models/get_contacts_spec.rb +48 -0
- data/spec/models/get_email_campaign_spec.rb +164 -0
- data/spec/models/get_email_campaigns_spec.rb +48 -0
- data/spec/models/get_email_event_report_events_spec.rb +82 -0
- data/spec/models/get_email_event_report_spec.rb +42 -0
- data/spec/models/get_extended_campaign_overview_sender_spec.rb +48 -0
- data/spec/models/get_extended_campaign_overview_spec.rb +164 -0
- data/spec/models/get_extended_campaign_stats_links_stats_spec.rb +42 -0
- data/spec/models/get_extended_campaign_stats_spec.rb +66 -0
- data/spec/models/get_extended_client_address_spec.rb +60 -0
- data/spec/models/get_extended_client_spec.rb +66 -0
- data/spec/models/get_extended_contact_details_spec.rb +84 -0
- data/spec/models/get_extended_list_campaign_stats_spec.rb +48 -0
- data/spec/models/get_extended_list_spec.rb +84 -0
- data/spec/models/get_folder_lists_spec.rb +48 -0
- data/spec/models/get_folder_spec.rb +66 -0
- data/spec/models/get_folders_spec.rb +48 -0
- data/spec/models/get_ip_from_sender_spec.rb +60 -0
- data/spec/models/get_ip_spec.rb +60 -0
- data/spec/models/get_ips_from_sender_spec.rb +42 -0
- data/spec/models/get_ips_spec.rb +42 -0
- data/spec/models/get_list_spec.rb +60 -0
- data/spec/models/get_lists_folder_spec.rb +48 -0
- data/spec/models/get_lists_lists_spec.rb +42 -0
- data/spec/models/get_lists_spec.rb +48 -0
- data/spec/models/get_process_spec.rb +64 -0
- data/spec/models/get_processes_spec.rb +48 -0
- data/spec/models/get_reports_reports_spec.rb +114 -0
- data/spec/models/get_reports_spec.rb +42 -0
- data/spec/models/get_senders_list_ips_spec.rb +54 -0
- data/spec/models/get_senders_list_senders_spec.rb +66 -0
- data/spec/models/get_senders_list_spec.rb +42 -0
- data/spec/models/get_sms_campaign_overview_spec.rb +94 -0
- data/spec/models/get_sms_campaign_spec.rb +94 -0
- data/spec/models/get_sms_campaign_stats_spec.rb +78 -0
- data/spec/models/get_sms_campaigns_spec.rb +48 -0
- data/spec/models/get_sms_event_report_events_spec.rb +82 -0
- data/spec/models/get_sms_event_report_spec.rb +42 -0
- data/spec/models/get_smtp_template_overview_sender_spec.rb +48 -0
- data/spec/models/get_smtp_template_overview_spec.rb +108 -0
- data/spec/models/get_smtp_templates_spec.rb +48 -0
- data/spec/models/get_stats_by_domain_spec.rb +36 -0
- data/spec/models/get_transac_aggregated_sms_report_spec.rb +96 -0
- data/spec/models/get_transac_sms_report_reports_spec.rb +102 -0
- data/spec/models/get_transac_sms_report_spec.rb +42 -0
- data/spec/models/get_webhook_spec.rb +82 -0
- data/spec/models/get_webhooks_spec.rb +42 -0
- data/spec/models/manage_ip_spec.rb +42 -0
- data/spec/models/post_contact_info_contacts_spec.rb +48 -0
- data/spec/models/post_contact_info_spec.rb +42 -0
- data/spec/models/post_send_failed_spec.rb +66 -0
- data/spec/models/post_send_sms_test_failed_spec.rb +60 -0
- data/spec/models/remaining_credit_model_child_spec.rb +48 -0
- data/spec/models/remaining_credit_model_reseller_spec.rb +48 -0
- data/spec/models/remaining_credit_model_spec.rb +48 -0
- data/spec/models/remove_credits_spec.rb +48 -0
- data/spec/models/request_contact_export_spec.rb +54 -0
- data/spec/models/request_contact_import_new_list_spec.rb +48 -0
- data/spec/models/request_contact_import_spec.rb +66 -0
- data/spec/models/request_sms_recipient_export_spec.rb +52 -0
- data/spec/models/send_email_attachment_spec.rb +48 -0
- data/spec/models/send_email_spec.rb +84 -0
- data/spec/models/send_report_email_spec.rb +76 -0
- data/spec/models/send_report_spec.rb +52 -0
- data/spec/models/send_sms_spec.rb +42 -0
- data/spec/models/send_smtp_email_attachment_spec.rb +54 -0
- data/spec/models/send_smtp_email_bcc_spec.rb +48 -0
- data/spec/models/send_smtp_email_cc_spec.rb +48 -0
- data/spec/models/send_smtp_email_reply_to_spec.rb +48 -0
- data/spec/models/send_smtp_email_sender_spec.rb +48 -0
- data/spec/models/send_smtp_email_spec.rb +96 -0
- data/spec/models/send_smtp_email_to_spec.rb +48 -0
- data/spec/models/send_template_email_spec.rb +42 -0
- data/spec/models/send_test_email_spec.rb +42 -0
- data/spec/models/send_test_sms_spec.rb +42 -0
- data/spec/models/send_transac_sms_spec.rb +66 -0
- data/spec/models/update_campaign_status_spec.rb +46 -0
- data/spec/models/update_child_spec.rb +72 -0
- data/spec/models/update_contact_spec.rb +66 -0
- data/spec/models/update_email_campaign_recipients_spec.rb +48 -0
- data/spec/models/update_email_campaign_sender_spec.rb +48 -0
- data/spec/models/update_email_campaign_spec.rb +138 -0
- data/spec/models/update_list_spec.rb +48 -0
- data/spec/models/update_sender_spec.rb +54 -0
- data/spec/models/update_sms_campaign_spec.rb +66 -0
- data/spec/models/update_smtp_template_sender_spec.rb +48 -0
- data/spec/models/update_smtp_template_spec.rb +96 -0
- data/spec/models/update_webhook_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +869 -0
|
@@ -0,0 +1,379 @@
|
|
|
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 FoldersApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Create a folder
|
|
24
|
+
#
|
|
25
|
+
# @param name Name of the folder
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [CreateModel]
|
|
28
|
+
def create_folder(name, opts = {})
|
|
29
|
+
data, _status_code, _headers = create_folder_with_http_info(name, opts)
|
|
30
|
+
return data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Create a folder
|
|
34
|
+
#
|
|
35
|
+
# @param name Name of the folder
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
|
38
|
+
def create_folder_with_http_info(name, opts = {})
|
|
39
|
+
if @api_client.config.debugging
|
|
40
|
+
@api_client.config.logger.debug "Calling API: FoldersApi.create_folder ..."
|
|
41
|
+
end
|
|
42
|
+
# verify the required parameter 'name' is set
|
|
43
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
44
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling FoldersApi.create_folder"
|
|
45
|
+
end
|
|
46
|
+
# resource path
|
|
47
|
+
local_var_path = "/contacts/folders"
|
|
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(name)
|
|
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: FoldersApi#create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
74
|
+
end
|
|
75
|
+
return data, status_code, headers
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Delete a folder (and all its lists)
|
|
79
|
+
#
|
|
80
|
+
# @param folder_id Id of the folder
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @return [nil]
|
|
83
|
+
def delete_folder(folder_id, opts = {})
|
|
84
|
+
delete_folder_with_http_info(folder_id, opts)
|
|
85
|
+
return nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Delete a folder (and all its lists)
|
|
89
|
+
#
|
|
90
|
+
# @param folder_id Id of the folder
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
93
|
+
def delete_folder_with_http_info(folder_id, opts = {})
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug "Calling API: FoldersApi.delete_folder ..."
|
|
96
|
+
end
|
|
97
|
+
# verify the required parameter 'folder_id' is set
|
|
98
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
99
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.delete_folder"
|
|
100
|
+
end
|
|
101
|
+
# resource path
|
|
102
|
+
local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_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: FoldersApi#delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
|
+
end
|
|
129
|
+
return data, status_code, headers
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Returns folder details
|
|
133
|
+
#
|
|
134
|
+
# @param folder_id id of the folder
|
|
135
|
+
# @param [Hash] opts the optional parameters
|
|
136
|
+
# @return [GetFolder]
|
|
137
|
+
def get_folder(folder_id, opts = {})
|
|
138
|
+
data, _status_code, _headers = get_folder_with_http_info(folder_id, opts)
|
|
139
|
+
return data
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Returns folder details
|
|
143
|
+
#
|
|
144
|
+
# @param folder_id id of the folder
|
|
145
|
+
# @param [Hash] opts the optional parameters
|
|
146
|
+
# @return [Array<(GetFolder, Fixnum, Hash)>] GetFolder data, response status code and response headers
|
|
147
|
+
def get_folder_with_http_info(folder_id, opts = {})
|
|
148
|
+
if @api_client.config.debugging
|
|
149
|
+
@api_client.config.logger.debug "Calling API: FoldersApi.get_folder ..."
|
|
150
|
+
end
|
|
151
|
+
# verify the required parameter 'folder_id' is set
|
|
152
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
153
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.get_folder"
|
|
154
|
+
end
|
|
155
|
+
# resource path
|
|
156
|
+
local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_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 => 'GetFolder')
|
|
181
|
+
if @api_client.config.debugging
|
|
182
|
+
@api_client.config.logger.debug "API called: FoldersApi#get_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
183
|
+
end
|
|
184
|
+
return data, status_code, headers
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Get the lists in a folder
|
|
188
|
+
#
|
|
189
|
+
# @param folder_id Id of the folder
|
|
190
|
+
# @param [Hash] opts the optional parameters
|
|
191
|
+
# @option opts [Integer] :limit Number of documents per page (default to 10)
|
|
192
|
+
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
|
193
|
+
# @return [GetFolderLists]
|
|
194
|
+
def get_folder_lists(folder_id, opts = {})
|
|
195
|
+
data, _status_code, _headers = get_folder_lists_with_http_info(folder_id, opts)
|
|
196
|
+
return data
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Get the lists in a folder
|
|
200
|
+
#
|
|
201
|
+
# @param folder_id Id of the folder
|
|
202
|
+
# @param [Hash] opts the optional parameters
|
|
203
|
+
# @option opts [Integer] :limit Number of documents per page
|
|
204
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
|
205
|
+
# @return [Array<(GetFolderLists, Fixnum, Hash)>] GetFolderLists data, response status code and response headers
|
|
206
|
+
def get_folder_lists_with_http_info(folder_id, opts = {})
|
|
207
|
+
if @api_client.config.debugging
|
|
208
|
+
@api_client.config.logger.debug "Calling API: FoldersApi.get_folder_lists ..."
|
|
209
|
+
end
|
|
210
|
+
# verify the required parameter 'folder_id' is set
|
|
211
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
212
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.get_folder_lists"
|
|
213
|
+
end
|
|
214
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
|
|
215
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FoldersApi.get_folder_lists, must be smaller than or equal to 50.'
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# resource path
|
|
219
|
+
local_var_path = "/contacts/folders/{folderId}/lists".sub('{' + 'folderId' + '}', folder_id.to_s)
|
|
220
|
+
|
|
221
|
+
# query parameters
|
|
222
|
+
query_params = {}
|
|
223
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
224
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
225
|
+
|
|
226
|
+
# header parameters
|
|
227
|
+
header_params = {}
|
|
228
|
+
# HTTP header 'Accept' (if needed)
|
|
229
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
230
|
+
# HTTP header 'Content-Type'
|
|
231
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
232
|
+
|
|
233
|
+
# form parameters
|
|
234
|
+
form_params = {}
|
|
235
|
+
|
|
236
|
+
# http body (model)
|
|
237
|
+
post_body = nil
|
|
238
|
+
auth_names = ['api-key']
|
|
239
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
240
|
+
:header_params => header_params,
|
|
241
|
+
:query_params => query_params,
|
|
242
|
+
:form_params => form_params,
|
|
243
|
+
:body => post_body,
|
|
244
|
+
:auth_names => auth_names,
|
|
245
|
+
:return_type => 'GetFolderLists')
|
|
246
|
+
if @api_client.config.debugging
|
|
247
|
+
@api_client.config.logger.debug "API called: FoldersApi#get_folder_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
248
|
+
end
|
|
249
|
+
return data, status_code, headers
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Get all the folders
|
|
253
|
+
#
|
|
254
|
+
# @param limit Number of documents per page
|
|
255
|
+
# @param offset Index of the first document of the page
|
|
256
|
+
# @param [Hash] opts the optional parameters
|
|
257
|
+
# @return [GetFolders]
|
|
258
|
+
def get_folders(limit, offset, opts = {})
|
|
259
|
+
data, _status_code, _headers = get_folders_with_http_info(limit, offset, opts)
|
|
260
|
+
return data
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Get all the folders
|
|
264
|
+
#
|
|
265
|
+
# @param limit Number of documents per page
|
|
266
|
+
# @param offset Index of the first document of the page
|
|
267
|
+
# @param [Hash] opts the optional parameters
|
|
268
|
+
# @return [Array<(GetFolders, Fixnum, Hash)>] GetFolders data, response status code and response headers
|
|
269
|
+
def get_folders_with_http_info(limit, offset, opts = {})
|
|
270
|
+
if @api_client.config.debugging
|
|
271
|
+
@api_client.config.logger.debug "Calling API: FoldersApi.get_folders ..."
|
|
272
|
+
end
|
|
273
|
+
# verify the required parameter 'limit' is set
|
|
274
|
+
if @api_client.config.client_side_validation && limit.nil?
|
|
275
|
+
fail ArgumentError, "Missing the required parameter 'limit' when calling FoldersApi.get_folders"
|
|
276
|
+
end
|
|
277
|
+
if @api_client.config.client_side_validation && limit > 50
|
|
278
|
+
fail ArgumentError, 'invalid value for "limit" when calling FoldersApi.get_folders, must be smaller than or equal to 50.'
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# verify the required parameter 'offset' is set
|
|
282
|
+
if @api_client.config.client_side_validation && offset.nil?
|
|
283
|
+
fail ArgumentError, "Missing the required parameter 'offset' when calling FoldersApi.get_folders"
|
|
284
|
+
end
|
|
285
|
+
# resource path
|
|
286
|
+
local_var_path = "/contacts/folders"
|
|
287
|
+
|
|
288
|
+
# query parameters
|
|
289
|
+
query_params = {}
|
|
290
|
+
query_params[:'limit'] = limit
|
|
291
|
+
query_params[:'offset'] = offset
|
|
292
|
+
|
|
293
|
+
# header parameters
|
|
294
|
+
header_params = {}
|
|
295
|
+
# HTTP header 'Accept' (if needed)
|
|
296
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
297
|
+
# HTTP header 'Content-Type'
|
|
298
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
299
|
+
|
|
300
|
+
# form parameters
|
|
301
|
+
form_params = {}
|
|
302
|
+
|
|
303
|
+
# http body (model)
|
|
304
|
+
post_body = nil
|
|
305
|
+
auth_names = ['api-key']
|
|
306
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
307
|
+
:header_params => header_params,
|
|
308
|
+
:query_params => query_params,
|
|
309
|
+
:form_params => form_params,
|
|
310
|
+
:body => post_body,
|
|
311
|
+
:auth_names => auth_names,
|
|
312
|
+
:return_type => 'GetFolders')
|
|
313
|
+
if @api_client.config.debugging
|
|
314
|
+
@api_client.config.logger.debug "API called: FoldersApi#get_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
315
|
+
end
|
|
316
|
+
return data, status_code, headers
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Update a contact folder
|
|
320
|
+
#
|
|
321
|
+
# @param folder_id Id of the folder
|
|
322
|
+
# @param name Name of the folder
|
|
323
|
+
# @param [Hash] opts the optional parameters
|
|
324
|
+
# @return [nil]
|
|
325
|
+
def update_folder(folder_id, name, opts = {})
|
|
326
|
+
update_folder_with_http_info(folder_id, name, opts)
|
|
327
|
+
return nil
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Update a contact folder
|
|
331
|
+
#
|
|
332
|
+
# @param folder_id Id of the folder
|
|
333
|
+
# @param name Name of the folder
|
|
334
|
+
# @param [Hash] opts the optional parameters
|
|
335
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
336
|
+
def update_folder_with_http_info(folder_id, name, opts = {})
|
|
337
|
+
if @api_client.config.debugging
|
|
338
|
+
@api_client.config.logger.debug "Calling API: FoldersApi.update_folder ..."
|
|
339
|
+
end
|
|
340
|
+
# verify the required parameter 'folder_id' is set
|
|
341
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
342
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.update_folder"
|
|
343
|
+
end
|
|
344
|
+
# verify the required parameter 'name' is set
|
|
345
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
346
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling FoldersApi.update_folder"
|
|
347
|
+
end
|
|
348
|
+
# resource path
|
|
349
|
+
local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_id.to_s)
|
|
350
|
+
|
|
351
|
+
# query parameters
|
|
352
|
+
query_params = {}
|
|
353
|
+
|
|
354
|
+
# header parameters
|
|
355
|
+
header_params = {}
|
|
356
|
+
# HTTP header 'Accept' (if needed)
|
|
357
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
358
|
+
# HTTP header 'Content-Type'
|
|
359
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
360
|
+
|
|
361
|
+
# form parameters
|
|
362
|
+
form_params = {}
|
|
363
|
+
|
|
364
|
+
# http body (model)
|
|
365
|
+
post_body = @api_client.object_to_http_body(name)
|
|
366
|
+
auth_names = ['api-key']
|
|
367
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
368
|
+
:header_params => header_params,
|
|
369
|
+
:query_params => query_params,
|
|
370
|
+
:form_params => form_params,
|
|
371
|
+
:body => post_body,
|
|
372
|
+
:auth_names => auth_names)
|
|
373
|
+
if @api_client.config.debugging
|
|
374
|
+
@api_client.config.logger.debug "API called: FoldersApi#update_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
375
|
+
end
|
|
376
|
+
return data, status_code, headers
|
|
377
|
+
end
|
|
378
|
+
end
|
|
379
|
+
end
|
|
@@ -0,0 +1,565 @@
|
|
|
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 ListsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Add existing contacts to a list
|
|
24
|
+
#
|
|
25
|
+
# @param list_id Id of the list
|
|
26
|
+
# @param contact_emails Emails addresses of the contacts
|
|
27
|
+
# @param [Hash] opts the optional parameters
|
|
28
|
+
# @return [PostContactInfo]
|
|
29
|
+
def add_contact_to_list(list_id, contact_emails, opts = {})
|
|
30
|
+
data, _status_code, _headers = add_contact_to_list_with_http_info(list_id, contact_emails, opts)
|
|
31
|
+
return data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Add existing contacts to a list
|
|
35
|
+
#
|
|
36
|
+
# @param list_id Id of the list
|
|
37
|
+
# @param contact_emails Emails addresses of the contacts
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers
|
|
40
|
+
def add_contact_to_list_with_http_info(list_id, contact_emails, opts = {})
|
|
41
|
+
if @api_client.config.debugging
|
|
42
|
+
@api_client.config.logger.debug "Calling API: ListsApi.add_contact_to_list ..."
|
|
43
|
+
end
|
|
44
|
+
# verify the required parameter 'list_id' is set
|
|
45
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
|
46
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.add_contact_to_list"
|
|
47
|
+
end
|
|
48
|
+
# verify the required parameter 'contact_emails' is set
|
|
49
|
+
if @api_client.config.client_side_validation && contact_emails.nil?
|
|
50
|
+
fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ListsApi.add_contact_to_list"
|
|
51
|
+
end
|
|
52
|
+
# resource path
|
|
53
|
+
local_var_path = "/contacts/lists/{listId}/contacts/add".sub('{' + 'listId' + '}', list_id.to_s)
|
|
54
|
+
|
|
55
|
+
# query parameters
|
|
56
|
+
query_params = {}
|
|
57
|
+
|
|
58
|
+
# header parameters
|
|
59
|
+
header_params = {}
|
|
60
|
+
# HTTP header 'Accept' (if needed)
|
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
62
|
+
# HTTP header 'Content-Type'
|
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
64
|
+
|
|
65
|
+
# form parameters
|
|
66
|
+
form_params = {}
|
|
67
|
+
|
|
68
|
+
# http body (model)
|
|
69
|
+
post_body = @api_client.object_to_http_body(contact_emails)
|
|
70
|
+
auth_names = ['api-key']
|
|
71
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
72
|
+
:header_params => header_params,
|
|
73
|
+
:query_params => query_params,
|
|
74
|
+
:form_params => form_params,
|
|
75
|
+
:body => post_body,
|
|
76
|
+
:auth_names => auth_names,
|
|
77
|
+
:return_type => 'PostContactInfo')
|
|
78
|
+
if @api_client.config.debugging
|
|
79
|
+
@api_client.config.logger.debug "API called: ListsApi#add_contact_to_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
80
|
+
end
|
|
81
|
+
return data, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Create a list
|
|
85
|
+
#
|
|
86
|
+
# @param create_list Values to create a list
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @return [CreateModel]
|
|
89
|
+
def create_list(create_list, opts = {})
|
|
90
|
+
data, _status_code, _headers = create_list_with_http_info(create_list, opts)
|
|
91
|
+
return data
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Create a list
|
|
95
|
+
#
|
|
96
|
+
# @param create_list Values to create a list
|
|
97
|
+
# @param [Hash] opts the optional parameters
|
|
98
|
+
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
|
99
|
+
def create_list_with_http_info(create_list, opts = {})
|
|
100
|
+
if @api_client.config.debugging
|
|
101
|
+
@api_client.config.logger.debug "Calling API: ListsApi.create_list ..."
|
|
102
|
+
end
|
|
103
|
+
# verify the required parameter 'create_list' is set
|
|
104
|
+
if @api_client.config.client_side_validation && create_list.nil?
|
|
105
|
+
fail ArgumentError, "Missing the required parameter 'create_list' when calling ListsApi.create_list"
|
|
106
|
+
end
|
|
107
|
+
# resource path
|
|
108
|
+
local_var_path = "/contacts/lists"
|
|
109
|
+
|
|
110
|
+
# query parameters
|
|
111
|
+
query_params = {}
|
|
112
|
+
|
|
113
|
+
# header parameters
|
|
114
|
+
header_params = {}
|
|
115
|
+
# HTTP header 'Accept' (if needed)
|
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
117
|
+
# HTTP header 'Content-Type'
|
|
118
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
119
|
+
|
|
120
|
+
# form parameters
|
|
121
|
+
form_params = {}
|
|
122
|
+
|
|
123
|
+
# http body (model)
|
|
124
|
+
post_body = @api_client.object_to_http_body(create_list)
|
|
125
|
+
auth_names = ['api-key']
|
|
126
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
127
|
+
:header_params => header_params,
|
|
128
|
+
:query_params => query_params,
|
|
129
|
+
:form_params => form_params,
|
|
130
|
+
:body => post_body,
|
|
131
|
+
:auth_names => auth_names,
|
|
132
|
+
:return_type => 'CreateModel')
|
|
133
|
+
if @api_client.config.debugging
|
|
134
|
+
@api_client.config.logger.debug "API called: ListsApi#create_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
135
|
+
end
|
|
136
|
+
return data, status_code, headers
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Delete a list
|
|
140
|
+
#
|
|
141
|
+
# @param list_id Id of the list
|
|
142
|
+
# @param [Hash] opts the optional parameters
|
|
143
|
+
# @return [nil]
|
|
144
|
+
def delete_list(list_id, opts = {})
|
|
145
|
+
delete_list_with_http_info(list_id, opts)
|
|
146
|
+
return nil
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Delete a list
|
|
150
|
+
#
|
|
151
|
+
# @param list_id Id of the list
|
|
152
|
+
# @param [Hash] opts the optional parameters
|
|
153
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
154
|
+
def delete_list_with_http_info(list_id, opts = {})
|
|
155
|
+
if @api_client.config.debugging
|
|
156
|
+
@api_client.config.logger.debug "Calling API: ListsApi.delete_list ..."
|
|
157
|
+
end
|
|
158
|
+
# verify the required parameter 'list_id' is set
|
|
159
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
|
160
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.delete_list"
|
|
161
|
+
end
|
|
162
|
+
# resource path
|
|
163
|
+
local_var_path = "/contacts/lists/{listId}".sub('{' + 'listId' + '}', list_id.to_s)
|
|
164
|
+
|
|
165
|
+
# query parameters
|
|
166
|
+
query_params = {}
|
|
167
|
+
|
|
168
|
+
# header parameters
|
|
169
|
+
header_params = {}
|
|
170
|
+
# HTTP header 'Accept' (if needed)
|
|
171
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
172
|
+
# HTTP header 'Content-Type'
|
|
173
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
174
|
+
|
|
175
|
+
# form parameters
|
|
176
|
+
form_params = {}
|
|
177
|
+
|
|
178
|
+
# http body (model)
|
|
179
|
+
post_body = nil
|
|
180
|
+
auth_names = ['api-key']
|
|
181
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
182
|
+
:header_params => header_params,
|
|
183
|
+
:query_params => query_params,
|
|
184
|
+
:form_params => form_params,
|
|
185
|
+
:body => post_body,
|
|
186
|
+
:auth_names => auth_names)
|
|
187
|
+
if @api_client.config.debugging
|
|
188
|
+
@api_client.config.logger.debug "API called: ListsApi#delete_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
189
|
+
end
|
|
190
|
+
return data, status_code, headers
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Get the contacts in a list
|
|
194
|
+
#
|
|
195
|
+
# @param list_id Id of the list
|
|
196
|
+
# @param [Hash] opts the optional parameters
|
|
197
|
+
# @option opts [String] :modified_since Filter the contacts modified after a given date (YYYY-MM-DD HH:mm:ss)
|
|
198
|
+
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
|
199
|
+
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
|
200
|
+
# @return [GetContacts]
|
|
201
|
+
def get_contacts_from_list(list_id, opts = {})
|
|
202
|
+
data, _status_code, _headers = get_contacts_from_list_with_http_info(list_id, opts)
|
|
203
|
+
return data
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Get the contacts in a list
|
|
207
|
+
#
|
|
208
|
+
# @param list_id Id of the list
|
|
209
|
+
# @param [Hash] opts the optional parameters
|
|
210
|
+
# @option opts [String] :modified_since Filter the contacts modified after a given date (YYYY-MM-DD HH:mm:ss)
|
|
211
|
+
# @option opts [Integer] :limit Number of documents per page
|
|
212
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
|
213
|
+
# @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
|
|
214
|
+
def get_contacts_from_list_with_http_info(list_id, opts = {})
|
|
215
|
+
if @api_client.config.debugging
|
|
216
|
+
@api_client.config.logger.debug "Calling API: ListsApi.get_contacts_from_list ..."
|
|
217
|
+
end
|
|
218
|
+
# verify the required parameter 'list_id' is set
|
|
219
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
|
220
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.get_contacts_from_list"
|
|
221
|
+
end
|
|
222
|
+
if @api_client.config.client_side_validation && !opts[:'modified_since'].nil? && opts[:'modified_since'] !~ Regexp.new(/YYYY-MM-DD HH:mm:ss/)
|
|
223
|
+
fail ArgumentError, "invalid value for 'opts[:\"modified_since\"]' when calling ListsApi.get_contacts_from_list, must conform to the pattern /YYYY-MM-DD HH:mm:ss/."
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
227
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_contacts_from_list, must be smaller than or equal to 500.'
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# resource path
|
|
231
|
+
local_var_path = "/contacts/lists/{listId}/contacts".sub('{' + 'listId' + '}', list_id.to_s)
|
|
232
|
+
|
|
233
|
+
# query parameters
|
|
234
|
+
query_params = {}
|
|
235
|
+
query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
|
|
236
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
237
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
238
|
+
|
|
239
|
+
# header parameters
|
|
240
|
+
header_params = {}
|
|
241
|
+
# HTTP header 'Accept' (if needed)
|
|
242
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
243
|
+
# HTTP header 'Content-Type'
|
|
244
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
245
|
+
|
|
246
|
+
# form parameters
|
|
247
|
+
form_params = {}
|
|
248
|
+
|
|
249
|
+
# http body (model)
|
|
250
|
+
post_body = nil
|
|
251
|
+
auth_names = ['api-key']
|
|
252
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
253
|
+
:header_params => header_params,
|
|
254
|
+
:query_params => query_params,
|
|
255
|
+
:form_params => form_params,
|
|
256
|
+
:body => post_body,
|
|
257
|
+
:auth_names => auth_names,
|
|
258
|
+
:return_type => 'GetContacts')
|
|
259
|
+
if @api_client.config.debugging
|
|
260
|
+
@api_client.config.logger.debug "API called: ListsApi#get_contacts_from_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
261
|
+
end
|
|
262
|
+
return data, status_code, headers
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Get the lists in a folder
|
|
266
|
+
#
|
|
267
|
+
# @param folder_id Id of the folder
|
|
268
|
+
# @param [Hash] opts the optional parameters
|
|
269
|
+
# @option opts [Integer] :limit Number of documents per page (default to 10)
|
|
270
|
+
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
|
271
|
+
# @return [GetFolderLists]
|
|
272
|
+
def get_folder_lists(folder_id, opts = {})
|
|
273
|
+
data, _status_code, _headers = get_folder_lists_with_http_info(folder_id, opts)
|
|
274
|
+
return data
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Get the lists in a folder
|
|
278
|
+
#
|
|
279
|
+
# @param folder_id Id of the folder
|
|
280
|
+
# @param [Hash] opts the optional parameters
|
|
281
|
+
# @option opts [Integer] :limit Number of documents per page
|
|
282
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
|
283
|
+
# @return [Array<(GetFolderLists, Fixnum, Hash)>] GetFolderLists data, response status code and response headers
|
|
284
|
+
def get_folder_lists_with_http_info(folder_id, opts = {})
|
|
285
|
+
if @api_client.config.debugging
|
|
286
|
+
@api_client.config.logger.debug "Calling API: ListsApi.get_folder_lists ..."
|
|
287
|
+
end
|
|
288
|
+
# verify the required parameter 'folder_id' is set
|
|
289
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
290
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling ListsApi.get_folder_lists"
|
|
291
|
+
end
|
|
292
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
|
|
293
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_folder_lists, must be smaller than or equal to 50.'
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# resource path
|
|
297
|
+
local_var_path = "/contacts/folders/{folderId}/lists".sub('{' + 'folderId' + '}', folder_id.to_s)
|
|
298
|
+
|
|
299
|
+
# query parameters
|
|
300
|
+
query_params = {}
|
|
301
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
302
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
303
|
+
|
|
304
|
+
# header parameters
|
|
305
|
+
header_params = {}
|
|
306
|
+
# HTTP header 'Accept' (if needed)
|
|
307
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
308
|
+
# HTTP header 'Content-Type'
|
|
309
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
310
|
+
|
|
311
|
+
# form parameters
|
|
312
|
+
form_params = {}
|
|
313
|
+
|
|
314
|
+
# http body (model)
|
|
315
|
+
post_body = nil
|
|
316
|
+
auth_names = ['api-key']
|
|
317
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
318
|
+
:header_params => header_params,
|
|
319
|
+
:query_params => query_params,
|
|
320
|
+
:form_params => form_params,
|
|
321
|
+
:body => post_body,
|
|
322
|
+
:auth_names => auth_names,
|
|
323
|
+
:return_type => 'GetFolderLists')
|
|
324
|
+
if @api_client.config.debugging
|
|
325
|
+
@api_client.config.logger.debug "API called: ListsApi#get_folder_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
326
|
+
end
|
|
327
|
+
return data, status_code, headers
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Get the details of a list
|
|
331
|
+
#
|
|
332
|
+
# @param list_id Id of the list
|
|
333
|
+
# @param [Hash] opts the optional parameters
|
|
334
|
+
# @return [GetExtendedList]
|
|
335
|
+
def get_list(list_id, opts = {})
|
|
336
|
+
data, _status_code, _headers = get_list_with_http_info(list_id, opts)
|
|
337
|
+
return data
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Get the details of a list
|
|
341
|
+
#
|
|
342
|
+
# @param list_id Id of the list
|
|
343
|
+
# @param [Hash] opts the optional parameters
|
|
344
|
+
# @return [Array<(GetExtendedList, Fixnum, Hash)>] GetExtendedList data, response status code and response headers
|
|
345
|
+
def get_list_with_http_info(list_id, opts = {})
|
|
346
|
+
if @api_client.config.debugging
|
|
347
|
+
@api_client.config.logger.debug "Calling API: ListsApi.get_list ..."
|
|
348
|
+
end
|
|
349
|
+
# verify the required parameter 'list_id' is set
|
|
350
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
|
351
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.get_list"
|
|
352
|
+
end
|
|
353
|
+
# resource path
|
|
354
|
+
local_var_path = "/contacts/lists/{listId}".sub('{' + 'listId' + '}', list_id.to_s)
|
|
355
|
+
|
|
356
|
+
# query parameters
|
|
357
|
+
query_params = {}
|
|
358
|
+
|
|
359
|
+
# header parameters
|
|
360
|
+
header_params = {}
|
|
361
|
+
# HTTP header 'Accept' (if needed)
|
|
362
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
363
|
+
# HTTP header 'Content-Type'
|
|
364
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
365
|
+
|
|
366
|
+
# form parameters
|
|
367
|
+
form_params = {}
|
|
368
|
+
|
|
369
|
+
# http body (model)
|
|
370
|
+
post_body = nil
|
|
371
|
+
auth_names = ['api-key']
|
|
372
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
373
|
+
:header_params => header_params,
|
|
374
|
+
:query_params => query_params,
|
|
375
|
+
:form_params => form_params,
|
|
376
|
+
:body => post_body,
|
|
377
|
+
:auth_names => auth_names,
|
|
378
|
+
:return_type => 'GetExtendedList')
|
|
379
|
+
if @api_client.config.debugging
|
|
380
|
+
@api_client.config.logger.debug "API called: ListsApi#get_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
381
|
+
end
|
|
382
|
+
return data, status_code, headers
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Get all the lists
|
|
386
|
+
#
|
|
387
|
+
# @param [Hash] opts the optional parameters
|
|
388
|
+
# @option opts [Integer] :limit Number of documents per page (default to 10)
|
|
389
|
+
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
|
390
|
+
# @return [GetLists]
|
|
391
|
+
def get_lists(opts = {})
|
|
392
|
+
data, _status_code, _headers = get_lists_with_http_info(opts)
|
|
393
|
+
return data
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Get all the lists
|
|
397
|
+
#
|
|
398
|
+
# @param [Hash] opts the optional parameters
|
|
399
|
+
# @option opts [Integer] :limit Number of documents per page
|
|
400
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
|
401
|
+
# @return [Array<(GetLists, Fixnum, Hash)>] GetLists data, response status code and response headers
|
|
402
|
+
def get_lists_with_http_info(opts = {})
|
|
403
|
+
if @api_client.config.debugging
|
|
404
|
+
@api_client.config.logger.debug "Calling API: ListsApi.get_lists ..."
|
|
405
|
+
end
|
|
406
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
|
|
407
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_lists, must be smaller than or equal to 50.'
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
# resource path
|
|
411
|
+
local_var_path = "/contacts/lists"
|
|
412
|
+
|
|
413
|
+
# query parameters
|
|
414
|
+
query_params = {}
|
|
415
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
416
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
417
|
+
|
|
418
|
+
# header parameters
|
|
419
|
+
header_params = {}
|
|
420
|
+
# HTTP header 'Accept' (if needed)
|
|
421
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
422
|
+
# HTTP header 'Content-Type'
|
|
423
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
424
|
+
|
|
425
|
+
# form parameters
|
|
426
|
+
form_params = {}
|
|
427
|
+
|
|
428
|
+
# http body (model)
|
|
429
|
+
post_body = nil
|
|
430
|
+
auth_names = ['api-key']
|
|
431
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
432
|
+
:header_params => header_params,
|
|
433
|
+
:query_params => query_params,
|
|
434
|
+
:form_params => form_params,
|
|
435
|
+
:body => post_body,
|
|
436
|
+
:auth_names => auth_names,
|
|
437
|
+
:return_type => 'GetLists')
|
|
438
|
+
if @api_client.config.debugging
|
|
439
|
+
@api_client.config.logger.debug "API called: ListsApi#get_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
440
|
+
end
|
|
441
|
+
return data, status_code, headers
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
# Remove existing contacts from a list
|
|
445
|
+
#
|
|
446
|
+
# @param list_id Id of the list
|
|
447
|
+
# @param contact_emails Emails adresses of the contact
|
|
448
|
+
# @param [Hash] opts the optional parameters
|
|
449
|
+
# @return [PostContactInfo]
|
|
450
|
+
def remove_contact_to_list(list_id, contact_emails, opts = {})
|
|
451
|
+
data, _status_code, _headers = remove_contact_to_list_with_http_info(list_id, contact_emails, opts)
|
|
452
|
+
return data
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
# Remove existing contacts from a list
|
|
456
|
+
#
|
|
457
|
+
# @param list_id Id of the list
|
|
458
|
+
# @param contact_emails Emails adresses of the contact
|
|
459
|
+
# @param [Hash] opts the optional parameters
|
|
460
|
+
# @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers
|
|
461
|
+
def remove_contact_to_list_with_http_info(list_id, contact_emails, opts = {})
|
|
462
|
+
if @api_client.config.debugging
|
|
463
|
+
@api_client.config.logger.debug "Calling API: ListsApi.remove_contact_to_list ..."
|
|
464
|
+
end
|
|
465
|
+
# verify the required parameter 'list_id' is set
|
|
466
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
|
467
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.remove_contact_to_list"
|
|
468
|
+
end
|
|
469
|
+
# verify the required parameter 'contact_emails' is set
|
|
470
|
+
if @api_client.config.client_side_validation && contact_emails.nil?
|
|
471
|
+
fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ListsApi.remove_contact_to_list"
|
|
472
|
+
end
|
|
473
|
+
# resource path
|
|
474
|
+
local_var_path = "/contacts/lists/{listId}/contacts/remove".sub('{' + 'listId' + '}', list_id.to_s)
|
|
475
|
+
|
|
476
|
+
# query parameters
|
|
477
|
+
query_params = {}
|
|
478
|
+
|
|
479
|
+
# header parameters
|
|
480
|
+
header_params = {}
|
|
481
|
+
# HTTP header 'Accept' (if needed)
|
|
482
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
483
|
+
# HTTP header 'Content-Type'
|
|
484
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
485
|
+
|
|
486
|
+
# form parameters
|
|
487
|
+
form_params = {}
|
|
488
|
+
|
|
489
|
+
# http body (model)
|
|
490
|
+
post_body = @api_client.object_to_http_body(contact_emails)
|
|
491
|
+
auth_names = ['api-key']
|
|
492
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
493
|
+
:header_params => header_params,
|
|
494
|
+
:query_params => query_params,
|
|
495
|
+
:form_params => form_params,
|
|
496
|
+
:body => post_body,
|
|
497
|
+
:auth_names => auth_names,
|
|
498
|
+
:return_type => 'PostContactInfo')
|
|
499
|
+
if @api_client.config.debugging
|
|
500
|
+
@api_client.config.logger.debug "API called: ListsApi#remove_contact_to_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
501
|
+
end
|
|
502
|
+
return data, status_code, headers
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
# Update a list
|
|
506
|
+
#
|
|
507
|
+
# @param list_id Id of the list
|
|
508
|
+
# @param update_list Values to update a list
|
|
509
|
+
# @param [Hash] opts the optional parameters
|
|
510
|
+
# @return [nil]
|
|
511
|
+
def update_list(list_id, update_list, opts = {})
|
|
512
|
+
update_list_with_http_info(list_id, update_list, opts)
|
|
513
|
+
return nil
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# Update a list
|
|
517
|
+
#
|
|
518
|
+
# @param list_id Id of the list
|
|
519
|
+
# @param update_list Values to update a list
|
|
520
|
+
# @param [Hash] opts the optional parameters
|
|
521
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
522
|
+
def update_list_with_http_info(list_id, update_list, opts = {})
|
|
523
|
+
if @api_client.config.debugging
|
|
524
|
+
@api_client.config.logger.debug "Calling API: ListsApi.update_list ..."
|
|
525
|
+
end
|
|
526
|
+
# verify the required parameter 'list_id' is set
|
|
527
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
|
528
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.update_list"
|
|
529
|
+
end
|
|
530
|
+
# verify the required parameter 'update_list' is set
|
|
531
|
+
if @api_client.config.client_side_validation && update_list.nil?
|
|
532
|
+
fail ArgumentError, "Missing the required parameter 'update_list' when calling ListsApi.update_list"
|
|
533
|
+
end
|
|
534
|
+
# resource path
|
|
535
|
+
local_var_path = "/contacts/lists/{listId}".sub('{' + 'listId' + '}', list_id.to_s)
|
|
536
|
+
|
|
537
|
+
# query parameters
|
|
538
|
+
query_params = {}
|
|
539
|
+
|
|
540
|
+
# header parameters
|
|
541
|
+
header_params = {}
|
|
542
|
+
# HTTP header 'Accept' (if needed)
|
|
543
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
544
|
+
# HTTP header 'Content-Type'
|
|
545
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
546
|
+
|
|
547
|
+
# form parameters
|
|
548
|
+
form_params = {}
|
|
549
|
+
|
|
550
|
+
# http body (model)
|
|
551
|
+
post_body = @api_client.object_to_http_body(update_list)
|
|
552
|
+
auth_names = ['api-key']
|
|
553
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
554
|
+
:header_params => header_params,
|
|
555
|
+
:query_params => query_params,
|
|
556
|
+
:form_params => form_params,
|
|
557
|
+
:body => post_body,
|
|
558
|
+
:auth_names => auth_names)
|
|
559
|
+
if @api_client.config.debugging
|
|
560
|
+
@api_client.config.logger.debug "API called: ListsApi#update_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
561
|
+
end
|
|
562
|
+
return data, status_code, headers
|
|
563
|
+
end
|
|
564
|
+
end
|
|
565
|
+
end
|