sib-api-v3-sdk 5.2.5 → 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (470) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/LICENSE.md +1 -1
  4. data/README.md +100 -75
  5. data/docs/AbTestCampaignResult.md +15 -0
  6. data/docs/AbTestCampaignResultClickedLinks.md +9 -0
  7. data/docs/AbTestCampaignResultStatistics.md +13 -0
  8. data/docs/AbTestVersionClicks.md +7 -0
  9. data/docs/AbTestVersionClicksInner.md +10 -0
  10. data/docs/AbTestVersionStats.md +9 -0
  11. data/docs/AccountApi.md +3 -3
  12. data/docs/AddContactToList.md +2 -1
  13. data/docs/AttributesApi.md +18 -18
  14. data/docs/ContactsApi.md +136 -73
  15. data/docs/CreateAttribute.md +1 -1
  16. data/docs/CreateChild.md +1 -0
  17. data/docs/CreateContact.md +2 -2
  18. data/docs/CreateDoiContact.md +13 -0
  19. data/docs/CreateEmailCampaign.md +4 -1
  20. data/docs/CreateEmailCampaignSender.md +1 -0
  21. data/docs/CreateReseller.md +1 -0
  22. data/docs/CreateSender.md +1 -1
  23. data/docs/CreateSmsCampaign.md +1 -1
  24. data/docs/CreateSmtpTemplateSender.md +1 -0
  25. data/docs/CreateWebhook.md +2 -2
  26. data/docs/EmailCampaignsApi.md +202 -25
  27. data/docs/EmailExportRecipients.md +1 -1
  28. data/docs/FoldersApi.md +12 -12
  29. data/docs/GetAggregatedReport.md +13 -13
  30. data/docs/GetCampaignStats.md +1 -0
  31. data/docs/GetChildAccountCreationStatus.md +8 -0
  32. data/docs/GetChildrenList.md +1 -0
  33. data/docs/GetDeviceBrowserStats.md +11 -0
  34. data/docs/GetEmailCampaign.md +1 -0
  35. data/docs/GetExtendedCampaignOverview.md +1 -0
  36. data/docs/GetExtendedCampaignOverviewSender.md +1 -0
  37. data/docs/GetExtendedCampaignStats.md +2 -0
  38. data/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md +1 -1
  39. data/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md +1 -1
  40. data/docs/GetSharedTemplateUrl.md +8 -0
  41. data/docs/GetSmtpTemplateOverview.md +1 -0
  42. data/docs/GetSmtpTemplateOverviewSender.md +1 -0
  43. data/docs/GetStatsByBrowser.md +7 -0
  44. data/docs/GetStatsByDevice.md +11 -0
  45. data/docs/GetTransacBlockedContacts.md +9 -0
  46. data/docs/GetTransacBlockedContactsContacts.md +11 -0
  47. data/docs/GetTransacBlockedContactsReason.md +9 -0
  48. data/docs/GetTransacEmailsListTransactionalEmails.md +2 -0
  49. data/docs/ListsApi.md +17 -17
  50. data/docs/PostContactInfoContacts.md +1 -0
  51. data/docs/RemainingCreditModelChild.md +2 -2
  52. data/docs/RemainingCreditModelReseller.md +2 -2
  53. data/docs/RemoveContactFromList.md +3 -2
  54. data/docs/RequestContactExport.md +3 -2
  55. data/docs/RequestContactExportCustomContactFilter.md +13 -0
  56. data/docs/RequestContactImport.md +2 -2
  57. data/docs/RequestSMSRecipientExport.md +1 -1
  58. data/docs/ResellerApi.md +158 -91
  59. data/docs/SMSCampaignsApi.md +24 -24
  60. data/docs/SendEmail.md +3 -3
  61. data/docs/SendReport.md +1 -1
  62. data/docs/SendReportEmail.md +1 -5
  63. data/docs/SendSmtpEmail.md +4 -4
  64. data/docs/SendSmtpEmailBcc.md +1 -1
  65. data/docs/SendSmtpEmailCc.md +1 -1
  66. data/docs/SendSmtpEmailReplyTo.md +1 -1
  67. data/docs/SendSmtpEmailSender.md +2 -1
  68. data/docs/SendSmtpEmailTo.md +1 -1
  69. data/docs/SendTransacSms.md +2 -2
  70. data/docs/SendersApi.md +8 -8
  71. data/docs/{SMTPApi.md → TransactionalEmailsApi.md} +254 -73
  72. data/docs/TransactionalSMSApi.md +17 -17
  73. data/docs/UpdateAttribute.md +1 -1
  74. data/docs/UpdateChildAccountStatus.md +1 -0
  75. data/docs/UpdateContact.md +1 -1
  76. data/docs/UpdateEmailCampaign.md +4 -1
  77. data/docs/UpdateEmailCampaignSender.md +1 -0
  78. data/docs/UpdateSmsCampaign.md +1 -1
  79. data/docs/UpdateSmtpTemplateSender.md +1 -0
  80. data/docs/UpdateWebhook.md +1 -1
  81. data/docs/UploadImageToGallery.md +9 -0
  82. data/docs/WebhooksApi.md +1 -1
  83. data/lib/sib-api-v3-sdk.rb +20 -3
  84. data/lib/sib-api-v3-sdk/api/account_api.rb +8 -11
  85. data/lib/sib-api-v3-sdk/api/attributes_api.rb +23 -35
  86. data/lib/sib-api-v3-sdk/api/contacts_api.rb +203 -220
  87. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +204 -73
  88. data/lib/sib-api-v3-sdk/api/folders_api.rb +29 -47
  89. data/lib/sib-api-v3-sdk/api/lists_api.rb +42 -69
  90. data/lib/sib-api-v3-sdk/api/process_api.rb +9 -15
  91. data/lib/sib-api-v3-sdk/api/reseller_api.rb +233 -214
  92. data/lib/sib-api-v3-sdk/api/senders_api.rb +25 -43
  93. data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +47 -73
  94. data/lib/sib-api-v3-sdk/api/{smtp_api.rb → transactional_emails_api.rb} +253 -122
  95. data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +19 -31
  96. data/lib/sib-api-v3-sdk/api/webhooks_api.rb +18 -33
  97. data/lib/sib-api-v3-sdk/api_client.rb +10 -10
  98. data/lib/sib-api-v3-sdk/api_error.rb +2 -2
  99. data/lib/sib-api-v3-sdk/configuration.rb +3 -3
  100. data/lib/sib-api-v3-sdk/models/ab_test_campaign_result.rb +298 -0
  101. data/lib/sib-api-v3-sdk/models/ab_test_campaign_result_clicked_links.rb +202 -0
  102. data/lib/sib-api-v3-sdk/models/ab_test_campaign_result_statistics.rb +258 -0
  103. data/lib/sib-api-v3-sdk/models/ab_test_version_clicks.rb +175 -0
  104. data/lib/sib-api-v3-sdk/models/ab_test_version_clicks_inner.rb +219 -0
  105. data/lib/sib-api-v3-sdk/models/ab_test_version_stats.rb +205 -0
  106. data/lib/sib-api-v3-sdk/models/add_child_domain.rb +7 -12
  107. data/lib/sib-api-v3-sdk/models/add_contact_to_list.rb +22 -15
  108. data/lib/sib-api-v3-sdk/models/add_credits.rb +7 -12
  109. data/lib/sib-api-v3-sdk/models/create_attribute.rb +11 -15
  110. data/lib/sib-api-v3-sdk/models/create_attribute_enumeration.rb +9 -14
  111. data/lib/sib-api-v3-sdk/models/create_child.rb +58 -19
  112. data/lib/sib-api-v3-sdk/models/create_contact.rb +9 -14
  113. data/lib/sib-api-v3-sdk/models/create_doi_contact.rb +258 -0
  114. data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +80 -30
  115. data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +7 -11
  116. data/lib/sib-api-v3-sdk/models/create_email_campaign_sender.rb +21 -15
  117. data/lib/sib-api-v3-sdk/models/create_list.rb +9 -14
  118. data/lib/sib-api-v3-sdk/models/create_model.rb +8 -13
  119. data/lib/sib-api-v3-sdk/models/create_reseller.rb +20 -15
  120. data/lib/sib-api-v3-sdk/models/create_sender.rb +10 -15
  121. data/lib/sib-api-v3-sdk/models/create_sender_ips.rb +13 -19
  122. data/lib/sib-api-v3-sdk/models/create_sender_model.rb +8 -13
  123. data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +17 -22
  124. data/lib/sib-api-v3-sdk/models/create_sms_campaign_recipients.rb +8 -13
  125. data/lib/sib-api-v3-sdk/models/create_smtp_email.rb +8 -13
  126. data/lib/sib-api-v3-sdk/models/create_smtp_template.rb +10 -15
  127. data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +21 -15
  128. data/lib/sib-api-v3-sdk/models/create_update_contact_model.rb +7 -12
  129. data/lib/sib-api-v3-sdk/models/create_update_folder.rb +7 -12
  130. data/lib/sib-api-v3-sdk/models/create_webhook.rb +14 -18
  131. data/lib/sib-api-v3-sdk/models/created_process_id.rb +8 -13
  132. data/lib/sib-api-v3-sdk/models/delete_hardbounces.rb +7 -12
  133. data/lib/sib-api-v3-sdk/models/email_export_recipients.rb +12 -16
  134. data/lib/sib-api-v3-sdk/models/error_model.rb +12 -16
  135. data/lib/sib-api-v3-sdk/models/get_account.rb +14 -19
  136. data/lib/sib-api-v3-sdk/models/get_account_marketing_automation.rb +8 -13
  137. data/lib/sib-api-v3-sdk/models/get_account_plan.rb +16 -20
  138. data/lib/sib-api-v3-sdk/models/get_account_relay.rb +9 -13
  139. data/lib/sib-api-v3-sdk/models/get_account_relay_data.rb +10 -14
  140. data/lib/sib-api-v3-sdk/models/get_aggregated_report.rb +7 -77
  141. data/lib/sib-api-v3-sdk/models/get_attributes.rb +8 -13
  142. data/lib/sib-api-v3-sdk/models/get_attributes_attributes.rb +15 -19
  143. data/lib/sib-api-v3-sdk/models/get_attributes_enumeration.rb +9 -14
  144. data/lib/sib-api-v3-sdk/models/get_campaign_overview.rb +17 -21
  145. data/lib/sib-api-v3-sdk/models/get_campaign_recipients.rb +9 -14
  146. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +29 -24
  147. data/lib/sib-api-v3-sdk/models/get_child_account_creation_status.rb +189 -0
  148. data/lib/sib-api-v3-sdk/models/get_child_domain.rb +9 -14
  149. data/lib/sib-api-v3-sdk/models/get_child_domains.rb +7 -12
  150. data/lib/sib-api-v3-sdk/models/get_child_info.rb +12 -17
  151. data/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb +8 -12
  152. data/lib/sib-api-v3-sdk/models/get_child_info_api_keys_v2.rb +9 -14
  153. data/lib/sib-api-v3-sdk/models/get_child_info_api_keys_v3.rb +9 -14
  154. data/lib/sib-api-v3-sdk/models/get_child_info_credits.rb +7 -11
  155. data/lib/sib-api-v3-sdk/models/get_child_info_statistics.rb +7 -11
  156. data/lib/sib-api-v3-sdk/models/get_children_list.rb +24 -14
  157. data/lib/sib-api-v3-sdk/models/get_client.rb +11 -16
  158. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +7 -11
  159. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_clicked.rb +9 -14
  160. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_opened.rb +11 -16
  161. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_transac_attributes.rb +10 -15
  162. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions.rb +9 -14
  163. data/lib/sib-api-v3-sdk/models/get_contact_details.rb +15 -20
  164. data/lib/sib-api-v3-sdk/models/get_contacts.rb +9 -14
  165. data/lib/sib-api-v3-sdk/models/get_device_browser_stats.rb +234 -0
  166. data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +40 -34
  167. data/lib/sib-api-v3-sdk/models/get_email_campaigns.rb +8 -13
  168. data/lib/sib-api-v3-sdk/models/get_email_event_report.rb +7 -12
  169. data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +14 -18
  170. data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +40 -34
  171. data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview_sender.rb +19 -14
  172. data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats.rb +45 -20
  173. data/lib/sib-api-v3-sdk/models/get_extended_client.rb +12 -17
  174. data/lib/sib-api-v3-sdk/models/get_extended_client_address.rb +11 -15
  175. data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +16 -21
  176. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +7 -11
  177. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_clicked.rb +9 -14
  178. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_links.rb +11 -16
  179. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_messages_sent.rb +9 -14
  180. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_opened.rb +11 -16
  181. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions.rb +9 -13
  182. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.rb +8 -18
  183. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.rb +9 -19
  184. data/lib/sib-api-v3-sdk/models/get_extended_list.rb +13 -18
  185. data/lib/sib-api-v3-sdk/models/get_extended_list_campaign_stats.rb +9 -14
  186. data/lib/sib-api-v3-sdk/models/get_folder.rb +12 -17
  187. data/lib/sib-api-v3-sdk/models/get_folder_lists.rb +9 -14
  188. data/lib/sib-api-v3-sdk/models/get_folders.rb +7 -12
  189. data/lib/sib-api-v3-sdk/models/get_ip.rb +11 -16
  190. data/lib/sib-api-v3-sdk/models/get_ip_from_sender.rb +11 -16
  191. data/lib/sib-api-v3-sdk/models/get_ips.rb +8 -13
  192. data/lib/sib-api-v3-sdk/models/get_ips_from_sender.rb +8 -13
  193. data/lib/sib-api-v3-sdk/models/get_list.rb +11 -16
  194. data/lib/sib-api-v3-sdk/models/get_lists.rb +9 -14
  195. data/lib/sib-api-v3-sdk/models/get_process.rb +13 -17
  196. data/lib/sib-api-v3-sdk/models/get_processes.rb +8 -13
  197. data/lib/sib-api-v3-sdk/models/get_reports.rb +7 -12
  198. data/lib/sib-api-v3-sdk/models/get_reports_reports.rb +20 -25
  199. data/lib/sib-api-v3-sdk/models/get_senders_list.rb +7 -12
  200. data/lib/sib-api-v3-sdk/models/get_senders_list_ips.rb +10 -15
  201. data/lib/sib-api-v3-sdk/models/get_senders_list_senders.rb +11 -16
  202. data/lib/sib-api-v3-sdk/models/get_shared_template_url.rb +189 -0
  203. data/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +20 -24
  204. data/lib/sib-api-v3-sdk/models/get_sms_campaign_overview.rb +18 -22
  205. data/lib/sib-api-v3-sdk/models/get_sms_campaign_stats.rb +14 -19
  206. data/lib/sib-api-v3-sdk/models/get_sms_campaigns.rb +8 -13
  207. data/lib/sib-api-v3-sdk/models/get_sms_event_report.rb +7 -12
  208. data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +14 -18
  209. data/lib/sib-api-v3-sdk/models/get_smtp_template_overview.rb +31 -26
  210. data/lib/sib-api-v3-sdk/models/get_smtp_template_overview_sender.rb +19 -14
  211. data/lib/sib-api-v3-sdk/models/get_smtp_templates.rb +7 -12
  212. data/lib/sib-api-v3-sdk/models/get_sso_token.rb +8 -13
  213. data/lib/sib-api-v3-sdk/models/get_stats_by_browser.rb +174 -0
  214. data/lib/sib-api-v3-sdk/models/get_stats_by_device.rb +222 -0
  215. data/lib/sib-api-v3-sdk/models/get_stats_by_domain.rb +7 -12
  216. data/lib/sib-api-v3-sdk/models/get_transac_aggregated_sms_report.rb +17 -22
  217. data/lib/sib-api-v3-sdk/models/get_transac_blocked_contacts.rb +195 -0
  218. data/lib/sib-api-v3-sdk/models/get_transac_blocked_contacts_contacts.rb +233 -0
  219. data/lib/sib-api-v3-sdk/models/get_transac_blocked_contacts_reason.rb +229 -0
  220. data/lib/sib-api-v3-sdk/models/get_transac_email_content.rb +13 -18
  221. data/lib/sib-api-v3-sdk/models/get_transac_email_content_events.rb +9 -14
  222. data/lib/sib-api-v3-sdk/models/get_transac_emails_list.rb +7 -12
  223. data/lib/sib-api-v3-sdk/models/get_transac_emails_list_transactional_emails.rb +36 -19
  224. data/lib/sib-api-v3-sdk/models/get_transac_sms_report.rb +7 -12
  225. data/lib/sib-api-v3-sdk/models/get_transac_sms_report_reports.rb +17 -22
  226. data/lib/sib-api-v3-sdk/models/get_webhook.rb +17 -21
  227. data/lib/sib-api-v3-sdk/models/get_webhooks.rb +8 -13
  228. data/lib/sib-api-v3-sdk/models/manage_ip.rb +7 -12
  229. data/lib/sib-api-v3-sdk/models/post_contact_info.rb +8 -13
  230. data/lib/sib-api-v3-sdk/models/post_contact_info_contacts.rb +19 -14
  231. data/lib/sib-api-v3-sdk/models/post_send_failed.rb +9 -14
  232. data/lib/sib-api-v3-sdk/models/post_send_sms_test_failed.rb +9 -14
  233. data/lib/sib-api-v3-sdk/models/remaining_credit_model.rb +9 -14
  234. data/lib/sib-api-v3-sdk/models/remaining_credit_model_child.rb +11 -15
  235. data/lib/sib-api-v3-sdk/models/remaining_credit_model_reseller.rb +11 -16
  236. data/lib/sib-api-v3-sdk/models/remove_contact_from_list.rb +22 -15
  237. data/lib/sib-api-v3-sdk/models/remove_credits.rb +7 -12
  238. data/lib/sib-api-v3-sdk/models/request_contact_export.rb +19 -20
  239. data/lib/sib-api-v3-sdk/models/request_contact_export_custom_contact_filter.rb +293 -0
  240. data/lib/sib-api-v3-sdk/models/request_contact_import.rb +9 -14
  241. data/lib/sib-api-v3-sdk/models/request_contact_import_new_list.rb +7 -11
  242. data/lib/sib-api-v3-sdk/models/request_sms_recipient_export.rb +12 -16
  243. data/lib/sib-api-v3-sdk/models/send_email.rb +11 -16
  244. data/lib/sib-api-v3-sdk/models/send_email_attachment.rb +12 -17
  245. data/lib/sib-api-v3-sdk/models/send_report.rb +12 -16
  246. data/lib/sib-api-v3-sdk/models/send_report_email.rb +12 -100
  247. data/lib/sib-api-v3-sdk/models/send_sms.rb +9 -14
  248. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +12 -17
  249. data/lib/sib-api-v3-sdk/models/send_smtp_email_attachment.rb +9 -15
  250. data/lib/sib-api-v3-sdk/models/send_smtp_email_bcc.rb +9 -14
  251. data/lib/sib-api-v3-sdk/models/send_smtp_email_cc.rb +9 -14
  252. data/lib/sib-api-v3-sdk/models/send_smtp_email_reply_to.rb +10 -14
  253. data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +22 -16
  254. data/lib/sib-api-v3-sdk/models/send_smtp_email_to.rb +9 -14
  255. data/lib/sib-api-v3-sdk/models/send_template_email.rb +8 -13
  256. data/lib/sib-api-v3-sdk/models/send_test_email.rb +7 -12
  257. data/lib/sib-api-v3-sdk/models/send_test_sms.rb +7 -12
  258. data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +21 -25
  259. data/lib/sib-api-v3-sdk/models/update_attribute.rb +8 -13
  260. data/lib/sib-api-v3-sdk/models/update_attribute_enumeration.rb +9 -14
  261. data/lib/sib-api-v3-sdk/models/update_campaign_status.rb +10 -13
  262. data/lib/sib-api-v3-sdk/models/update_child.rb +7 -12
  263. data/lib/sib-api-v3-sdk/models/update_child_account_status.rb +19 -14
  264. data/lib/sib-api-v3-sdk/models/update_child_domain.rb +7 -12
  265. data/lib/sib-api-v3-sdk/models/update_contact.rb +8 -13
  266. data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +78 -28
  267. data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +7 -11
  268. data/lib/sib-api-v3-sdk/models/update_email_campaign_sender.rb +20 -14
  269. data/lib/sib-api-v3-sdk/models/update_list.rb +7 -12
  270. data/lib/sib-api-v3-sdk/models/update_sender.rb +7 -12
  271. data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +13 -19
  272. data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +7 -12
  273. data/lib/sib-api-v3-sdk/models/update_smtp_template_sender.rb +20 -14
  274. data/lib/sib-api-v3-sdk/models/update_webhook.rb +8 -12
  275. data/lib/sib-api-v3-sdk/models/upload_image_to_gallery.rb +199 -0
  276. data/lib/sib-api-v3-sdk/version.rb +3 -3
  277. data/sib-api-v3-sdk.gemspec +5 -5
  278. data/spec/api/account_api_spec.rb +4 -5
  279. data/spec/api/attributes_api_spec.rb +10 -14
  280. data/spec/api/contacts_api_spec.rb +62 -73
  281. data/spec/api/email_campaigns_api_spec.rb +54 -28
  282. data/spec/api/folders_api_spec.rb +12 -18
  283. data/spec/api/lists_api_spec.rb +17 -26
  284. data/spec/api/process_api_spec.rb +4 -6
  285. data/spec/api/reseller_api_spec.rb +53 -54
  286. data/spec/api/senders_api_spec.rb +10 -16
  287. data/spec/api/sms_campaigns_api_spec.rb +19 -27
  288. data/spec/api/{smtp_api_spec.rb → transactional_emails_api_spec.rb} +65 -39
  289. data/spec/api/transactional_sms_api_spec.rb +8 -12
  290. data/spec/api/webhooks_api_spec.rb +7 -12
  291. data/spec/api_client_spec.rb +36 -36
  292. data/spec/configuration_spec.rb +10 -10
  293. data/spec/models/ab_test_campaign_result_clicked_links_spec.rb +47 -0
  294. data/spec/models/ab_test_campaign_result_spec.rb +91 -0
  295. data/spec/models/ab_test_campaign_result_statistics_spec.rb +71 -0
  296. data/spec/models/ab_test_version_clicks_inner_spec.rb +53 -0
  297. data/spec/models/ab_test_version_clicks_spec.rb +35 -0
  298. data/spec/models/ab_test_version_stats_spec.rb +47 -0
  299. data/spec/models/add_child_domain_spec.rb +3 -4
  300. data/spec/models/add_contact_to_list_spec.rb +9 -4
  301. data/spec/models/add_credits_spec.rb +4 -5
  302. data/spec/models/create_attribute_enumeration_spec.rb +4 -5
  303. data/spec/models/create_attribute_spec.rb +9 -10
  304. data/spec/models/create_child_spec.rb +17 -8
  305. data/spec/models/create_contact_spec.rb +9 -10
  306. data/spec/models/create_doi_contact_spec.rb +71 -0
  307. data/spec/models/create_email_campaign_recipients_spec.rb +4 -5
  308. data/spec/models/create_email_campaign_sender_spec.rb +10 -5
  309. data/spec/models/create_email_campaign_spec.rb +49 -32
  310. data/spec/models/create_list_spec.rb +4 -5
  311. data/spec/models/create_model_spec.rb +3 -4
  312. data/spec/models/create_reseller_spec.rb +9 -4
  313. data/spec/models/create_sender_ips_spec.rb +5 -6
  314. data/spec/models/create_sender_model_spec.rb +5 -6
  315. data/spec/models/create_sender_spec.rb +5 -6
  316. data/spec/models/create_sms_campaign_recipients_spec.rb +4 -5
  317. data/spec/models/create_sms_campaign_spec.rb +7 -8
  318. data/spec/models/create_smtp_email_spec.rb +3 -4
  319. data/spec/models/create_smtp_template_sender_spec.rb +10 -5
  320. data/spec/models/create_smtp_template_spec.rb +12 -13
  321. data/spec/models/create_update_contact_model_spec.rb +3 -4
  322. data/spec/models/create_update_folder_spec.rb +3 -4
  323. data/spec/models/create_webhook_spec.rb +14 -15
  324. data/spec/models/created_process_id_spec.rb +3 -4
  325. data/spec/models/delete_hardbounces_spec.rb +5 -6
  326. data/spec/models/email_export_recipients_spec.rb +8 -9
  327. data/spec/models/error_model_spec.rb +8 -9
  328. data/spec/models/get_account_marketing_automation_spec.rb +4 -5
  329. data/spec/models/get_account_plan_spec.rb +16 -17
  330. data/spec/models/get_account_relay_data_spec.rb +5 -6
  331. data/spec/models/get_account_relay_spec.rb +4 -5
  332. data/spec/models/get_account_spec.rb +10 -11
  333. data/spec/models/get_aggregated_report_spec.rb +15 -16
  334. data/spec/models/get_attributes_attributes_spec.rb +15 -16
  335. data/spec/models/get_attributes_enumeration_spec.rb +4 -5
  336. data/spec/models/get_attributes_spec.rb +3 -4
  337. data/spec/models/get_campaign_overview_spec.rb +23 -24
  338. data/spec/models/get_campaign_recipients_spec.rb +4 -5
  339. data/spec/models/get_campaign_stats_spec.rb +20 -15
  340. data/spec/models/get_child_account_creation_status_spec.rb +41 -0
  341. data/spec/models/get_child_domain_spec.rb +4 -5
  342. data/spec/models/get_child_domains_spec.rb +2 -3
  343. data/spec/models/get_child_info_api_keys_spec.rb +4 -5
  344. data/spec/models/get_child_info_api_keys_v2_spec.rb +4 -5
  345. data/spec/models/get_child_info_api_keys_v3_spec.rb +4 -5
  346. data/spec/models/get_child_info_credits_spec.rb +4 -5
  347. data/spec/models/get_child_info_spec.rb +11 -12
  348. data/spec/models/get_child_info_statistics_spec.rb +5 -6
  349. data/spec/models/get_children_list_spec.rb +9 -4
  350. data/spec/models/get_client_spec.rb +6 -7
  351. data/spec/models/get_contact_campaign_stats_clicked_spec.rb +4 -5
  352. data/spec/models/get_contact_campaign_stats_opened_spec.rb +6 -7
  353. data/spec/models/get_contact_campaign_stats_spec.rb +10 -11
  354. data/spec/models/get_contact_campaign_stats_transac_attributes_spec.rb +5 -6
  355. data/spec/models/get_contact_campaign_stats_unsubscriptions_spec.rb +4 -5
  356. data/spec/models/get_contact_details_spec.rb +11 -12
  357. data/spec/models/get_contacts_spec.rb +4 -5
  358. data/spec/models/get_device_browser_stats_spec.rb +59 -0
  359. data/spec/models/get_email_campaign_spec.rb +46 -41
  360. data/spec/models/get_email_campaigns_spec.rb +4 -5
  361. data/spec/models/get_email_event_report_events_spec.rb +16 -17
  362. data/spec/models/get_email_event_report_spec.rb +3 -4
  363. data/spec/models/get_extended_campaign_overview_sender_spec.rb +10 -5
  364. data/spec/models/get_extended_campaign_overview_spec.rb +44 -39
  365. data/spec/models/get_extended_campaign_stats_spec.rb +20 -9
  366. data/spec/models/get_extended_client_address_spec.rb +6 -7
  367. data/spec/models/get_extended_client_spec.rb +7 -8
  368. data/spec/models/get_extended_contact_details_spec.rb +12 -13
  369. data/spec/models/get_extended_contact_details_statistics_clicked_spec.rb +4 -5
  370. data/spec/models/get_extended_contact_details_statistics_links_spec.rb +6 -7
  371. data/spec/models/get_extended_contact_details_statistics_messages_sent_spec.rb +4 -5
  372. data/spec/models/get_extended_contact_details_statistics_opened_spec.rb +6 -7
  373. data/spec/models/get_extended_contact_details_statistics_spec.rb +10 -11
  374. data/spec/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription_spec.rb +4 -5
  375. data/spec/models/get_extended_contact_details_statistics_unsubscriptions_spec.rb +4 -5
  376. data/spec/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription_spec.rb +5 -6
  377. data/spec/models/get_extended_list_campaign_stats_spec.rb +4 -5
  378. data/spec/models/get_extended_list_spec.rb +10 -11
  379. data/spec/models/get_folder_lists_spec.rb +4 -5
  380. data/spec/models/get_folder_spec.rb +7 -8
  381. data/spec/models/get_folders_spec.rb +4 -5
  382. data/spec/models/get_ip_from_sender_spec.rb +6 -7
  383. data/spec/models/get_ip_spec.rb +6 -7
  384. data/spec/models/get_ips_from_sender_spec.rb +3 -4
  385. data/spec/models/get_ips_spec.rb +3 -4
  386. data/spec/models/get_list_spec.rb +6 -7
  387. data/spec/models/get_lists_spec.rb +4 -5
  388. data/spec/models/get_process_spec.rb +10 -11
  389. data/spec/models/get_processes_spec.rb +4 -5
  390. data/spec/models/get_reports_reports_spec.rb +15 -16
  391. data/spec/models/get_reports_spec.rb +3 -4
  392. data/spec/models/get_senders_list_ips_spec.rb +5 -6
  393. data/spec/models/get_senders_list_senders_spec.rb +7 -8
  394. data/spec/models/get_senders_list_spec.rb +3 -4
  395. data/spec/models/get_shared_template_url_spec.rb +41 -0
  396. data/spec/models/get_sms_campaign_overview_spec.rb +14 -15
  397. data/spec/models/get_sms_campaign_spec.rb +16 -17
  398. data/spec/models/get_sms_campaign_stats_spec.rb +9 -10
  399. data/spec/models/get_sms_campaigns_spec.rb +4 -5
  400. data/spec/models/get_sms_event_report_events_spec.rb +13 -14
  401. data/spec/models/get_sms_event_report_spec.rb +3 -4
  402. data/spec/models/get_smtp_template_overview_sender_spec.rb +10 -5
  403. data/spec/models/get_smtp_template_overview_spec.rb +20 -15
  404. data/spec/models/get_smtp_templates_spec.rb +4 -5
  405. data/spec/models/get_sso_token_spec.rb +3 -4
  406. data/spec/models/get_stats_by_browser_spec.rb +35 -0
  407. data/spec/models/get_stats_by_device_spec.rb +59 -0
  408. data/spec/models/get_stats_by_domain_spec.rb +2 -3
  409. data/spec/models/get_transac_aggregated_sms_report_spec.rb +12 -13
  410. data/spec/models/get_transac_blocked_contacts_contacts_spec.rb +59 -0
  411. data/spec/models/get_transac_blocked_contacts_reason_spec.rb +51 -0
  412. data/spec/models/get_transac_blocked_contacts_spec.rb +47 -0
  413. data/spec/models/get_transac_email_content_events_spec.rb +4 -5
  414. data/spec/models/get_transac_email_content_spec.rb +9 -10
  415. data/spec/models/get_transac_emails_list_spec.rb +3 -4
  416. data/spec/models/get_transac_emails_list_transactional_emails_spec.rb +20 -9
  417. data/spec/models/get_transac_sms_report_reports_spec.rb +12 -13
  418. data/spec/models/get_transac_sms_report_spec.rb +3 -4
  419. data/spec/models/get_webhook_spec.rb +13 -14
  420. data/spec/models/get_webhooks_spec.rb +3 -4
  421. data/spec/models/manage_ip_spec.rb +3 -4
  422. data/spec/models/post_contact_info_contacts_spec.rb +11 -6
  423. data/spec/models/post_contact_info_spec.rb +3 -4
  424. data/spec/models/post_send_failed_spec.rb +7 -8
  425. data/spec/models/post_send_sms_test_failed_spec.rb +6 -7
  426. data/spec/models/remaining_credit_model_child_spec.rb +4 -5
  427. data/spec/models/remaining_credit_model_reseller_spec.rb +4 -5
  428. data/spec/models/remaining_credit_model_spec.rb +4 -5
  429. data/spec/models/remove_contact_from_list_spec.rb +10 -5
  430. data/spec/models/remove_credits_spec.rb +4 -5
  431. data/spec/models/request_contact_export_custom_contact_filter_spec.rb +83 -0
  432. data/spec/models/request_contact_export_spec.rb +11 -6
  433. data/spec/models/request_contact_import_new_list_spec.rb +4 -5
  434. data/spec/models/request_contact_import_spec.rb +11 -12
  435. data/spec/models/request_sms_recipient_export_spec.rb +8 -9
  436. data/spec/models/send_email_attachment_spec.rb +4 -5
  437. data/spec/models/send_email_spec.rb +11 -12
  438. data/spec/models/send_report_email_spec.rb +4 -33
  439. data/spec/models/send_report_spec.rb +8 -9
  440. data/spec/models/send_sms_spec.rb +7 -8
  441. data/spec/models/send_smtp_email_attachment_spec.rb +5 -6
  442. data/spec/models/send_smtp_email_bcc_spec.rb +4 -5
  443. data/spec/models/send_smtp_email_cc_spec.rb +4 -5
  444. data/spec/models/send_smtp_email_reply_to_spec.rb +4 -5
  445. data/spec/models/send_smtp_email_sender_spec.rb +10 -5
  446. data/spec/models/send_smtp_email_spec.rb +15 -16
  447. data/spec/models/send_smtp_email_to_spec.rb +4 -5
  448. data/spec/models/send_template_email_spec.rb +3 -4
  449. data/spec/models/send_test_email_spec.rb +3 -4
  450. data/spec/models/send_test_sms_spec.rb +3 -4
  451. data/spec/models/send_transac_sms_spec.rb +12 -13
  452. data/spec/models/update_attribute_enumeration_spec.rb +4 -5
  453. data/spec/models/update_attribute_spec.rb +4 -5
  454. data/spec/models/update_campaign_status_spec.rb +7 -8
  455. data/spec/models/update_child_account_status_spec.rb +11 -6
  456. data/spec/models/update_child_domain_spec.rb +3 -4
  457. data/spec/models/update_child_spec.rb +7 -8
  458. data/spec/models/update_contact_spec.rb +8 -9
  459. data/spec/models/update_email_campaign_recipients_spec.rb +4 -5
  460. data/spec/models/update_email_campaign_sender_spec.rb +10 -5
  461. data/spec/models/update_email_campaign_spec.rb +49 -32
  462. data/spec/models/update_list_spec.rb +4 -5
  463. data/spec/models/update_sender_spec.rb +5 -6
  464. data/spec/models/update_sms_campaign_spec.rb +7 -8
  465. data/spec/models/update_smtp_template_sender_spec.rb +10 -5
  466. data/spec/models/update_smtp_template_spec.rb +12 -13
  467. data/spec/models/update_webhook_spec.rb +9 -10
  468. data/spec/models/upload_image_to_gallery_spec.rb +47 -0
  469. data/spec/spec_helper.rb +2 -2
  470. metadata +78 -10
