sib-api-v3-sdk 5.2.3 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (457) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/LICENSE.md +1 -1
  4. data/README.md +96 -68
  5. data/docs/AbTestCampaignResult.md +13 -0
  6. data/docs/AccountApi.md +3 -3
  7. data/docs/AddContactToList.md +1 -1
  8. data/docs/AttributesApi.md +18 -18
  9. data/docs/ContactsApi.md +123 -60
  10. data/docs/CreateAttribute.md +1 -1
  11. data/docs/CreateChild.md +1 -0
  12. data/docs/CreateContact.md +3 -3
  13. data/docs/CreateDoiContact.md +13 -0
  14. data/docs/CreateEmailCampaign.md +6 -3
  15. data/docs/CreateEmailCampaignSender.md +1 -0
  16. data/docs/CreateReseller.md +1 -0
  17. data/docs/CreateSender.md +1 -1
  18. data/docs/CreateSmtpEmail.md +1 -1
  19. data/docs/CreateSmtpTemplate.md +1 -1
  20. data/docs/CreateSmtpTemplateSender.md +1 -0
  21. data/docs/CreateWebhook.md +2 -2
  22. data/docs/EmailCampaignsApi.md +202 -25
  23. data/docs/EmailExportRecipients.md +1 -1
  24. data/docs/FoldersApi.md +12 -12
  25. data/docs/GetAccountRelay.md +1 -1
  26. data/docs/GetAccountRelayData.md +1 -1
  27. data/docs/GetChildAccountCreationStatus.md +8 -0
  28. data/docs/GetChildrenList.md +1 -0
  29. data/docs/GetDeviceBrowserStats.md +11 -0
  30. data/docs/GetEmailCampaign.md +1 -0
  31. data/docs/GetExtendedCampaignOverview.md +1 -0
  32. data/docs/GetExtendedCampaignOverviewSender.md +1 -0
  33. data/docs/GetExtendedCampaignStats.md +2 -0
  34. data/docs/GetSharedTemplateUrl.md +8 -0
  35. data/docs/GetSmtpTemplateOverview.md +1 -0
  36. data/docs/GetSmtpTemplateOverviewSender.md +1 -0
  37. data/docs/GetSmtpTemplates.md +1 -1
  38. data/docs/GetStatsByBrowser.md +7 -0
  39. data/docs/GetStatsByDevice.md +11 -0
  40. data/docs/GetTransacBlockedContacts.md +9 -0
  41. data/docs/GetTransacBlockedContactsContacts.md +11 -0
  42. data/docs/GetTransacBlockedContactsReason.md +9 -0
  43. data/docs/GetTransacEmailContent.md +14 -0
  44. data/docs/GetTransacEmailContentEvents.md +9 -0
  45. data/docs/GetTransacEmailsList.md +8 -0
  46. data/docs/GetTransacEmailsListTransactionalEmails.md +15 -0
  47. data/docs/ListsApi.md +13 -13
  48. data/docs/PostContactInfoContacts.md +1 -0
  49. data/docs/RemainingCreditModelChild.md +2 -2
  50. data/docs/RemainingCreditModelReseller.md +2 -2
  51. data/docs/RemoveContactFromList.md +2 -2
  52. data/docs/RequestContactExport.md +3 -2
  53. data/docs/RequestContactExportCustomContactFilter.md +13 -0
  54. data/docs/RequestContactImport.md +2 -2
  55. data/docs/RequestSMSRecipientExport.md +1 -1
  56. data/docs/ResellerApi.md +215 -86
  57. data/docs/SMSCampaignsApi.md +24 -24
  58. data/docs/SMTPApi.md +350 -42
  59. data/docs/SendEmail.md +2 -2
  60. data/docs/SendReport.md +1 -1
  61. data/docs/SendReportEmail.md +1 -1
  62. data/docs/SendSmtpEmail.md +4 -4
  63. data/docs/SendSmtpEmailBcc.md +1 -1
  64. data/docs/SendSmtpEmailCc.md +1 -1
  65. data/docs/SendSmtpEmailReplyTo.md +1 -1
  66. data/docs/SendSmtpEmailSender.md +1 -1
  67. data/docs/SendSmtpEmailTo.md +1 -1
  68. data/docs/SendTransacSms.md +1 -1
  69. data/docs/SendersApi.md +8 -8
  70. data/docs/TransactionalSMSApi.md +17 -17
  71. data/docs/UpdateAttribute.md +1 -1
  72. data/docs/UpdateChildAccountStatus.md +11 -0
  73. data/docs/UpdateContact.md +2 -2
  74. data/docs/UpdateEmailCampaign.md +5 -2
  75. data/docs/UpdateEmailCampaignSender.md +1 -0
  76. data/docs/UpdateSmtpTemplate.md +1 -1
  77. data/docs/UpdateSmtpTemplateSender.md +1 -0
  78. data/docs/UploadImageToGallery.md +9 -0
  79. data/docs/WebhooksApi.md +1 -1
  80. data/lib/sib-api-v3-sdk.rb +19 -2
  81. data/lib/sib-api-v3-sdk/api/account_api.rb +8 -11
  82. data/lib/sib-api-v3-sdk/api/attributes_api.rb +23 -35
  83. data/lib/sib-api-v3-sdk/api/contacts_api.rb +169 -186
  84. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +204 -73
  85. data/lib/sib-api-v3-sdk/api/folders_api.rb +29 -47
  86. data/lib/sib-api-v3-sdk/api/lists_api.rb +38 -65
  87. data/lib/sib-api-v3-sdk/api/process_api.rb +9 -15
  88. data/lib/sib-api-v3-sdk/api/reseller_api.rb +280 -201
  89. data/lib/sib-api-v3-sdk/api/senders_api.rb +25 -43
  90. data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +47 -73
  91. data/lib/sib-api-v3-sdk/api/smtp_api.rb +342 -92
  92. data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +19 -31
  93. data/lib/sib-api-v3-sdk/api/webhooks_api.rb +18 -33
  94. data/lib/sib-api-v3-sdk/api_client.rb +10 -10
  95. data/lib/sib-api-v3-sdk/api_error.rb +2 -2
  96. data/lib/sib-api-v3-sdk/configuration.rb +3 -3
  97. data/lib/sib-api-v3-sdk/models/ab_test_campaign_result.rb +280 -0
  98. data/lib/sib-api-v3-sdk/models/add_child_domain.rb +7 -12
  99. data/lib/sib-api-v3-sdk/models/add_contact_to_list.rb +8 -13
  100. data/lib/sib-api-v3-sdk/models/add_credits.rb +7 -12
  101. data/lib/sib-api-v3-sdk/models/create_attribute.rb +11 -15
  102. data/lib/sib-api-v3-sdk/models/create_attribute_enumeration.rb +9 -14
  103. data/lib/sib-api-v3-sdk/models/create_child.rb +58 -19
  104. data/lib/sib-api-v3-sdk/models/create_contact.rb +10 -15
  105. data/lib/sib-api-v3-sdk/models/create_doi_contact.rb +253 -0
  106. data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +82 -32
  107. data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +7 -11
  108. data/lib/sib-api-v3-sdk/models/create_email_campaign_sender.rb +21 -15
  109. data/lib/sib-api-v3-sdk/models/create_list.rb +9 -14
  110. data/lib/sib-api-v3-sdk/models/create_model.rb +8 -13
  111. data/lib/sib-api-v3-sdk/models/create_reseller.rb +20 -15
  112. data/lib/sib-api-v3-sdk/models/create_sender.rb +10 -15
  113. data/lib/sib-api-v3-sdk/models/create_sender_ips.rb +13 -19
  114. data/lib/sib-api-v3-sdk/models/create_sender_model.rb +8 -13
  115. data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +13 -18
  116. data/lib/sib-api-v3-sdk/models/create_sms_campaign_recipients.rb +8 -13
  117. data/lib/sib-api-v3-sdk/models/create_smtp_email.rb +9 -14
  118. data/lib/sib-api-v3-sdk/models/create_smtp_template.rb +11 -16
  119. data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +21 -15
  120. data/lib/sib-api-v3-sdk/models/create_update_contact_model.rb +7 -12
  121. data/lib/sib-api-v3-sdk/models/create_update_folder.rb +7 -12
  122. data/lib/sib-api-v3-sdk/models/create_webhook.rb +14 -18
  123. data/lib/sib-api-v3-sdk/models/created_process_id.rb +8 -13
  124. data/lib/sib-api-v3-sdk/models/delete_hardbounces.rb +7 -12
  125. data/lib/sib-api-v3-sdk/models/email_export_recipients.rb +12 -16
  126. data/lib/sib-api-v3-sdk/models/error_model.rb +12 -16
  127. data/lib/sib-api-v3-sdk/models/get_account.rb +14 -19
  128. data/lib/sib-api-v3-sdk/models/get_account_marketing_automation.rb +8 -13
  129. data/lib/sib-api-v3-sdk/models/get_account_plan.rb +16 -20
  130. data/lib/sib-api-v3-sdk/models/get_account_relay.rb +11 -15
  131. data/lib/sib-api-v3-sdk/models/get_account_relay_data.rb +12 -16
  132. data/lib/sib-api-v3-sdk/models/get_aggregated_report.rb +20 -25
  133. data/lib/sib-api-v3-sdk/models/get_attributes.rb +8 -13
  134. data/lib/sib-api-v3-sdk/models/get_attributes_attributes.rb +15 -19
  135. data/lib/sib-api-v3-sdk/models/get_attributes_enumeration.rb +9 -14
  136. data/lib/sib-api-v3-sdk/models/get_campaign_overview.rb +17 -21
  137. data/lib/sib-api-v3-sdk/models/get_campaign_recipients.rb +9 -14
  138. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +17 -22
  139. data/lib/sib-api-v3-sdk/models/get_child_account_creation_status.rb +189 -0
  140. data/lib/sib-api-v3-sdk/models/get_child_domain.rb +9 -14
  141. data/lib/sib-api-v3-sdk/models/get_child_domains.rb +7 -12
  142. data/lib/sib-api-v3-sdk/models/get_child_info.rb +12 -17
  143. data/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb +8 -12
  144. data/lib/sib-api-v3-sdk/models/get_child_info_api_keys_v2.rb +9 -14
  145. data/lib/sib-api-v3-sdk/models/get_child_info_api_keys_v3.rb +9 -14
  146. data/lib/sib-api-v3-sdk/models/get_child_info_credits.rb +7 -11
  147. data/lib/sib-api-v3-sdk/models/get_child_info_statistics.rb +7 -11
  148. data/lib/sib-api-v3-sdk/models/get_children_list.rb +24 -14
  149. data/lib/sib-api-v3-sdk/models/get_client.rb +11 -16
  150. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +7 -11
  151. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_clicked.rb +9 -14
  152. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_opened.rb +11 -16
  153. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_transac_attributes.rb +10 -15
  154. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions.rb +9 -14
  155. data/lib/sib-api-v3-sdk/models/get_contact_details.rb +15 -20
  156. data/lib/sib-api-v3-sdk/models/get_contacts.rb +9 -14
  157. data/lib/sib-api-v3-sdk/models/get_device_browser_stats.rb +234 -0
  158. data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +40 -34
  159. data/lib/sib-api-v3-sdk/models/get_email_campaigns.rb +8 -13
  160. data/lib/sib-api-v3-sdk/models/get_email_event_report.rb +7 -12
  161. data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +14 -18
  162. data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +40 -34
  163. data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview_sender.rb +19 -14
  164. data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats.rb +45 -20
  165. data/lib/sib-api-v3-sdk/models/get_extended_client.rb +12 -17
  166. data/lib/sib-api-v3-sdk/models/get_extended_client_address.rb +11 -15
  167. data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +16 -21
  168. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +7 -11
  169. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_clicked.rb +9 -14
  170. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_links.rb +11 -16
  171. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_messages_sent.rb +9 -14
  172. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_opened.rb +11 -16
  173. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions.rb +9 -13
  174. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.rb +9 -14
  175. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.rb +10 -15
  176. data/lib/sib-api-v3-sdk/models/get_extended_list.rb +13 -18
  177. data/lib/sib-api-v3-sdk/models/get_extended_list_campaign_stats.rb +9 -14
  178. data/lib/sib-api-v3-sdk/models/get_folder.rb +12 -17
  179. data/lib/sib-api-v3-sdk/models/get_folder_lists.rb +9 -14
  180. data/lib/sib-api-v3-sdk/models/get_folders.rb +7 -12
  181. data/lib/sib-api-v3-sdk/models/get_ip.rb +11 -16
  182. data/lib/sib-api-v3-sdk/models/get_ip_from_sender.rb +11 -16
  183. data/lib/sib-api-v3-sdk/models/get_ips.rb +8 -13
  184. data/lib/sib-api-v3-sdk/models/get_ips_from_sender.rb +8 -13
  185. data/lib/sib-api-v3-sdk/models/get_list.rb +11 -16
  186. data/lib/sib-api-v3-sdk/models/get_lists.rb +9 -14
  187. data/lib/sib-api-v3-sdk/models/get_process.rb +13 -17
  188. data/lib/sib-api-v3-sdk/models/get_processes.rb +8 -13
  189. data/lib/sib-api-v3-sdk/models/get_reports.rb +7 -12
  190. data/lib/sib-api-v3-sdk/models/get_reports_reports.rb +20 -25
  191. data/lib/sib-api-v3-sdk/models/get_senders_list.rb +7 -12
  192. data/lib/sib-api-v3-sdk/models/get_senders_list_ips.rb +10 -15
  193. data/lib/sib-api-v3-sdk/models/get_senders_list_senders.rb +11 -16
  194. data/lib/sib-api-v3-sdk/models/get_shared_template_url.rb +189 -0
  195. data/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +20 -24
  196. data/lib/sib-api-v3-sdk/models/get_sms_campaign_overview.rb +18 -22
  197. data/lib/sib-api-v3-sdk/models/get_sms_campaign_stats.rb +14 -19
  198. data/lib/sib-api-v3-sdk/models/get_sms_campaigns.rb +8 -13
  199. data/lib/sib-api-v3-sdk/models/get_sms_event_report.rb +7 -12
  200. data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +14 -18
  201. data/lib/sib-api-v3-sdk/models/get_smtp_template_overview.rb +31 -26
  202. data/lib/sib-api-v3-sdk/models/get_smtp_template_overview_sender.rb +19 -14
  203. data/lib/sib-api-v3-sdk/models/get_smtp_templates.rb +8 -13
  204. data/lib/sib-api-v3-sdk/models/get_sso_token.rb +8 -13
  205. data/lib/sib-api-v3-sdk/models/get_stats_by_browser.rb +174 -0
  206. data/lib/sib-api-v3-sdk/models/get_stats_by_device.rb +222 -0
  207. data/lib/sib-api-v3-sdk/models/get_stats_by_domain.rb +7 -12
  208. data/lib/sib-api-v3-sdk/models/get_transac_aggregated_sms_report.rb +17 -22
  209. data/lib/sib-api-v3-sdk/models/get_transac_blocked_contacts.rb +195 -0
  210. data/lib/sib-api-v3-sdk/models/get_transac_blocked_contacts_contacts.rb +233 -0
  211. data/lib/sib-api-v3-sdk/models/get_transac_blocked_contacts_reason.rb +229 -0
  212. data/lib/sib-api-v3-sdk/models/get_transac_email_content.rb +276 -0
  213. data/lib/sib-api-v3-sdk/models/get_transac_email_content_events.rb +204 -0
  214. data/lib/sib-api-v3-sdk/models/get_transac_emails_list.rb +185 -0
  215. data/lib/sib-api-v3-sdk/models/get_transac_emails_list_transactional_emails.rb +281 -0
  216. data/lib/sib-api-v3-sdk/models/get_transac_sms_report.rb +7 -12
  217. data/lib/sib-api-v3-sdk/models/get_transac_sms_report_reports.rb +17 -22
  218. data/lib/sib-api-v3-sdk/models/get_webhook.rb +17 -21
  219. data/lib/sib-api-v3-sdk/models/get_webhooks.rb +8 -13
  220. data/lib/sib-api-v3-sdk/models/manage_ip.rb +7 -12
  221. data/lib/sib-api-v3-sdk/models/post_contact_info.rb +8 -13
  222. data/lib/sib-api-v3-sdk/models/post_contact_info_contacts.rb +19 -14
  223. data/lib/sib-api-v3-sdk/models/post_send_failed.rb +9 -14
  224. data/lib/sib-api-v3-sdk/models/post_send_sms_test_failed.rb +9 -14
  225. data/lib/sib-api-v3-sdk/models/remaining_credit_model.rb +9 -14
  226. data/lib/sib-api-v3-sdk/models/remaining_credit_model_child.rb +11 -15
  227. data/lib/sib-api-v3-sdk/models/remaining_credit_model_reseller.rb +11 -16
  228. data/lib/sib-api-v3-sdk/models/remove_contact_from_list.rb +9 -14
  229. data/lib/sib-api-v3-sdk/models/remove_credits.rb +7 -12
  230. data/lib/sib-api-v3-sdk/models/request_contact_export.rb +19 -20
  231. data/lib/sib-api-v3-sdk/models/request_contact_export_custom_contact_filter.rb +293 -0
  232. data/lib/sib-api-v3-sdk/models/request_contact_import.rb +9 -14
  233. data/lib/sib-api-v3-sdk/models/request_contact_import_new_list.rb +7 -11
  234. data/lib/sib-api-v3-sdk/models/request_sms_recipient_export.rb +12 -16
  235. data/lib/sib-api-v3-sdk/models/send_email.rb +10 -15
  236. data/lib/sib-api-v3-sdk/models/send_email_attachment.rb +12 -17
  237. data/lib/sib-api-v3-sdk/models/send_report.rb +12 -16
  238. data/lib/sib-api-v3-sdk/models/send_report_email.rb +14 -17
  239. data/lib/sib-api-v3-sdk/models/send_sms.rb +9 -14
  240. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +12 -17
  241. data/lib/sib-api-v3-sdk/models/send_smtp_email_attachment.rb +9 -15
  242. data/lib/sib-api-v3-sdk/models/send_smtp_email_bcc.rb +9 -14
  243. data/lib/sib-api-v3-sdk/models/send_smtp_email_cc.rb +9 -14
  244. data/lib/sib-api-v3-sdk/models/send_smtp_email_reply_to.rb +10 -14
  245. data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +10 -14
  246. data/lib/sib-api-v3-sdk/models/send_smtp_email_to.rb +9 -14
  247. data/lib/sib-api-v3-sdk/models/send_template_email.rb +8 -13
  248. data/lib/sib-api-v3-sdk/models/send_test_email.rb +7 -12
  249. data/lib/sib-api-v3-sdk/models/send_test_sms.rb +7 -12
  250. data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +17 -21
  251. data/lib/sib-api-v3-sdk/models/update_attribute.rb +8 -13
  252. data/lib/sib-api-v3-sdk/models/update_attribute_enumeration.rb +9 -14
  253. data/lib/sib-api-v3-sdk/models/update_campaign_status.rb +10 -13
  254. data/lib/sib-api-v3-sdk/models/update_child.rb +7 -12
  255. data/lib/sib-api-v3-sdk/models/update_child_account_status.rb +214 -0
  256. data/lib/sib-api-v3-sdk/models/update_child_domain.rb +7 -12
  257. data/lib/sib-api-v3-sdk/models/update_contact.rb +9 -14
  258. data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +79 -29
  259. data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +7 -11
  260. data/lib/sib-api-v3-sdk/models/update_email_campaign_sender.rb +20 -14
  261. data/lib/sib-api-v3-sdk/models/update_list.rb +7 -12
  262. data/lib/sib-api-v3-sdk/models/update_sender.rb +7 -12
  263. data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +9 -15
  264. data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +8 -13
  265. data/lib/sib-api-v3-sdk/models/update_smtp_template_sender.rb +20 -14
  266. data/lib/sib-api-v3-sdk/models/update_webhook.rb +7 -11
  267. data/lib/sib-api-v3-sdk/models/upload_image_to_gallery.rb +199 -0
  268. data/lib/sib-api-v3-sdk/version.rb +3 -3
  269. data/sib-api-v3-sdk.gemspec +5 -5
  270. data/spec/api/account_api_spec.rb +4 -5
  271. data/spec/api/attributes_api_spec.rb +10 -14
  272. data/spec/api/contacts_api_spec.rb +57 -68
  273. data/spec/api/email_campaigns_api_spec.rb +54 -28
  274. data/spec/api/folders_api_spec.rb +12 -18
  275. data/spec/api/lists_api_spec.rb +15 -24
  276. data/spec/api/process_api_spec.rb +4 -6
  277. data/spec/api/reseller_api_spec.rb +64 -52
  278. data/spec/api/senders_api_spec.rb +10 -16
  279. data/spec/api/sms_campaigns_api_spec.rb +19 -27
  280. data/spec/api/smtp_api_spec.rb +88 -34
  281. data/spec/api/transactional_sms_api_spec.rb +8 -12
  282. data/spec/api/webhooks_api_spec.rb +7 -12
  283. data/spec/api_client_spec.rb +36 -36
  284. data/spec/configuration_spec.rb +10 -10
  285. data/spec/models/ab_test_campaign_result_spec.rb +79 -0
  286. data/spec/models/add_child_domain_spec.rb +3 -4
  287. data/spec/models/add_contact_to_list_spec.rb +3 -4
  288. data/spec/models/add_credits_spec.rb +4 -5
  289. data/spec/models/create_attribute_enumeration_spec.rb +4 -5
  290. data/spec/models/create_attribute_spec.rb +9 -10
  291. data/spec/models/create_child_spec.rb +17 -8
  292. data/spec/models/create_contact_spec.rb +9 -10
  293. data/spec/models/create_doi_contact_spec.rb +71 -0
  294. data/spec/models/create_email_campaign_recipients_spec.rb +4 -5
  295. data/spec/models/create_email_campaign_sender_spec.rb +10 -5
  296. data/spec/models/create_email_campaign_spec.rb +49 -32
  297. data/spec/models/create_list_spec.rb +4 -5
  298. data/spec/models/create_model_spec.rb +3 -4
  299. data/spec/models/create_reseller_spec.rb +9 -4
  300. data/spec/models/create_sender_ips_spec.rb +5 -6
  301. data/spec/models/create_sender_model_spec.rb +5 -6
  302. data/spec/models/create_sender_spec.rb +5 -6
  303. data/spec/models/create_sms_campaign_recipients_spec.rb +4 -5
  304. data/spec/models/create_sms_campaign_spec.rb +7 -8
  305. data/spec/models/create_smtp_email_spec.rb +3 -4
  306. data/spec/models/create_smtp_template_sender_spec.rb +10 -5
  307. data/spec/models/create_smtp_template_spec.rb +12 -13
  308. data/spec/models/create_update_contact_model_spec.rb +3 -4
  309. data/spec/models/create_update_folder_spec.rb +3 -4
  310. data/spec/models/create_webhook_spec.rb +14 -15
  311. data/spec/models/created_process_id_spec.rb +3 -4
  312. data/spec/models/delete_hardbounces_spec.rb +5 -6
  313. data/spec/models/email_export_recipients_spec.rb +8 -9
  314. data/spec/models/error_model_spec.rb +8 -9
  315. data/spec/models/get_account_marketing_automation_spec.rb +4 -5
  316. data/spec/models/get_account_plan_spec.rb +16 -17
  317. data/spec/models/get_account_relay_data_spec.rb +5 -6
  318. data/spec/models/get_account_relay_spec.rb +4 -5
  319. data/spec/models/get_account_spec.rb +10 -11
  320. data/spec/models/get_aggregated_report_spec.rb +15 -16
  321. data/spec/models/get_attributes_attributes_spec.rb +15 -16
  322. data/spec/models/get_attributes_enumeration_spec.rb +4 -5
  323. data/spec/models/get_attributes_spec.rb +3 -4
  324. data/spec/models/get_campaign_overview_spec.rb +23 -24
  325. data/spec/models/get_campaign_recipients_spec.rb +4 -5
  326. data/spec/models/get_campaign_stats_spec.rb +14 -15
  327. data/spec/models/get_child_account_creation_status_spec.rb +41 -0
  328. data/spec/models/get_child_domain_spec.rb +4 -5
  329. data/spec/models/get_child_domains_spec.rb +2 -3
  330. data/spec/models/get_child_info_api_keys_spec.rb +4 -5
  331. data/spec/models/get_child_info_api_keys_v2_spec.rb +4 -5
  332. data/spec/models/get_child_info_api_keys_v3_spec.rb +4 -5
  333. data/spec/models/get_child_info_credits_spec.rb +4 -5
  334. data/spec/models/get_child_info_spec.rb +11 -12
  335. data/spec/models/get_child_info_statistics_spec.rb +5 -6
  336. data/spec/models/get_children_list_spec.rb +9 -4
  337. data/spec/models/get_client_spec.rb +6 -7
  338. data/spec/models/get_contact_campaign_stats_clicked_spec.rb +4 -5
  339. data/spec/models/get_contact_campaign_stats_opened_spec.rb +6 -7
  340. data/spec/models/get_contact_campaign_stats_spec.rb +10 -11
  341. data/spec/models/get_contact_campaign_stats_transac_attributes_spec.rb +5 -6
  342. data/spec/models/get_contact_campaign_stats_unsubscriptions_spec.rb +4 -5
  343. data/spec/models/get_contact_details_spec.rb +11 -12
  344. data/spec/models/get_contacts_spec.rb +4 -5
  345. data/spec/models/get_device_browser_stats_spec.rb +59 -0
  346. data/spec/models/get_email_campaign_spec.rb +46 -41
  347. data/spec/models/get_email_campaigns_spec.rb +4 -5
  348. data/spec/models/get_email_event_report_events_spec.rb +16 -17
  349. data/spec/models/get_email_event_report_spec.rb +3 -4
  350. data/spec/models/get_extended_campaign_overview_sender_spec.rb +10 -5
  351. data/spec/models/get_extended_campaign_overview_spec.rb +44 -39
  352. data/spec/models/get_extended_campaign_stats_spec.rb +20 -9
  353. data/spec/models/get_extended_client_address_spec.rb +6 -7
  354. data/spec/models/get_extended_client_spec.rb +7 -8
  355. data/spec/models/get_extended_contact_details_spec.rb +12 -13
  356. data/spec/models/get_extended_contact_details_statistics_clicked_spec.rb +4 -5
  357. data/spec/models/get_extended_contact_details_statistics_links_spec.rb +6 -7
  358. data/spec/models/get_extended_contact_details_statistics_messages_sent_spec.rb +4 -5
  359. data/spec/models/get_extended_contact_details_statistics_opened_spec.rb +6 -7
  360. data/spec/models/get_extended_contact_details_statistics_spec.rb +10 -11
  361. data/spec/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription_spec.rb +4 -5
  362. data/spec/models/get_extended_contact_details_statistics_unsubscriptions_spec.rb +4 -5
  363. data/spec/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription_spec.rb +5 -6
  364. data/spec/models/get_extended_list_campaign_stats_spec.rb +4 -5
  365. data/spec/models/get_extended_list_spec.rb +10 -11
  366. data/spec/models/get_folder_lists_spec.rb +4 -5
  367. data/spec/models/get_folder_spec.rb +7 -8
  368. data/spec/models/get_folders_spec.rb +4 -5
  369. data/spec/models/get_ip_from_sender_spec.rb +6 -7
  370. data/spec/models/get_ip_spec.rb +6 -7
  371. data/spec/models/get_ips_from_sender_spec.rb +3 -4
  372. data/spec/models/get_ips_spec.rb +3 -4
  373. data/spec/models/get_list_spec.rb +6 -7
  374. data/spec/models/get_lists_spec.rb +4 -5
  375. data/spec/models/get_process_spec.rb +10 -11
  376. data/spec/models/get_processes_spec.rb +4 -5
  377. data/spec/models/get_reports_reports_spec.rb +15 -16
  378. data/spec/models/get_reports_spec.rb +3 -4
  379. data/spec/models/get_senders_list_ips_spec.rb +5 -6
  380. data/spec/models/get_senders_list_senders_spec.rb +7 -8
  381. data/spec/models/get_senders_list_spec.rb +3 -4
  382. data/spec/models/get_shared_template_url_spec.rb +41 -0
  383. data/spec/models/get_sms_campaign_overview_spec.rb +14 -15
  384. data/spec/models/get_sms_campaign_spec.rb +16 -17
  385. data/spec/models/get_sms_campaign_stats_spec.rb +9 -10
  386. data/spec/models/get_sms_campaigns_spec.rb +4 -5
  387. data/spec/models/get_sms_event_report_events_spec.rb +13 -14
  388. data/spec/models/get_sms_event_report_spec.rb +3 -4
  389. data/spec/models/get_smtp_template_overview_sender_spec.rb +10 -5
  390. data/spec/models/get_smtp_template_overview_spec.rb +20 -15
  391. data/spec/models/get_smtp_templates_spec.rb +4 -5
  392. data/spec/models/get_sso_token_spec.rb +3 -4
  393. data/spec/models/get_stats_by_browser_spec.rb +35 -0
  394. data/spec/models/get_stats_by_device_spec.rb +59 -0
  395. data/spec/models/get_stats_by_domain_spec.rb +2 -3
  396. data/spec/models/get_transac_aggregated_sms_report_spec.rb +12 -13
  397. data/spec/models/get_transac_blocked_contacts_contacts_spec.rb +59 -0
  398. data/spec/models/get_transac_blocked_contacts_reason_spec.rb +51 -0
  399. data/spec/models/get_transac_blocked_contacts_spec.rb +47 -0
  400. data/spec/models/get_transac_email_content_events_spec.rb +47 -0
  401. data/spec/models/get_transac_email_content_spec.rb +77 -0
  402. data/spec/models/get_transac_emails_list_spec.rb +41 -0
  403. data/spec/models/get_transac_emails_list_transactional_emails_spec.rb +83 -0
  404. data/spec/models/get_transac_sms_report_reports_spec.rb +12 -13
  405. data/spec/models/get_transac_sms_report_spec.rb +3 -4
  406. data/spec/models/get_webhook_spec.rb +13 -14
  407. data/spec/models/get_webhooks_spec.rb +3 -4
  408. data/spec/models/manage_ip_spec.rb +3 -4
  409. data/spec/models/post_contact_info_contacts_spec.rb +11 -6
  410. data/spec/models/post_contact_info_spec.rb +3 -4
  411. data/spec/models/post_send_failed_spec.rb +7 -8
  412. data/spec/models/post_send_sms_test_failed_spec.rb +6 -7
  413. data/spec/models/remaining_credit_model_child_spec.rb +4 -5
  414. data/spec/models/remaining_credit_model_reseller_spec.rb +4 -5
  415. data/spec/models/remaining_credit_model_spec.rb +4 -5
  416. data/spec/models/remove_contact_from_list_spec.rb +4 -5
  417. data/spec/models/remove_credits_spec.rb +4 -5
  418. data/spec/models/request_contact_export_custom_contact_filter_spec.rb +83 -0
  419. data/spec/models/request_contact_export_spec.rb +11 -6
  420. data/spec/models/request_contact_import_new_list_spec.rb +4 -5
  421. data/spec/models/request_contact_import_spec.rb +11 -12
  422. data/spec/models/request_sms_recipient_export_spec.rb +8 -9
  423. data/spec/models/send_email_attachment_spec.rb +4 -5
  424. data/spec/models/send_email_spec.rb +11 -12
  425. data/spec/models/send_report_email_spec.rb +12 -13
  426. data/spec/models/send_report_spec.rb +8 -9
  427. data/spec/models/send_sms_spec.rb +7 -8
  428. data/spec/models/send_smtp_email_attachment_spec.rb +5 -6
  429. data/spec/models/send_smtp_email_bcc_spec.rb +4 -5
  430. data/spec/models/send_smtp_email_cc_spec.rb +4 -5
  431. data/spec/models/send_smtp_email_reply_to_spec.rb +4 -5
  432. data/spec/models/send_smtp_email_sender_spec.rb +4 -5
  433. data/spec/models/send_smtp_email_spec.rb +15 -16
  434. data/spec/models/send_smtp_email_to_spec.rb +4 -5
  435. data/spec/models/send_template_email_spec.rb +3 -4
  436. data/spec/models/send_test_email_spec.rb +3 -4
  437. data/spec/models/send_test_sms_spec.rb +3 -4
  438. data/spec/models/send_transac_sms_spec.rb +12 -13
  439. data/spec/models/update_attribute_enumeration_spec.rb +4 -5
  440. data/spec/models/update_attribute_spec.rb +4 -5
  441. data/spec/models/update_campaign_status_spec.rb +7 -8
  442. data/spec/models/update_child_account_status_spec.rb +59 -0
  443. data/spec/models/update_child_domain_spec.rb +3 -4
  444. data/spec/models/update_child_spec.rb +7 -8
  445. data/spec/models/update_contact_spec.rb +8 -9
  446. data/spec/models/update_email_campaign_recipients_spec.rb +4 -5
  447. data/spec/models/update_email_campaign_sender_spec.rb +10 -5
  448. data/spec/models/update_email_campaign_spec.rb +49 -32
  449. data/spec/models/update_list_spec.rb +4 -5
  450. data/spec/models/update_sender_spec.rb +5 -6
  451. data/spec/models/update_sms_campaign_spec.rb +7 -8
  452. data/spec/models/update_smtp_template_sender_spec.rb +10 -5
  453. data/spec/models/update_smtp_template_spec.rb +12 -13
  454. data/spec/models/update_webhook_spec.rb +9 -10
  455. data/spec/models/upload_image_to_gallery_spec.rb +47 -0
  456. data/spec/spec_helper.rb +2 -2
  457. metadata +70 -2
