sib-api-v3-sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (487) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/LICENSE.md +21 -0
  4. data/README.md +349 -0
  5. data/Rakefile +8 -0
  6. data/docs/AccountApi.md +55 -0
  7. data/docs/AddCredits.md +9 -0
  8. data/docs/AddRemoveContactToList.md +8 -0
  9. data/docs/AttributesApi.md +160 -0
  10. data/docs/ContactsApi.md +1310 -0
  11. data/docs/CreaUpdateFolder.md +8 -0
  12. data/docs/CreateAttribute.md +12 -0
  13. data/docs/CreateAttributeEnumemaration.md +9 -0
  14. data/docs/CreateChild.md +12 -0
  15. data/docs/CreateContact.md +12 -0
  16. data/docs/CreateEmailCampaign.md +25 -0
  17. data/docs/CreateEmailCampaignRecipients.md +9 -0
  18. data/docs/CreateEmailCampaignSender.md +9 -0
  19. data/docs/CreateList.md +9 -0
  20. data/docs/CreateModel.md +8 -0
  21. data/docs/CreateSender.md +10 -0
  22. data/docs/CreateSenderIps.md +10 -0
  23. data/docs/CreateSenderModel.md +10 -0
  24. data/docs/CreateSmsCampaign.md +12 -0
  25. data/docs/CreateSmsCampaignRecipients.md +9 -0
  26. data/docs/CreateSmtpEmail.md +8 -0
  27. data/docs/CreateSmtpTemplate.md +17 -0
  28. data/docs/CreateSmtpTemplateSender.md +9 -0
  29. data/docs/CreateWebhook.md +11 -0
  30. data/docs/CreatedProcessId.md +8 -0
  31. data/docs/DeleteHardbounces.md +10 -0
  32. data/docs/EmailCampaignsApi.md +557 -0
  33. data/docs/EmailExportRecipients.md +9 -0
  34. data/docs/ErrorModel.md +9 -0
  35. data/docs/FoldersApi.md +336 -0
  36. data/docs/GetAccount.md +15 -0
  37. data/docs/GetAccountMarketingAutomation.md +9 -0
  38. data/docs/GetAccountPlan.md +10 -0
  39. data/docs/GetAccountRelay.md +9 -0
  40. data/docs/GetAccountRelayData.md +10 -0
  41. data/docs/GetAggregatedReport.md +19 -0
  42. data/docs/GetAttributes.md +8 -0
  43. data/docs/GetAttributesAttributes.md +13 -0
  44. data/docs/GetAttributesEnumeration.md +9 -0
  45. data/docs/GetCampaignOverview.md +13 -0
  46. data/docs/GetCampaignRecipients.md +9 -0
  47. data/docs/GetCampaignRecipientsExclusionLists.md +9 -0
  48. data/docs/GetCampaignRecipientsLists.md +9 -0
  49. data/docs/GetCampaignStats.md +19 -0
  50. data/docs/GetChildInfo.md +16 -0
  51. data/docs/GetChildInfoApiKeys.md +10 -0
  52. data/docs/GetChildInfoCredits.md +9 -0
  53. data/docs/GetChildInfoIps.md +9 -0
  54. data/docs/GetChildInfoStatistics.md +10 -0
  55. data/docs/GetChildrenList.md +8 -0
  56. data/docs/GetClient.md +11 -0
  57. data/docs/GetContactCampaignStats.md +15 -0
  58. data/docs/GetContactCampaignStatsClicked.md +9 -0
  59. data/docs/GetContactCampaignStatsLinks.md +11 -0
  60. data/docs/GetContactCampaignStatsMessagesSent.md +9 -0
  61. data/docs/GetContactCampaignStatsOpened.md +11 -0
  62. data/docs/GetContactCampaignStatsTransacAttributes.md +10 -0
  63. data/docs/GetContactCampaignStatsUnsubscriptions.md +9 -0
  64. data/docs/GetContactCampaignStatsUnsubscriptionsAdminUnsubscription.md +9 -0
  65. data/docs/GetContactCampaignStatsUnsubscriptionsUserUnsubscription.md +10 -0
  66. data/docs/GetContactDetails.md +15 -0
  67. data/docs/GetContacts.md +9 -0
  68. data/docs/GetEmailCampaign.md +27 -0
  69. data/docs/GetEmailCampaigns.md +9 -0
  70. data/docs/GetEmailEventReport.md +8 -0
  71. data/docs/GetEmailEventReportEvents.md +14 -0
  72. data/docs/GetExtendedCampaignOverview.md +27 -0
  73. data/docs/GetExtendedCampaignOverviewSender.md +9 -0
  74. data/docs/GetExtendedCampaignStats.md +12 -0
  75. data/docs/GetExtendedCampaignStatsLinksStats.md +8 -0
  76. data/docs/GetExtendedClient.md +12 -0
  77. data/docs/GetExtendedClientAddress.md +11 -0
  78. data/docs/GetExtendedContactDetails.md +15 -0
  79. data/docs/GetExtendedList.md +15 -0
  80. data/docs/GetExtendedListCampaignStats.md +9 -0
  81. data/docs/GetFolder.md +12 -0
  82. data/docs/GetFolderLists.md +9 -0
  83. data/docs/GetFolders.md +9 -0
  84. data/docs/GetIp.md +11 -0
  85. data/docs/GetIpFromSender.md +11 -0
  86. data/docs/GetIps.md +8 -0
  87. data/docs/GetIpsFromSender.md +8 -0
  88. data/docs/GetList.md +11 -0
  89. data/docs/GetLists.md +9 -0
  90. data/docs/GetListsFolder.md +9 -0
  91. data/docs/GetListsLists.md +8 -0
  92. data/docs/GetProcess.md +11 -0
  93. data/docs/GetProcesses.md +9 -0
  94. data/docs/GetReports.md +8 -0
  95. data/docs/GetReportsReports.md +20 -0
  96. data/docs/GetSendersList.md +8 -0
  97. data/docs/GetSendersListIps.md +10 -0
  98. data/docs/GetSendersListSenders.md +12 -0
  99. data/docs/GetSmsCampaign.md +16 -0
  100. data/docs/GetSmsCampaignOverview.md +16 -0
  101. data/docs/GetSmsCampaignStats.md +14 -0
  102. data/docs/GetSmsCampaigns.md +9 -0
  103. data/docs/GetSmsEventReport.md +8 -0
  104. data/docs/GetSmsEventReportEvents.md +14 -0
  105. data/docs/GetSmtpTemplateOverview.md +19 -0
  106. data/docs/GetSmtpTemplateOverviewSender.md +9 -0
  107. data/docs/GetSmtpTemplates.md +9 -0
  108. data/docs/GetStatsByDomain.md +7 -0
  109. data/docs/GetTransacAggregatedSmsReport.md +17 -0
  110. data/docs/GetTransacSmsReport.md +8 -0
  111. data/docs/GetTransacSmsReportReports.md +18 -0
  112. data/docs/GetWebhook.md +14 -0
  113. data/docs/GetWebhooks.md +8 -0
  114. data/docs/ListsApi.md +509 -0
  115. data/docs/ManageIp.md +8 -0
  116. data/docs/PostContactInfo.md +8 -0
  117. data/docs/PostContactInfoContacts.md +9 -0
  118. data/docs/PostSendFailed.md +12 -0
  119. data/docs/PostSendSmsTestFailed.md +11 -0
  120. data/docs/ProcessApi.md +117 -0
  121. data/docs/RemainingCreditModel.md +9 -0
  122. data/docs/RemainingCreditModelChild.md +9 -0
  123. data/docs/RemainingCreditModelReseller.md +9 -0
  124. data/docs/RemoveCredits.md +9 -0
  125. data/docs/RequestContactExport.md +10 -0
  126. data/docs/RequestContactImport.md +12 -0
  127. data/docs/RequestContactImportNewList.md +9 -0
  128. data/docs/RequestSMSRecipientExport.md +9 -0
  129. data/docs/ResellerApi.md +491 -0
  130. data/docs/SMSCampaignsApi.md +560 -0
  131. data/docs/SMTPApi.md +642 -0
  132. data/docs/SendEmail.md +15 -0
  133. data/docs/SendEmailAttachment.md +9 -0
  134. data/docs/SendReport.md +9 -0
  135. data/docs/SendReportEmail.md +13 -0
  136. data/docs/SendSms.md +8 -0
  137. data/docs/SendSmtpEmail.md +17 -0
  138. data/docs/SendSmtpEmailAttachment.md +10 -0
  139. data/docs/SendSmtpEmailBcc.md +9 -0
  140. data/docs/SendSmtpEmailCc.md +9 -0
  141. data/docs/SendSmtpEmailReplyTo.md +9 -0
  142. data/docs/SendSmtpEmailSender.md +9 -0
  143. data/docs/SendSmtpEmailTo.md +9 -0
  144. data/docs/SendTemplateEmail.md +8 -0
  145. data/docs/SendTestEmail.md +8 -0
  146. data/docs/SendTestSms.md +8 -0
  147. data/docs/SendTransacSms.md +12 -0
  148. data/docs/SendersApi.md +326 -0
  149. data/docs/TransactionalSMSApi.md +249 -0
  150. data/docs/UpdateCampaignStatus.md +8 -0
  151. data/docs/UpdateChild.md +13 -0
  152. data/docs/UpdateContact.md +12 -0
  153. data/docs/UpdateEmailCampaign.md +24 -0
  154. data/docs/UpdateEmailCampaignRecipients.md +9 -0
  155. data/docs/UpdateEmailCampaignSender.md +9 -0
  156. data/docs/UpdateList.md +9 -0
  157. data/docs/UpdateSender.md +10 -0
  158. data/docs/UpdateSmsCampaign.md +12 -0
  159. data/docs/UpdateSmtpTemplate.md +17 -0
  160. data/docs/UpdateSmtpTemplateSender.md +9 -0
  161. data/docs/UpdateWebhook.md +10 -0
  162. data/docs/WebhooksApi.md +275 -0
  163. data/git_push.sh +55 -0
  164. data/lib/sib-api-v3-sdk.rb +196 -0
  165. data/lib/sib-api-v3-sdk/api/account_api.rb +72 -0
  166. data/lib/sib-api-v3-sdk/api/attributes_api.rb +181 -0
  167. data/lib/sib-api-v3-sdk/api/contacts_api.rb +1408 -0
  168. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +609 -0
  169. data/lib/sib-api-v3-sdk/api/folders_api.rb +379 -0
  170. data/lib/sib-api-v3-sdk/api/lists_api.rb +565 -0
  171. data/lib/sib-api-v3-sdk/api/process_api.rb +137 -0
  172. data/lib/sib-api-v3-sdk/api/reseller_api.rb +534 -0
  173. data/lib/sib-api-v3-sdk/api/senders_api.rb +343 -0
  174. data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +609 -0
  175. data/lib/sib-api-v3-sdk/api/smtp_api.rb +699 -0
  176. data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +280 -0
  177. data/lib/sib-api-v3-sdk/api/webhooks_api.rb +302 -0
  178. data/lib/sib-api-v3-sdk/api_client.rb +389 -0
  179. data/lib/sib-api-v3-sdk/api_error.rb +38 -0
  180. data/lib/sib-api-v3-sdk/configuration.rb +209 -0
  181. data/lib/sib-api-v3-sdk/models/add_credits.rb +199 -0
  182. data/lib/sib-api-v3-sdk/models/add_remove_contact_to_list.rb +191 -0
  183. data/lib/sib-api-v3-sdk/models/crea_update_folder.rb +189 -0
  184. data/lib/sib-api-v3-sdk/models/create_attribute.rb +291 -0
  185. data/lib/sib-api-v3-sdk/models/create_attribute_enumemaration.rb +199 -0
  186. data/lib/sib-api-v3-sdk/models/create_child.rb +254 -0
  187. data/lib/sib-api-v3-sdk/models/create_contact.rb +231 -0
  188. data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +425 -0
  189. data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +203 -0
  190. data/lib/sib-api-v3-sdk/models/create_email_campaign_sender.rb +204 -0
  191. data/lib/sib-api-v3-sdk/models/create_list.rb +209 -0
  192. data/lib/sib-api-v3-sdk/models/create_model.rb +194 -0
  193. data/lib/sib-api-v3-sdk/models/create_sender.rb +221 -0
  194. data/lib/sib-api-v3-sdk/models/create_sender_ips.rb +244 -0
  195. data/lib/sib-api-v3-sdk/models/create_sender_model.rb +214 -0
  196. data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +273 -0
  197. data/lib/sib-api-v3-sdk/models/create_sms_campaign_recipients.rb +213 -0
  198. data/lib/sib-api-v3-sdk/models/create_smtp_email.rb +194 -0
  199. data/lib/sib-api-v3-sdk/models/create_smtp_template.rb +288 -0
  200. data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +204 -0
  201. data/lib/sib-api-v3-sdk/models/create_webhook.rb +261 -0
  202. data/lib/sib-api-v3-sdk/models/created_process_id.rb +194 -0
  203. data/lib/sib-api-v3-sdk/models/delete_hardbounces.rb +209 -0
  204. data/lib/sib-api-v3-sdk/models/email_export_recipients.rb +237 -0
  205. data/lib/sib-api-v3-sdk/models/error_model.rb +242 -0
  206. data/lib/sib-api-v3-sdk/models/get_account.rb +283 -0
  207. data/lib/sib-api-v3-sdk/models/get_account_marketing_automation.rb +204 -0
  208. data/lib/sib-api-v3-sdk/models/get_account_plan.rb +269 -0
  209. data/lib/sib-api-v3-sdk/models/get_account_relay.rb +203 -0
  210. data/lib/sib-api-v3-sdk/models/get_account_relay_data.rb +224 -0
  211. data/lib/sib-api-v3-sdk/models/get_aggregated_report.rb +359 -0
  212. data/lib/sib-api-v3-sdk/models/get_attributes.rb +196 -0
  213. data/lib/sib-api-v3-sdk/models/get_attributes_attributes.rb +301 -0
  214. data/lib/sib-api-v3-sdk/models/get_attributes_enumeration.rb +209 -0
  215. data/lib/sib-api-v3-sdk/models/get_campaign_overview.rb +325 -0
  216. data/lib/sib-api-v3-sdk/models/get_campaign_recipients.rb +213 -0
  217. data/lib/sib-api-v3-sdk/models/get_campaign_recipients_exclusion_lists.rb +209 -0
  218. data/lib/sib-api-v3-sdk/models/get_campaign_recipients_lists.rb +209 -0
  219. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +359 -0
  220. data/lib/sib-api-v3-sdk/models/get_child_info.rb +296 -0
  221. data/lib/sib-api-v3-sdk/models/get_child_info_api_keys.rb +219 -0
  222. data/lib/sib-api-v3-sdk/models/get_child_info_credits.rb +199 -0
  223. data/lib/sib-api-v3-sdk/models/get_child_info_ips.rb +209 -0
  224. data/lib/sib-api-v3-sdk/models/get_child_info_statistics.rb +209 -0
  225. data/lib/sib-api-v3-sdk/models/get_children_list.rb +191 -0
  226. data/lib/sib-api-v3-sdk/models/get_client.rb +239 -0
  227. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +265 -0
  228. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_clicked.rb +210 -0
  229. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_links.rb +239 -0
  230. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_messages_sent.rb +209 -0
  231. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_opened.rb +239 -0
  232. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_transac_attributes.rb +224 -0
  233. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions.rb +213 -0
  234. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions_admin_unsubscription.rb +209 -0
  235. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions_user_unsubscription.rb +224 -0
  236. data/lib/sib-api-v3-sdk/models/get_contact_details.rb +316 -0
  237. data/lib/sib-api-v3-sdk/models/get_contacts.rb +210 -0
  238. data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +552 -0
  239. data/lib/sib-api-v3-sdk/models/get_email_campaigns.rb +205 -0
  240. data/lib/sib-api-v3-sdk/models/get_email_event_report.rb +190 -0
  241. data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +312 -0
  242. data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +552 -0
  243. data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview_sender.rb +199 -0
  244. data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats.rb +255 -0
  245. data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats_links_stats.rb +194 -0
  246. data/lib/sib-api-v3-sdk/models/get_extended_client.rb +248 -0
  247. data/lib/sib-api-v3-sdk/models/get_extended_client_address.rb +239 -0
  248. data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +316 -0
  249. data/lib/sib-api-v3-sdk/models/get_extended_list.rb +309 -0
  250. data/lib/sib-api-v3-sdk/models/get_extended_list_campaign_stats.rb +208 -0
  251. data/lib/sib-api-v3-sdk/models/get_folder.rb +254 -0
  252. data/lib/sib-api-v3-sdk/models/get_folder_lists.rb +210 -0
  253. data/lib/sib-api-v3-sdk/models/get_folders.rb +200 -0
  254. data/lib/sib-api-v3-sdk/models/get_ip.rb +239 -0
  255. data/lib/sib-api-v3-sdk/models/get_ip_from_sender.rb +239 -0
  256. data/lib/sib-api-v3-sdk/models/get_ips.rb +196 -0
  257. data/lib/sib-api-v3-sdk/models/get_ips_from_sender.rb +196 -0
  258. data/lib/sib-api-v3-sdk/models/get_list.rb +239 -0
  259. data/lib/sib-api-v3-sdk/models/get_lists.rb +211 -0
  260. data/lib/sib-api-v3-sdk/models/get_lists_folder.rb +209 -0
  261. data/lib/sib-api-v3-sdk/models/get_lists_lists.rb +188 -0
  262. data/lib/sib-api-v3-sdk/models/get_process.rb +267 -0
  263. data/lib/sib-api-v3-sdk/models/get_processes.rb +206 -0
  264. data/lib/sib-api-v3-sdk/models/get_reports.rb +190 -0
  265. data/lib/sib-api-v3-sdk/models/get_reports_reports.rb +374 -0
  266. data/lib/sib-api-v3-sdk/models/get_senders_list.rb +191 -0
  267. data/lib/sib-api-v3-sdk/models/get_senders_list_ips.rb +224 -0
  268. data/lib/sib-api-v3-sdk/models/get_senders_list_senders.rb +251 -0
  269. data/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +404 -0
  270. data/lib/sib-api-v3-sdk/models/get_sms_campaign_overview.rb +404 -0
  271. data/lib/sib-api-v3-sdk/models/get_sms_campaign_stats.rb +284 -0
  272. data/lib/sib-api-v3-sdk/models/get_sms_campaigns.rb +205 -0
  273. data/lib/sib-api-v3-sdk/models/get_sms_event_report.rb +190 -0
  274. data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +311 -0
  275. data/lib/sib-api-v3-sdk/models/get_smtp_template_overview.rb +391 -0
  276. data/lib/sib-api-v3-sdk/models/get_smtp_template_overview_sender.rb +199 -0
  277. data/lib/sib-api-v3-sdk/models/get_smtp_templates.rb +200 -0
  278. data/lib/sib-api-v3-sdk/models/get_stats_by_domain.rb +179 -0
  279. data/lib/sib-api-v3-sdk/models/get_transac_aggregated_sms_report.rb +329 -0
  280. data/lib/sib-api-v3-sdk/models/get_transac_sms_report.rb +190 -0
  281. data/lib/sib-api-v3-sdk/models/get_transac_sms_report_reports.rb +344 -0
  282. data/lib/sib-api-v3-sdk/models/get_webhook.rb +356 -0
  283. data/lib/sib-api-v3-sdk/models/get_webhooks.rb +195 -0
  284. data/lib/sib-api-v3-sdk/models/manage_ip.rb +189 -0
  285. data/lib/sib-api-v3-sdk/models/post_contact_info.rb +188 -0
  286. data/lib/sib-api-v3-sdk/models/post_contact_info_contacts.rb +206 -0
  287. data/lib/sib-api-v3-sdk/models/post_send_failed.rb +242 -0
  288. data/lib/sib-api-v3-sdk/models/post_send_sms_test_failed.rb +231 -0
  289. data/lib/sib-api-v3-sdk/models/remaining_credit_model.rb +197 -0
  290. data/lib/sib-api-v3-sdk/models/remaining_credit_model_child.rb +209 -0
  291. data/lib/sib-api-v3-sdk/models/remaining_credit_model_reseller.rb +209 -0
  292. data/lib/sib-api-v3-sdk/models/remove_credits.rb +199 -0
  293. data/lib/sib-api-v3-sdk/models/request_contact_export.rb +216 -0
  294. data/lib/sib-api-v3-sdk/models/request_contact_import.rb +230 -0
  295. data/lib/sib-api-v3-sdk/models/request_contact_import_new_list.rb +199 -0
  296. data/lib/sib-api-v3-sdk/models/request_sms_recipient_export.rb +239 -0
  297. data/lib/sib-api-v3-sdk/models/send_email.rb +274 -0
  298. data/lib/sib-api-v3-sdk/models/send_email_attachment.rb +215 -0
  299. data/lib/sib-api-v3-sdk/models/send_report.rb +233 -0
  300. data/lib/sib-api-v3-sdk/models/send_report_email.rb +278 -0
  301. data/lib/sib-api-v3-sdk/models/send_sms.rb +193 -0
  302. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +301 -0
  303. data/lib/sib-api-v3-sdk/models/send_smtp_email_attachment.rb +225 -0
  304. data/lib/sib-api-v3-sdk/models/send_smtp_email_bcc.rb +204 -0
  305. data/lib/sib-api-v3-sdk/models/send_smtp_email_cc.rb +204 -0
  306. data/lib/sib-api-v3-sdk/models/send_smtp_email_reply_to.rb +204 -0
  307. data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +204 -0
  308. data/lib/sib-api-v3-sdk/models/send_smtp_email_to.rb +204 -0
  309. data/lib/sib-api-v3-sdk/models/send_template_email.rb +194 -0
  310. data/lib/sib-api-v3-sdk/models/send_test_email.rb +191 -0
  311. data/lib/sib-api-v3-sdk/models/send_test_sms.rb +191 -0
  312. data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +282 -0
  313. data/lib/sib-api-v3-sdk/models/update_campaign_status.rb +221 -0
  314. data/lib/sib-api-v3-sdk/models/update_child.rb +240 -0
  315. data/lib/sib-api-v3-sdk/models/update_contact.rb +234 -0
  316. data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +367 -0
  317. data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +203 -0
  318. data/lib/sib-api-v3-sdk/models/update_email_campaign_sender.rb +199 -0
  319. data/lib/sib-api-v3-sdk/models/update_list.rb +199 -0
  320. data/lib/sib-api-v3-sdk/models/update_sender.rb +211 -0
  321. data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +260 -0
  322. data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +278 -0
  323. data/lib/sib-api-v3-sdk/models/update_smtp_template_sender.rb +199 -0
  324. data/lib/sib-api-v3-sdk/models/update_webhook.rb +211 -0
  325. data/lib/sib-api-v3-sdk/version.rb +15 -0
  326. data/sib-api-v3-sdk.gemspec +45 -0
  327. data/spec/api/account_api_spec.rb +46 -0
  328. data/spec/api/attributes_api_spec.rb +70 -0
  329. data/spec/api/contacts_api_spec.rb +335 -0
  330. data/spec/api/email_campaigns_api_spec.rb +163 -0
  331. data/spec/api/folders_api_spec.rb +111 -0
  332. data/spec/api/lists_api_spec.rb +152 -0
  333. data/spec/api/process_api_spec.rb +60 -0
  334. data/spec/api/reseller_api_spec.rb +147 -0
  335. data/spec/api/senders_api_spec.rb +108 -0
  336. data/spec/api/sms_campaigns_api_spec.rb +163 -0
  337. data/spec/api/smtp_api_spec.rb +189 -0
  338. data/spec/api/transactional_sms_api_spec.rb +96 -0
  339. data/spec/api/webhooks_api_spec.rb +96 -0
  340. data/spec/api_client_spec.rb +226 -0
  341. data/spec/configuration_spec.rb +42 -0
  342. data/spec/models/add_credits_spec.rb +48 -0
  343. data/spec/models/add_remove_contact_to_list_spec.rb +42 -0
  344. data/spec/models/crea_update_folder_spec.rb +42 -0
  345. data/spec/models/create_attribute_enumemaration_spec.rb +48 -0
  346. data/spec/models/create_attribute_spec.rb +74 -0
  347. data/spec/models/create_child_spec.rb +66 -0
  348. data/spec/models/create_contact_spec.rb +66 -0
  349. data/spec/models/create_email_campaign_recipients_spec.rb +48 -0
  350. data/spec/models/create_email_campaign_sender_spec.rb +48 -0
  351. data/spec/models/create_email_campaign_spec.rb +148 -0
  352. data/spec/models/create_list_spec.rb +48 -0
  353. data/spec/models/create_model_spec.rb +42 -0
  354. data/spec/models/create_sender_ips_spec.rb +54 -0
  355. data/spec/models/create_sender_model_spec.rb +54 -0
  356. data/spec/models/create_sender_spec.rb +54 -0
  357. data/spec/models/create_sms_campaign_recipients_spec.rb +48 -0
  358. data/spec/models/create_sms_campaign_spec.rb +66 -0
  359. data/spec/models/create_smtp_email_spec.rb +42 -0
  360. data/spec/models/create_smtp_template_sender_spec.rb +48 -0
  361. data/spec/models/create_smtp_template_spec.rb +96 -0
  362. data/spec/models/create_webhook_spec.rb +64 -0
  363. data/spec/models/created_process_id_spec.rb +42 -0
  364. data/spec/models/delete_hardbounces_spec.rb +54 -0
  365. data/spec/models/email_export_recipients_spec.rb +52 -0
  366. data/spec/models/error_model_spec.rb +52 -0
  367. data/spec/models/get_account_marketing_automation_spec.rb +48 -0
  368. data/spec/models/get_account_plan_spec.rb +62 -0
  369. data/spec/models/get_account_relay_data_spec.rb +54 -0
  370. data/spec/models/get_account_relay_spec.rb +48 -0
  371. data/spec/models/get_account_spec.rb +84 -0
  372. data/spec/models/get_aggregated_report_spec.rb +108 -0
  373. data/spec/models/get_attributes_attributes_spec.rb +80 -0
  374. data/spec/models/get_attributes_enumeration_spec.rb +48 -0
  375. data/spec/models/get_attributes_spec.rb +42 -0
  376. data/spec/models/get_campaign_overview_spec.rb +80 -0
  377. data/spec/models/get_campaign_recipients_exclusion_lists_spec.rb +48 -0
  378. data/spec/models/get_campaign_recipients_lists_spec.rb +48 -0
  379. data/spec/models/get_campaign_recipients_spec.rb +48 -0
  380. data/spec/models/get_campaign_stats_spec.rb +108 -0
  381. data/spec/models/get_child_info_api_keys_spec.rb +54 -0
  382. data/spec/models/get_child_info_credits_spec.rb +48 -0
  383. data/spec/models/get_child_info_ips_spec.rb +48 -0
  384. data/spec/models/get_child_info_spec.rb +90 -0
  385. data/spec/models/get_child_info_statistics_spec.rb +54 -0
  386. data/spec/models/get_children_list_spec.rb +42 -0
  387. data/spec/models/get_client_spec.rb +60 -0
  388. data/spec/models/get_contact_campaign_stats_clicked_spec.rb +48 -0
  389. data/spec/models/get_contact_campaign_stats_links_spec.rb +60 -0
  390. data/spec/models/get_contact_campaign_stats_messages_sent_spec.rb +48 -0
  391. data/spec/models/get_contact_campaign_stats_opened_spec.rb +60 -0
  392. data/spec/models/get_contact_campaign_stats_spec.rb +84 -0
  393. data/spec/models/get_contact_campaign_stats_transac_attributes_spec.rb +54 -0
  394. data/spec/models/get_contact_campaign_stats_unsubscriptions_admin_unsubscription_spec.rb +48 -0
  395. data/spec/models/get_contact_campaign_stats_unsubscriptions_spec.rb +48 -0
  396. data/spec/models/get_contact_campaign_stats_unsubscriptions_user_unsubscription_spec.rb +54 -0
  397. data/spec/models/get_contact_details_spec.rb +84 -0
  398. data/spec/models/get_contacts_spec.rb +48 -0
  399. data/spec/models/get_email_campaign_spec.rb +164 -0
  400. data/spec/models/get_email_campaigns_spec.rb +48 -0
  401. data/spec/models/get_email_event_report_events_spec.rb +82 -0
  402. data/spec/models/get_email_event_report_spec.rb +42 -0
  403. data/spec/models/get_extended_campaign_overview_sender_spec.rb +48 -0
  404. data/spec/models/get_extended_campaign_overview_spec.rb +164 -0
  405. data/spec/models/get_extended_campaign_stats_links_stats_spec.rb +42 -0
  406. data/spec/models/get_extended_campaign_stats_spec.rb +66 -0
  407. data/spec/models/get_extended_client_address_spec.rb +60 -0
  408. data/spec/models/get_extended_client_spec.rb +66 -0
  409. data/spec/models/get_extended_contact_details_spec.rb +84 -0
  410. data/spec/models/get_extended_list_campaign_stats_spec.rb +48 -0
  411. data/spec/models/get_extended_list_spec.rb +84 -0
  412. data/spec/models/get_folder_lists_spec.rb +48 -0
  413. data/spec/models/get_folder_spec.rb +66 -0
  414. data/spec/models/get_folders_spec.rb +48 -0
  415. data/spec/models/get_ip_from_sender_spec.rb +60 -0
  416. data/spec/models/get_ip_spec.rb +60 -0
  417. data/spec/models/get_ips_from_sender_spec.rb +42 -0
  418. data/spec/models/get_ips_spec.rb +42 -0
  419. data/spec/models/get_list_spec.rb +60 -0
  420. data/spec/models/get_lists_folder_spec.rb +48 -0
  421. data/spec/models/get_lists_lists_spec.rb +42 -0
  422. data/spec/models/get_lists_spec.rb +48 -0
  423. data/spec/models/get_process_spec.rb +64 -0
  424. data/spec/models/get_processes_spec.rb +48 -0
  425. data/spec/models/get_reports_reports_spec.rb +114 -0
  426. data/spec/models/get_reports_spec.rb +42 -0
  427. data/spec/models/get_senders_list_ips_spec.rb +54 -0
  428. data/spec/models/get_senders_list_senders_spec.rb +66 -0
  429. data/spec/models/get_senders_list_spec.rb +42 -0
  430. data/spec/models/get_sms_campaign_overview_spec.rb +94 -0
  431. data/spec/models/get_sms_campaign_spec.rb +94 -0
  432. data/spec/models/get_sms_campaign_stats_spec.rb +78 -0
  433. data/spec/models/get_sms_campaigns_spec.rb +48 -0
  434. data/spec/models/get_sms_event_report_events_spec.rb +82 -0
  435. data/spec/models/get_sms_event_report_spec.rb +42 -0
  436. data/spec/models/get_smtp_template_overview_sender_spec.rb +48 -0
  437. data/spec/models/get_smtp_template_overview_spec.rb +108 -0
  438. data/spec/models/get_smtp_templates_spec.rb +48 -0
  439. data/spec/models/get_stats_by_domain_spec.rb +36 -0
  440. data/spec/models/get_transac_aggregated_sms_report_spec.rb +96 -0
  441. data/spec/models/get_transac_sms_report_reports_spec.rb +102 -0
  442. data/spec/models/get_transac_sms_report_spec.rb +42 -0
  443. data/spec/models/get_webhook_spec.rb +82 -0
  444. data/spec/models/get_webhooks_spec.rb +42 -0
  445. data/spec/models/manage_ip_spec.rb +42 -0
  446. data/spec/models/post_contact_info_contacts_spec.rb +48 -0
  447. data/spec/models/post_contact_info_spec.rb +42 -0
  448. data/spec/models/post_send_failed_spec.rb +66 -0
  449. data/spec/models/post_send_sms_test_failed_spec.rb +60 -0
  450. data/spec/models/remaining_credit_model_child_spec.rb +48 -0
  451. data/spec/models/remaining_credit_model_reseller_spec.rb +48 -0
  452. data/spec/models/remaining_credit_model_spec.rb +48 -0
  453. data/spec/models/remove_credits_spec.rb +48 -0
  454. data/spec/models/request_contact_export_spec.rb +54 -0
  455. data/spec/models/request_contact_import_new_list_spec.rb +48 -0
  456. data/spec/models/request_contact_import_spec.rb +66 -0
  457. data/spec/models/request_sms_recipient_export_spec.rb +52 -0
  458. data/spec/models/send_email_attachment_spec.rb +48 -0
  459. data/spec/models/send_email_spec.rb +84 -0
  460. data/spec/models/send_report_email_spec.rb +76 -0
  461. data/spec/models/send_report_spec.rb +52 -0
  462. data/spec/models/send_sms_spec.rb +42 -0
  463. data/spec/models/send_smtp_email_attachment_spec.rb +54 -0
  464. data/spec/models/send_smtp_email_bcc_spec.rb +48 -0
  465. data/spec/models/send_smtp_email_cc_spec.rb +48 -0
  466. data/spec/models/send_smtp_email_reply_to_spec.rb +48 -0
  467. data/spec/models/send_smtp_email_sender_spec.rb +48 -0
  468. data/spec/models/send_smtp_email_spec.rb +96 -0
  469. data/spec/models/send_smtp_email_to_spec.rb +48 -0
  470. data/spec/models/send_template_email_spec.rb +42 -0
  471. data/spec/models/send_test_email_spec.rb +42 -0
  472. data/spec/models/send_test_sms_spec.rb +42 -0
  473. data/spec/models/send_transac_sms_spec.rb +66 -0
  474. data/spec/models/update_campaign_status_spec.rb +46 -0
  475. data/spec/models/update_child_spec.rb +72 -0
  476. data/spec/models/update_contact_spec.rb +66 -0
  477. data/spec/models/update_email_campaign_recipients_spec.rb +48 -0
  478. data/spec/models/update_email_campaign_sender_spec.rb +48 -0
  479. data/spec/models/update_email_campaign_spec.rb +138 -0
  480. data/spec/models/update_list_spec.rb +48 -0
  481. data/spec/models/update_sender_spec.rb +54 -0
  482. data/spec/models/update_sms_campaign_spec.rb +66 -0
  483. data/spec/models/update_smtp_template_sender_spec.rb +48 -0
  484. data/spec/models/update_smtp_template_spec.rb +96 -0
  485. data/spec/models/update_webhook_spec.rb +54 -0
  486. data/spec/spec_helper.rb +111 -0
  487. metadata +869 -0