@@ -1,16 +1,16 @@
1
1
  =begin
2
2
  #SendinBlue API
3
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 |
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 | | 406 | Error. Not Acceptable |
5
5
 
6
6
  OpenAPI spec version: 3.0.0
7
7
  Contact: contact@sendinblue.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.12
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module SibApiV3Sdk
16
16
  class ContactsApi
@@ -19,27 +19,24 @@ module SibApiV3Sdk
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Add existing contacts to a list
24
- #
25
23
  # @param list_id Id of the list
26
- # @param contact_emails Emails addresses of the contacts
24
+ # @param contact_emails Emails addresses OR IDs of the contacts
27
25
  # @param [Hash] opts the optional parameters
28
26
  # @return [PostContactInfo]
29
27
  def add_contact_to_list(list_id, contact_emails, opts = {})
30
28
  data, _status_code, _headers = add_contact_to_list_with_http_info(list_id, contact_emails, opts)
31
- return data
29
+ data
32
30
  end
33
31
 
34
32
  # Add existing contacts to a list
35
- #
36
33
  # @param list_id Id of the list
37
- # @param contact_emails Emails addresses of the contacts
34
+ # @param contact_emails Emails addresses OR IDs of the contacts
38
35
  # @param [Hash] opts the optional parameters
39
36
  # @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers
40
37
  def add_contact_to_list_with_http_info(list_id, contact_emails, opts = {})
41
38
  if @api_client.config.debugging
42
- @api_client.config.logger.debug "Calling API: ContactsApi.add_contact_to_list ..."
39
+ @api_client.config.logger.debug 'Calling API: ContactsApi.add_contact_to_list ...'
43
40
  end
44
41
  # verify the required parameter 'list_id' is set
45
42
  if @api_client.config.client_side_validation && list_id.nil?
@@ -50,7 +47,7 @@ module SibApiV3Sdk
50
47
  fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ContactsApi.add_contact_to_list"
51
48
  end
52
49
  # resource path
53
- local_var_path = "/contacts/lists/{listId}/contacts/add".sub('{' + 'listId' + '}', list_id.to_s)
50
+ local_var_path = '/contacts/lists/{listId}/contacts/add'.sub('{' + 'listId' + '}', list_id.to_s)
54
51
 
55
52
  # query parameters
56
53
  query_params = {}
@@ -80,9 +77,7 @@ module SibApiV3Sdk
80
77
  end
81
78
  return data, status_code, headers
82
79
  end
83
-
84
- # Creates contact attribute
85
- #
80
+ # Create contact attribute
86
81
  # @param attribute_category Category of the attribute