@@ -1,19 +1,18 @@
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
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
-
17
16
  class AddCredits
18
17
  # Required if email credits are empty. SMS credits to be added to the child account
19
18
  attr_accessor :sms
@@ -21,7 +20,6 @@ module SibApiV3Sdk
21
20
  # Required if sms credits are empty. Email credits to be added to the child account
22
21
  attr_accessor :email
23
22
 
24
-
25
23
  # Attribute mapping from ruby-style variable name to JSON key.
26
24
  def self.attribute_map
27
25
  {
@@ -44,7 +42,7 @@ module SibApiV3Sdk
44
42
  return unless attributes.is_a?(Hash)
45
43
 
46
44
  # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
46
 
49
47
  if attributes.has_key?(:'sms')
50
48
  self.sms = attributes[:'sms']
@@ -53,20 +51,19 @@ module SibApiV3Sdk
53
51
  if attributes.has_key?(:'email')
54
52
  self.email = attributes[:'email']
55
53
  end
56
-
57
54
  end
58
55
 
59
56
  # Show invalid properties with the reasons. Usually used together with valid?
60
57
  # @return Array for valid properties with the reasons
61
58
  def list_invalid_properties
62
59
  invalid_properties = Array.new
63
- return invalid_properties
60
+ invalid_properties
64
61
  end
65
62
 
66
63
  # Check to see if the all the properties in the model are valid
67
64
  # @return true if the model is valid
68
65
  def valid?
69
- return true
66
+ true
70
67
  end
71
68
 
72
69
  # Checks equality by comparing each attribute.
@@ -100,7 +97,7 @@ module SibApiV3Sdk
100
97
  # check to ensure the input is an array given that the the attribute
101
98
  # is documented as an array but the input is not
102
99
  if attributes[self.class.attribute_map[key]].is_a?(Array)
103
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
100
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
104
101
  end
105
102
  elsif !attributes[self.class.attribute_map[key]].nil?
106
103
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -182,7 +179,7 @@ module SibApiV3Sdk
182
179
  # @return [Hash] Returns the value in the form of hash
183
180
  def _to_hash(value)
184
181
  if value.is_a?(Array)
185
- value.compact.map{ |v| _to_hash(v) }
182
+ value.compact.map { |v| _to_hash(v) }
186
183
  elsif value.is_a?(Hash)
187
184
  {}.tap do |hash|
188
185
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -193,7 +190,5 @@ module SibApiV3Sdk
193
190
  value
194
191
  end
195
192
  end
196
-
197
193
  end
198
-
199
194
  end
@@ -1,24 +1,23 @@
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
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
-
17
16
  class CreateAttribute
18
17
  # Value of the attribute. Use only if the attribute's category is 'calculated' or 'global'
19
18
  attr_accessor :value
20
19
 
21
- # List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, `[{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]`
20
+ # List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]
22
21
  attr_accessor :enumeration
23
22
 
24
23
  # Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute )
@@ -70,7 +69,7 @@ module SibApiV3Sdk
70
69
  return unless attributes.is_a?(Hash)
71
70
 
72
71
  # convert string to symbol for hash key
73
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
72
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
74
73
 
75
74
  if attributes.has_key?(:'value')
76
75
  self.value = attributes[:'value']
@@ -85,30 +84,29 @@ module SibApiV3Sdk
85
84
  if attributes.has_key?(:'type')
86
85
  self.type = attributes[:'type']
87
86
  end
88
-
89
87
  end
90
88
 
91
89
  # Show invalid properties with the reasons. Usually used together with valid?
92
90
  # @return Array for valid properties with the reasons
93
91
  def list_invalid_properties
94
92
  invalid_properties = Array.new
95
- return invalid_properties
93
+ invalid_properties
96
94
  end
97
95
 
98
96
  # Check to see if the all the properties in the model are valid
99
97
  # @return true if the model is valid
100
98
  def valid?
101
- type_validator = EnumAttributeValidator.new('String', ["text", "date", "float", "boolean", "id", "category"])
99
+ type_validator = EnumAttributeValidator.new('String', ['text', 'date', 'float', 'boolean', 'id', 'category'])
102
100
  return false unless type_validator.valid?(@type)
103
- return true
101
+ true
104
102
  end
105
103
 
106
104
  # Custom attribute writer method checking allowed values (enum).
107
105
  # @param [Object] type Object to be assigned
108
106
  def type=(type)
109
- validator = EnumAttributeValidator.new('String', ["text", "date", "float", "boolean", "id", "category"])
107
+ validator = EnumAttributeValidator.new('String', ['text', 'date', 'float', 'boolean', 'id', 'category'])
110
108
  unless validator.valid?(type)
111
- fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
109
+ fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
112
110
  end
113
111
  @type = type
114
112
  end
@@ -145,7 +143,7 @@ module SibApiV3Sdk
145
143
  # check to ensure the input is an array given that the the attribute
146
144
  # is documented as an array but the input is not
147
145
  if attributes[self.class.attribute_map[key]].is_a?(Array)
148
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
146
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
147
  end
150
148
  elsif !attributes[self.class.attribute_map[key]].nil?
151
149
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -227,7 +225,7 @@ module SibApiV3Sdk
227
225
  # @return [Hash] Returns the value in the form of hash
228
226
  def _to_hash(value)
229
227
  if value.is_a?(Array)
230
- value.compact.map{ |v| _to_hash(v) }
228
+ value.compact.map { |v| _to_hash(v) }
231
229
  elsif value.is_a?(Hash)
232
230
  {}.tap do |hash|
233
231
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -238,7 +236,5 @@ module SibApiV3Sdk
238
236
  value
239
237
  end
240
238
  end
241
-
242
239
  end
243
-
244
240
  end
@@ -1,19 +1,18 @@
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
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
-
17
16
  class CreateAttributeEnumeration
18
17
  # Id of the value
19
18
  attr_accessor :value
@@ -21,7 +20,6 @@ module SibApiV3Sdk
21
20
  # Label of the value
22
21
  attr_accessor :label
23
22
 
24
-
25
23
  # Attribute mapping from ruby-style variable name to JSON key.
26
24
  def self.attribute_map
27
25
  {
@@ -44,7 +42,7 @@ module SibApiV3Sdk
44
42
  return unless attributes.is_a?(Hash)
45
43
 
46
44
  # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
46
 
49
47
  if attributes.has_key?(:'value')
50
48
  self.value = attributes[:'value']
@@ -53,7 +51,6 @@ module SibApiV3Sdk
53
51
  if attributes.has_key?(:'label')
54
52
  self.label = attributes[:'label']
55
53
  end
56
-
57
54
  end
58
55
 
59
56
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -61,14 +58,14 @@ module SibApiV3Sdk
61
58
  def list_invalid_properties
62
59
  invalid_properties = Array.new
63
60
  if @value.nil?
64
- invalid_properties.push("invalid value for 'value', value cannot be nil.")
61
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
65
62
  end
66
63
 
67
64
  if @label.nil?
68
- invalid_properties.push("invalid value for 'label', label cannot be nil.")
65
+ invalid_properties.push('invalid value for "label", label cannot be nil.')
69
66
  end
70
67
 
71
- return invalid_properties
68
+ invalid_properties
72
69
  end
73
70
 
74
71
  # Check to see if the all the properties in the model are valid
@@ -76,7 +73,7 @@ module SibApiV3Sdk
76
73
  def valid?
77
74
  return false if @value.nil?
78
75
  return false if @label.nil?
79
- return true
76
+ true
80
77
  end
81
78
 
82
79
  # Checks equality by comparing each attribute.
@@ -110,7 +107,7 @@ module SibApiV3Sdk
110
107
  # check to ensure the input is an array given that the the attribute
111
108
  # is documented as an array but the input is not
112
109
  if attributes[self.class.attribute_map[key]].is_a?(Array)
113
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
111
  end
115
112
  elsif !attributes[self.class.attribute_map[key]].nil?
116
113
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -192,7 +189,7 @@ module SibApiV3Sdk
192
189
  # @return [Hash] Returns the value in the form of hash
193
190
  def _to_hash(value)
194
191
  if value.is_a?(Array)
195
- value.compact.map{ |v| _to_hash(v) }
192
+ value.compact.map { |v| _to_hash(v) }
196
193
  elsif value.is_a?(Hash)
197
194
  {}.tap do |hash|
198
195
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -203,7 +200,5 @@ module SibApiV3Sdk
203
200
  value
204
201
  end
205
202
  end
206
-
207
203
  end
208
-
209
204
  end
@@ -1,19 +1,18 @@
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
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
-
17
16
  class CreateChild
18
17
  # Email address to create the child account
19
18
  attr_accessor :email
@@ -30,6 +29,30 @@ module SibApiV3Sdk
30
29
  # Password for the child account to login
31
30
  attr_accessor :password
32
31
 
32
+ # Language of the child account
33
+ attr_accessor :language
34
+
35
+ class EnumAttributeValidator
36
+ attr_reader :datatype
37
+ attr_reader :allowable_values
38
+
39
+ def initialize(datatype, allowable_values)
40
+ @allowable_values = allowable_values.map do |value|
41
+ case datatype.to_s
42
+ when /Integer/i
43
+ value.to_i
44
+ when /Float/i
45
+ value.to_f
46
+ else
47
+ value
48
+ end
49
+ end
50
+ end
51
+
52
+ def valid?(value)
53
+ !value || allowable_values.include?(value)
54
+ end
55
+ end
33
56
 
34
57
  # Attribute mapping from ruby-style variable name to JSON key.
35
58
  def self.attribute_map
@@ -38,7 +61,8 @@ module SibApiV3Sdk
38
61
  :'first_name' => :'firstName',
39
62
  :'last_name' => :'lastName',
40
63
  :'company_name' => :'companyName',
41
- :'password' => :'password'
64
+ :'password' => :'password',
65
+ :'language' => :'language'
42
66
  }
43
67
  end
44
68
 
@@ -49,7 +73,8 @@ module SibApiV3Sdk
49
73
  :'first_name' => :'String',
50
74
  :'last_name' => :'String',
51
75
  :'company_name' => :'String',
52
- :'password' => :'String'
76
+ :'password' => :'String',
77
+ :'language' => :'String'
53
78
  }