@@ -0,0 +1,215 @@
1
+ =begin
2
+ #SendinBlue API
3
+
4
+ #SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
5
+
6
+ OpenAPI spec version: 3.0.0
7
+ Contact: contact@sendinblue.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SibApiV3Sdk
16
+
17
+ class SendEmailAttachment
18
+ # Base64 encoded chunk data of the attachment generated on the fly
19
+ attr_accessor :content
20
+
21
+ # Required for content. Name of the attachment
22
+ attr_accessor :name
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'content' => :'content',
29
+ :'name' => :'name'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'content' => :'String',
37
+ :'name' => :'String'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes.has_key?(:'content')
50
+ self.content = attributes[:'content']
51
+ end
52
+
53
+ if attributes.has_key?(:'name')
54
+ self.name = attributes[:'name']
55
+ end
56
+
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properies with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ if !@content.nil? && @content !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
64
+ invalid_properties.push("invalid value for 'content', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
65
+ end
66
+
67
+ return invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ return false if !@content.nil? && @content !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
74
+ return true
75
+ end
76
+
77
+ # Custom attribute writer method with validation
78
+ # @param [Object] content Value to be assigned
79
+ def content=(content)
80
+
81
+ if !content.nil? && content !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
82
+ fail ArgumentError, "invalid value for 'content', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
83
+ end
84
+
85
+ @content = content
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ content == o.content &&
94
+ name == o.name
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [content, name].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ if type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ DateTime.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ temp_model = SibApiV3Sdk.const_get(type).new
167
+ temp_model.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ next if value.nil?
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map{ |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+
215
+ end
@@ -0,0 +1,233 @@
1
+ =begin
2
+ #SendinBlue API
3
+
4
+ #SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
5
+
6
+ OpenAPI spec version: 3.0.0
7
+ Contact: contact@sendinblue.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SibApiV3Sdk
16
+
17
+ class SendReport
18
+ # Language of email content for campaign report sending.
19
+ attr_accessor :language
20
+
21
+ attr_accessor :email
22
+
23
+ class EnumAttributeValidator
24
+ attr_reader :datatype
25
+ attr_reader :allowable_values
26
+
27
+ def initialize(datatype, allowable_values)
28
+ @allowable_values = allowable_values.map do |value|
29
+ case datatype.to_s
30
+ when /Integer/i
31
+ value.to_i
32
+ when /Float/i
33
+ value.to_f
34
+ else
35
+ value
36
+ end
37
+ end
38
+ end
39
+
40
+ def valid?(value)
41
+ !value || allowable_values.include?(value)
42
+ end
43
+ end
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'language' => :'language',
49
+ :'email' => :'email'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.swagger_types
55
+ {
56
+ :'language' => :'String',
57
+ :'email' => :'SendReportEmail'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
68
+
69
+ if attributes.has_key?(:'language')
70
+ self.language = attributes[:'language']
71
+ else
72
+ self.language = "fr"
73
+ end
74
+
75
+ if attributes.has_key?(:'email')
76
+ self.email = attributes[:'email']
77
+ end
78
+
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properies with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ return invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ language_validator = EnumAttributeValidator.new('String', ["fr", "es", "pt", "it", "de", "en"])
92
+ return false unless language_validator.valid?(@language)
93
+ return true
94
+ end
95
+
96
+ # Custom attribute writer method checking allowed values (enum).
97
+ # @param [Object] language Object to be assigned
98
+ def language=(language)
99
+ validator = EnumAttributeValidator.new('String', ["fr", "es", "pt", "it", "de", "en"])
100
+ unless validator.valid?(language)
101
+ fail ArgumentError, "invalid value for 'language', must be one of #{validator.allowable_values}."
102
+ end
103
+ @language = language
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ language == o.language &&
112
+ email == o.email
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Fixnum] Hash code
123
+ def hash
124
+ [language, email].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.swagger_types.each_pair do |key, type|
133
+ if type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ DateTime.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ temp_model = SibApiV3Sdk.const_get(type).new
185
+ temp_model.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ next if value.nil?
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map{ |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+
231
+ end
232
+
233
+ end
@@ -0,0 +1,278 @@
1
+ =begin
2
+ #SendinBlue API
3
+
4
+ #SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
5
+
6
+ OpenAPI spec version: 3.0.0
7
+ Contact: contact@sendinblue.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SibApiV3Sdk
16
+
17
+ class SendReportEmail
18
+ # Subject of the email message
19
+ attr_accessor :subject
20
+
21
+ # Email addresses of the recipients
22
+ attr_accessor :to
23
+
24
+ # Type of the message body
25
+ attr_accessor :content_type
26
+
27
+ # Email addresses of the recipients in bcc
28
+ attr_accessor :bcc
29
+
30
+ # Email addresses of the recipients in cc
31
+ attr_accessor :cc
32
+
33
+ # Body of the email message
34
+ attr_accessor :body
35
+
36
+ class EnumAttributeValidator
37
+ attr_reader :datatype
38
+ attr_reader :allowable_values
39
+
40
+ def initialize(datatype, allowable_values)
41
+ @allowable_values = allowable_values.map do |value|
42
+ case datatype.to_s
43
+ when /Integer/i
44
+ value.to_i
45
+ when /Float/i
46
+ value.to_f
47
+ else
48
+ value
49
+ end
50
+ end
51
+ end
52
+
53
+ def valid?(value)
54
+ !value || allowable_values.include?(value)
55
+ end
56
+ end
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'subject' => :'subject',
62
+ :'to' => :'to',
63
+ :'content_type' => :'contentType',
64
+ :'bcc' => :'bcc',
65
+ :'cc' => :'cc',
66
+ :'body' => :'body'
67
+ }
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.swagger_types
72
+ {
73
+ :'subject' => :'String',
74
+ :'to' => :'Array<String>',
75
+ :'content_type' => :'String',
76
+ :'bcc' => :'Array<String>',
77
+ :'cc' => :'Array<String>',
78
+ :'body' => :'String'
79
+ }
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ return unless attributes.is_a?(Hash)
86
+
87
+ # convert string to symbol for hash key
88
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
89
+
90
+ if attributes.has_key?(:'subject')
91
+ self.subject = attributes[:'subject']
92
+ end
93
+
94
+ if attributes.has_key?(:'to')
95
+ if (value = attributes[:'to']).is_a?(Array)
96
+ self.to = value
97
+ end
98
+ end
99
+
100
+ if attributes.has_key?(:'contentType')
101
+ self.content_type = attributes[:'contentType']
102
+ end
103
+
104
+ if attributes.has_key?(:'bcc')
105
+ if (value = attributes[:'bcc']).is_a?(Array)
106
+ self.bcc = value
107
+ end
108
+ end
109
+
110
+ if attributes.has_key?(:'cc')
111
+ if (value = attributes[:'cc']).is_a?(Array)
112
+ self.cc = value
113
+ end
114
+ end
115
+
116
+ if attributes.has_key?(:'body')
117
+ self.body = attributes[:'body']
118
+ end
119
+
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properies with the reasons
124
+ def list_invalid_properties
125
+ invalid_properties = Array.new
126
+ return invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ content_type_validator = EnumAttributeValidator.new('String', ["text", "html"])
133
+ return false unless content_type_validator.valid?(@content_type)
134
+ return true
135
+ end
136
+
137
+ # Custom attribute writer method checking allowed values (enum).
138
+ # @param [Object] content_type Object to be assigned
139
+ def content_type=(content_type)
140
+ validator = EnumAttributeValidator.new('String', ["text", "html"])
141
+ unless validator.valid?(content_type)
142
+ fail ArgumentError, "invalid value for 'content_type', must be one of #{validator.allowable_values}."
143
+ end
144
+ @content_type = content_type
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ subject == o.subject &&
153
+ to == o.to &&
154
+ content_type == o.content_type &&
155
+ bcc == o.bcc &&
156
+ cc == o.cc &&
157
+ body == o.body
158
+ end
159
+
160
+ # @see the `==` method
161
+ # @param [Object] Object to be compared
162
+ def eql?(o)
163
+ self == o
164
+ end
165
+
166
+ # Calculates hash code according to all attributes.
167
+ # @return [Fixnum] Hash code
168
+ def hash
169
+ [subject, to, content_type, bcc, cc, body].hash
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ self.class.swagger_types.each_pair do |key, type|
178
+ if type =~ /\AArray<(.*)>/i
179
+ # check to ensure the input is an array given that the the attribute
180
+ # is documented as an array but the input is not
181
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
182
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
183
+ end
184
+ elsif !attributes[self.class.attribute_map[key]].nil?
185
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
186
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
187
+ end
188
+
189
+ self
190
+ end
191
+
192
+ # Deserializes the data based on type
193
+ # @param string type Data type
194
+ # @param string value Value to be deserialized
195
+ # @return [Object] Deserialized data
196
+ def _deserialize(type, value)
197
+ case type.to_sym
198
+ when :DateTime
199
+ DateTime.parse(value)
200
+ when :Date
201
+ Date.parse(value)
202
+ when :String
203
+ value.to_s
204
+ when :Integer
205
+ value.to_i
206
+ when :Float
207
+ value.to_f
208
+ when :BOOLEAN
209
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
+ true
211
+ else
212
+ false
213
+ end
214
+ when :Object
215
+ # generic object (usually a Hash), return directly
216
+ value
217
+ when /\AArray<(?<inner_type>.+)>\z/
218
+ inner_type = Regexp.last_match[:inner_type]
219
+ value.map { |v| _deserialize(inner_type, v) }
220
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
+ k_type = Regexp.last_match[:k_type]
222
+ v_type = Regexp.last_match[:v_type]
223
+ {}.tap do |hash|
224
+ value.each do |k, v|
225
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
226
+ end
227
+ end
228
+ else # model
229
+ temp_model = SibApiV3Sdk.const_get(type).new
230
+ temp_model.build_from_hash(value)
231
+ end
232
+ end
233
+
234
+ # Returns the string representation of the object
235
+ # @return [String] String presentation of the object
236
+ def to_s
237
+ to_hash.to_s
238
+ end
239
+
240
+ # to_body is an alias to to_hash (backward compatibility)
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_body
243
+ to_hash
244
+ end
245
+
246
+ # Returns the object in the form of hash
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_hash
249
+ hash = {}
250
+ self.class.attribute_map.each_pair do |attr, param|
251
+ value = self.send(attr)
252
+ next if value.nil?
253
+ hash[param] = _to_hash(value)
254
+ end
255
+ hash
256
+ end
257
+
258
+ # Outputs non-array value in the form of hash
259
+ # For object, use to_hash. Otherwise, just return the value
260
+ # @param [Object] value Any valid value
261
+ # @return [Hash] Returns the value in the form of hash
262
+ def _to_hash(value)
263
+ if value.is_a?(Array)
264
+ value.compact.map{ |v| _to_hash(v) }
265
+ elsif value.is_a?(Hash)
266
+ {}.tap do |hash|
267
+ value.each { |k, v| hash[k] = _to_hash(v) }
268
+ end
269
+ elsif value.respond_to? :to_hash
270
+ value.to_hash
271
+ else
272
+ value
273
+ end
274
+ end
275
+
276
+ end
277
+
278
+ end