87
82
  # @param attribute_name Name of the attribute
88
83
  # @param create_attribute Values to create an attribute
@@ -90,11 +85,10 @@ module SibApiV3Sdk
90
85
  # @return [nil]
91
86
  def create_attribute(attribute_category, attribute_name, create_attribute, opts = {})
92
87
  create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, opts)
93
- return nil
88
+ nil
94
89
  end
95
90
 
96
- # Creates contact attribute
97
- #
91
+ # Create contact attribute
98
92
  # @param attribute_category Category of the attribute
99
93
  # @param attribute_name Name of the attribute
100
94
  # @param create_attribute Values to create an attribute
@@ -102,7 +96,7 @@ module SibApiV3Sdk
102
96
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
103
97
  def create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, opts = {})
104
98
  if @api_client.config.debugging
105
- @api_client.config.logger.debug "Calling API: ContactsApi.create_attribute ..."
99
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_attribute ...'
106
100
  end
107
101
  # verify the required parameter 'attribute_category' is set
108
102
  if @api_client.config.client_side_validation && attribute_category.nil?
@@ -121,7 +115,7 @@ module SibApiV3Sdk
121
115
  fail ArgumentError, "Missing the required parameter 'create_attribute' when calling ContactsApi.create_attribute"
122
116
  end
123
117
  # resource path
124
- local_var_path = "/contacts/attributes/{attributeCategory}/{attributeName}".sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
118
+ local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
125
119
 
126
120
  # query parameters
127
121
  query_params = {}
@@ -150,32 +144,29 @@ module SibApiV3Sdk
150
144
  end
151
145
  return data, status_code, headers
152
146
  end
153
-
154
147
  # Create a contact
155
- #
156
148
  # @param create_contact Values to create a contact
157
149
  # @param [Hash] opts the optional parameters
158
150
  # @return [CreateUpdateContactModel]
159
151
  def create_contact(create_contact, opts = {})
160
152
  data, _status_code, _headers = create_contact_with_http_info(create_contact, opts)
161
- return data
153
+ data
162
154
  end
163
155
 
164
156
  # Create a contact
165
- #
166
157
  # @param create_contact Values to create a contact
167
158
  # @param [Hash] opts the optional parameters
168
159
  # @return [Array<(CreateUpdateContactModel, Fixnum, Hash)>] CreateUpdateContactModel data, response status code and response headers
169
160
  def create_contact_with_http_info(create_contact, opts = {})
170
161
  if @api_client.config.debugging
171
- @api_client.config.logger.debug "Calling API: ContactsApi.create_contact ..."
162
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_contact ...'
172
163
  end
173
164
  # verify the required parameter 'create_contact' is set
174
165
  if @api_client.config.client_side_validation && create_contact.nil?
175
166
  fail ArgumentError, "Missing the required parameter 'create_contact' when calling ContactsApi.create_contact"
176
167
  end
177
168
  # resource path
178
- local_var_path = "/contacts"
169
+ local_var_path = '/contacts'
179
170
 
180
171
  # query parameters
181
172
  query_params = {}
@@ -205,32 +196,80 @@ module SibApiV3Sdk
205
196
  end
206
197
  return data, status_code, headers
207
198
  end
199
+ # Create Contact via DOI (Double-Opt-In) Flow
200
+ # @param create_doi_contact Values to create the Double opt-in (DOI) contact
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [nil]
203
+ def create_doi_contact(create_doi_contact, opts = {})
204
+ create_doi_contact_with_http_info(create_doi_contact, opts)
205
+ nil
206
+ end
207
+
208
+ # Create Contact via DOI (Double-Opt-In) Flow
209
+ # @param create_doi_contact Values to create the Double opt-in (DOI) contact
210
+ # @param [Hash] opts the optional parameters
211
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
212
+ def create_doi_contact_with_http_info(create_doi_contact, opts = {})
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_doi_contact ...'
215
+ end
216
+ # verify the required parameter 'create_doi_contact' is set
217
+ if @api_client.config.client_side_validation && create_doi_contact.nil?
218
+ fail ArgumentError, "Missing the required parameter 'create_doi_contact' when calling ContactsApi.create_doi_contact"
219
+ end
220
+ # resource path
221
+ local_var_path = '/contacts/doubleOptinConfirmation'
222
+
223
+ # query parameters
224
+ query_params = {}
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'])
208
232
 