54
79
  end
55
80
 
@@ -59,7 +84,7 @@ module SibApiV3Sdk
59
84
  return unless attributes.is_a?(Hash)
60
85
 
61
86
  # convert string to symbol for hash key
62
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
87
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
88
 
64
89
  if attributes.has_key?(:'email')
65
90
  self.email = attributes[:'email']
@@ -81,6 +106,9 @@ module SibApiV3Sdk
81
106
  self.password = attributes[:'password']
82
107
  end
83
108
 
109
+ if attributes.has_key?(:'language')
110
+ self.language = attributes[:'language']
111
+ end
84
112
  end
85
113
 
86
114
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -88,26 +116,26 @@ module SibApiV3Sdk
88
116
  def list_invalid_properties
89
117
  invalid_properties = Array.new
90
118
  if @email.nil?
91
- invalid_properties.push("invalid value for 'email', email cannot be nil.")
119
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
92
120
  end
93
121
 
94
122
  if @first_name.nil?
95
- invalid_properties.push("invalid value for 'first_name', first_name cannot be nil.")
123
+ invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
96
124
  end
97
125
 
98
126
  if @last_name.nil?
99
- invalid_properties.push("invalid value for 'last_name', last_name cannot be nil.")
127
+ invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
100
128
  end
101
129
 
