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,1408 @@
|
|
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 ContactsApi
|
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: ContactsApi.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 ContactsApi.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 ContactsApi.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: ContactsApi#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
|
+
# Creates contact attributes
|
85
|
+
#
|
86
|
+
# @param create_attribute Values to create an attribute
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [CreateModel]
|
89
|
+
def create_attribute(create_attribute, opts = {})
|
90
|
+
data, _status_code, _headers = create_attribute_with_http_info(create_attribute, opts)
|
91
|
+
return data
|
92
|
+
end
|
93
|
+
|
94
|
+
# Creates contact attributes
|
95
|
+
#
|
96
|
+
# @param create_attribute Values to create an attribute
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
99
|
+
def create_attribute_with_http_info(create_attribute, opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.create_attribute ..."
|
102
|
+
end
|
103
|
+
# verify the required parameter 'create_attribute' is set
|
104
|
+
if @api_client.config.client_side_validation && create_attribute.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'create_attribute' when calling ContactsApi.create_attribute"
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = "/contacts/attributes"
|
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_attribute)
|
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: ContactsApi#create_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
135
|
+
end
|
136
|
+
return data, status_code, headers
|
137
|
+
end
|
138
|
+
|
139
|
+
# Create a contact
|
140
|
+
#
|
141
|
+
# @param create_contact Values to create a contact
|
142
|
+
# @param [Hash] opts the optional parameters
|
143
|
+
# @return [CreateModel]
|
144
|
+
def create_contact(create_contact, opts = {})
|
145
|
+
data, _status_code, _headers = create_contact_with_http_info(create_contact, opts)
|
146
|
+
return data
|
147
|
+
end
|
148
|
+
|
149
|
+
# Create a contact
|
150
|
+
#
|
151
|
+
# @param create_contact Values to create a contact
|
152
|
+
# @param [Hash] opts the optional parameters
|
153
|
+
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
154
|
+
def create_contact_with_http_info(create_contact, opts = {})
|
155
|
+
if @api_client.config.debugging
|
156
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.create_contact ..."
|
157
|
+
end
|
158
|
+
# verify the required parameter 'create_contact' is set
|
159
|
+
if @api_client.config.client_side_validation && create_contact.nil?
|
160
|
+
fail ArgumentError, "Missing the required parameter 'create_contact' when calling ContactsApi.create_contact"
|
161
|
+
end
|
162
|
+
# resource path
|
163
|
+
local_var_path = "/contacts"
|
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 = @api_client.object_to_http_body(create_contact)
|
180
|
+
auth_names = ['api-key']
|
181
|
+
data, status_code, headers = @api_client.call_api(:POST, 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
|
+
:return_type => 'CreateModel')
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug "API called: ContactsApi#create_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
190
|
+
end
|
191
|
+
return data, status_code, headers
|
192
|
+
end
|
193
|
+
|
194
|
+
# Create a folder
|
195
|
+
#
|
196
|
+
# @param name Name of the folder
|
197
|
+
# @param [Hash] opts the optional parameters
|
198
|
+
# @return [CreateModel]
|
199
|
+
def create_folder(name, opts = {})
|
200
|
+
data, _status_code, _headers = create_folder_with_http_info(name, opts)
|
201
|
+
return data
|
202
|
+
end
|
203
|
+
|
204
|
+
# Create a folder
|
205
|
+
#
|
206
|
+
# @param name Name of the folder
|
207
|
+
# @param [Hash] opts the optional parameters
|
208
|
+
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
209
|
+
def create_folder_with_http_info(name, opts = {})
|
210
|
+
if @api_client.config.debugging
|
211
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.create_folder ..."
|
212
|
+
end
|
213
|
+
# verify the required parameter 'name' is set
|
214
|
+
if @api_client.config.client_side_validation && name.nil?
|
215
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ContactsApi.create_folder"
|
216
|
+
end
|
217
|
+
# resource path
|
218
|
+
local_var_path = "/contacts/folders"
|
219
|
+
|
220
|
+
# query parameters
|
221
|
+
query_params = {}
|
222
|
+
|
223
|
+
# header parameters
|
224
|
+
header_params = {}
|
225
|
+
# HTTP header 'Accept' (if needed)
|
226
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
227
|
+
# HTTP header 'Content-Type'
|
228
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
229
|
+
|
230
|
+
# form parameters
|
231
|
+
form_params = {}
|
232
|
+
|
233
|
+
# http body (model)
|
234
|
+
post_body = @api_client.object_to_http_body(name)
|
235
|
+
auth_names = ['api-key']
|
236
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
237
|
+
:header_params => header_params,
|
238
|
+
:query_params => query_params,
|
239
|
+
:form_params => form_params,
|
240
|
+
:body => post_body,
|
241
|
+
:auth_names => auth_names,
|
242
|
+
:return_type => 'CreateModel')
|
243
|
+
if @api_client.config.debugging
|
244
|
+
@api_client.config.logger.debug "API called: ContactsApi#create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
245
|
+
end
|
246
|
+
return data, status_code, headers
|
247
|
+
end
|
248
|
+
|
249
|
+
# Create a list
|
250
|
+
#
|
251
|
+
# @param create_list Values to create a list
|
252
|
+
# @param [Hash] opts the optional parameters
|
253
|
+
# @return [CreateModel]
|
254
|
+
def create_list(create_list, opts = {})
|
255
|
+
data, _status_code, _headers = create_list_with_http_info(create_list, opts)
|
256
|
+
return data
|
257
|
+
end
|
258
|
+
|
259
|
+
# Create a list
|
260
|
+
#
|
261
|
+
# @param create_list Values to create a list
|
262
|
+
# @param [Hash] opts the optional parameters
|
263
|
+
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
264
|
+
def create_list_with_http_info(create_list, opts = {})
|
265
|
+
if @api_client.config.debugging
|
266
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.create_list ..."
|
267
|
+
end
|
268
|
+
# verify the required parameter 'create_list' is set
|
269
|
+
if @api_client.config.client_side_validation && create_list.nil?
|
270
|
+
fail ArgumentError, "Missing the required parameter 'create_list' when calling ContactsApi.create_list"
|
271
|
+
end
|
272
|
+
# resource path
|
273
|
+
local_var_path = "/contacts/lists"
|
274
|
+
|
275
|
+
# query parameters
|
276
|
+
query_params = {}
|
277
|
+
|
278
|
+
# header parameters
|
279
|
+
header_params = {}
|
280
|
+
# HTTP header 'Accept' (if needed)
|
281
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
282
|
+
# HTTP header 'Content-Type'
|
283
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
284
|
+
|
285
|
+
# form parameters
|
286
|
+
form_params = {}
|
287
|
+
|
288
|
+
# http body (model)
|
289
|
+
post_body = @api_client.object_to_http_body(create_list)
|
290
|
+
auth_names = ['api-key']
|
291
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
292
|
+
:header_params => header_params,
|
293
|
+
:query_params => query_params,
|
294
|
+
:form_params => form_params,
|
295
|
+
:body => post_body,
|
296
|
+
:auth_names => auth_names,
|
297
|
+
:return_type => 'CreateModel')
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug "API called: ContactsApi#create_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
+
end
|
301
|
+
return data, status_code, headers
|
302
|
+
end
|
303
|
+
|
304
|
+
# Deletes an attribute
|
305
|
+
#
|
306
|
+
# @param attribute_id id of the attribute
|
307
|
+
# @param [Hash] opts the optional parameters
|
308
|
+
# @return [nil]
|
309
|
+
def delete_attribute(attribute_id, opts = {})
|
310
|
+
delete_attribute_with_http_info(attribute_id, opts)
|
311
|
+
return nil
|
312
|
+
end
|
313
|
+
|
314
|
+
# Deletes an attribute
|
315
|
+
#
|
316
|
+
# @param attribute_id id of the attribute
|
317
|
+
# @param [Hash] opts the optional parameters
|
318
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
319
|
+
def delete_attribute_with_http_info(attribute_id, opts = {})
|
320
|
+
if @api_client.config.debugging
|
321
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.delete_attribute ..."
|
322
|
+
end
|
323
|
+
# verify the required parameter 'attribute_id' is set
|
324
|
+
if @api_client.config.client_side_validation && attribute_id.nil?
|
325
|
+
fail ArgumentError, "Missing the required parameter 'attribute_id' when calling ContactsApi.delete_attribute"
|
326
|
+
end
|
327
|
+
# resource path
|
328
|
+
local_var_path = "/contacts/attributes/{attributeId}".sub('{' + 'attributeId' + '}', attribute_id.to_s)
|
329
|
+
|
330
|
+
# query parameters
|
331
|
+
query_params = {}
|
332
|
+
|
333
|
+
# header parameters
|
334
|
+
header_params = {}
|
335
|
+
# HTTP header 'Accept' (if needed)
|
336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
337
|
+
# HTTP header 'Content-Type'
|
338
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
339
|
+
|
340
|
+
# form parameters
|
341
|
+
form_params = {}
|
342
|
+
|
343
|
+
# http body (model)
|
344
|
+
post_body = nil
|
345
|
+
auth_names = ['api-key']
|
346
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
347
|
+
:header_params => header_params,
|
348
|
+
:query_params => query_params,
|
349
|
+
:form_params => form_params,
|
350
|
+
:body => post_body,
|
351
|
+
:auth_names => auth_names)
|
352
|
+
if @api_client.config.debugging
|
353
|
+
@api_client.config.logger.debug "API called: ContactsApi#delete_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
354
|
+
end
|
355
|
+
return data, status_code, headers
|
356
|
+
end
|
357
|
+
|
358
|
+
# Delete a folder (and all its lists)
|
359
|
+
#
|
360
|
+
# @param folder_id Id of the folder
|
361
|
+
# @param [Hash] opts the optional parameters
|
362
|
+
# @return [nil]
|
363
|
+
def delete_folder(folder_id, opts = {})
|
364
|
+
delete_folder_with_http_info(folder_id, opts)
|
365
|
+
return nil
|
366
|
+
end
|
367
|
+
|
368
|
+
# Delete a folder (and all its lists)
|
369
|
+
#
|
370
|
+
# @param folder_id Id of the folder
|
371
|
+
# @param [Hash] opts the optional parameters
|
372
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
373
|
+
def delete_folder_with_http_info(folder_id, opts = {})
|
374
|
+
if @api_client.config.debugging
|
375
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.delete_folder ..."
|
376
|
+
end
|
377
|
+
# verify the required parameter 'folder_id' is set
|
378
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
379
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.delete_folder"
|
380
|
+
end
|
381
|
+
# resource path
|
382
|
+
local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_id.to_s)
|
383
|
+
|
384
|
+
# query parameters
|
385
|
+
query_params = {}
|
386
|
+
|
387
|
+
# header parameters
|
388
|
+
header_params = {}
|
389
|
+
# HTTP header 'Accept' (if needed)
|
390
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
391
|
+
# HTTP header 'Content-Type'
|
392
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
393
|
+
|
394
|
+
# form parameters
|
395
|
+
form_params = {}
|
396
|
+
|
397
|
+
# http body (model)
|
398
|
+
post_body = nil
|
399
|
+
auth_names = ['api-key']
|
400
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
401
|
+
:header_params => header_params,
|
402
|
+
:query_params => query_params,
|
403
|
+
:form_params => form_params,
|
404
|
+
:body => post_body,
|
405
|
+
:auth_names => auth_names)
|
406
|
+
if @api_client.config.debugging
|
407
|
+
@api_client.config.logger.debug "API called: ContactsApi#delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
408
|
+
end
|
409
|
+
return data, status_code, headers
|
410
|
+
end
|
411
|
+
|
412
|
+
# Delete a list
|
413
|
+
#
|
414
|
+
# @param list_id Id of the list
|
415
|
+
# @param [Hash] opts the optional parameters
|
416
|
+
# @return [nil]
|
417
|
+
def delete_list(list_id, opts = {})
|
418
|
+
delete_list_with_http_info(list_id, opts)
|
419
|
+
return nil
|
420
|
+
end
|
421
|
+
|
422
|
+
# Delete a list
|
423
|
+
#
|
424
|
+
# @param list_id Id of the list
|
425
|
+
# @param [Hash] opts the optional parameters
|
426
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
427
|
+
def delete_list_with_http_info(list_id, opts = {})
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.delete_list ..."
|
430
|
+
end
|
431
|
+
# verify the required parameter 'list_id' is set
|
432
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
433
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.delete_list"
|
434
|
+
end
|
435
|
+
# resource path
|
436
|
+
local_var_path = "/contacts/lists/{listId}".sub('{' + 'listId' + '}', list_id.to_s)
|
437
|
+
|
438
|
+
# query parameters
|
439
|
+
query_params = {}
|
440
|
+
|
441
|
+
# header parameters
|
442
|
+
header_params = {}
|
443
|
+
# HTTP header 'Accept' (if needed)
|
444
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
445
|
+
# HTTP header 'Content-Type'
|
446
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
447
|
+
|
448
|
+
# form parameters
|
449
|
+
form_params = {}
|
450
|
+
|
451
|
+
# http body (model)
|
452
|
+
post_body = nil
|
453
|
+
auth_names = ['api-key']
|
454
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
455
|
+
:header_params => header_params,
|
456
|
+
:query_params => query_params,
|
457
|
+
:form_params => form_params,
|
458
|
+
:body => post_body,
|
459
|
+
:auth_names => auth_names)
|
460
|
+
if @api_client.config.debugging
|
461
|
+
@api_client.config.logger.debug "API called: ContactsApi#delete_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
462
|
+
end
|
463
|
+
return data, status_code, headers
|
464
|
+
end
|
465
|
+
|
466
|
+
# Lists all attributes
|
467
|
+
#
|
468
|
+
# @param [Hash] opts the optional parameters
|
469
|
+
# @return [GetAttributes]
|
470
|
+
def get_attributes(opts = {})
|
471
|
+
data, _status_code, _headers = get_attributes_with_http_info(opts)
|
472
|
+
return data
|
473
|
+
end
|
474
|
+
|
475
|
+
# Lists all attributes
|
476
|
+
#
|
477
|
+
# @param [Hash] opts the optional parameters
|
478
|
+
# @return [Array<(GetAttributes, Fixnum, Hash)>] GetAttributes data, response status code and response headers
|
479
|
+
def get_attributes_with_http_info(opts = {})
|
480
|
+
if @api_client.config.debugging
|
481
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_attributes ..."
|
482
|
+
end
|
483
|
+
# resource path
|
484
|
+
local_var_path = "/contacts/attributes"
|
485
|
+
|
486
|
+
# query parameters
|
487
|
+
query_params = {}
|
488
|
+
|
489
|
+
# header parameters
|
490
|
+
header_params = {}
|
491
|
+
# HTTP header 'Accept' (if needed)
|
492
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
493
|
+
# HTTP header 'Content-Type'
|
494
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
495
|
+
|
496
|
+
# form parameters
|
497
|
+
form_params = {}
|
498
|
+
|
499
|
+
# http body (model)
|
500
|
+
post_body = nil
|
501
|
+
auth_names = ['api-key']
|
502
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
503
|
+
:header_params => header_params,
|
504
|
+
:query_params => query_params,
|
505
|
+
:form_params => form_params,
|
506
|
+
:body => post_body,
|
507
|
+
:auth_names => auth_names,
|
508
|
+
:return_type => 'GetAttributes')
|
509
|
+
if @api_client.config.debugging
|
510
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
511
|
+
end
|
512
|
+
return data, status_code, headers
|
513
|
+
end
|
514
|
+
|
515
|
+
# Retrieves contact informations
|
516
|
+
#
|
517
|
+
# @param email Email (urlencoded) of the contact
|
518
|
+
# @param [Hash] opts the optional parameters
|
519
|
+
# @return [GetExtendedContactDetails]
|
520
|
+
def get_contact_info(email, opts = {})
|
521
|
+
data, _status_code, _headers = get_contact_info_with_http_info(email, opts)
|
522
|
+
return data
|
523
|
+
end
|
524
|
+
|
525
|
+
# Retrieves contact informations
|
526
|
+
#
|
527
|
+
# @param email Email (urlencoded) of the contact
|
528
|
+
# @param [Hash] opts the optional parameters
|
529
|
+
# @return [Array<(GetExtendedContactDetails, Fixnum, Hash)>] GetExtendedContactDetails data, response status code and response headers
|
530
|
+
def get_contact_info_with_http_info(email, opts = {})
|
531
|
+
if @api_client.config.debugging
|
532
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_contact_info ..."
|
533
|
+
end
|
534
|
+
# verify the required parameter 'email' is set
|
535
|
+
if @api_client.config.client_side_validation && email.nil?
|
536
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.get_contact_info"
|
537
|
+
end
|
538
|
+
# resource path
|
539
|
+
local_var_path = "/contacts/{email}".sub('{' + 'email' + '}', email.to_s)
|
540
|
+
|
541
|
+
# query parameters
|
542
|
+
query_params = {}
|
543
|
+
|
544
|
+
# header parameters
|
545
|
+
header_params = {}
|
546
|
+
# HTTP header 'Accept' (if needed)
|
547
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
548
|
+
# HTTP header 'Content-Type'
|
549
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
550
|
+
|
551
|
+
# form parameters
|
552
|
+
form_params = {}
|
553
|
+
|
554
|
+
# http body (model)
|
555
|
+
post_body = nil
|
556
|
+
auth_names = ['api-key']
|
557
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
558
|
+
:header_params => header_params,
|
559
|
+
:query_params => query_params,
|
560
|
+
:form_params => form_params,
|
561
|
+
:body => post_body,
|
562
|
+
:auth_names => auth_names,
|
563
|
+
:return_type => 'GetExtendedContactDetails')
|
564
|
+
if @api_client.config.debugging
|
565
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_contact_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
566
|
+
end
|
567
|
+
return data, status_code, headers
|
568
|
+
end
|
569
|
+
|
570
|
+
# Get the campaigns statistics for a contact
|
571
|
+
#
|
572
|
+
# @param email Email address (urlencoded) of the contact
|
573
|
+
# @param [Hash] opts the optional parameters
|
574
|
+
# @return [GetContactCampaignStats]
|
575
|
+
def get_contact_stats(email, opts = {})
|
576
|
+
data, _status_code, _headers = get_contact_stats_with_http_info(email, opts)
|
577
|
+
return data
|
578
|
+
end
|
579
|
+
|
580
|
+
# Get the campaigns statistics for a contact
|
581
|
+
#
|
582
|
+
# @param email Email address (urlencoded) of the contact
|
583
|
+
# @param [Hash] opts the optional parameters
|
584
|
+
# @return [Array<(GetContactCampaignStats, Fixnum, Hash)>] GetContactCampaignStats data, response status code and response headers
|
585
|
+
def get_contact_stats_with_http_info(email, opts = {})
|
586
|
+
if @api_client.config.debugging
|
587
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_contact_stats ..."
|
588
|
+
end
|
589
|
+
# verify the required parameter 'email' is set
|
590
|
+
if @api_client.config.client_side_validation && email.nil?
|
591
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.get_contact_stats"
|
592
|
+
end
|
593
|
+
# resource path
|
594
|
+
local_var_path = "/contacts/{email}/campaignStats".sub('{' + 'email' + '}', email.to_s)
|
595
|
+
|
596
|
+
# query parameters
|
597
|
+
query_params = {}
|
598
|
+
|
599
|
+
# header parameters
|
600
|
+
header_params = {}
|
601
|
+
# HTTP header 'Accept' (if needed)
|
602
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
603
|
+
# HTTP header 'Content-Type'
|
604
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
605
|
+
|
606
|
+
# form parameters
|
607
|
+
form_params = {}
|
608
|
+
|
609
|
+
# http body (model)
|
610
|
+
post_body = nil
|
611
|
+
auth_names = ['api-key']
|
612
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
613
|
+
:header_params => header_params,
|
614
|
+
:query_params => query_params,
|
615
|
+
:form_params => form_params,
|
616
|
+
:body => post_body,
|
617
|
+
:auth_names => auth_names,
|
618
|
+
:return_type => 'GetContactCampaignStats')
|
619
|
+
if @api_client.config.debugging
|
620
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_contact_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
621
|
+
end
|
622
|
+
return data, status_code, headers
|
623
|
+
end
|
624
|
+
|
625
|
+
# Get all the contacts
|
626
|
+
#
|
627
|
+
# @param [Hash] opts the optional parameters
|
628
|
+
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
629
|
+
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
630
|
+
# @return [GetContacts]
|
631
|
+
def get_contacts(opts = {})
|
632
|
+
data, _status_code, _headers = get_contacts_with_http_info(opts)
|
633
|
+
return data
|
634
|
+
end
|
635
|
+
|
636
|
+
# Get all the contacts
|
637
|
+
#
|
638
|
+
# @param [Hash] opts the optional parameters
|
639
|
+
# @option opts [Integer] :limit Number of documents per page
|
640
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
641
|
+
# @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
|
642
|
+
def get_contacts_with_http_info(opts = {})
|
643
|
+
if @api_client.config.debugging
|
644
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_contacts ..."
|
645
|
+
end
|
646
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
647
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts, must be smaller than or equal to 1000.'
|
648
|
+
end
|
649
|
+
|
650
|
+
# resource path
|
651
|
+
local_var_path = "/contacts"
|
652
|
+
|
653
|
+
# query parameters
|
654
|
+
query_params = {}
|
655
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
656
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
657
|
+
|
658
|
+
# header parameters
|
659
|
+
header_params = {}
|
660
|
+
# HTTP header 'Accept' (if needed)
|
661
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
662
|
+
# HTTP header 'Content-Type'
|
663
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
664
|
+
|
665
|
+
# form parameters
|
666
|
+
form_params = {}
|
667
|
+
|
668
|
+
# http body (model)
|
669
|
+
post_body = nil
|
670
|
+
auth_names = ['api-key']
|
671
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
672
|
+
:header_params => header_params,
|
673
|
+
:query_params => query_params,
|
674
|
+
:form_params => form_params,
|
675
|
+
:body => post_body,
|
676
|
+
:auth_names => auth_names,
|
677
|
+
:return_type => 'GetContacts')
|
678
|
+
if @api_client.config.debugging
|
679
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
680
|
+
end
|
681
|
+
return data, status_code, headers
|
682
|
+
end
|
683
|
+
|
684
|
+
# Get the contacts in a list
|
685
|
+
#
|
686
|
+
# @param list_id Id of the list
|
687
|
+
# @param [Hash] opts the optional parameters
|
688
|
+
# @option opts [String] :modified_since Filter the contacts modified after a given date (YYYY-MM-DD HH:mm:ss)
|
689
|
+
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
690
|
+
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
691
|
+
# @return [GetContacts]
|
692
|
+
def get_contacts_from_list(list_id, opts = {})
|
693
|
+
data, _status_code, _headers = get_contacts_from_list_with_http_info(list_id, opts)
|
694
|
+
return data
|
695
|
+
end
|
696
|
+
|
697
|
+
# Get the contacts in a list
|
698
|
+
#
|
699
|
+
# @param list_id Id of the list
|
700
|
+
# @param [Hash] opts the optional parameters
|
701
|
+
# @option opts [String] :modified_since Filter the contacts modified after a given date (YYYY-MM-DD HH:mm:ss)
|
702
|
+
# @option opts [Integer] :limit Number of documents per page
|
703
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
704
|
+
# @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
|
705
|
+
def get_contacts_from_list_with_http_info(list_id, opts = {})
|
706
|
+
if @api_client.config.debugging
|
707
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_contacts_from_list ..."
|
708
|
+
end
|
709
|
+
# verify the required parameter 'list_id' is set
|
710
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
711
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.get_contacts_from_list"
|
712
|
+
end
|
713
|
+
if @api_client.config.client_side_validation && !opts[:'modified_since'].nil? && opts[:'modified_since'] !~ Regexp.new(/YYYY-MM-DD HH:mm:ss/)
|
714
|
+
fail ArgumentError, "invalid value for 'opts[:\"modified_since\"]' when calling ContactsApi.get_contacts_from_list, must conform to the pattern /YYYY-MM-DD HH:mm:ss/."
|
715
|
+
end
|
716
|
+
|
717
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
718
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts_from_list, must be smaller than or equal to 500.'
|
719
|
+
end
|
720
|
+
|
721
|
+
# resource path
|
722
|
+
local_var_path = "/contacts/lists/{listId}/contacts".sub('{' + 'listId' + '}', list_id.to_s)
|
723
|
+
|
724
|
+
# query parameters
|
725
|
+
query_params = {}
|
726
|
+
query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
|
727
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
728
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
729
|
+
|
730
|
+
# header parameters
|
731
|
+
header_params = {}
|
732
|
+
# HTTP header 'Accept' (if needed)
|
733
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
734
|
+
# HTTP header 'Content-Type'
|
735
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
736
|
+
|
737
|
+
# form parameters
|
738
|
+
form_params = {}
|
739
|
+
|
740
|
+
# http body (model)
|
741
|
+
post_body = nil
|
742
|
+
auth_names = ['api-key']
|
743
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
744
|
+
:header_params => header_params,
|
745
|
+
:query_params => query_params,
|
746
|
+
:form_params => form_params,
|
747
|
+
:body => post_body,
|
748
|
+
:auth_names => auth_names,
|
749
|
+
:return_type => 'GetContacts')
|
750
|
+
if @api_client.config.debugging
|
751
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_contacts_from_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
752
|
+
end
|
753
|
+
return data, status_code, headers
|
754
|
+
end
|
755
|
+
|
756
|
+
# Returns folder details
|
757
|
+
#
|
758
|
+
# @param folder_id id of the folder
|
759
|
+
# @param [Hash] opts the optional parameters
|
760
|
+
# @return [GetFolder]
|
761
|
+
def get_folder(folder_id, opts = {})
|
762
|
+
data, _status_code, _headers = get_folder_with_http_info(folder_id, opts)
|
763
|
+
return data
|
764
|
+
end
|
765
|
+
|
766
|
+
# Returns folder details
|
767
|
+
#
|
768
|
+
# @param folder_id id of the folder
|
769
|
+
# @param [Hash] opts the optional parameters
|
770
|
+
# @return [Array<(GetFolder, Fixnum, Hash)>] GetFolder data, response status code and response headers
|
771
|
+
def get_folder_with_http_info(folder_id, opts = {})
|
772
|
+
if @api_client.config.debugging
|
773
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_folder ..."
|
774
|
+
end
|
775
|
+
# verify the required parameter 'folder_id' is set
|
776
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
777
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.get_folder"
|
778
|
+
end
|
779
|
+
# resource path
|
780
|
+
local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_id.to_s)
|
781
|
+
|
782
|
+
# query parameters
|
783
|
+
query_params = {}
|
784
|
+
|
785
|
+
# header parameters
|
786
|
+
header_params = {}
|
787
|
+
# HTTP header 'Accept' (if needed)
|
788
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
789
|
+
# HTTP header 'Content-Type'
|
790
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
791
|
+
|
792
|
+
# form parameters
|
793
|
+
form_params = {}
|
794
|
+
|
795
|
+
# http body (model)
|
796
|
+
post_body = nil
|
797
|
+
auth_names = ['api-key']
|
798
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
799
|
+
:header_params => header_params,
|
800
|
+
:query_params => query_params,
|
801
|
+
:form_params => form_params,
|
802
|
+
:body => post_body,
|
803
|
+
:auth_names => auth_names,
|
804
|
+
:return_type => 'GetFolder')
|
805
|
+
if @api_client.config.debugging
|
806
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
807
|
+
end
|
808
|
+
return data, status_code, headers
|
809
|
+
end
|
810
|
+
|
811
|
+
# Get the lists in a folder
|
812
|
+
#
|
813
|
+
# @param folder_id Id of the folder
|
814
|
+
# @param [Hash] opts the optional parameters
|
815
|
+
# @option opts [Integer] :limit Number of documents per page (default to 10)
|
816
|
+
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
817
|
+
# @return [GetFolderLists]
|
818
|
+
def get_folder_lists(folder_id, opts = {})
|
819
|
+
data, _status_code, _headers = get_folder_lists_with_http_info(folder_id, opts)
|
820
|
+
return data
|
821
|
+
end
|
822
|
+
|
823
|
+
# Get the lists in a folder
|
824
|
+
#
|
825
|
+
# @param folder_id Id of the folder
|
826
|
+
# @param [Hash] opts the optional parameters
|
827
|
+
# @option opts [Integer] :limit Number of documents per page
|
828
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
829
|
+
# @return [Array<(GetFolderLists, Fixnum, Hash)>] GetFolderLists data, response status code and response headers
|
830
|
+
def get_folder_lists_with_http_info(folder_id, opts = {})
|
831
|
+
if @api_client.config.debugging
|
832
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_folder_lists ..."
|
833
|
+
end
|
834
|
+
# verify the required parameter 'folder_id' is set
|
835
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
836
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.get_folder_lists"
|
837
|
+
end
|
838
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
|
839
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_folder_lists, must be smaller than or equal to 50.'
|
840
|
+
end
|
841
|
+
|
842
|
+
# resource path
|
843
|
+
local_var_path = "/contacts/folders/{folderId}/lists".sub('{' + 'folderId' + '}', folder_id.to_s)
|
844
|
+
|
845
|
+
# query parameters
|
846
|
+
query_params = {}
|
847
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
848
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
849
|
+
|
850
|
+
# header parameters
|
851
|
+
header_params = {}
|
852
|
+
# HTTP header 'Accept' (if needed)
|
853
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
854
|
+
# HTTP header 'Content-Type'
|
855
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
856
|
+
|
857
|
+
# form parameters
|
858
|
+
form_params = {}
|
859
|
+
|
860
|
+
# http body (model)
|
861
|
+
post_body = nil
|
862
|
+
auth_names = ['api-key']
|
863
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
864
|
+
:header_params => header_params,
|
865
|
+
:query_params => query_params,
|
866
|
+
:form_params => form_params,
|
867
|
+
:body => post_body,
|
868
|
+
:auth_names => auth_names,
|
869
|
+
:return_type => 'GetFolderLists')
|
870
|
+
if @api_client.config.debugging
|
871
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_folder_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
872
|
+
end
|
873
|
+
return data, status_code, headers
|
874
|
+
end
|
875
|
+
|
876
|
+
# Get all the folders
|
877
|
+
#
|
878
|
+
# @param limit Number of documents per page
|
879
|
+
# @param offset Index of the first document of the page
|
880
|
+
# @param [Hash] opts the optional parameters
|
881
|
+
# @return [GetFolders]
|
882
|
+
def get_folders(limit, offset, opts = {})
|
883
|
+
data, _status_code, _headers = get_folders_with_http_info(limit, offset, opts)
|
884
|
+
return data
|
885
|
+
end
|
886
|
+
|
887
|
+
# Get all the folders
|
888
|
+
#
|
889
|
+
# @param limit Number of documents per page
|
890
|
+
# @param offset Index of the first document of the page
|
891
|
+
# @param [Hash] opts the optional parameters
|
892
|
+
# @return [Array<(GetFolders, Fixnum, Hash)>] GetFolders data, response status code and response headers
|
893
|
+
def get_folders_with_http_info(limit, offset, opts = {})
|
894
|
+
if @api_client.config.debugging
|
895
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_folders ..."
|
896
|
+
end
|
897
|
+
# verify the required parameter 'limit' is set
|
898
|
+
if @api_client.config.client_side_validation && limit.nil?
|
899
|
+
fail ArgumentError, "Missing the required parameter 'limit' when calling ContactsApi.get_folders"
|
900
|
+
end
|
901
|
+
if @api_client.config.client_side_validation && limit > 50
|
902
|
+
fail ArgumentError, 'invalid value for "limit" when calling ContactsApi.get_folders, must be smaller than or equal to 50.'
|
903
|
+
end
|
904
|
+
|
905
|
+
# verify the required parameter 'offset' is set
|
906
|
+
if @api_client.config.client_side_validation && offset.nil?
|
907
|
+
fail ArgumentError, "Missing the required parameter 'offset' when calling ContactsApi.get_folders"
|
908
|
+
end
|
909
|
+
# resource path
|
910
|
+
local_var_path = "/contacts/folders"
|
911
|
+
|
912
|
+
# query parameters
|
913
|
+
query_params = {}
|
914
|
+
query_params[:'limit'] = limit
|
915
|
+
query_params[:'offset'] = offset
|
916
|
+
|
917
|
+
# header parameters
|
918
|
+
header_params = {}
|
919
|
+
# HTTP header 'Accept' (if needed)
|
920
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
921
|
+
# HTTP header 'Content-Type'
|
922
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
923
|
+
|
924
|
+
# form parameters
|
925
|
+
form_params = {}
|
926
|
+
|
927
|
+
# http body (model)
|
928
|
+
post_body = nil
|
929
|
+
auth_names = ['api-key']
|
930
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
931
|
+
:header_params => header_params,
|
932
|
+
:query_params => query_params,
|
933
|
+
:form_params => form_params,
|
934
|
+
:body => post_body,
|
935
|
+
:auth_names => auth_names,
|
936
|
+
:return_type => 'GetFolders')
|
937
|
+
if @api_client.config.debugging
|
938
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
939
|
+
end
|
940
|
+
return data, status_code, headers
|
941
|
+
end
|
942
|
+
|
943
|
+
# Get the details of a list
|
944
|
+
#
|
945
|
+
# @param list_id Id of the list
|
946
|
+
# @param [Hash] opts the optional parameters
|
947
|
+
# @return [GetExtendedList]
|
948
|
+
def get_list(list_id, opts = {})
|
949
|
+
data, _status_code, _headers = get_list_with_http_info(list_id, opts)
|
950
|
+
return data
|
951
|
+
end
|
952
|
+
|
953
|
+
# Get the details of a list
|
954
|
+
#
|
955
|
+
# @param list_id Id of the list
|
956
|
+
# @param [Hash] opts the optional parameters
|
957
|
+
# @return [Array<(GetExtendedList, Fixnum, Hash)>] GetExtendedList data, response status code and response headers
|
958
|
+
def get_list_with_http_info(list_id, opts = {})
|
959
|
+
if @api_client.config.debugging
|
960
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_list ..."
|
961
|
+
end
|
962
|
+
# verify the required parameter 'list_id' is set
|
963
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
964
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.get_list"
|
965
|
+
end
|
966
|
+
# resource path
|
967
|
+
local_var_path = "/contacts/lists/{listId}".sub('{' + 'listId' + '}', list_id.to_s)
|
968
|
+
|
969
|
+
# query parameters
|
970
|
+
query_params = {}
|
971
|
+
|
972
|
+
# header parameters
|
973
|
+
header_params = {}
|
974
|
+
# HTTP header 'Accept' (if needed)
|
975
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
976
|
+
# HTTP header 'Content-Type'
|
977
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
978
|
+
|
979
|
+
# form parameters
|
980
|
+
form_params = {}
|
981
|
+
|
982
|
+
# http body (model)
|
983
|
+
post_body = nil
|
984
|
+
auth_names = ['api-key']
|
985
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
986
|
+
:header_params => header_params,
|
987
|
+
:query_params => query_params,
|
988
|
+
:form_params => form_params,
|
989
|
+
:body => post_body,
|
990
|
+
:auth_names => auth_names,
|
991
|
+
:return_type => 'GetExtendedList')
|
992
|
+
if @api_client.config.debugging
|
993
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
994
|
+
end
|
995
|
+
return data, status_code, headers
|
996
|
+
end
|
997
|
+
|
998
|
+
# Get all the lists
|
999
|
+
#
|
1000
|
+
# @param [Hash] opts the optional parameters
|
1001
|
+
# @option opts [Integer] :limit Number of documents per page (default to 10)
|
1002
|
+
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
1003
|
+
# @return [GetLists]
|
1004
|
+
def get_lists(opts = {})
|
1005
|
+
data, _status_code, _headers = get_lists_with_http_info(opts)
|
1006
|
+
return data
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
# Get all the lists
|
1010
|
+
#
|
1011
|
+
# @param [Hash] opts the optional parameters
|
1012
|
+
# @option opts [Integer] :limit Number of documents per page
|
1013
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
1014
|
+
# @return [Array<(GetLists, Fixnum, Hash)>] GetLists data, response status code and response headers
|
1015
|
+
def get_lists_with_http_info(opts = {})
|
1016
|
+
if @api_client.config.debugging
|
1017
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.get_lists ..."
|
1018
|
+
end
|
1019
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
|
1020
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_lists, must be smaller than or equal to 50.'
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
# resource path
|
1024
|
+
local_var_path = "/contacts/lists"
|
1025
|
+
|
1026
|
+
# query parameters
|
1027
|
+
query_params = {}
|
1028
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1029
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1030
|
+
|
1031
|
+
# header parameters
|
1032
|
+
header_params = {}
|
1033
|
+
# HTTP header 'Accept' (if needed)
|
1034
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1035
|
+
# HTTP header 'Content-Type'
|
1036
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1037
|
+
|
1038
|
+
# form parameters
|
1039
|
+
form_params = {}
|
1040
|
+
|
1041
|
+
# http body (model)
|
1042
|
+
post_body = nil
|
1043
|
+
auth_names = ['api-key']
|
1044
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1045
|
+
:header_params => header_params,
|
1046
|
+
:query_params => query_params,
|
1047
|
+
:form_params => form_params,
|
1048
|
+
:body => post_body,
|
1049
|
+
:auth_names => auth_names,
|
1050
|
+
:return_type => 'GetLists')
|
1051
|
+
if @api_client.config.debugging
|
1052
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1053
|
+
end
|
1054
|
+
return data, status_code, headers
|
1055
|
+
end
|
1056
|
+
|
1057
|
+
# Import contacts
|
1058
|
+
# It returns the background process ID which on completion calls the notify URL that you have set in the input.
|
1059
|
+
# @param request_contact_import Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns``
|
1060
|
+
# @param [Hash] opts the optional parameters
|
1061
|
+
# @return [CreatedProcessId]
|
1062
|
+
def import_contacts(request_contact_import, opts = {})
|
1063
|
+
data, _status_code, _headers = import_contacts_with_http_info(request_contact_import, opts)
|
1064
|
+
return data
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
# Import contacts
|
1068
|
+
# It returns the background process ID which on completion calls the notify URL that you have set in the input.
|
1069
|
+
# @param request_contact_import Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns``
|
1070
|
+
# @param [Hash] opts the optional parameters
|
1071
|
+
# @return [Array<(CreatedProcessId, Fixnum, Hash)>] CreatedProcessId data, response status code and response headers
|
1072
|
+
def import_contacts_with_http_info(request_contact_import, opts = {})
|
1073
|
+
if @api_client.config.debugging
|
1074
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.import_contacts ..."
|
1075
|
+
end
|
1076
|
+
# verify the required parameter 'request_contact_import' is set
|
1077
|
+
if @api_client.config.client_side_validation && request_contact_import.nil?
|
1078
|
+
fail ArgumentError, "Missing the required parameter 'request_contact_import' when calling ContactsApi.import_contacts"
|
1079
|
+
end
|
1080
|
+
# resource path
|
1081
|
+
local_var_path = "/contacts/import"
|
1082
|
+
|
1083
|
+
# query parameters
|
1084
|
+
query_params = {}
|
1085
|
+
|
1086
|
+
# header parameters
|
1087
|
+
header_params = {}
|
1088
|
+
# HTTP header 'Accept' (if needed)
|
1089
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1090
|
+
# HTTP header 'Content-Type'
|
1091
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1092
|
+
|
1093
|
+
# form parameters
|
1094
|
+
form_params = {}
|
1095
|
+
|
1096
|
+
# http body (model)
|
1097
|
+
post_body = @api_client.object_to_http_body(request_contact_import)
|
1098
|
+
auth_names = ['api-key']
|
1099
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1100
|
+
:header_params => header_params,
|
1101
|
+
:query_params => query_params,
|
1102
|
+
:form_params => form_params,
|
1103
|
+
:body => post_body,
|
1104
|
+
:auth_names => auth_names,
|
1105
|
+
:return_type => 'CreatedProcessId')
|
1106
|
+
if @api_client.config.debugging
|
1107
|
+
@api_client.config.logger.debug "API called: ContactsApi#import_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1108
|
+
end
|
1109
|
+
return data, status_code, headers
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
# Remove existing contacts from a list
|
1113
|
+
#
|
1114
|
+
# @param list_id Id of the list
|
1115
|
+
# @param contact_emails Emails adresses of the contact
|
1116
|
+
# @param [Hash] opts the optional parameters
|
1117
|
+
# @return [PostContactInfo]
|
1118
|
+
def remove_contact_to_list(list_id, contact_emails, opts = {})
|
1119
|
+
data, _status_code, _headers = remove_contact_to_list_with_http_info(list_id, contact_emails, opts)
|
1120
|
+
return data
|
1121
|
+
end
|
1122
|
+
|
1123
|
+
# Remove existing contacts from a list
|
1124
|
+
#
|
1125
|
+
# @param list_id Id of the list
|
1126
|
+
# @param contact_emails Emails adresses of the contact
|
1127
|
+
# @param [Hash] opts the optional parameters
|
1128
|
+
# @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers
|
1129
|
+
def remove_contact_to_list_with_http_info(list_id, contact_emails, opts = {})
|
1130
|
+
if @api_client.config.debugging
|
1131
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.remove_contact_to_list ..."
|
1132
|
+
end
|
1133
|
+
# verify the required parameter 'list_id' is set
|
1134
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
1135
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.remove_contact_to_list"
|
1136
|
+
end
|
1137
|
+
# verify the required parameter 'contact_emails' is set
|
1138
|
+
if @api_client.config.client_side_validation && contact_emails.nil?
|
1139
|
+
fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ContactsApi.remove_contact_to_list"
|
1140
|
+
end
|
1141
|
+
# resource path
|
1142
|
+
local_var_path = "/contacts/lists/{listId}/contacts/remove".sub('{' + 'listId' + '}', list_id.to_s)
|
1143
|
+
|
1144
|
+
# query parameters
|
1145
|
+
query_params = {}
|
1146
|
+
|
1147
|
+
# header parameters
|
1148
|
+
header_params = {}
|
1149
|
+
# HTTP header 'Accept' (if needed)
|
1150
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1151
|
+
# HTTP header 'Content-Type'
|
1152
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1153
|
+
|
1154
|
+
# form parameters
|
1155
|
+
form_params = {}
|
1156
|
+
|
1157
|
+
# http body (model)
|
1158
|
+
post_body = @api_client.object_to_http_body(contact_emails)
|
1159
|
+
auth_names = ['api-key']
|
1160
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1161
|
+
:header_params => header_params,
|
1162
|
+
:query_params => query_params,
|
1163
|
+
:form_params => form_params,
|
1164
|
+
:body => post_body,
|
1165
|
+
:auth_names => auth_names,
|
1166
|
+
:return_type => 'PostContactInfo')
|
1167
|
+
if @api_client.config.debugging
|
1168
|
+
@api_client.config.logger.debug "API called: ContactsApi#remove_contact_to_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1169
|
+
end
|
1170
|
+
return data, status_code, headers
|
1171
|
+
end
|
1172
|
+
|
1173
|
+
# Export contacts
|
1174
|
+
# It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
|
1175
|
+
# @param request_contact_export Values to request a contact export
|
1176
|
+
# @param [Hash] opts the optional parameters
|
1177
|
+
# @return [CreatedProcessId]
|
1178
|
+
def request_contact_export(request_contact_export, opts = {})
|
1179
|
+
data, _status_code, _headers = request_contact_export_with_http_info(request_contact_export, opts)
|
1180
|
+
return data
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
# Export contacts
|
1184
|
+
# It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
|
1185
|
+
# @param request_contact_export Values to request a contact export
|
1186
|
+
# @param [Hash] opts the optional parameters
|
1187
|
+
# @return [Array<(CreatedProcessId, Fixnum, Hash)>] CreatedProcessId data, response status code and response headers
|
1188
|
+
def request_contact_export_with_http_info(request_contact_export, opts = {})
|
1189
|
+
if @api_client.config.debugging
|
1190
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.request_contact_export ..."
|
1191
|
+
end
|
1192
|
+
# verify the required parameter 'request_contact_export' is set
|
1193
|
+
if @api_client.config.client_side_validation && request_contact_export.nil?
|
1194
|
+
fail ArgumentError, "Missing the required parameter 'request_contact_export' when calling ContactsApi.request_contact_export"
|
1195
|
+
end
|
1196
|
+
# resource path
|
1197
|
+
local_var_path = "/contacts/export"
|
1198
|
+
|
1199
|
+
# query parameters
|
1200
|
+
query_params = {}
|
1201
|
+
|
1202
|
+
# header parameters
|
1203
|
+
header_params = {}
|
1204
|
+
# HTTP header 'Accept' (if needed)
|
1205
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1206
|
+
# HTTP header 'Content-Type'
|
1207
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1208
|
+
|
1209
|
+
# form parameters
|
1210
|
+
form_params = {}
|
1211
|
+
|
1212
|
+
# http body (model)
|
1213
|
+
post_body = @api_client.object_to_http_body(request_contact_export)
|
1214
|
+
auth_names = ['api-key']
|
1215
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1216
|
+
:header_params => header_params,
|
1217
|
+
:query_params => query_params,
|
1218
|
+
:form_params => form_params,
|
1219
|
+
:body => post_body,
|
1220
|
+
:auth_names => auth_names,
|
1221
|
+
:return_type => 'CreatedProcessId')
|
1222
|
+
if @api_client.config.debugging
|
1223
|
+
@api_client.config.logger.debug "API called: ContactsApi#request_contact_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1224
|
+
end
|
1225
|
+
return data, status_code, headers
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
# Updates a contact
|
1229
|
+
#
|
1230
|
+
# @param email Email (urlencoded) of the contact
|
1231
|
+
# @param update_contact Values to update a contact
|
1232
|
+
# @param [Hash] opts the optional parameters
|
1233
|
+
# @return [nil]
|
1234
|
+
def update_contact(email, update_contact, opts = {})
|
1235
|
+
update_contact_with_http_info(email, update_contact, opts)
|
1236
|
+
return nil
|
1237
|
+
end
|
1238
|
+
|
1239
|
+
# Updates a contact
|
1240
|
+
#
|
1241
|
+
# @param email Email (urlencoded) of the contact
|
1242
|
+
# @param update_contact Values to update a contact
|
1243
|
+
# @param [Hash] opts the optional parameters
|
1244
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1245
|
+
def update_contact_with_http_info(email, update_contact, opts = {})
|
1246
|
+
if @api_client.config.debugging
|
1247
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.update_contact ..."
|
1248
|
+
end
|
1249
|
+
# verify the required parameter 'email' is set
|
1250
|
+
if @api_client.config.client_side_validation && email.nil?
|
1251
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.update_contact"
|
1252
|
+
end
|
1253
|
+
# verify the required parameter 'update_contact' is set
|
1254
|
+
if @api_client.config.client_side_validation && update_contact.nil?
|
1255
|
+
fail ArgumentError, "Missing the required parameter 'update_contact' when calling ContactsApi.update_contact"
|
1256
|
+
end
|
1257
|
+
# resource path
|
1258
|
+
local_var_path = "/contacts/{email}".sub('{' + 'email' + '}', email.to_s)
|
1259
|
+
|
1260
|
+
# query parameters
|
1261
|
+
query_params = {}
|
1262
|
+
|
1263
|
+
# header parameters
|
1264
|
+
header_params = {}
|
1265
|
+
# HTTP header 'Accept' (if needed)
|
1266
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1267
|
+
# HTTP header 'Content-Type'
|
1268
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1269
|
+
|
1270
|
+
# form parameters
|
1271
|
+
form_params = {}
|
1272
|
+
|
1273
|
+
# http body (model)
|
1274
|
+
post_body = @api_client.object_to_http_body(update_contact)
|
1275
|
+
auth_names = ['api-key']
|
1276
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1277
|
+
:header_params => header_params,
|
1278
|
+
:query_params => query_params,
|
1279
|
+
:form_params => form_params,
|
1280
|
+
:body => post_body,
|
1281
|
+
:auth_names => auth_names)
|
1282
|
+
if @api_client.config.debugging
|
1283
|
+
@api_client.config.logger.debug "API called: ContactsApi#update_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1284
|
+
end
|
1285
|
+
return data, status_code, headers
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
# Update a contact folder
|
1289
|
+
#
|
1290
|
+
# @param folder_id Id of the folder
|
1291
|
+
# @param name Name of the folder
|
1292
|
+
# @param [Hash] opts the optional parameters
|
1293
|
+
# @return [nil]
|
1294
|
+
def update_folder(folder_id, name, opts = {})
|
1295
|
+
update_folder_with_http_info(folder_id, name, opts)
|
1296
|
+
return nil
|
1297
|
+
end
|
1298
|
+
|
1299
|
+
# Update a contact folder
|
1300
|
+
#
|
1301
|
+
# @param folder_id Id of the folder
|
1302
|
+
# @param name Name of the folder
|
1303
|
+
# @param [Hash] opts the optional parameters
|
1304
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1305
|
+
def update_folder_with_http_info(folder_id, name, opts = {})
|
1306
|
+
if @api_client.config.debugging
|
1307
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.update_folder ..."
|
1308
|
+
end
|
1309
|
+
# verify the required parameter 'folder_id' is set
|
1310
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
1311
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.update_folder"
|
1312
|
+
end
|
1313
|
+
# verify the required parameter 'name' is set
|
1314
|
+
if @api_client.config.client_side_validation && name.nil?
|
1315
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ContactsApi.update_folder"
|
1316
|
+
end
|
1317
|
+
# resource path
|
1318
|
+
local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_id.to_s)
|
1319
|
+
|
1320
|
+
# query parameters
|
1321
|
+
query_params = {}
|
1322
|
+
|
1323
|
+
# header parameters
|
1324
|
+
header_params = {}
|
1325
|
+
# HTTP header 'Accept' (if needed)
|
1326
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1327
|
+
# HTTP header 'Content-Type'
|
1328
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1329
|
+
|
1330
|
+
# form parameters
|
1331
|
+
form_params = {}
|
1332
|
+
|
1333
|
+
# http body (model)
|
1334
|
+
post_body = @api_client.object_to_http_body(name)
|
1335
|
+
auth_names = ['api-key']
|
1336
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1337
|
+
:header_params => header_params,
|
1338
|
+
:query_params => query_params,
|
1339
|
+
:form_params => form_params,
|
1340
|
+
:body => post_body,
|
1341
|
+
:auth_names => auth_names)
|
1342
|
+
if @api_client.config.debugging
|
1343
|
+
@api_client.config.logger.debug "API called: ContactsApi#update_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1344
|
+
end
|
1345
|
+
return data, status_code, headers
|
1346
|
+
end
|
1347
|
+
|
1348
|
+
# Update a list
|
1349
|
+
#
|
1350
|
+
# @param list_id Id of the list
|
1351
|
+
# @param update_list Values to update a list
|
1352
|
+
# @param [Hash] opts the optional parameters
|
1353
|
+
# @return [nil]
|
1354
|
+
def update_list(list_id, update_list, opts = {})
|
1355
|
+
update_list_with_http_info(list_id, update_list, opts)
|
1356
|
+
return nil
|
1357
|
+
end
|
1358
|
+
|
1359
|
+
# Update a list
|
1360
|
+
#
|
1361
|
+
# @param list_id Id of the list
|
1362
|
+
# @param update_list Values to update a list
|
1363
|
+
# @param [Hash] opts the optional parameters
|
1364
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1365
|
+
def update_list_with_http_info(list_id, update_list, opts = {})
|
1366
|
+
if @api_client.config.debugging
|
1367
|
+
@api_client.config.logger.debug "Calling API: ContactsApi.update_list ..."
|
1368
|
+
end
|
1369
|
+
# verify the required parameter 'list_id' is set
|
1370
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
1371
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.update_list"
|
1372
|
+
end
|
1373
|
+
# verify the required parameter 'update_list' is set
|
1374
|
+
if @api_client.config.client_side_validation && update_list.nil?
|
1375
|
+
fail ArgumentError, "Missing the required parameter 'update_list' when calling ContactsApi.update_list"
|
1376
|
+
end
|
1377
|
+
# resource path
|
1378
|
+
local_var_path = "/contacts/lists/{listId}".sub('{' + 'listId' + '}', list_id.to_s)
|
1379
|
+
|
1380
|
+
# query parameters
|
1381
|
+
query_params = {}
|
1382
|
+
|
1383
|
+
# header parameters
|
1384
|
+
header_params = {}
|
1385
|
+
# HTTP header 'Accept' (if needed)
|
1386
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1387
|
+
# HTTP header 'Content-Type'
|
1388
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1389
|
+
|
1390
|
+
# form parameters
|
1391
|
+
form_params = {}
|
1392
|
+
|
1393
|
+
# http body (model)
|
1394
|
+
post_body = @api_client.object_to_http_body(update_list)
|
1395
|
+
auth_names = ['api-key']
|
1396
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1397
|
+
:header_params => header_params,
|
1398
|
+
:query_params => query_params,
|
1399
|
+
:form_params => form_params,
|
1400
|
+
:body => post_body,
|
1401
|
+
:auth_names => auth_names)
|
1402
|
+
if @api_client.config.debugging
|
1403
|
+
@api_client.config.logger.debug "API called: ContactsApi#update_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1404
|
+
end
|
1405
|
+
return data, status_code, headers
|
1406
|
+
end
|
1407
|
+
end
|
1408
|
+
end
|