233
+ # form parameters
234
+ form_params = {}
235
+
236
+ # http body (model)
237
+ post_body = @api_client.object_to_http_body(create_doi_contact)
238
+ auth_names = ['api-key', 'partner-key']
239
+ data, status_code, headers = @api_client.call_api(:POST, 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
+ if @api_client.config.debugging
246
+ @api_client.config.logger.debug "API called: ContactsApi#create_doi_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
247
+ end
248
+ return data, status_code, headers
249
+ end
209
250
  # Create a folder
210
- #
211
251
  # @param create_folder Name of the folder
212
252
  # @param [Hash] opts the optional parameters
213
253
  # @return [CreateModel]
214
254
  def create_folder(create_folder, opts = {})
215
255
  data, _status_code, _headers = create_folder_with_http_info(create_folder, opts)
216
- return data
256
+ data
217
257
  end
218
258
 
219
259
  # Create a folder
220
- #
221
260
  # @param create_folder Name of the folder
222
261
  # @param [Hash] opts the optional parameters
223
262
  # @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
224
263
  def create_folder_with_http_info(create_folder, opts = {})
225
264
  if @api_client.config.debugging
226
- @api_client.config.logger.debug "Calling API: ContactsApi.create_folder ..."
265
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_folder ...'
227
266
  end
228
267
  # verify the required parameter 'create_folder' is set
229
268
  if @api_client.config.client_side_validation && create_folder.nil?
230
269
  fail ArgumentError, "Missing the required parameter 'create_folder' when calling ContactsApi.create_folder"
231
270
  end
232
271
  # resource path
233
- local_var_path = "/contacts/folders"
272
+ local_var_path = '/contacts/folders'
234
273
 
235
274
  # query parameters
236
275
  query_params = {}
@@ -260,32 +299,29 @@ module SibApiV3Sdk
260
299
  end
261
300
  return data, status_code, headers
262
301
  end
263
-
264
302
  # Create a list
265
- #
266
303
  # @param create_list Values to create a list
267
304
  # @param [Hash] opts the optional parameters
268
305
  # @return [CreateModel]
269
306
  def create_list(create_list, opts = {})
270
307
  data, _status_code, _headers = create_list_with_http_info(create_list, opts)
271
- return data
308
+ data
272
309
  end
273
310
 
274
311
  # Create a list
275
- #
276
312
  # @param create_list Values to create a list
277
313
  # @param [Hash] opts the optional parameters
278
314
  # @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
279
315
  def create_list_with_http_info(create_list, opts = {})
280
316
  if @api_client.config.debugging
281
- @api_client.config.logger.debug "Calling API: ContactsApi.create_list ..."
317
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_list ...'
282
318
  end
283
319
  # verify the required parameter 'create_list' is set
284
320
  if @api_client.config.client_side_validation && create_list.nil?
285
321
  fail ArgumentError, "Missing the required parameter 'create_list' when calling ContactsApi.create_list"
286
322
  end
287
323
  # resource path
288
- local_var_path = "/contacts/lists"
324
+ local_var_path = '/contacts/lists'
289
325
 
290
326
  # query parameters
291
327
  query_params = {}
@@ -315,27 +351,24 @@ module SibApiV3Sdk
315
351
  end
316
352
  return data, status_code, headers
317
353
  end
318
-
319
- # Deletes an attribute
320
- #
354
+ # Delete an attribute
321
355
  # @param attribute_category Category of the attribute
322
356
  # @param attribute_name Name of the existing attribute
323
357
  # @param [Hash] opts the optional parameters
324
358
  # @return [nil]
325
359
  def delete_attribute(attribute_category, attribute_name, opts = {})
326
360
  delete_attribute_with_http_info(attribute_category, attribute_name, opts)
327
- return nil
361
+ nil
328
362
  end
329
363
 
330
- # Deletes an attribute
331
- #
364
+ # Delete an attribute
332
365
  # @param attribute_category Category of the attribute
333
366
  # @param attribute_name Name of the existing attribute
334
367
  # @param [Hash] opts the optional parameters
335
368
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
336
369
  def delete_attribute_with_http_info(attribute_category, attribute_name, opts = {})
337
370
  if @api_client.config.debugging
338
- @api_client.config.logger.debug "Calling API: ContactsApi.delete_attribute ..."
371
+ @api_client.config.logger.debug 'Calling API: ContactsApi.delete_attribute ...'
339
372
  end
340
373
  # verify the required parameter 'attribute_category' is set
341
374
  if @api_client.config.client_side_validation && attribute_category.nil?
@@ -350,7 +383,7 @@ module SibApiV3Sdk
350
383
  fail ArgumentError, "Missing the required parameter 'attribute_name' when calling ContactsApi.delete_attribute"
351
384
  end
352
385
  # resource path
353
- local_var_path = "/contacts/attributes/{attributeCategory}/{attributeName}".sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
386
+ local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
354
387
 
355
388
  # query parameters
356
389
  query_params = {}
@@ -379,32 +412,29 @@ module SibApiV3Sdk
379
412
  end
380
413
  return data, status_code, headers
381
414
  end
382
-
383
- # Deletes a contact
384
- #
385
- # @param email Email (urlencoded) of the contact
415
+ # Delete a contact
416
+ # @param identifier Email (urlencoded) OR ID of the contact
386
417
  # @param [Hash] opts the optional parameters
387
418
  # @return [nil]
388
- def delete_contact(email, opts = {})
389
- delete_contact_with_http_info(email, opts)
390
- return nil
419
+ def delete_contact(identifier, opts = {})
420
+ delete_contact_with_http_info(identifier, opts)
421
+ nil
391
422
  end
392
423
 
393
- # Deletes a contact
394
- #
395
- # @param email Email (urlencoded) of the contact
424
+ # Delete a contact
425
+ # @param identifier Email (urlencoded) OR ID of the contact
396
426
  # @param [Hash] opts the optional parameters
397
427
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
398
- def delete_contact_with_http_info(email, opts = {})
428
+ def delete_contact_with_http_info(identifier, opts = {})
399
429
  if @api_client.config.debugging
400
- @api_client.config.logger.debug "Calling API: ContactsApi.delete_contact ..."
430
+ @api_client.config.logger.debug 'Calling API: ContactsApi.delete_contact ...'
401
431
  end
402
- # verify the required parameter 'email' is set
403
- if @api_client.config.client_side_validation && email.nil?
404
- fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.delete_contact"
432
+ # verify the required parameter 'identifier' is set
433
+ if @api_client.config.client_side_validation && identifier.nil?
434
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactsApi.delete_contact"
405
435
  end
406
436
  # resource path
407
- local_var_path = "/contacts/{email}".sub('{' + 'email' + '}', email.to_s)
437
+ local_var_path = '/contacts/{identifier}'.sub('{' + 'identifier' + '}', identifier.to_s)
408
438
 
409
439
  # query parameters
410
440
  query_params = {}
@@ -433,32 +463,29 @@ module SibApiV3Sdk
433
463
  end
434
464
  return data, status_code, headers
435
465
  end
436
-
437
466
  # Delete a folder (and all its lists)
438
- #
439
467
  # @param folder_id Id of the folder
440
468
  # @param [Hash] opts the optional parameters
441
469
  # @return [nil]
442
470
  def delete_folder(folder_id, opts = {})
443
471
  delete_folder_with_http_info(folder_id, opts)
444
- return nil
472
+ nil
445
473
  end
446
474
 
447
475
  # Delete a folder (and all its lists)
448
- #
449
476
  # @param folder_id Id of the folder
450
477
  # @param [Hash] opts the optional parameters
451
478
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
452
479
  def delete_folder_with_http_info(folder_id, opts = {})
453
480
  if @api_client.config.debugging
454
- @api_client.config.logger.debug "Calling API: ContactsApi.delete_folder ..."
481
+ @api_client.config.logger.debug 'Calling API: ContactsApi.delete_folder ...'
455
482
  end
456
483
  # verify the required parameter 'folder_id' is set
457
484
  if @api_client.config.client_side_validation && folder_id.nil?
458
485
  fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.delete_folder"
459
486
  end
460
487
  # resource path
461
- local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_id.to_s)
488
+ local_var_path = '/contacts/folders/{folderId}'.sub('{' + 'folderId' + '}', folder_id.to_s)
462
489
 
463
490
  # query parameters
464
491
  query_params = {}
@@ -487,32 +514,29 @@ module SibApiV3Sdk
487
514
  end
488
515
  return data, status_code, headers
489
516
  end
490
-
491
517
  # Delete a list
492
- #
493
518
  # @param list_id Id of the list
494
519
  # @param [Hash] opts the optional parameters
495
520
  # @return [nil]
496
521
  def delete_list(list_id, opts = {})
497
522
  delete_list_with_http_info(list_id, opts)
498
- return nil
523
+ nil
499
524
  end
500
525
 
501
526
  # Delete a list
502
- #
503
527
  # @param list_id Id of the list
504
528
  # @param [Hash] opts the optional parameters
505
529
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
506
530
  def delete_list_with_http_info(list_id, opts = {})
507
531
  if @api_client.config.debugging
508
- @api_client.config.logger.debug "Calling API: ContactsApi.delete_list ..."
532
+ @api_client.config.logger.debug 'Calling API: ContactsApi.delete_list ...'
509
533
  end
510
534
  # verify the required parameter 'list_id' is set
511
535
  if @api_client.config.client_side_validation && list_id.nil?
512
536
  fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.delete_list"
513
537
  end
514
538
  # resource path
515
- local_var_path = "/contacts/lists/{listId}".sub('{' + 'listId' + '}', list_id.to_s)
539
+ local_var_path = '/contacts/lists/{listId}'.sub('{' + 'listId' + '}', list_id.to_s)
516
540
 
517
541
  # query parameters
518
542
  query_params = {}
@@ -541,26 +565,23 @@ module SibApiV3Sdk
541
565
  end
542
566
  return data, status_code, headers
543
567
  end
544
-
545
- # Lists all attributes
546
- #
568
+ # List all attributes
547
569
  # @param [Hash] opts the optional parameters
548
570
  # @return [GetAttributes]
549
571
  def get_attributes(opts = {})