102
130
  if @company_name.nil?
103
- invalid_properties.push("invalid value for 'company_name', company_name cannot be nil.")
131
+ invalid_properties.push('invalid value for "company_name", company_name cannot be nil.')
104
132
  end
105
133
 
106
134
  if @password.nil?
107
- invalid_properties.push("invalid value for 'password', password cannot be nil.")
135
+ invalid_properties.push('invalid value for "password", password cannot be nil.')
108
136
  end
109
137
 
110
- return invalid_properties
138
+ invalid_properties
111
139
  end
112
140
 
113
141
  # Check to see if the all the properties in the model are valid
@@ -118,7 +146,19 @@ module SibApiV3Sdk
118
146
  return false if @last_name.nil?
119
147
  return false if @company_name.nil?
120
148
  return false if @password.nil?
121
- return true
149
+ language_validator = EnumAttributeValidator.new('String', ['fr', 'es', 'pt', 'it', 'de', 'en'])
150
+ return false unless language_validator.valid?(@language)
151
+ true
152
+ end
153
+
154
+ # Custom attribute writer method checking allowed values (enum).
155
+ # @param [Object] language Object to be assigned
156
+ def language=(language)
157
+ validator = EnumAttributeValidator.new('String', ['fr', 'es', 'pt', 'it', 'de', 'en'])
158
+ unless validator.valid?(language)
159
+ fail ArgumentError, 'invalid value for "language", must be one of #{validator.allowable_values}.'
160
+ end
161
+ @language = language
122
162
  end