550
572
  data, _status_code, _headers = get_attributes_with_http_info(opts)
551
- return data
573
+ data
552
574
  end
553
575
 
554
- # Lists all attributes
555
- #
576
+ # List all attributes
556
577
  # @param [Hash] opts the optional parameters
557
578
  # @return [Array<(GetAttributes, Fixnum, Hash)>] GetAttributes data, response status code and response headers
558
579
  def get_attributes_with_http_info(opts = {})
559
580
  if @api_client.config.debugging
560
- @api_client.config.logger.debug "Calling API: ContactsApi.get_attributes ..."
581
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_attributes ...'
561
582
  end
562
583
  # resource path
563
- local_var_path = "/contacts/attributes"
584
+ local_var_path = '/contacts/attributes'
564
585
 
565
586
  # query parameters
566
587
  query_params = {}
@@ -590,32 +611,29 @@ module SibApiV3Sdk
590
611
  end
591
612
  return data, status_code, headers
592
613
  end
593
-
594
- # Retrieves contact informations
595
- #
596
- # @param email Email (urlencoded) of the contact OR its SMS attribute value
614
+ # Get a contact's details
615
+ # @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value
597
616
  # @param [Hash] opts the optional parameters
598
617
  # @return [GetExtendedContactDetails]
599
- def get_contact_info(email, opts = {})
600
- data, _status_code, _headers = get_contact_info_with_http_info(email, opts)
601
- return data
618
+ def get_contact_info(identifier, opts = {})
619
+ data, _status_code, _headers = get_contact_info_with_http_info(identifier, opts)
620
+ data
602
621
  end
603
622
 
604
- # Retrieves contact informations
605
- #
606
- # @param email Email (urlencoded) of the contact OR its SMS attribute value
623
+ # Get a contact&#39;s details
624
+ # @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value
607
625
  # @param [Hash] opts the optional parameters
608
626
  # @return [Array<(GetExtendedContactDetails, Fixnum, Hash)>] GetExtendedContactDetails data, response status code and response headers
609
- def get_contact_info_with_http_info(email, opts = {})
627
+ def get_contact_info_with_http_info(identifier, opts = {})
610
628
  if @api_client.config.debugging
611
- @api_client.config.logger.debug "Calling API: ContactsApi.get_contact_info ..."
629
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact_info ...'
612
630
  end
613
- # verify the required parameter 'email' is set
614
- if @api_client.config.client_side_validation && email.nil?
615
- fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.get_contact_info"
631
+ # verify the required parameter 'identifier' is set
632
+ if @api_client.config.client_side_validation && identifier.nil?
633
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactsApi.get_contact_info"
616
634
  end
617
635
  # resource path
618
- local_var_path = "/contacts/{email}".sub('{' + 'email' + '}', email.to_s)
636
+ local_var_path = '/contacts/{identifier}'.sub('{' + 'identifier' + '}', identifier.to_s)
619
637
 
620
638
  # query parameters
621
639
  query_params = {}
@@ -645,35 +663,38 @@ module SibApiV3Sdk
645
663
  end
646
664
  return data, status_code, headers
647
665
  end
648
-
649
- # Get the campaigns statistics for a contact
650
- #
651
- # @param email Email address (urlencoded) of the contact
666
+ # Get email campaigns' statistics for a contact
667
+ # @param identifier Email (urlencoded) OR ID of the contact
652
668
  # @param [Hash] opts the optional parameters
669
+ # @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
670
+ # @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate
653
671
  # @return [GetContactCampaignStats]
654
- def get_contact_stats(email, opts = {})
655
- data, _status_code, _headers = get_contact_stats_with_http_info(email, opts)
656
- return data
672
+ def get_contact_stats(identifier, opts = {})
673
+ data, _status_code, _headers = get_contact_stats_with_http_info(identifier, opts)
674
+ data
657
675
  end
658
676
 
659
- # Get the campaigns statistics for a contact
660
- #
661
- # @param email Email address (urlencoded) of the contact
677
+ # Get email campaigns&#39; statistics for a contact
678
+ # @param identifier Email (urlencoded) OR ID of the contact
662
679
  # @param [Hash] opts the optional parameters
680
+ # @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
681
+ # @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate
663
682
  # @return [Array<(GetContactCampaignStats, Fixnum, Hash)>] GetContactCampaignStats data, response status code and response headers
664
- def get_contact_stats_with_http_info(email, opts = {})
683
+ def get_contact_stats_with_http_info(identifier, opts = {})
665
684
  if @api_client.config.debugging
666
- @api_client.config.logger.debug "Calling API: ContactsApi.get_contact_stats ..."
685
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact_stats ...'
667
686
  end
668
- # verify the required parameter 'email' is set
669
- if @api_client.config.client_side_validation && email.nil?
670
- fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.get_contact_stats"
687
+ # verify the required parameter 'identifier' is set
688
+ if @api_client.config.client_side_validation && identifier.nil?
689
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactsApi.get_contact_stats"
671
690
  end
672
691
  # resource path
673
- local_var_path = "/contacts/{email}/campaignStats".sub('{' + 'email' + '}', email.to_s)
692
+ local_var_path = '/contacts/{identifier}/campaignStats'.sub('{' + 'identifier' + '}', identifier.to_s)
674
693
 
675
694
  # query parameters
676
695
  query_params = {}
696
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
697
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
677
698
 
678
699
  # header parameters
679
700
  header_params = {}
@@ -700,9 +721,7 @@ module SibApiV3Sdk
700
721
  end
701
722
  return data, status_code, headers
702
723
  end
703
-
704
724
  # Get all the contacts
705
- #
706
725
  # @param [Hash] opts the optional parameters
707
726
  # @option opts [Integer] :limit Number of documents per page (default to 50)
708
727
  # @option opts [Integer] :offset Index of the first document of the page (default to 0)
@@ -710,11 +729,10 @@ module SibApiV3Sdk
710
729
  # @return [GetContacts]
711
730
  def get_contacts(opts = {})
712
731
  data, _status_code, _headers = get_contacts_with_http_info(opts)
713
- return data
732
+ data
714
733
  end
715
734
 
716
735
  # Get all the contacts
717
- #
718
736
  # @param [Hash] opts the optional parameters
719
737
  # @option opts [Integer] :limit Number of documents per page
720
738
  # @option opts [Integer] :offset Index of the first document of the page
@@ -722,14 +740,14 @@ module SibApiV3Sdk
722
740
  # @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
723
741
  def get_contacts_with_http_info(opts = {})
724
742
  if @api_client.config.debugging
725
- @api_client.config.logger.debug "Calling API: ContactsApi.get_contacts ..."
743
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contacts ...'
726
744
  end
727
745
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
728
746
  fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts, must be smaller than or equal to 1000.'
729
747
  end
730
748
 
731
749
  # resource path
732
- local_var_path = "/contacts"
750
+ local_var_path = '/contacts'
733
751
 
734
752
  # query parameters
735
753
  query_params = {}
@@ -762,9 +780,7 @@ module SibApiV3Sdk
762
780
  end
763
781
  return data, status_code, headers
764
782
  end
765
-
766
- # Get the contacts in a list
767
- #
783
+ # Get contacts in a list
768
784
  # @param list_id Id of the list
769
785
  # @param [Hash] opts the optional parameters
770
786
  # @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
@@ -773,11 +789,10 @@ module SibApiV3Sdk
773
789
  # @return [GetContacts]
774
790
  def get_contacts_from_list(list_id, opts = {})
775
791
  data, _status_code, _headers = get_contacts_from_list_with_http_info(list_id, opts)
776
- return data
792
+ data
777
793
  end
778
794
 
779
- # Get the contacts in a list
780
- #
795
+ # Get contacts in a list
781
796
  # @param list_id Id of the list
782
797
  # @param [Hash] opts the optional parameters
783
798
  # @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
@@ -786,7 +801,7 @@ module SibApiV3Sdk
786
801
  # @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
787
802
  def get_contacts_from_list_with_http_info(list_id, opts = {})
788
803
  if @api_client.config.debugging
789
- @api_client.config.logger.debug "Calling API: ContactsApi.get_contacts_from_list ..."
804
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contacts_from_list ...'
790
805
  end
791
806
  # verify the required parameter 'list_id' is set
792
807
  if @api_client.config.client_side_validation && list_id.nil?
@@ -797,7 +812,7 @@ module SibApiV3Sdk
797
812
  end
798
813
 
799
814
  # resource path
800
- local_var_path = "/contacts/lists/{listId}/contacts".sub('{' + 'listId' + '}', list_id.to_s)
815
+ local_var_path = '/contacts/lists/{listId}/contacts'.sub('{' + 'listId' + '}', list_id.to_s)
801
816
 
802
817
  # query parameters
803
818
  query_params = {}
@@ -830,32 +845,29 @@ module SibApiV3Sdk
830
845
  end
831
846
  return data, status_code, headers
832
847
  end
833
-
834
- # Returns folder details
835
- #
848
+ # Returns a folder's details
836
849
  # @param folder_id id of the folder
837
850
  # @param [Hash] opts the optional parameters
838
851
  # @return [GetFolder]
839
852
  def get_folder(folder_id, opts = {})
840
853
  data, _status_code, _headers = get_folder_with_http_info(folder_id, opts)
841
- return data
854
+ data
842
855
  end
843
856
 
844
- # Returns folder details
845
- #
857
+ # Returns a folder&#39;s details
846
858
  # @param folder_id id of the folder
847
859
  # @param [Hash] opts the optional parameters
848
860
  # @return [Array<(GetFolder, Fixnum, Hash)>] GetFolder data, response status code and response headers
849
861
  def get_folder_with_http_info(folder_id, opts = {})
850
862
  if @api_client.config.debugging
851
- @api_client.config.logger.debug "Calling API: ContactsApi.get_folder ..."
863
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_folder ...'
852
864
  end
853
865
  # verify the required parameter 'folder_id' is set
854
866
  if @api_client.config.client_side_validation && folder_id.nil?
855
867
  fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.get_folder"
856
868
  end
857
869
  # resource path
858
- local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_id.to_s)
870
+ local_var_path = '/contacts/folders/{folderId}'.sub('{' + 'folderId' + '}', folder_id.to_s)
859
871
 
860
872
  # query parameters
861
873
  query_params = {}
@@ -885,9 +897,7 @@ module SibApiV3Sdk
885
897
  end
886
898
  return data, status_code, headers
887
899
  end
888
-
889
- # Get the lists in a folder
890
- #
900
+ # Get lists in a folder
891
901
  # @param folder_id Id of the folder
892
902
  # @param [Hash] opts the optional parameters
893
903
  # @option opts [Integer] :limit Number of documents per page (default to 10)
@@ -895,11 +905,10 @@ module SibApiV3Sdk
895
905
  # @return [GetFolderLists]
896
906
  def get_folder_lists(folder_id, opts = {})
897
907
  data, _status_code, _headers = get_folder_lists_with_http_info(folder_id, opts)
898
- return data
908
+ data
899
909
  end
900
910
 
901
- # Get the lists in a folder
902
- #
911
+ # Get lists in a folder
903
912
  # @param folder_id Id of the folder
904
913
  # @param [Hash] opts the optional parameters
905
914
  # @option opts [Integer] :limit Number of documents per page
@@ -907,7 +916,7 @@ module SibApiV3Sdk
907
916
  # @return [Array<(GetFolderLists, Fixnum, Hash)>] GetFolderLists data, response status code and response headers
908
917
  def get_folder_lists_with_http_info(folder_id, opts = {})
909
918
  if @api_client.config.debugging
910
- @api_client.config.logger.debug "Calling API: ContactsApi.get_folder_lists ..."
919
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_folder_lists ...'
911
920
  end
912
921
  # verify the required parameter 'folder_id' is set
913
922
  if @api_client.config.client_side_validation && folder_id.nil?
@@ -918,7 +927,7 @@ module SibApiV3Sdk
918
927
  end
919
928
 
920
929
  # resource path
921
- local_var_path = "/contacts/folders/{folderId}/lists".sub('{' + 'folderId' + '}', folder_id.to_s)
930
+ local_var_path = '/contacts/folders/{folderId}/lists'.sub('{' + 'folderId' + '}', folder_id.to_s)
922
931
 
923
932
  # query parameters
924
933
  query_params = {}
@@ -950,27 +959,24 @@ module SibApiV3Sdk
950
959
  end
951
960
  return data, status_code, headers
952
961
  end
953
-
954
- # Get all the folders
955
- #
962
+ # Get all folders
956
963
  # @param limit Number of documents per page
957
964
  # @param offset Index of the first document of the page
958
965
  # @param [Hash] opts the optional parameters
959
966
  # @return [GetFolders]
960
967
  def get_folders(limit, offset, opts = {})
961
968
  data, _status_code, _headers = get_folders_with_http_info(limit, offset, opts)
962
- return data
969
+ data
963
970
  end
964
971
 
965
- # Get all the folders
966
- #
972
+ # Get all folders
967
973
  # @param limit Number of documents per page
968
974
  # @param offset Index of the first document of the page
969
975
  # @param [Hash] opts the optional parameters
970
976
  # @return [Array<(GetFolders, Fixnum, Hash)>] GetFolders data, response status code and response headers
971
977
  def get_folders_with_http_info(limit, offset, opts = {})
972
978
  if @api_client.config.debugging
973
- @api_client.config.logger.debug "Calling API: ContactsApi.get_folders ..."
979
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_folders ...'
974
980
  end
975
981
  # verify the required parameter 'limit' is set
976
982
  if @api_client.config.client_side_validation && limit.nil?
@@ -985,7 +991,7 @@ module SibApiV3Sdk
985
991
  fail ArgumentError, "Missing the required parameter 'offset' when calling ContactsApi.get_folders"
986
992
  end
987
993
  # resource path
988
- local_var_path = "/contacts/folders"
994
+ local_var_path = '/contacts/folders'
989
995
 
990
996
  # query parameters
991
997
  query_params = {}
@@ -1017,32 +1023,29 @@ module SibApiV3Sdk
1017
1023
  end
1018
1024
  return data, status_code, headers
1019
1025
  end
1020
-
1021
- # Get the details of a list
1022
- #
1026
+ # Get a list's details
1023
1027
  # @param list_id Id of the list
1024
1028
  # @param [Hash] opts the optional parameters
1025
1029
  # @return [GetExtendedList]
1026
1030
  def get_list(list_id, opts = {})
1027
1031
  data, _status_code, _headers = get_list_with_http_info(list_id, opts)
1028
- return data
1032
+ data
1029
1033
  end
1030
1034
 
1031
- # Get the details of a list
1032
- #
1035
+ # Get a list&#39;s details
1033
1036
  # @param list_id Id of the list
1034
1037
  # @param [Hash] opts the optional parameters
1035
1038
  # @return [Array<(GetExtendedList, Fixnum, Hash)>] GetExtendedList data, response status code and response headers
1036
1039
  def get_list_with_http_info(list_id, opts = {})
1037
1040
  if @api_client.config.debugging
1038
- @api_client.config.logger.debug "Calling API: ContactsApi.get_list ..."
1041
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_list ...'
1039
1042
  end
1040
1043
  # verify the required parameter 'list_id' is set
1041
1044
  if @api_client.config.client_side_validation && list_id.nil?
1042
1045
  fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.get_list"
1043
1046
  end
1044
1047
  # resource path
1045
- local_var_path = "/contacts/lists/{listId}".sub('{' + 'listId' + '}', list_id.to_s)
1048
+ local_var_path = '/contacts/lists/{listId}'.sub('{' + 'listId' + '}', list_id.to_s)
1046
1049
 
1047
1050
  # query parameters
1048
1051
  query_params = {}
@@ -1072,34 +1075,31 @@ module SibApiV3Sdk
1072
1075
  end
1073
1076
  return data, status_code, headers
1074
1077
  end
1075
-
1076
1078
  # Get all the lists
1077
- #
1078
1079
  # @param [Hash] opts the optional parameters
1079
1080
  # @option opts [Integer] :limit Number of documents per page (default to 10)
1080
1081
  # @option opts [Integer] :offset Index of the first document of the page (default to 0)
1081
1082
  # @return [GetLists]
1082
1083
  def get_lists(opts = {})
1083
1084
  data, _status_code, _headers = get_lists_with_http_info(opts)
1084
- return data
1085
+ data
1085
1086
  end
1086
1087
 
1087
1088
  # Get all the lists
1088
- #
1089
1089
  # @param [Hash] opts the optional parameters
1090
1090
  # @option opts [Integer] :limit Number of documents per page
1091
1091
  # @option opts [Integer] :offset Index of the first document of the page
1092
1092
  # @return [Array<(GetLists, Fixnum, Hash)>] GetLists data, response status code and response headers
1093
1093
  def get_lists_with_http_info(opts = {})
1094
1094
  if @api_client.config.debugging
1095
- @api_client.config.logger.debug "Calling API: ContactsApi.get_lists ..."
1095
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_lists ...'
1096
1096
  end
1097
1097
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
1098
1098
  fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_lists, must be smaller than or equal to 50.'
1099
1099
  end
1100
1100
 
1101
1101
  # resource path
1102
- local_var_path = "/contacts/lists"
1102
+ local_var_path = '/contacts/lists'
1103
1103
 
1104
1104
  # query parameters
1105
1105
  query_params = {}
@@ -1131,7 +1131,6 @@ module SibApiV3Sdk
1131
1131
  end
1132
1132
  return data, status_code, headers
1133
1133
  end
1134
-
1135
1134
  # Import contacts
1136
1135
  # It returns the background process ID which on completion calls the notify URL that you have set in the input.
1137
1136
  # @param request_contact_import Values to import contacts in Sendinblue. To know more about the expected format, please have a look at &#x60;&#x60;https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns&#x60;&#x60;
@@ -1139,7 +1138,7 @@ module SibApiV3Sdk
1139
1138
  # @return [CreatedProcessId]
1140
1139
  def import_contacts(request_contact_import, opts = {})
1141
1140
  data, _status_code, _headers = import_contacts_with_http_info(request_contact_import, opts)
1142
- return data
1141
+ data
1143
1142
  end
1144
1143
 
1145
1144
  # Import contacts
@@ -1149,14 +1148,14 @@ module SibApiV3Sdk
1149
1148
  # @return [Array<(CreatedProcessId, Fixnum, Hash)>] CreatedProcessId data, response status code and response headers
1150
1149
  def import_contacts_with_http_info(request_contact_import, opts = {})
1151
1150
  if @api_client.config.debugging
1152
- @api_client.config.logger.debug "Calling API: ContactsApi.import_contacts ..."
1151
+ @api_client.config.logger.debug 'Calling API: ContactsApi.import_contacts ...'
1153
1152
  end
1154
1153
  # verify the required parameter 'request_contact_import' is set
1155
1154
  if @api_client.config.client_side_validation && request_contact_import.nil?
1156
1155
  fail ArgumentError, "Missing the required parameter 'request_contact_import' when calling ContactsApi.import_contacts"
1157
1156
  end
1158
1157
  # resource path
1159
- local_var_path = "/contacts/import"
1158
+ local_var_path = '/contacts/import'
1160
1159
 
1161
1160
  # query parameters
1162
1161
  query_params = {}
@@ -1186,27 +1185,24 @@ module SibApiV3Sdk
1186
1185
  end
1187
1186
  return data, status_code, headers
1188
1187
  end
1189
-
1190
- # Remove existing contacts from a list
1191
- #
1188
+ # Delete a contact from a list
1192
1189
  # @param list_id Id of the list
1193
- # @param contact_emails Emails adresses of the contact
1190
+ # @param contact_emails Emails addresses OR IDs of the contacts
1194
1191
  # @param [Hash] opts the optional parameters
1195
1192
  # @return [PostContactInfo]
1196
1193
  def remove_contact_from_list(list_id, contact_emails, opts = {})
1197
1194
  data, _status_code, _headers = remove_contact_from_list_with_http_info(list_id, contact_emails, opts)
1198
- return data
1195
+ data
1199
1196
  end
1200
1197
 
1201
- # Remove existing contacts from a list
1202
- #
1198
+ # Delete a contact from a list
1203
1199
  # @param list_id Id of the list
1204
- # @param contact_emails Emails adresses of the contact
1200
+ # @param contact_emails Emails addresses OR IDs of the contacts
1205
1201
  # @param [Hash] opts the optional parameters
1206
1202
  # @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers
1207
1203
  def remove_contact_from_list_with_http_info(list_id, contact_emails, opts = {})
1208
1204
  if @api_client.config.debugging
1209
- @api_client.config.logger.debug "Calling API: ContactsApi.remove_contact_from_list ..."
1205
+ @api_client.config.logger.debug 'Calling API: ContactsApi.remove_contact_from_list ...'
1210
1206
  end
1211
1207
  # verify the required parameter 'list_id' is set