123
163
 
124
164
  # Checks equality by comparing each attribute.
@@ -130,7 +170,8 @@ module SibApiV3Sdk
130
170
  first_name == o.first_name &&
131
171
  last_name == o.last_name &&
132
172
  company_name == o.company_name &&
133
- password == o.password
173
+ password == o.password &&
174
+ language == o.language
134
175
  end
135
176
 
136
177
  # @see the `==` method
@@ -142,7 +183,7 @@ module SibApiV3Sdk
142
183
  # Calculates hash code according to all attributes.
143
184
  # @return [Fixnum] Hash code
144
185
  def hash
145
- [email, first_name, last_name, company_name, password].hash
186
+ [email, first_name, last_name, company_name, password, language].hash
146
187
  end
147
188
 
148
189
  # Builds the object from hash
@@ -155,7 +196,7 @@ module SibApiV3Sdk
155
196
  # check to ensure the input is an array given that the the attribute
156
197
  # is documented as an array but the input is not
157
198
  if attributes[self.class.attribute_map[key]].is_a?(Array)
158
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
199
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
159
200
  end
160
201
  elsif !attributes[self.class.attribute_map[key]].nil?
161
202
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -237,7 +278,7 @@ module SibApiV3Sdk
237
278
  # @return [Hash] Returns the value in the form of hash
238
279
  def _to_hash(value)
239
280
  if value.is_a?(Array)
240
- value.compact.map{ |v| _to_hash(v) }
281
+ value.compact.map { |v| _to_hash(v) }
241
282
  elsif value.is_a?(Hash)
242
283
  {}.tap do |hash|
243
284
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -248,7 +289,5 @@ module SibApiV3Sdk
248
289
  value
249
290
  end
250
291
  end
251
-
252
292
  end
253
-
254
293
  end