1212
1208
  if @api_client.config.client_side_validation && list_id.nil?
@@ -1217,7 +1213,7 @@ module SibApiV3Sdk
1217
1213
  fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ContactsApi.remove_contact_from_list"
1218
1214
  end
1219
1215
  # resource path
1220
- local_var_path = "/contacts/lists/{listId}/contacts/remove".sub('{' + 'listId' + '}', list_id.to_s)
1216
+ local_var_path = '/contacts/lists/{listId}/contacts/remove'.sub('{' + 'listId' + '}', list_id.to_s)
1221
1217
 
1222
1218
  # query parameters
1223
1219
  query_params = {}
@@ -1247,7 +1243,6 @@ module SibApiV3Sdk
1247
1243
  end
1248
1244
  return data, status_code, headers
1249
1245
  end
1250
-
1251
1246
  # Export contacts
1252
1247
  # 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.
1253
1248
  # @param request_contact_export Values to request a contact export
@@ -1255,7 +1250,7 @@ module SibApiV3Sdk
1255
1250
  # @return [CreatedProcessId]
1256
1251
  def request_contact_export(request_contact_export, opts = {})
1257
1252
  data, _status_code, _headers = request_contact_export_with_http_info(request_contact_export, opts)
1258
- return data
1253
+ data
1259
1254
  end
1260
1255
 
1261
1256
  # Export contacts
@@ -1265,14 +1260,14 @@ module SibApiV3Sdk
1265
1260
  # @return [Array<(CreatedProcessId, Fixnum, Hash)>] CreatedProcessId data, response status code and response headers
1266
1261
  def request_contact_export_with_http_info(request_contact_export, opts = {})
1267
1262
  if @api_client.config.debugging
1268
- @api_client.config.logger.debug "Calling API: ContactsApi.request_contact_export ..."
1263
+ @api_client.config.logger.debug 'Calling API: ContactsApi.request_contact_export ...'
1269
1264
  end
1270
1265
  # verify the required parameter 'request_contact_export' is set
1271
1266
  if @api_client.config.client_side_validation && request_contact_export.nil?
1272
1267
  fail ArgumentError, "Missing the required parameter 'request_contact_export' when calling ContactsApi.request_contact_export"
1273
1268
  end
1274
1269
  # resource path
1275
- local_var_path = "/contacts/export"
1270
+ local_var_path = '/contacts/export'
1276
1271
 
1277
1272
  # query parameters
1278
1273
  query_params = {}
@@ -1302,9 +1297,7 @@ module SibApiV3Sdk
1302
1297
  end
1303
1298
  return data, status_code, headers
1304
1299
  end
1305
-
1306
- # Updates contact attribute
1307
- #
1300
+ # Update contact attribute
1308
1301
  # @param attribute_category Category of the attribute
1309
1302
  # @param attribute_name Name of the existing attribute
1310
1303
  # @param update_attribute Values to update an attribute
@@ -1312,11 +1305,10 @@ module SibApiV3Sdk
1312
1305
  # @return [nil]
1313
1306
  def update_attribute(attribute_category, attribute_name, update_attribute, opts = {})
1314
1307
  update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, opts)
1315
- return nil
1308
+ nil
1316
1309
  end
1317
1310
 
1318
- # Updates contact attribute
1319
- #
1311
+ # Update contact attribute
1320
1312
  # @param attribute_category Category of the attribute
1321
1313
  # @param attribute_name Name of the existing attribute
1322
1314
  # @param update_attribute Values to update an attribute
@@ -1324,7 +1316,7 @@ module SibApiV3Sdk
1324
1316
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1325
1317
  def update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, opts = {})
1326
1318
  if @api_client.config.debugging
1327
- @api_client.config.logger.debug "Calling API: ContactsApi.update_attribute ..."
1319
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_attribute ...'
1328
1320
  end
1329
1321
  # verify the required parameter 'attribute_category' is set
1330
1322
  if @api_client.config.client_side_validation && attribute_category.nil?
@@ -1343,7 +1335,7 @@ module SibApiV3Sdk
1343
1335
  fail ArgumentError, "Missing the required parameter 'update_attribute' when calling ContactsApi.update_attribute"
1344
1336
  end
1345
1337
  # resource path
1346
- local_var_path = "/contacts/attributes/{attributeCategory}/{attributeName}".sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
1338
+ local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
1347
1339
 
1348
1340
  # query parameters
1349
1341
  query_params = {}
@@ -1372,38 +1364,35 @@ module SibApiV3Sdk
1372
1364
  end
1373
1365
  return data, status_code, headers
1374
1366
  end
1375
-
1376
- # Updates a contact
1377
- #
1378
- # @param email Email (urlencoded) of the contact
1367
+ # Update a contact
1368
+ # @param identifier Email (urlencoded) OR ID of the contact
1379
1369
  # @param update_contact Values to update a contact
1380
1370
  # @param [Hash] opts the optional parameters
1381
1371
  # @return [nil]
1382
- def update_contact(email, update_contact, opts = {})
1383
- update_contact_with_http_info(email, update_contact, opts)
1384
- return nil
1372
+ def update_contact(identifier, update_contact, opts = {})
1373
+ update_contact_with_http_info(identifier, update_contact, opts)
1374
+ nil
1385
1375
  end
1386
1376
 
1387
- # Updates a contact
1388
- #
1389
- # @param email Email (urlencoded) of the contact
1377
+ # Update a contact
1378
+ # @param identifier Email (urlencoded) OR ID of the contact
1390
1379
  # @param update_contact Values to update a contact
1391
1380
  # @param [Hash] opts the optional parameters
1392
1381
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1393
- def update_contact_with_http_info(email, update_contact, opts = {})
1382
+ def update_contact_with_http_info(identifier, update_contact, opts = {})
1394
1383
  if @api_client.config.debugging
1395
- @api_client.config.logger.debug "Calling API: ContactsApi.update_contact ..."
1384
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_contact ...'
1396
1385
  end
1397
- # verify the required parameter 'email' is set
1398
- if @api_client.config.client_side_validation && email.nil?
1399
- fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.update_contact"
1386
+ # verify the required parameter 'identifier' is set
1387
+ if @api_client.config.client_side_validation && identifier.nil?
1388
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactsApi.update_contact"
1400
1389
  end
1401
1390
  # verify the required parameter 'update_contact' is set
1402
1391
  if @api_client.config.client_side_validation && update_contact.nil?
1403
1392
  fail ArgumentError, "Missing the required parameter 'update_contact' when calling ContactsApi.update_contact"
1404
1393
  end
1405
1394
  # resource path
1406
- local_var_path = "/contacts/{email}".sub('{' + 'email' + '}', email.to_s)
1395
+ local_var_path = '/contacts/{identifier}'.sub('{' + 'identifier' + '}', identifier.to_s)
1407
1396
 
1408
1397
  # query parameters
1409
1398
  query_params = {}
@@ -1432,27 +1421,24 @@ module SibApiV3Sdk
1432
1421
  end
1433
1422
  return data, status_code, headers
1434
1423
  end
1435
-
1436
- # Update a contact folder
1437
- #
1424
+ # Update a folder
1438
1425
  # @param folder_id Id of the folder
1439
1426
  # @param update_folder Name of the folder
1440
1427
  # @param [Hash] opts the optional parameters
1441
1428
  # @return [nil]
1442
1429
  def update_folder(folder_id, update_folder, opts = {})
1443
1430
  update_folder_with_http_info(folder_id, update_folder, opts)
1444
- return nil
1431
+ nil
1445
1432
  end
1446
1433
 
1447
- # Update a contact folder
1448
- #
1434
+ # Update a folder
1449
1435
  # @param folder_id Id of the folder
1450
1436
  # @param update_folder Name of the folder
1451
1437
  # @param [Hash] opts the optional parameters
1452
1438
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1453
1439
  def update_folder_with_http_info(folder_id, update_folder, opts = {})
1454
1440
  if @api_client.config.debugging
1455
- @api_client.config.logger.debug "Calling API: ContactsApi.update_folder ..."
1441
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_folder ...'
1456
1442
  end
1457
1443
  # verify the required parameter 'folder_id' is set
1458
1444
  if @api_client.config.client_side_validation && folder_id.nil?
@@ -1463,7 +1449,7 @@ module SibApiV3Sdk
1463
1449
  fail ArgumentError, "Missing the required parameter 'update_folder' when calling ContactsApi.update_folder"
1464
1450
  end
1465
1451
  # resource path
1466
- local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_id.to_s)
1452
+ local_var_path = '/contacts/folders/{folderId}'.sub('{' + 'folderId' + '}', folder_id.to_s)
1467
1453
 
1468
1454
  # query parameters
1469
1455
  query_params = {}
@@ -1492,27 +1478,24 @@ module SibApiV3Sdk
1492
1478
  end
1493
1479
  return data, status_code, headers
1494
1480
  end
1495
-
1496
1481
  # Update a list
1497
- #
1498
1482
  # @param list_id Id of the list
1499
1483
  # @param update_list Values to update a list
1500
1484
  # @param [Hash] opts the optional parameters
1501
1485
  # @return [nil]
1502
1486
  def update_list(list_id, update_list, opts = {})
1503
1487
  update_list_with_http_info(list_id, update_list, opts)
1504
- return nil
1488
+ nil
1505
1489
  end
1506
1490
 
1507
1491
  # Update a list
1508
- #
1509
1492
  # @param list_id Id of the list
1510
1493
  # @param update_list Values to update a list
1511
1494
  # @param [Hash] opts the optional parameters
1512
1495
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1513
1496
  def update_list_with_http_info(list_id, update_list, opts = {})
1514
1497
  if @api_client.config.debugging
1515
- @api_client.config.logger.debug "Calling API: ContactsApi.update_list ..."
1498
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_list ...'
1516
1499
  end
1517
1500
  # verify the required parameter 'list_id' is set
1518
1501
  if @api_client.config.client_side_validation && list_id.nil?
@@ -1523,7 +1506,7 @@ module SibApiV3Sdk
1523
1506
  fail ArgumentError, "Missing the required parameter 'update_list' when calling ContactsApi.update_list"
1524
1507
  end
1525
1508
  # resource path
1526
- local_var_path = "/contacts/lists/{listId}".sub('{' + 'listId' + '}', list_id.to_s)
1509
+ local_var_path = '/contacts/lists/{listId}'.sub('{' + 'listId' + '}', list_id.to_s)
1527
1510
 
1528
1511
  # query parameters
1529
1512
  query_params = {}