brevo-ruby 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1077) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/LICENSE.md +21 -0
  4. data/README.md +651 -0
  5. data/Rakefile +8 -0
  6. data/brevo-ruby.gemspec +46 -0
  7. data/docs/AbTestCampaignResult.md +15 -0
  8. data/docs/AbTestCampaignResultClickedLinks.md +9 -0
  9. data/docs/AbTestCampaignResultStatistics.md +13 -0
  10. data/docs/AbTestVersionClicks.md +7 -0
  11. data/docs/AbTestVersionClicksInner.md +10 -0
  12. data/docs/AbTestVersionStats.md +9 -0
  13. data/docs/AccountApi.md +125 -0
  14. data/docs/AddChildDomain.md +8 -0
  15. data/docs/AddContactToList.md +9 -0
  16. data/docs/AddCredits.md +9 -0
  17. data/docs/AuthenticateDomainModel.md +9 -0
  18. data/docs/BlockDomain.md +8 -0
  19. data/docs/Body.md +10 -0
  20. data/docs/Body1.md +10 -0
  21. data/docs/Body10.md +11 -0
  22. data/docs/Body11.md +8 -0
  23. data/docs/Body12.md +11 -0
  24. data/docs/Body2.md +11 -0
  25. data/docs/Body3.md +9 -0
  26. data/docs/Body4.md +9 -0
  27. data/docs/Body5.md +11 -0
  28. data/docs/Body6.md +18 -0
  29. data/docs/Body7.md +17 -0
  30. data/docs/Body8.md +13 -0
  31. data/docs/Body9.md +8 -0
  32. data/docs/BodyVariablesItems.md +7 -0
  33. data/docs/CompaniesApi.md +425 -0
  34. data/docs/CompaniesList.md +8 -0
  35. data/docs/Company.md +11 -0
  36. data/docs/CompanyAttributes.md +7 -0
  37. data/docs/CompanyAttributesInner.md +12 -0
  38. data/docs/ComponentItems.md +9 -0
  39. data/docs/ContactsApi.md +1767 -0
  40. data/docs/ConversationsApi.md +542 -0
  41. data/docs/ConversationsMessage.md +17 -0
  42. data/docs/ConversationsMessageFile.md +12 -0
  43. data/docs/ConversationsMessageFileImageInfo.md +10 -0
  44. data/docs/CouponsApi.md +305 -0
  45. data/docs/CreateApiKeyRequest.md +9 -0
  46. data/docs/CreateApiKeyResponse.md +9 -0
  47. data/docs/CreateAttribute.md +11 -0
  48. data/docs/CreateAttributeEnumeration.md +9 -0
  49. data/docs/CreateCategoryModel.md +8 -0
  50. data/docs/CreateChild.md +13 -0
  51. data/docs/CreateContact.md +15 -0
  52. data/docs/CreateCouponCollection.md +9 -0
  53. data/docs/CreateCoupons.md +9 -0
  54. data/docs/CreateDoiContact.md +13 -0
  55. data/docs/CreateDomain.md +8 -0
  56. data/docs/CreateDomainModel.md +11 -0
  57. data/docs/CreateDomainModelDnsRecords.md +9 -0
  58. data/docs/CreateDomainModelDnsRecordsDkimRecord.md +11 -0
  59. data/docs/CreateEmailCampaign.md +37 -0
  60. data/docs/CreateEmailCampaignRecipients.md +10 -0
  61. data/docs/CreateEmailCampaignSender.md +10 -0
  62. data/docs/CreateExternalFeed.md +16 -0
  63. data/docs/CreateList.md +9 -0
  64. data/docs/CreateModel.md +8 -0
  65. data/docs/CreateProductModel.md +8 -0
  66. data/docs/CreateReseller.md +9 -0
  67. data/docs/CreateSender.md +10 -0
  68. data/docs/CreateSenderIps.md +10 -0
  69. data/docs/CreateSenderModel.md +10 -0
  70. data/docs/CreateSmsCampaign.md +15 -0
  71. data/docs/CreateSmsCampaignRecipients.md +9 -0
  72. data/docs/CreateSmtpEmail.md +9 -0
  73. data/docs/CreateSmtpTemplate.md +17 -0
  74. data/docs/CreateSmtpTemplateSender.md +10 -0
  75. data/docs/CreateSubAccount.md +11 -0
  76. data/docs/CreateSubAccountResponse.md +8 -0
  77. data/docs/CreateUpdateBatchCategory.md +9 -0
  78. data/docs/CreateUpdateBatchCategoryModel.md +9 -0
  79. data/docs/CreateUpdateBatchProducts.md +9 -0
  80. data/docs/CreateUpdateBatchProductsModel.md +9 -0
  81. data/docs/CreateUpdateCategories.md +11 -0
  82. data/docs/CreateUpdateCategory.md +12 -0
  83. data/docs/CreateUpdateContactModel.md +8 -0
  84. data/docs/CreateUpdateFolder.md +8 -0
  85. data/docs/CreateUpdateProduct.md +18 -0
  86. data/docs/CreateUpdateProducts.md +17 -0
  87. data/docs/CreateWebhook.md +12 -0
  88. data/docs/CreateWhatsAppCampaign.md +11 -0
  89. data/docs/CreateWhatsAppCampaignRecipients.md +10 -0
  90. data/docs/CreateWhatsAppTemplate.md +13 -0
  91. data/docs/CreatedBatchId.md +8 -0
  92. data/docs/CreatedProcessId.md +8 -0
  93. data/docs/Deal.md +11 -0
  94. data/docs/DealAttributes.md +7 -0
  95. data/docs/DealAttributesInner.md +12 -0
  96. data/docs/DealsApi.md +536 -0
  97. data/docs/DealsList.md +8 -0
  98. data/docs/DeleteHardbounces.md +10 -0
  99. data/docs/DomainsApi.md +292 -0
  100. data/docs/EcommerceApi.md +675 -0
  101. data/docs/EmailCampaignsApi.md +799 -0
  102. data/docs/EmailExportRecipients.md +9 -0
  103. data/docs/ErrorModel.md +9 -0
  104. data/docs/ExportWebhooksHistory.md +16 -0
  105. data/docs/ExternalFeedsApi.md +322 -0
  106. data/docs/FileData.md +14 -0
  107. data/docs/FileDownloadableLink.md +8 -0
  108. data/docs/FileList.md +7 -0
  109. data/docs/FilesApi.md +318 -0
  110. data/docs/GetAccount.md +15 -0
  111. data/docs/GetAccountActivity.md +8 -0
  112. data/docs/GetAccountActivityLogs.md +12 -0
  113. data/docs/GetAccountMarketingAutomation.md +9 -0
  114. data/docs/GetAccountPlan.md +13 -0
  115. data/docs/GetAccountRelay.md +9 -0
  116. data/docs/GetAccountRelayData.md +10 -0
  117. data/docs/GetAggregatedReport.md +20 -0
  118. data/docs/GetAllExternalFeeds.md +9 -0
  119. data/docs/GetAllExternalFeedsFeeds.md +19 -0
  120. data/docs/GetAttributes.md +8 -0
  121. data/docs/GetAttributesAttributes.md +12 -0
  122. data/docs/GetAttributesEnumeration.md +9 -0
  123. data/docs/GetBlockedDomains.md +8 -0
  124. data/docs/GetCampaignOverview.md +20 -0
  125. data/docs/GetCampaignRecipients.md +9 -0
  126. data/docs/GetCampaignStats.md +23 -0
  127. data/docs/GetCategories.md +9 -0
  128. data/docs/GetCategoryDetails.md +13 -0
  129. data/docs/GetChildAccountCreationStatus.md +8 -0
  130. data/docs/GetChildDomain.md +9 -0
  131. data/docs/GetChildDomains.md +7 -0
  132. data/docs/GetChildInfo.md +16 -0
  133. data/docs/GetChildInfoApiKeys.md +9 -0
  134. data/docs/GetChildInfoApiKeysV2.md +9 -0
  135. data/docs/GetChildInfoApiKeysV3.md +9 -0
  136. data/docs/GetChildInfoCredits.md +9 -0
  137. data/docs/GetChildInfoStatistics.md +10 -0
  138. data/docs/GetChildrenList.md +9 -0
  139. data/docs/GetClient.md +11 -0
  140. data/docs/GetContactCampaignStats.md +16 -0
  141. data/docs/GetContactCampaignStatsClicked.md +9 -0
  142. data/docs/GetContactCampaignStatsOpened.md +11 -0
  143. data/docs/GetContactCampaignStatsTransacAttributes.md +10 -0
  144. data/docs/GetContactCampaignStatsUnsubscriptions.md +9 -0
  145. data/docs/GetContactDetails.md +16 -0
  146. data/docs/GetContacts.md +9 -0
  147. data/docs/GetCouponCollection.md +13 -0
  148. data/docs/GetDeviceBrowserStats.md +11 -0
  149. data/docs/GetDomainConfigurationModel.md +11 -0
  150. data/docs/GetDomainsList.md +8 -0
  151. data/docs/GetDomainsListDomains.md +12 -0
  152. data/docs/GetEmailCampaign.md +38 -0
  153. data/docs/GetEmailCampaigns.md +9 -0
  154. data/docs/GetEmailEventReport.md +8 -0
  155. data/docs/GetEmailEventReportEvents.md +18 -0
  156. data/docs/GetExtendedCampaignOverview.md +36 -0
  157. data/docs/GetExtendedCampaignOverviewSender.md +10 -0
  158. data/docs/GetExtendedCampaignStats.md +15 -0
  159. data/docs/GetExtendedCampaignStatsGlobalStats.md +7 -0
  160. data/docs/GetExtendedClient.md +12 -0
  161. data/docs/GetExtendedClientAddress.md +11 -0
  162. data/docs/GetExtendedContactDetails.md +17 -0
  163. data/docs/GetExtendedContactDetailsStatistics.md +16 -0
  164. data/docs/GetExtendedContactDetailsStatisticsClicked.md +9 -0
  165. data/docs/GetExtendedContactDetailsStatisticsDelivered.md +9 -0
  166. data/docs/GetExtendedContactDetailsStatisticsLinks.md +11 -0
  167. data/docs/GetExtendedContactDetailsStatisticsMessagesSent.md +9 -0
  168. data/docs/GetExtendedContactDetailsStatisticsOpened.md +11 -0
  169. data/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md +9 -0
  170. data/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md +9 -0
  171. data/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md +10 -0
  172. data/docs/GetExtendedList.md +16 -0
  173. data/docs/GetExtendedListCampaignStats.md +9 -0
  174. data/docs/GetExternalFeedByUUID.md +19 -0
  175. data/docs/GetExternalFeedByUUIDHeaders.md +9 -0
  176. data/docs/GetFolder.md +12 -0
  177. data/docs/GetFolderLists.md +9 -0
  178. data/docs/GetFolders.md +9 -0
  179. data/docs/GetInboundEmailEvents.md +8 -0
  180. data/docs/GetInboundEmailEventsByUuid.md +15 -0
  181. data/docs/GetInboundEmailEventsByUuidAttachments.md +11 -0
  182. data/docs/GetInboundEmailEventsByUuidLogs.md +9 -0
  183. data/docs/GetInboundEmailEventsEvents.md +11 -0
  184. data/docs/GetInvitedUsersList.md +8 -0
  185. data/docs/GetInvitedUsersListFeatureAccess.md +10 -0
  186. data/docs/GetInvitedUsersListUsers.md +11 -0
  187. data/docs/GetIp.md +11 -0
  188. data/docs/GetIpFromSender.md +11 -0
  189. data/docs/GetIps.md +8 -0
  190. data/docs/GetIpsFromSender.md +8 -0
  191. data/docs/GetList.md +12 -0
  192. data/docs/GetLists.md +9 -0
  193. data/docs/GetProcess.md +11 -0
  194. data/docs/GetProcesses.md +9 -0
  195. data/docs/GetProductDetails.md +22 -0
  196. data/docs/GetProducts.md +9 -0
  197. data/docs/GetReports.md +8 -0
  198. data/docs/GetReportsReports.md +20 -0
  199. data/docs/GetScheduledEmailByBatchId.md +9 -0
  200. data/docs/GetScheduledEmailByBatchIdBatches.md +10 -0
  201. data/docs/GetScheduledEmailByMessageId.md +10 -0
  202. data/docs/GetSegments.md +9 -0
  203. data/docs/GetSegmentsSegments.md +11 -0
  204. data/docs/GetSendersList.md +8 -0
  205. data/docs/GetSendersListIps.md +10 -0
  206. data/docs/GetSendersListSenders.md +12 -0
  207. data/docs/GetSharedTemplateUrl.md +8 -0
  208. data/docs/GetSmsCampaign.md +17 -0
  209. data/docs/GetSmsCampaignOverview.md +15 -0
  210. data/docs/GetSmsCampaignRecipients.md +7 -0
  211. data/docs/GetSmsCampaignStats.md +14 -0
  212. data/docs/GetSmsCampaigns.md +9 -0
  213. data/docs/GetSmsEventReport.md +8 -0
  214. data/docs/GetSmsEventReportEvents.md +14 -0
  215. data/docs/GetSmtpTemplateOverview.md +20 -0
  216. data/docs/GetSmtpTemplateOverviewSender.md +10 -0
  217. data/docs/GetSmtpTemplates.md +9 -0
  218. data/docs/GetSsoToken.md +8 -0
  219. data/docs/GetStatsByBrowser.md +7 -0
  220. data/docs/GetStatsByDevice.md +11 -0
  221. data/docs/GetStatsByDomain.md +7 -0
  222. data/docs/GetTransacAggregatedSmsReport.md +17 -0
  223. data/docs/GetTransacBlockedContacts.md +9 -0
  224. data/docs/GetTransacBlockedContactsContacts.md +11 -0
  225. data/docs/GetTransacBlockedContactsReason.md +9 -0
  226. data/docs/GetTransacEmailContent.md +14 -0
  227. data/docs/GetTransacEmailContentEvents.md +9 -0
  228. data/docs/GetTransacEmailsList.md +9 -0
  229. data/docs/GetTransacEmailsListTransactionalEmails.md +15 -0
  230. data/docs/GetTransacSmsReport.md +8 -0
  231. data/docs/GetTransacSmsReportReports.md +17 -0
  232. data/docs/GetUserPermission.md +10 -0
  233. data/docs/GetUserPermissionPrivileges.md +9 -0
  234. data/docs/GetWATemplates.md +9 -0
  235. data/docs/GetWATemplatesTemplates.md +15 -0
  236. data/docs/GetWebhook.md +14 -0
  237. data/docs/GetWebhooks.md +8 -0
  238. data/docs/GetWhatsAppConfig.md +13 -0
  239. data/docs/GetWhatsappCampaignOverview.md +16 -0
  240. data/docs/GetWhatsappCampaigns.md +9 -0
  241. data/docs/GetWhatsappCampaignsCampaigns.md +18 -0
  242. data/docs/GetWhatsappEventReport.md +8 -0
  243. data/docs/GetWhatsappEventReportEvents.md +15 -0
  244. data/docs/InboundParsingApi.md +199 -0
  245. data/docs/InlineResponse200.md +8 -0
  246. data/docs/InlineResponse2001.md +10 -0
  247. data/docs/InlineResponse201.md +8 -0
  248. data/docs/InlineResponse2011.md +8 -0
  249. data/docs/InlineResponse2012.md +8 -0
  250. data/docs/InlineResponse2013.md +8 -0
  251. data/docs/InlineResponse2014.md +8 -0
  252. data/docs/ManageIp.md +8 -0
  253. data/docs/MasterAccountApi.md +549 -0
  254. data/docs/MasterDetailsResponse.md +14 -0
  255. data/docs/MasterDetailsResponseBillingInfo.md +11 -0
  256. data/docs/MasterDetailsResponseBillingInfoAddress.md +12 -0
  257. data/docs/MasterDetailsResponseBillingInfoName.md +9 -0
  258. data/docs/MasterDetailsResponsePlanInfo.md +13 -0
  259. data/docs/MasterDetailsResponsePlanInfoFeatures.md +12 -0
  260. data/docs/Note.md +14 -0
  261. data/docs/NoteData.md +11 -0
  262. data/docs/NoteId.md +8 -0
  263. data/docs/NoteList.md +7 -0
  264. data/docs/NotesApi.md +312 -0
  265. data/docs/Order.md +16 -0
  266. data/docs/OrderBatch.md +9 -0
  267. data/docs/OrderBilling.md +14 -0
  268. data/docs/OrderProducts.md +11 -0
  269. data/docs/Otp.md +8 -0
  270. data/docs/Pipeline.md +10 -0
  271. data/docs/PipelineStage.md +9 -0
  272. data/docs/Pipelines.md +7 -0
  273. data/docs/PostContactInfo.md +8 -0
  274. data/docs/PostContactInfoContacts.md +11 -0
  275. data/docs/PostSendFailed.md +12 -0
  276. data/docs/PostSendSmsTestFailed.md +11 -0
  277. data/docs/ProcessApi.md +129 -0
  278. data/docs/RemainingCreditModel.md +9 -0
  279. data/docs/RemainingCreditModelChild.md +9 -0
  280. data/docs/RemainingCreditModelReseller.md +9 -0
  281. data/docs/RemoveContactFromList.md +10 -0
  282. data/docs/RemoveCredits.md +9 -0
  283. data/docs/RequestContactExport.md +10 -0
  284. data/docs/RequestContactExportCustomContactFilter.md +13 -0
  285. data/docs/RequestContactImport.md +17 -0
  286. data/docs/RequestContactImportNewList.md +9 -0
  287. data/docs/RequestSMSRecipientExport.md +9 -0
  288. data/docs/ResellerApi.md +964 -0
  289. data/docs/SMSCampaignsApi.md +613 -0
  290. data/docs/ScheduleSmtpEmail.md +10 -0
  291. data/docs/SendReport.md +9 -0
  292. data/docs/SendReportEmail.md +9 -0
  293. data/docs/SendSms.md +12 -0
  294. data/docs/SendSmtpEmail.md +23 -0
  295. data/docs/SendSmtpEmailAttachment.md +10 -0
  296. data/docs/SendSmtpEmailBcc.md +9 -0
  297. data/docs/SendSmtpEmailCc.md +9 -0
  298. data/docs/SendSmtpEmailMessageVersions.md +13 -0
  299. data/docs/SendSmtpEmailReplyTo.md +9 -0
  300. data/docs/SendSmtpEmailReplyTo1.md +9 -0
  301. data/docs/SendSmtpEmailSender.md +10 -0
  302. data/docs/SendSmtpEmailTo.md +9 -0
  303. data/docs/SendSmtpEmailTo1.md +9 -0
  304. data/docs/SendTestEmail.md +8 -0
  305. data/docs/SendTestSms.md +8 -0
  306. data/docs/SendTransacSms.md +15 -0
  307. data/docs/SendWhatsappMessage.md +11 -0
  308. data/docs/SendersApi.md +417 -0
  309. data/docs/SsoTokenRequest.md +10 -0
  310. data/docs/SubAccountDetailsResponse.md +11 -0
  311. data/docs/SubAccountDetailsResponsePlanInfo.md +10 -0
  312. data/docs/SubAccountDetailsResponsePlanInfoCredits.md +9 -0
  313. data/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md +9 -0
  314. data/docs/SubAccountDetailsResponsePlanInfoFeatures.md +10 -0
  315. data/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md +9 -0
  316. data/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md +9 -0
  317. data/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md +9 -0
  318. data/docs/SubAccountUpdatePlanRequest.md +9 -0
  319. data/docs/SubAccountUpdatePlanRequestCredits.md +8 -0
  320. data/docs/SubAccountUpdatePlanRequestFeatures.md +10 -0
  321. data/docs/SubAccountsResponse.md +9 -0
  322. data/docs/SubAccountsResponseSubAccounts.md +11 -0
  323. data/docs/Task.md +13 -0
  324. data/docs/TaskList.md +8 -0
  325. data/docs/TaskReminder.md +10 -0
  326. data/docs/TaskTypes.md +9 -0
  327. data/docs/TasksApi.md +376 -0
  328. data/docs/TransactionalEmailsApi.md +1390 -0
  329. data/docs/TransactionalSMSApi.md +273 -0
  330. data/docs/TransactionalWhatsAppApi.md +143 -0
  331. data/docs/UpdateAttribute.md +9 -0
  332. data/docs/UpdateAttributeEnumeration.md +9 -0
  333. data/docs/UpdateBatchContacts.md +8 -0
  334. data/docs/UpdateBatchContactsContacts.md +17 -0
  335. data/docs/UpdateBatchContactsModel.md +9 -0
  336. data/docs/UpdateCampaignStatus.md +8 -0
  337. data/docs/UpdateChild.md +12 -0
  338. data/docs/UpdateChildAccountStatus.md +11 -0
  339. data/docs/UpdateChildDomain.md +8 -0
  340. data/docs/UpdateContact.md +14 -0
  341. data/docs/UpdateCouponCollection.md +8 -0
  342. data/docs/UpdateEmailCampaign.md +37 -0
  343. data/docs/UpdateEmailCampaignRecipients.md +10 -0
  344. data/docs/UpdateEmailCampaignSender.md +10 -0
  345. data/docs/UpdateExternalFeed.md +16 -0
  346. data/docs/UpdateList.md +9 -0
  347. data/docs/UpdateSender.md +10 -0
  348. data/docs/UpdateSmsCampaign.md +15 -0
  349. data/docs/UpdateSmtpTemplate.md +17 -0
  350. data/docs/UpdateSmtpTemplateSender.md +10 -0
  351. data/docs/UpdateWebhook.md +11 -0
  352. data/docs/UpdateWhatsAppCampaign.md +11 -0
  353. data/docs/UploadImageModel.md +8 -0
  354. data/docs/UploadImageToGallery.md +9 -0
  355. data/docs/UserApi.md +118 -0
  356. data/docs/VariablesItems.md +10 -0
  357. data/docs/WebhooksApi.md +362 -0
  358. data/docs/WhatsAppCampaignsApi.md +543 -0
  359. data/docs/WhatsappCampStats.md +12 -0
  360. data/docs/WhatsappCampTemplate.md +18 -0
  361. data/lib/brevo-ruby/api/account_api.rb +145 -0
  362. data/lib/brevo-ruby/api/companies_api.rb +419 -0
  363. data/lib/brevo-ruby/api/contacts_api.rb +1735 -0
  364. data/lib/brevo-ruby/api/conversations_api.rb +514 -0
  365. data/lib/brevo-ruby/api/coupons_api.rb +316 -0
  366. data/lib/brevo-ruby/api/deals_api.rb +518 -0
  367. data/lib/brevo-ruby/api/domains_api.rb +282 -0
  368. data/lib/brevo-ruby/api/ecommerce_api.rb +655 -0
  369. data/lib/brevo-ruby/api/email_campaigns_api.rb +782 -0
  370. data/lib/brevo-ruby/api/external_feeds_api.rb +336 -0
  371. data/lib/brevo-ruby/api/files_api.rb +323 -0
  372. data/lib/brevo-ruby/api/inbound_parsing_api.rb +218 -0
  373. data/lib/brevo-ruby/api/master_account_api.rb +535 -0
  374. data/lib/brevo-ruby/api/notes_api.rb +318 -0
  375. data/lib/brevo-ruby/api/process_api.rb +151 -0
  376. data/lib/brevo-ruby/api/reseller_api.rb +923 -0
  377. data/lib/brevo-ruby/api/senders_api.rb +388 -0
  378. data/lib/brevo-ruby/api/sms_campaigns_api.rb +603 -0
  379. data/lib/brevo-ruby/api/tasks_api.rb +385 -0
  380. data/lib/brevo-ruby/api/transactional_emails_api.rb +1370 -0
  381. data/lib/brevo-ruby/api/transactional_sms_api.rb +290 -0
  382. data/lib/brevo-ruby/api/transactional_whats_app_api.rb +173 -0
  383. data/lib/brevo-ruby/api/user_api.rb +131 -0
  384. data/lib/brevo-ruby/api/webhooks_api.rb +357 -0
  385. data/lib/brevo-ruby/api/whats_app_campaigns_api.rb +534 -0
  386. data/lib/brevo-ruby/api_client.rb +392 -0
  387. data/lib/brevo-ruby/api_error.rb +38 -0
  388. data/lib/brevo-ruby/configuration.rb +216 -0
  389. data/lib/brevo-ruby/models/ab_test_campaign_result.rb +299 -0
  390. data/lib/brevo-ruby/models/ab_test_campaign_result_clicked_links.rb +203 -0
  391. data/lib/brevo-ruby/models/ab_test_campaign_result_statistics.rb +259 -0
  392. data/lib/brevo-ruby/models/ab_test_version_clicks.rb +176 -0
  393. data/lib/brevo-ruby/models/ab_test_version_clicks_inner.rb +220 -0
  394. data/lib/brevo-ruby/models/ab_test_version_stats.rb +206 -0
  395. data/lib/brevo-ruby/models/add_child_domain.rb +185 -0
  396. data/lib/brevo-ruby/models/add_contact_to_list.rb +199 -0
  397. data/lib/brevo-ruby/models/add_credits.rb +195 -0
  398. data/lib/brevo-ruby/models/authenticate_domain_model.rb +205 -0
  399. data/lib/brevo-ruby/models/block_domain.rb +190 -0
  400. data/lib/brevo-ruby/models/body.rb +210 -0
  401. data/lib/brevo-ruby/models/body_1.rb +205 -0
  402. data/lib/brevo-ruby/models/body_10.rb +225 -0
  403. data/lib/brevo-ruby/models/body_11.rb +190 -0
  404. data/lib/brevo-ruby/models/body_12.rb +215 -0
  405. data/lib/brevo-ruby/models/body_2.rb +223 -0
  406. data/lib/brevo-ruby/models/body_3.rb +200 -0
  407. data/lib/brevo-ruby/models/body_4.rb +195 -0
  408. data/lib/brevo-ruby/models/body_5.rb +223 -0
  409. data/lib/brevo-ruby/models/body_6.rb +320 -0
  410. data/lib/brevo-ruby/models/body_7.rb +281 -0
  411. data/lib/brevo-ruby/models/body_8.rb +245 -0
  412. data/lib/brevo-ruby/models/body_9.rb +190 -0
  413. data/lib/brevo-ruby/models/body_variables_items.rb +175 -0
  414. data/lib/brevo-ruby/models/companies_list.rb +188 -0
  415. data/lib/brevo-ruby/models/company.rb +220 -0
  416. data/lib/brevo-ruby/models/company_attributes.rb +176 -0
  417. data/lib/brevo-ruby/models/company_attributes_inner.rb +223 -0
  418. data/lib/brevo-ruby/models/component_items.rb +193 -0
  419. data/lib/brevo-ruby/models/conversations_message.rb +324 -0
  420. data/lib/brevo-ruby/models/conversations_message_file.rb +239 -0
  421. data/lib/brevo-ruby/models/conversations_message_file_image_info.rb +236 -0
  422. data/lib/brevo-ruby/models/create_api_key_request.rb +200 -0
  423. data/lib/brevo-ruby/models/create_api_key_response.rb +195 -0
  424. data/lib/brevo-ruby/models/create_attribute.rb +251 -0
  425. data/lib/brevo-ruby/models/create_attribute_enumeration.rb +205 -0
  426. data/lib/brevo-ruby/models/create_category_model.rb +185 -0
  427. data/lib/brevo-ruby/models/create_child.rb +294 -0
  428. data/lib/brevo-ruby/models/create_contact.rb +261 -0
  429. data/lib/brevo-ruby/models/create_coupon_collection.rb +205 -0
  430. data/lib/brevo-ruby/models/create_coupons.rb +206 -0
  431. data/lib/brevo-ruby/models/create_doi_contact.rb +259 -0
  432. data/lib/brevo-ruby/models/create_domain.rb +190 -0
  433. data/lib/brevo-ruby/models/create_domain_model.rb +219 -0
  434. data/lib/brevo-ruby/models/create_domain_model_dns_records.rb +193 -0
  435. data/lib/brevo-ruby/models/create_domain_model_dns_records_dkim_record.rb +211 -0
  436. data/lib/brevo-ruby/models/create_email_campaign.rb +597 -0
  437. data/lib/brevo-ruby/models/create_email_campaign_recipients.rb +212 -0
  438. data/lib/brevo-ruby/models/create_email_campaign_sender.rb +211 -0
  439. data/lib/brevo-ruby/models/create_external_feed.rb +339 -0
  440. data/lib/brevo-ruby/models/create_list.rb +205 -0
  441. data/lib/brevo-ruby/models/create_model.rb +190 -0
  442. data/lib/brevo-ruby/models/create_product_model.rb +185 -0
  443. data/lib/brevo-ruby/models/create_reseller.rb +200 -0
  444. data/lib/brevo-ruby/models/create_sender.rb +217 -0
  445. data/lib/brevo-ruby/models/create_sender_ips.rb +239 -0
  446. data/lib/brevo-ruby/models/create_sender_model.rb +210 -0
  447. data/lib/brevo-ruby/models/create_sms_campaign.rb +290 -0
  448. data/lib/brevo-ruby/models/create_sms_campaign_recipients.rb +204 -0
  449. data/lib/brevo-ruby/models/create_smtp_email.rb +196 -0
  450. data/lib/brevo-ruby/models/create_smtp_template.rb +289 -0
  451. data/lib/brevo-ruby/models/create_smtp_template_sender.rb +206 -0
  452. data/lib/brevo-ruby/models/create_sub_account.rb +259 -0
  453. data/lib/brevo-ruby/models/create_sub_account_response.rb +190 -0
  454. data/lib/brevo-ruby/models/create_update_batch_category.rb +202 -0
  455. data/lib/brevo-ruby/models/create_update_batch_category_model.rb +195 -0
  456. data/lib/brevo-ruby/models/create_update_batch_products.rb +202 -0
  457. data/lib/brevo-ruby/models/create_update_batch_products_model.rb +195 -0
  458. data/lib/brevo-ruby/models/create_update_categories.rb +220 -0
  459. data/lib/brevo-ruby/models/create_update_category.rb +232 -0
  460. data/lib/brevo-ruby/models/create_update_contact_model.rb +185 -0
  461. data/lib/brevo-ruby/models/create_update_folder.rb +185 -0
  462. data/lib/brevo-ruby/models/create_update_product.rb +301 -0
  463. data/lib/brevo-ruby/models/create_update_products.rb +289 -0
  464. data/lib/brevo-ruby/models/create_webhook.rb +273 -0
  465. data/lib/brevo-ruby/models/create_whats_app_campaign.rb +234 -0
  466. data/lib/brevo-ruby/models/create_whats_app_campaign_recipients.rb +212 -0
  467. data/lib/brevo-ruby/models/create_whats_app_template.rb +289 -0
  468. data/lib/brevo-ruby/models/created_batch_id.rb +190 -0
  469. data/lib/brevo-ruby/models/created_process_id.rb +190 -0
  470. data/lib/brevo-ruby/models/deal.rb +220 -0
  471. data/lib/brevo-ruby/models/deal_attributes.rb +176 -0
  472. data/lib/brevo-ruby/models/deal_attributes_inner.rb +223 -0
  473. data/lib/brevo-ruby/models/deals_list.rb +188 -0
  474. data/lib/brevo-ruby/models/delete_hardbounces.rb +205 -0
  475. data/lib/brevo-ruby/models/email_export_recipients.rb +234 -0
  476. data/lib/brevo-ruby/models/error_model.rb +239 -0
  477. data/lib/brevo-ruby/models/export_webhooks_history.rb +309 -0
  478. data/lib/brevo-ruby/models/file_data.rb +246 -0
  479. data/lib/brevo-ruby/models/file_downloadable_link.rb +190 -0
  480. data/lib/brevo-ruby/models/file_list.rb +176 -0
  481. data/lib/brevo-ruby/models/get_account.rb +289 -0
  482. data/lib/brevo-ruby/models/get_account_activity.rb +187 -0
  483. data/lib/brevo-ruby/models/get_account_activity_logs.rb +250 -0
  484. data/lib/brevo-ruby/models/get_account_marketing_automation.rb +200 -0
  485. data/lib/brevo-ruby/models/get_account_plan.rb +296 -0
  486. data/lib/brevo-ruby/models/get_account_relay.rb +205 -0
  487. data/lib/brevo-ruby/models/get_account_relay_data.rb +221 -0
  488. data/lib/brevo-ruby/models/get_aggregated_report.rb +305 -0
  489. data/lib/brevo-ruby/models/get_all_external_feeds.rb +196 -0
  490. data/lib/brevo-ruby/models/get_all_external_feeds_feeds.rb +404 -0
  491. data/lib/brevo-ruby/models/get_attributes.rb +192 -0
  492. data/lib/brevo-ruby/models/get_attributes_attributes.rb +283 -0
  493. data/lib/brevo-ruby/models/get_attributes_enumeration.rb +205 -0
  494. data/lib/brevo-ruby/models/get_blocked_domains.rb +193 -0
  495. data/lib/brevo-ruby/models/get_campaign_overview.rb +371 -0
  496. data/lib/brevo-ruby/models/get_campaign_recipients.rb +207 -0
  497. data/lib/brevo-ruby/models/get_campaign_stats.rb +390 -0
  498. data/lib/brevo-ruby/models/get_categories.rb +206 -0
  499. data/lib/brevo-ruby/models/get_category_details.rb +255 -0
  500. data/lib/brevo-ruby/models/get_child_account_creation_status.rb +190 -0
  501. data/lib/brevo-ruby/models/get_child_domain.rb +195 -0
  502. data/lib/brevo-ruby/models/get_child_domains.rb +175 -0
  503. data/lib/brevo-ruby/models/get_child_info.rb +289 -0
  504. data/lib/brevo-ruby/models/get_child_info_api_keys.rb +203 -0
  505. data/lib/brevo-ruby/models/get_child_info_api_keys_v2.rb +205 -0
  506. data/lib/brevo-ruby/models/get_child_info_api_keys_v3.rb +205 -0
  507. data/lib/brevo-ruby/models/get_child_info_credits.rb +196 -0
  508. data/lib/brevo-ruby/models/get_child_info_statistics.rb +206 -0
  509. data/lib/brevo-ruby/models/get_children_list.rb +197 -0
  510. data/lib/brevo-ruby/models/get_client.rb +235 -0
  511. data/lib/brevo-ruby/models/get_contact_campaign_stats.rb +273 -0
  512. data/lib/brevo-ruby/models/get_contact_campaign_stats_clicked.rb +206 -0
  513. data/lib/brevo-ruby/models/get_contact_campaign_stats_opened.rb +235 -0
  514. data/lib/brevo-ruby/models/get_contact_campaign_stats_transac_attributes.rb +220 -0
  515. data/lib/brevo-ruby/models/get_contact_campaign_stats_unsubscriptions.rb +209 -0
  516. data/lib/brevo-ruby/models/get_contact_details.rb +307 -0
  517. data/lib/brevo-ruby/models/get_contacts.rb +206 -0
  518. data/lib/brevo-ruby/models/get_coupon_collection.rb +265 -0
  519. data/lib/brevo-ruby/models/get_device_browser_stats.rb +235 -0
  520. data/lib/brevo-ruby/models/get_domain_configuration_model.rb +234 -0
  521. data/lib/brevo-ruby/models/get_domains_list.rb +187 -0
  522. data/lib/brevo-ruby/models/get_domains_list_domains.rb +245 -0
  523. data/lib/brevo-ruby/models/get_email_campaign.rb +598 -0
  524. data/lib/brevo-ruby/models/get_email_campaigns.rb +196 -0
  525. data/lib/brevo-ruby/models/get_email_event_report.rb +186 -0
  526. data/lib/brevo-ruby/models/get_email_event_report_events.rb +339 -0
  527. data/lib/brevo-ruby/models/get_extended_campaign_overview.rb +570 -0
  528. data/lib/brevo-ruby/models/get_extended_campaign_overview_sender.rb +205 -0
  529. data/lib/brevo-ruby/models/get_extended_campaign_stats.rb +295 -0
  530. data/lib/brevo-ruby/models/get_extended_campaign_stats_global_stats.rb +176 -0
  531. data/lib/brevo-ruby/models/get_extended_client.rb +249 -0
  532. data/lib/brevo-ruby/models/get_extended_client_address.rb +236 -0
  533. data/lib/brevo-ruby/models/get_extended_contact_details.rb +321 -0
  534. data/lib/brevo-ruby/models/get_extended_contact_details_statistics.rb +281 -0
  535. data/lib/brevo-ruby/models/get_extended_contact_details_statistics_clicked.rb +207 -0
  536. data/lib/brevo-ruby/models/get_extended_contact_details_statistics_delivered.rb +205 -0
  537. data/lib/brevo-ruby/models/get_extended_contact_details_statistics_links.rb +235 -0
  538. data/lib/brevo-ruby/models/get_extended_contact_details_statistics_messages_sent.rb +205 -0
  539. data/lib/brevo-ruby/models/get_extended_contact_details_statistics_opened.rb +235 -0
  540. data/lib/brevo-ruby/models/get_extended_contact_details_statistics_unsubscriptions.rb +210 -0
  541. data/lib/brevo-ruby/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.rb +200 -0
  542. data/lib/brevo-ruby/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.rb +215 -0
  543. data/lib/brevo-ruby/models/get_extended_list.rb +301 -0
  544. data/lib/brevo-ruby/models/get_extended_list_campaign_stats.rb +204 -0
  545. data/lib/brevo-ruby/models/get_external_feed_by_uuid.rb +404 -0
  546. data/lib/brevo-ruby/models/get_external_feed_by_uuid_headers.rb +195 -0
  547. data/lib/brevo-ruby/models/get_folder.rb +250 -0
  548. data/lib/brevo-ruby/models/get_folder_lists.rb +196 -0
  549. data/lib/brevo-ruby/models/get_folders.rb +196 -0
  550. data/lib/brevo-ruby/models/get_inbound_email_events.rb +186 -0
  551. data/lib/brevo-ruby/models/get_inbound_email_events_by_uuid.rb +259 -0
  552. data/lib/brevo-ruby/models/get_inbound_email_events_by_uuid_attachments.rb +215 -0
  553. data/lib/brevo-ruby/models/get_inbound_email_events_by_uuid_logs.rb +229 -0
  554. data/lib/brevo-ruby/models/get_inbound_email_events_events.rb +235 -0
  555. data/lib/brevo-ruby/models/get_invited_users_list.rb +187 -0
  556. data/lib/brevo-ruby/models/get_invited_users_list_feature_access.rb +206 -0
  557. data/lib/brevo-ruby/models/get_invited_users_list_users.rb +234 -0
  558. data/lib/brevo-ruby/models/get_ip.rb +235 -0
  559. data/lib/brevo-ruby/models/get_ip_from_sender.rb +235 -0
  560. data/lib/brevo-ruby/models/get_ips.rb +192 -0
  561. data/lib/brevo-ruby/models/get_ips_from_sender.rb +192 -0
  562. data/lib/brevo-ruby/models/get_list.rb +250 -0
  563. data/lib/brevo-ruby/models/get_lists.rb +197 -0
  564. data/lib/brevo-ruby/models/get_process.rb +264 -0
  565. data/lib/brevo-ruby/models/get_processes.rb +197 -0
  566. data/lib/brevo-ruby/models/get_product_details.rb +357 -0
  567. data/lib/brevo-ruby/models/get_products.rb +206 -0
  568. data/lib/brevo-ruby/models/get_reports.rb +186 -0
  569. data/lib/brevo-ruby/models/get_reports_reports.rb +370 -0
  570. data/lib/brevo-ruby/models/get_scheduled_email_by_batch_id.rb +196 -0
  571. data/lib/brevo-ruby/models/get_scheduled_email_by_batch_id_batches.rb +254 -0
  572. data/lib/brevo-ruby/models/get_scheduled_email_by_message_id.rb +254 -0
  573. data/lib/brevo-ruby/models/get_segments.rb +194 -0
  574. data/lib/brevo-ruby/models/get_segments_segments.rb +215 -0
  575. data/lib/brevo-ruby/models/get_senders_list.rb +187 -0
  576. data/lib/brevo-ruby/models/get_senders_list_ips.rb +220 -0
  577. data/lib/brevo-ruby/models/get_senders_list_senders.rb +247 -0
  578. data/lib/brevo-ruby/models/get_shared_template_url.rb +190 -0
  579. data/lib/brevo-ruby/models/get_sms_campaign.rb +352 -0
  580. data/lib/brevo-ruby/models/get_sms_campaign_overview.rb +324 -0
  581. data/lib/brevo-ruby/models/get_sms_campaign_recipients.rb +175 -0
  582. data/lib/brevo-ruby/models/get_sms_campaign_stats.rb +280 -0
  583. data/lib/brevo-ruby/models/get_sms_campaigns.rb +196 -0
  584. data/lib/brevo-ruby/models/get_sms_event_report.rb +186 -0
  585. data/lib/brevo-ruby/models/get_sms_event_report_events.rb +278 -0
  586. data/lib/brevo-ruby/models/get_smtp_template_overview.rb +364 -0
  587. data/lib/brevo-ruby/models/get_smtp_template_overview_sender.rb +205 -0
  588. data/lib/brevo-ruby/models/get_smtp_templates.rb +196 -0
  589. data/lib/brevo-ruby/models/get_sso_token.rb +190 -0
  590. data/lib/brevo-ruby/models/get_stats_by_browser.rb +175 -0
  591. data/lib/brevo-ruby/models/get_stats_by_device.rb +223 -0
  592. data/lib/brevo-ruby/models/get_stats_by_domain.rb +175 -0
  593. data/lib/brevo-ruby/models/get_transac_aggregated_sms_report.rb +275 -0
  594. data/lib/brevo-ruby/models/get_transac_blocked_contacts.rb +196 -0
  595. data/lib/brevo-ruby/models/get_transac_blocked_contacts_contacts.rb +234 -0
  596. data/lib/brevo-ruby/models/get_transac_blocked_contacts_reason.rb +230 -0
  597. data/lib/brevo-ruby/models/get_transac_email_content.rb +277 -0
  598. data/lib/brevo-ruby/models/get_transac_email_content_events.rb +205 -0
  599. data/lib/brevo-ruby/models/get_transac_emails_list.rb +196 -0
  600. data/lib/brevo-ruby/models/get_transac_emails_list_transactional_emails.rb +282 -0
  601. data/lib/brevo-ruby/models/get_transac_sms_report.rb +186 -0
  602. data/lib/brevo-ruby/models/get_transac_sms_report_reports.rb +275 -0
  603. data/lib/brevo-ruby/models/get_user_permission.rb +223 -0
  604. data/lib/brevo-ruby/models/get_user_permission_privileges.rb +205 -0
  605. data/lib/brevo-ruby/models/get_wa_templates.rb +206 -0
  606. data/lib/brevo-ruby/models/get_wa_templates_templates.rb +290 -0
  607. data/lib/brevo-ruby/models/get_webhook.rb +315 -0
  608. data/lib/brevo-ruby/models/get_webhooks.rb +191 -0
  609. data/lib/brevo-ruby/models/get_whats_app_config.rb +281 -0
  610. data/lib/brevo-ruby/models/get_whatsapp_campaign_overview.rb +332 -0
  611. data/lib/brevo-ruby/models/get_whatsapp_campaigns.rb +196 -0
  612. data/lib/brevo-ruby/models/get_whatsapp_campaigns_campaigns.rb +353 -0
  613. data/lib/brevo-ruby/models/get_whatsapp_event_report.rb +186 -0
  614. data/lib/brevo-ruby/models/get_whatsapp_event_report_events.rb +314 -0
  615. data/lib/brevo-ruby/models/inline_response_200.rb +191 -0
  616. data/lib/brevo-ruby/models/inline_response_200_1.rb +220 -0
  617. data/lib/brevo-ruby/models/inline_response_201.rb +191 -0
  618. data/lib/brevo-ruby/models/inline_response_201_1.rb +191 -0
  619. data/lib/brevo-ruby/models/inline_response_201_2.rb +190 -0
  620. data/lib/brevo-ruby/models/inline_response_201_3.rb +190 -0
  621. data/lib/brevo-ruby/models/inline_response_201_4.rb +190 -0
  622. data/lib/brevo-ruby/models/manage_ip.rb +185 -0
  623. data/lib/brevo-ruby/models/master_details_response.rb +243 -0
  624. data/lib/brevo-ruby/models/master_details_response_billing_info.rb +214 -0
  625. data/lib/brevo-ruby/models/master_details_response_billing_info_address.rb +226 -0
  626. data/lib/brevo-ruby/models/master_details_response_billing_info_name.rb +196 -0
  627. data/lib/brevo-ruby/models/master_details_response_plan_info.rb +272 -0
  628. data/lib/brevo-ruby/models/master_details_response_plan_info_features.rb +225 -0
  629. data/lib/brevo-ruby/models/note.rb +283 -0
  630. data/lib/brevo-ruby/models/note_data.rb +255 -0
  631. data/lib/brevo-ruby/models/note_id.rb +186 -0
  632. data/lib/brevo-ruby/models/note_list.rb +176 -0
  633. data/lib/brevo-ruby/models/order.rb +297 -0
  634. data/lib/brevo-ruby/models/order_batch.rb +202 -0
  635. data/lib/brevo-ruby/models/order_billing.rb +246 -0
  636. data/lib/brevo-ruby/models/order_products.rb +231 -0
  637. data/lib/brevo-ruby/models/otp.rb +185 -0
  638. data/lib/brevo-ruby/models/pipeline.rb +208 -0
  639. data/lib/brevo-ruby/models/pipeline_stage.rb +196 -0
  640. data/lib/brevo-ruby/models/pipelines.rb +176 -0
  641. data/lib/brevo-ruby/models/post_contact_info.rb +189 -0
  642. data/lib/brevo-ruby/models/post_contact_info_contacts.rb +217 -0
  643. data/lib/brevo-ruby/models/post_send_failed.rb +238 -0
  644. data/lib/brevo-ruby/models/post_send_sms_test_failed.rb +227 -0
  645. data/lib/brevo-ruby/models/remaining_credit_model.rb +203 -0
  646. data/lib/brevo-ruby/models/remaining_credit_model_child.rb +206 -0
  647. data/lib/brevo-ruby/models/remaining_credit_model_reseller.rb +205 -0
  648. data/lib/brevo-ruby/models/remove_contact_from_list.rb +209 -0
  649. data/lib/brevo-ruby/models/remove_credits.rb +195 -0
  650. data/lib/brevo-ruby/models/request_contact_export.rb +211 -0
  651. data/lib/brevo-ruby/models/request_contact_export_custom_contact_filter.rb +294 -0
  652. data/lib/brevo-ruby/models/request_contact_import.rb +286 -0
  653. data/lib/brevo-ruby/models/request_contact_import_new_list.rb +196 -0
  654. data/lib/brevo-ruby/models/request_sms_recipient_export.rb +234 -0
  655. data/lib/brevo-ruby/models/schedule_smtp_email.rb +206 -0
  656. data/lib/brevo-ruby/models/send_report.rb +235 -0
  657. data/lib/brevo-ruby/models/send_report_email.rb +208 -0
  658. data/lib/brevo-ruby/models/send_sms.rb +233 -0
  659. data/lib/brevo-ruby/models/send_smtp_email.rb +345 -0
  660. data/lib/brevo-ruby/models/send_smtp_email_attachment.rb +220 -0
  661. data/lib/brevo-ruby/models/send_smtp_email_bcc.rb +200 -0
  662. data/lib/brevo-ruby/models/send_smtp_email_cc.rb +200 -0
  663. data/lib/brevo-ruby/models/send_smtp_email_message_versions.rb +247 -0
  664. data/lib/brevo-ruby/models/send_smtp_email_reply_to.rb +201 -0
  665. data/lib/brevo-ruby/models/send_smtp_email_reply_to_1.rb +201 -0
  666. data/lib/brevo-ruby/models/send_smtp_email_sender.rb +206 -0
  667. data/lib/brevo-ruby/models/send_smtp_email_to.rb +200 -0
  668. data/lib/brevo-ruby/models/send_smtp_email_to_1.rb +200 -0
  669. data/lib/brevo-ruby/models/send_test_email.rb +187 -0
  670. data/lib/brevo-ruby/models/send_test_sms.rb +185 -0
  671. data/lib/brevo-ruby/models/send_transac_sms.rb +327 -0
  672. data/lib/brevo-ruby/models/send_whatsapp_message.rb +227 -0
  673. data/lib/brevo-ruby/models/sso_token_request.rb +244 -0
  674. data/lib/brevo-ruby/models/sub_account_details_response.rb +214 -0
  675. data/lib/brevo-ruby/models/sub_account_details_response_plan_info.rb +204 -0
  676. data/lib/brevo-ruby/models/sub_account_details_response_plan_info_credits.rb +195 -0
  677. data/lib/brevo-ruby/models/sub_account_details_response_plan_info_credits_emails.rb +196 -0
  678. data/lib/brevo-ruby/models/sub_account_details_response_plan_info_features.rb +203 -0
  679. data/lib/brevo-ruby/models/sub_account_details_response_plan_info_features_inbox.rb +196 -0
  680. data/lib/brevo-ruby/models/sub_account_details_response_plan_info_features_landing_page.rb +196 -0
  681. data/lib/brevo-ruby/models/sub_account_details_response_plan_info_features_users.rb +196 -0
  682. data/lib/brevo-ruby/models/sub_account_update_plan_request.rb +194 -0
  683. data/lib/brevo-ruby/models/sub_account_update_plan_request_credits.rb +186 -0
  684. data/lib/brevo-ruby/models/sub_account_update_plan_request_features.rb +206 -0
  685. data/lib/brevo-ruby/models/sub_accounts_response.rb +196 -0
  686. data/lib/brevo-ruby/models/sub_accounts_response_sub_accounts.rb +235 -0
  687. data/lib/brevo-ruby/models/task.rb +252 -0
  688. data/lib/brevo-ruby/models/task_list.rb +188 -0
  689. data/lib/brevo-ruby/models/task_reminder.rb +257 -0
  690. data/lib/brevo-ruby/models/task_types.rb +196 -0
  691. data/lib/brevo-ruby/models/update_attribute.rb +197 -0
  692. data/lib/brevo-ruby/models/update_attribute_enumeration.rb +205 -0
  693. data/lib/brevo-ruby/models/update_batch_contacts.rb +187 -0
  694. data/lib/brevo-ruby/models/update_batch_contacts_contacts.rb +283 -0
  695. data/lib/brevo-ruby/models/update_batch_contacts_model.rb +197 -0
  696. data/lib/brevo-ruby/models/update_campaign_status.rb +220 -0
  697. data/lib/brevo-ruby/models/update_child.rb +225 -0
  698. data/lib/brevo-ruby/models/update_child_account_status.rb +215 -0
  699. data/lib/brevo-ruby/models/update_child_domain.rb +185 -0
  700. data/lib/brevo-ruby/models/update_contact.rb +251 -0
  701. data/lib/brevo-ruby/models/update_coupon_collection.rb +190 -0
  702. data/lib/brevo-ruby/models/update_email_campaign.rb +587 -0
  703. data/lib/brevo-ruby/models/update_email_campaign_recipients.rb +212 -0
  704. data/lib/brevo-ruby/models/update_email_campaign_sender.rb +206 -0
  705. data/lib/brevo-ruby/models/update_external_feed.rb +327 -0
  706. data/lib/brevo-ruby/models/update_list.rb +195 -0
  707. data/lib/brevo-ruby/models/update_sender.rb +207 -0
  708. data/lib/brevo-ruby/models/update_sms_campaign.rb +271 -0
  709. data/lib/brevo-ruby/models/update_smtp_template.rb +274 -0
  710. data/lib/brevo-ruby/models/update_smtp_template_sender.rb +206 -0
  711. data/lib/brevo-ruby/models/update_webhook.rb +239 -0
  712. data/lib/brevo-ruby/models/update_whats_app_campaign.rb +250 -0
  713. data/lib/brevo-ruby/models/upload_image_model.rb +190 -0
  714. data/lib/brevo-ruby/models/upload_image_to_gallery.rb +200 -0
  715. data/lib/brevo-ruby/models/variables_items.rb +202 -0
  716. data/lib/brevo-ruby/models/whatsapp_camp_stats.rb +245 -0
  717. data/lib/brevo-ruby/models/whatsapp_camp_template.rb +287 -0
  718. data/lib/brevo-ruby/version.rb +15 -0
  719. data/lib/brevo-ruby.rb +393 -0
  720. data/spec/api/account_api_spec.rb +59 -0
  721. data/spec/api/companies_api_spec.rb +119 -0
  722. data/spec/api/contacts_api_spec.rb +387 -0
  723. data/spec/api/conversations_api_spec.rb +140 -0
  724. data/spec/api/coupons_api_spec.rb +93 -0
  725. data/spec/api/deals_api_spec.rb +141 -0
  726. data/spec/api/domains_api_spec.rb +89 -0
  727. data/spec/api/ecommerce_api_spec.rb +173 -0
  728. data/spec/api/email_campaigns_api_spec.rb +195 -0
  729. data/spec/api/external_feeds_api_spec.rb +102 -0
  730. data/spec/api/files_api_spec.rb +99 -0
  731. data/spec/api/inbound_parsing_api_spec.rb +76 -0
  732. data/spec/api/master_account_api_spec.rb +145 -0
  733. data/spec/api/notes_api_spec.rb +97 -0
  734. data/spec/api/process_api_spec.rb +59 -0
  735. data/spec/api/reseller_api_spec.rb +223 -0
  736. data/spec/api/senders_api_spec.rb +114 -0
  737. data/spec/api/sms_campaigns_api_spec.rb +157 -0
  738. data/spec/api/tasks_api_spec.rb +113 -0
  739. data/spec/api/transactional_emails_api_spec.rb +330 -0
  740. data/spec/api/transactional_sms_api_spec.rb +94 -0
  741. data/spec/api/transactional_whats_app_api_spec.rb +66 -0
  742. data/spec/api/user_api_spec.rb +56 -0
  743. data/spec/api/webhooks_api_spec.rb +104 -0
  744. data/spec/api/whats_app_campaigns_api_spec.rb +142 -0
  745. data/spec/api_client_spec.rb +243 -0
  746. data/spec/configuration_spec.rb +42 -0
  747. data/spec/models/ab_test_campaign_result_clicked_links_spec.rb +47 -0
  748. data/spec/models/ab_test_campaign_result_spec.rb +91 -0
  749. data/spec/models/ab_test_campaign_result_statistics_spec.rb +71 -0
  750. data/spec/models/ab_test_version_clicks_inner_spec.rb +53 -0
  751. data/spec/models/ab_test_version_clicks_spec.rb +35 -0
  752. data/spec/models/ab_test_version_stats_spec.rb +47 -0
  753. data/spec/models/add_child_domain_spec.rb +41 -0
  754. data/spec/models/add_contact_to_list_spec.rb +47 -0
  755. data/spec/models/add_credits_spec.rb +47 -0
  756. data/spec/models/authenticate_domain_model_spec.rb +47 -0
  757. data/spec/models/block_domain_spec.rb +41 -0
  758. data/spec/models/body_10_spec.rb +59 -0
  759. data/spec/models/body_11_spec.rb +41 -0
  760. data/spec/models/body_12_spec.rb +59 -0
  761. data/spec/models/body_1_spec.rb +53 -0
  762. data/spec/models/body_2_spec.rb +59 -0
  763. data/spec/models/body_3_spec.rb +47 -0
  764. data/spec/models/body_4_spec.rb +47 -0
  765. data/spec/models/body_5_spec.rb +59 -0
  766. data/spec/models/body_6_spec.rb +101 -0
  767. data/spec/models/body_7_spec.rb +95 -0
  768. data/spec/models/body_8_spec.rb +71 -0
  769. data/spec/models/body_9_spec.rb +41 -0
  770. data/spec/models/body_spec.rb +53 -0
  771. data/spec/models/body_variables_items_spec.rb +35 -0
  772. data/spec/models/companies_list_spec.rb +41 -0
  773. data/spec/models/company_attributes_inner_spec.rb +65 -0
  774. data/spec/models/company_attributes_spec.rb +35 -0
  775. data/spec/models/company_spec.rb +59 -0
  776. data/spec/models/component_items_spec.rb +47 -0
  777. data/spec/models/conversations_message_file_image_info_spec.rb +53 -0
  778. data/spec/models/conversations_message_file_spec.rb +65 -0
  779. data/spec/models/conversations_message_spec.rb +99 -0
  780. data/spec/models/create_api_key_request_spec.rb +47 -0
  781. data/spec/models/create_api_key_response_spec.rb +47 -0
  782. data/spec/models/create_attribute_enumeration_spec.rb +47 -0
  783. data/spec/models/create_attribute_spec.rb +63 -0
  784. data/spec/models/create_category_model_spec.rb +41 -0
  785. data/spec/models/create_child_spec.rb +75 -0
  786. data/spec/models/create_contact_spec.rb +83 -0
  787. data/spec/models/create_coupon_collection_spec.rb +47 -0
  788. data/spec/models/create_coupons_spec.rb +47 -0
  789. data/spec/models/create_doi_contact_spec.rb +71 -0
  790. data/spec/models/create_domain_model_dns_records_dkim_record_spec.rb +59 -0
  791. data/spec/models/create_domain_model_dns_records_spec.rb +47 -0
  792. data/spec/models/create_domain_model_spec.rb +59 -0
  793. data/spec/models/create_domain_spec.rb +41 -0
  794. data/spec/models/create_email_campaign_recipients_spec.rb +53 -0
  795. data/spec/models/create_email_campaign_sender_spec.rb +53 -0
  796. data/spec/models/create_email_campaign_spec.rb +219 -0
  797. data/spec/models/create_external_feed_spec.rb +93 -0
  798. data/spec/models/create_list_spec.rb +47 -0
  799. data/spec/models/create_model_spec.rb +41 -0
  800. data/spec/models/create_product_model_spec.rb +41 -0
  801. data/spec/models/create_reseller_spec.rb +47 -0
  802. data/spec/models/create_sender_ips_spec.rb +53 -0
  803. data/spec/models/create_sender_model_spec.rb +53 -0
  804. data/spec/models/create_sender_spec.rb +53 -0
  805. data/spec/models/create_sms_campaign_recipients_spec.rb +47 -0
  806. data/spec/models/create_sms_campaign_spec.rb +83 -0
  807. data/spec/models/create_smtp_email_spec.rb +47 -0
  808. data/spec/models/create_smtp_template_sender_spec.rb +53 -0
  809. data/spec/models/create_smtp_template_spec.rb +95 -0
  810. data/spec/models/create_sub_account_response_spec.rb +41 -0
  811. data/spec/models/create_sub_account_spec.rb +63 -0
  812. data/spec/models/create_update_batch_category_model_spec.rb +47 -0
  813. data/spec/models/create_update_batch_category_spec.rb +47 -0
  814. data/spec/models/create_update_batch_products_model_spec.rb +47 -0
  815. data/spec/models/create_update_batch_products_spec.rb +47 -0
  816. data/spec/models/create_update_categories_spec.rb +59 -0
  817. data/spec/models/create_update_category_spec.rb +65 -0
  818. data/spec/models/create_update_contact_model_spec.rb +41 -0
  819. data/spec/models/create_update_folder_spec.rb +41 -0
  820. data/spec/models/create_update_product_spec.rb +101 -0
  821. data/spec/models/create_update_products_spec.rb +95 -0
  822. data/spec/models/create_webhook_spec.rb +73 -0
  823. data/spec/models/create_whats_app_campaign_recipients_spec.rb +53 -0
  824. data/spec/models/create_whats_app_campaign_spec.rb +59 -0
  825. data/spec/models/create_whats_app_template_spec.rb +75 -0
  826. data/spec/models/created_batch_id_spec.rb +41 -0
  827. data/spec/models/created_process_id_spec.rb +41 -0
  828. data/spec/models/deal_attributes_inner_spec.rb +65 -0
  829. data/spec/models/deal_attributes_spec.rb +35 -0
  830. data/spec/models/deal_spec.rb +59 -0
  831. data/spec/models/deals_list_spec.rb +41 -0
  832. data/spec/models/delete_hardbounces_spec.rb +53 -0
  833. data/spec/models/email_export_recipients_spec.rb +51 -0
  834. data/spec/models/error_model_spec.rb +51 -0
  835. data/spec/models/export_webhooks_history_spec.rb +93 -0
  836. data/spec/models/file_data_spec.rb +77 -0
  837. data/spec/models/file_downloadable_link_spec.rb +41 -0
  838. data/spec/models/file_list_spec.rb +35 -0
  839. data/spec/models/get_account_activity_logs_spec.rb +65 -0
  840. data/spec/models/get_account_activity_spec.rb +41 -0
  841. data/spec/models/get_account_marketing_automation_spec.rb +47 -0
  842. data/spec/models/get_account_plan_spec.rb +79 -0
  843. data/spec/models/get_account_relay_data_spec.rb +53 -0
  844. data/spec/models/get_account_relay_spec.rb +47 -0
  845. data/spec/models/get_account_spec.rb +83 -0
  846. data/spec/models/get_aggregated_report_spec.rb +113 -0
  847. data/spec/models/get_all_external_feeds_feeds_spec.rb +111 -0
  848. data/spec/models/get_all_external_feeds_spec.rb +47 -0
  849. data/spec/models/get_attributes_attributes_spec.rb +73 -0
  850. data/spec/models/get_attributes_enumeration_spec.rb +47 -0
  851. data/spec/models/get_attributes_spec.rb +41 -0
  852. data/spec/models/get_blocked_domains_spec.rb +41 -0
  853. data/spec/models/get_campaign_overview_spec.rb +121 -0
  854. data/spec/models/get_campaign_recipients_spec.rb +47 -0
  855. data/spec/models/get_campaign_stats_spec.rb +131 -0
  856. data/spec/models/get_categories_spec.rb +47 -0
  857. data/spec/models/get_category_details_spec.rb +71 -0
  858. data/spec/models/get_child_account_creation_status_spec.rb +41 -0
  859. data/spec/models/get_child_domain_spec.rb +47 -0
  860. data/spec/models/get_child_domains_spec.rb +35 -0
  861. data/spec/models/get_child_info_api_keys_spec.rb +47 -0
  862. data/spec/models/get_child_info_api_keys_v2_spec.rb +47 -0
  863. data/spec/models/get_child_info_api_keys_v3_spec.rb +47 -0
  864. data/spec/models/get_child_info_credits_spec.rb +47 -0
  865. data/spec/models/get_child_info_spec.rb +89 -0
  866. data/spec/models/get_child_info_statistics_spec.rb +53 -0
  867. data/spec/models/get_children_list_spec.rb +47 -0
  868. data/spec/models/get_client_spec.rb +59 -0
  869. data/spec/models/get_contact_campaign_stats_clicked_spec.rb +47 -0
  870. data/spec/models/get_contact_campaign_stats_opened_spec.rb +59 -0
  871. data/spec/models/get_contact_campaign_stats_spec.rb +89 -0
  872. data/spec/models/get_contact_campaign_stats_transac_attributes_spec.rb +53 -0
  873. data/spec/models/get_contact_campaign_stats_unsubscriptions_spec.rb +47 -0
  874. data/spec/models/get_contact_details_spec.rb +89 -0
  875. data/spec/models/get_contacts_spec.rb +47 -0
  876. data/spec/models/get_coupon_collection_spec.rb +71 -0
  877. data/spec/models/get_device_browser_stats_spec.rb +59 -0
  878. data/spec/models/get_domain_configuration_model_spec.rb +59 -0
  879. data/spec/models/get_domains_list_domains_spec.rb +65 -0
  880. data/spec/models/get_domains_list_spec.rb +41 -0
  881. data/spec/models/get_email_campaign_spec.rb +229 -0
  882. data/spec/models/get_email_campaigns_spec.rb +47 -0
  883. data/spec/models/get_email_event_report_events_spec.rb +105 -0
  884. data/spec/models/get_email_event_report_spec.rb +41 -0
  885. data/spec/models/get_extended_campaign_overview_sender_spec.rb +53 -0
  886. data/spec/models/get_extended_campaign_overview_spec.rb +217 -0
  887. data/spec/models/get_extended_campaign_stats_global_stats_spec.rb +35 -0
  888. data/spec/models/get_extended_campaign_stats_spec.rb +83 -0
  889. data/spec/models/get_extended_client_address_spec.rb +59 -0
  890. data/spec/models/get_extended_client_spec.rb +65 -0
  891. data/spec/models/get_extended_contact_details_spec.rb +95 -0
  892. data/spec/models/get_extended_contact_details_statistics_clicked_spec.rb +47 -0
  893. data/spec/models/get_extended_contact_details_statistics_delivered_spec.rb +47 -0
  894. data/spec/models/get_extended_contact_details_statistics_links_spec.rb +59 -0
  895. data/spec/models/get_extended_contact_details_statistics_messages_sent_spec.rb +47 -0
  896. data/spec/models/get_extended_contact_details_statistics_opened_spec.rb +59 -0
  897. data/spec/models/get_extended_contact_details_statistics_spec.rb +89 -0
  898. data/spec/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription_spec.rb +47 -0
  899. data/spec/models/get_extended_contact_details_statistics_unsubscriptions_spec.rb +47 -0
  900. data/spec/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription_spec.rb +53 -0
  901. data/spec/models/get_extended_list_campaign_stats_spec.rb +47 -0
  902. data/spec/models/get_extended_list_spec.rb +89 -0
  903. data/spec/models/get_external_feed_by_uuid_headers_spec.rb +47 -0
  904. data/spec/models/get_external_feed_by_uuid_spec.rb +111 -0
  905. data/spec/models/get_folder_lists_spec.rb +47 -0
  906. data/spec/models/get_folder_spec.rb +65 -0
  907. data/spec/models/get_folders_spec.rb +47 -0
  908. data/spec/models/get_inbound_email_events_by_uuid_attachments_spec.rb +59 -0
  909. data/spec/models/get_inbound_email_events_by_uuid_logs_spec.rb +51 -0
  910. data/spec/models/get_inbound_email_events_by_uuid_spec.rb +83 -0
  911. data/spec/models/get_inbound_email_events_events_spec.rb +59 -0
  912. data/spec/models/get_inbound_email_events_spec.rb +41 -0
  913. data/spec/models/get_invited_users_list_feature_access_spec.rb +53 -0
  914. data/spec/models/get_invited_users_list_spec.rb +41 -0
  915. data/spec/models/get_invited_users_list_users_spec.rb +59 -0
  916. data/spec/models/get_ip_from_sender_spec.rb +59 -0
  917. data/spec/models/get_ip_spec.rb +59 -0
  918. data/spec/models/get_ips_from_sender_spec.rb +41 -0
  919. data/spec/models/get_ips_spec.rb +41 -0
  920. data/spec/models/get_list_spec.rb +65 -0
  921. data/spec/models/get_lists_spec.rb +47 -0
  922. data/spec/models/get_process_spec.rb +63 -0
  923. data/spec/models/get_processes_spec.rb +47 -0
  924. data/spec/models/get_product_details_spec.rb +125 -0
  925. data/spec/models/get_products_spec.rb +47 -0
  926. data/spec/models/get_reports_reports_spec.rb +113 -0
  927. data/spec/models/get_reports_spec.rb +41 -0
  928. data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +57 -0
  929. data/spec/models/get_scheduled_email_by_batch_id_spec.rb +47 -0
  930. data/spec/models/get_scheduled_email_by_message_id_spec.rb +57 -0
  931. data/spec/models/get_segments_segments_spec.rb +59 -0
  932. data/spec/models/get_segments_spec.rb +47 -0
  933. data/spec/models/get_senders_list_ips_spec.rb +53 -0
  934. data/spec/models/get_senders_list_senders_spec.rb +65 -0
  935. data/spec/models/get_senders_list_spec.rb +41 -0
  936. data/spec/models/get_shared_template_url_spec.rb +41 -0
  937. data/spec/models/get_sms_campaign_overview_spec.rb +87 -0
  938. data/spec/models/get_sms_campaign_recipients_spec.rb +35 -0
  939. data/spec/models/get_sms_campaign_spec.rb +99 -0
  940. data/spec/models/get_sms_campaign_stats_spec.rb +77 -0
  941. data/spec/models/get_sms_campaigns_spec.rb +47 -0
  942. data/spec/models/get_sms_event_report_events_spec.rb +81 -0
  943. data/spec/models/get_sms_event_report_spec.rb +41 -0
  944. data/spec/models/get_smtp_template_overview_sender_spec.rb +53 -0
  945. data/spec/models/get_smtp_template_overview_spec.rb +113 -0
  946. data/spec/models/get_smtp_templates_spec.rb +47 -0
  947. data/spec/models/get_sso_token_spec.rb +41 -0
  948. data/spec/models/get_stats_by_browser_spec.rb +35 -0
  949. data/spec/models/get_stats_by_device_spec.rb +59 -0
  950. data/spec/models/get_stats_by_domain_spec.rb +35 -0
  951. data/spec/models/get_transac_aggregated_sms_report_spec.rb +95 -0
  952. data/spec/models/get_transac_blocked_contacts_contacts_spec.rb +59 -0
  953. data/spec/models/get_transac_blocked_contacts_reason_spec.rb +51 -0
  954. data/spec/models/get_transac_blocked_contacts_spec.rb +47 -0
  955. data/spec/models/get_transac_email_content_events_spec.rb +47 -0
  956. data/spec/models/get_transac_email_content_spec.rb +77 -0
  957. data/spec/models/get_transac_emails_list_spec.rb +47 -0
  958. data/spec/models/get_transac_emails_list_transactional_emails_spec.rb +83 -0
  959. data/spec/models/get_transac_sms_report_reports_spec.rb +95 -0
  960. data/spec/models/get_transac_sms_report_spec.rb +41 -0
  961. data/spec/models/get_user_permission_privileges_spec.rb +47 -0
  962. data/spec/models/get_user_permission_spec.rb +53 -0
  963. data/spec/models/get_wa_templates_spec.rb +47 -0
  964. data/spec/models/get_wa_templates_templates_spec.rb +83 -0
  965. data/spec/models/get_webhook_spec.rb +81 -0
  966. data/spec/models/get_webhooks_spec.rb +41 -0
  967. data/spec/models/get_whats_app_config_spec.rb +79 -0
  968. data/spec/models/get_whatsapp_campaign_overview_spec.rb +93 -0
  969. data/spec/models/get_whatsapp_campaigns_campaigns_spec.rb +105 -0
  970. data/spec/models/get_whatsapp_campaigns_spec.rb +47 -0
  971. data/spec/models/get_whatsapp_event_report_events_spec.rb +87 -0
  972. data/spec/models/get_whatsapp_event_report_spec.rb +41 -0
  973. data/spec/models/inline_response_200_1_spec.rb +53 -0
  974. data/spec/models/inline_response_200_spec.rb +41 -0
  975. data/spec/models/inline_response_201_1_spec.rb +41 -0
  976. data/spec/models/inline_response_201_2_spec.rb +41 -0
  977. data/spec/models/inline_response_201_3_spec.rb +41 -0
  978. data/spec/models/inline_response_201_4_spec.rb +41 -0
  979. data/spec/models/inline_response_201_spec.rb +41 -0
  980. data/spec/models/manage_ip_spec.rb +41 -0
  981. data/spec/models/master_details_response_billing_info_address_spec.rb +65 -0
  982. data/spec/models/master_details_response_billing_info_name_spec.rb +47 -0
  983. data/spec/models/master_details_response_billing_info_spec.rb +59 -0
  984. data/spec/models/master_details_response_plan_info_features_spec.rb +65 -0
  985. data/spec/models/master_details_response_plan_info_spec.rb +75 -0
  986. data/spec/models/master_details_response_spec.rb +77 -0
  987. data/spec/models/note_data_spec.rb +59 -0
  988. data/spec/models/note_id_spec.rb +41 -0
  989. data/spec/models/note_list_spec.rb +35 -0
  990. data/spec/models/note_spec.rb +77 -0
  991. data/spec/models/order_batch_spec.rb +47 -0
  992. data/spec/models/order_billing_spec.rb +77 -0
  993. data/spec/models/order_products_spec.rb +59 -0
  994. data/spec/models/order_spec.rb +89 -0
  995. data/spec/models/otp_spec.rb +41 -0
  996. data/spec/models/pipeline_spec.rb +53 -0
  997. data/spec/models/pipeline_stage_spec.rb +47 -0
  998. data/spec/models/pipelines_spec.rb +35 -0
  999. data/spec/models/post_contact_info_contacts_spec.rb +59 -0
  1000. data/spec/models/post_contact_info_spec.rb +41 -0
  1001. data/spec/models/post_send_failed_spec.rb +65 -0
  1002. data/spec/models/post_send_sms_test_failed_spec.rb +59 -0
  1003. data/spec/models/remaining_credit_model_child_spec.rb +47 -0
  1004. data/spec/models/remaining_credit_model_reseller_spec.rb +47 -0
  1005. data/spec/models/remaining_credit_model_spec.rb +47 -0
  1006. data/spec/models/remove_contact_from_list_spec.rb +53 -0
  1007. data/spec/models/remove_credits_spec.rb +47 -0
  1008. data/spec/models/request_contact_export_custom_contact_filter_spec.rb +83 -0
  1009. data/spec/models/request_contact_export_spec.rb +53 -0
  1010. data/spec/models/request_contact_import_new_list_spec.rb +47 -0
  1011. data/spec/models/request_contact_import_spec.rb +95 -0
  1012. data/spec/models/request_sms_recipient_export_spec.rb +51 -0
  1013. data/spec/models/schedule_smtp_email_spec.rb +53 -0
  1014. data/spec/models/send_report_email_spec.rb +47 -0
  1015. data/spec/models/send_report_spec.rb +51 -0
  1016. data/spec/models/send_sms_spec.rb +65 -0
  1017. data/spec/models/send_smtp_email_attachment_spec.rb +53 -0
  1018. data/spec/models/send_smtp_email_bcc_spec.rb +47 -0
  1019. data/spec/models/send_smtp_email_cc_spec.rb +47 -0
  1020. data/spec/models/send_smtp_email_message_versions_spec.rb +71 -0
  1021. data/spec/models/send_smtp_email_reply_to_1_spec.rb +47 -0
  1022. data/spec/models/send_smtp_email_reply_to_spec.rb +47 -0
  1023. data/spec/models/send_smtp_email_sender_spec.rb +53 -0
  1024. data/spec/models/send_smtp_email_spec.rb +131 -0
  1025. data/spec/models/send_smtp_email_to_1_spec.rb +47 -0
  1026. data/spec/models/send_smtp_email_to_spec.rb +47 -0
  1027. data/spec/models/send_test_email_spec.rb +41 -0
  1028. data/spec/models/send_test_sms_spec.rb +41 -0
  1029. data/spec/models/send_transac_sms_spec.rb +87 -0
  1030. data/spec/models/send_whatsapp_message_spec.rb +59 -0
  1031. data/spec/models/sso_token_request_spec.rb +57 -0
  1032. data/spec/models/sub_account_details_response_plan_info_credits_emails_spec.rb +47 -0
  1033. data/spec/models/sub_account_details_response_plan_info_credits_spec.rb +47 -0
  1034. data/spec/models/sub_account_details_response_plan_info_features_inbox_spec.rb +47 -0
  1035. data/spec/models/sub_account_details_response_plan_info_features_landing_page_spec.rb +47 -0
  1036. data/spec/models/sub_account_details_response_plan_info_features_spec.rb +53 -0
  1037. data/spec/models/sub_account_details_response_plan_info_features_users_spec.rb +47 -0
  1038. data/spec/models/sub_account_details_response_plan_info_spec.rb +53 -0
  1039. data/spec/models/sub_account_details_response_spec.rb +59 -0
  1040. data/spec/models/sub_account_update_plan_request_credits_spec.rb +41 -0
  1041. data/spec/models/sub_account_update_plan_request_features_spec.rb +53 -0
  1042. data/spec/models/sub_account_update_plan_request_spec.rb +47 -0
  1043. data/spec/models/sub_accounts_response_spec.rb +47 -0
  1044. data/spec/models/sub_accounts_response_sub_accounts_spec.rb +59 -0
  1045. data/spec/models/task_list_spec.rb +41 -0
  1046. data/spec/models/task_reminder_spec.rb +57 -0
  1047. data/spec/models/task_spec.rb +71 -0
  1048. data/spec/models/task_types_spec.rb +47 -0
  1049. data/spec/models/update_attribute_enumeration_spec.rb +47 -0
  1050. data/spec/models/update_attribute_spec.rb +47 -0
  1051. data/spec/models/update_batch_contacts_contacts_spec.rb +95 -0
  1052. data/spec/models/update_batch_contacts_model_spec.rb +47 -0
  1053. data/spec/models/update_batch_contacts_spec.rb +41 -0
  1054. data/spec/models/update_campaign_status_spec.rb +45 -0
  1055. data/spec/models/update_child_account_status_spec.rb +59 -0
  1056. data/spec/models/update_child_domain_spec.rb +41 -0
  1057. data/spec/models/update_child_spec.rb +65 -0
  1058. data/spec/models/update_contact_spec.rb +77 -0
  1059. data/spec/models/update_coupon_collection_spec.rb +41 -0
  1060. data/spec/models/update_email_campaign_recipients_spec.rb +53 -0
  1061. data/spec/models/update_email_campaign_sender_spec.rb +53 -0
  1062. data/spec/models/update_email_campaign_spec.rb +219 -0
  1063. data/spec/models/update_external_feed_spec.rb +93 -0
  1064. data/spec/models/update_list_spec.rb +47 -0
  1065. data/spec/models/update_sender_spec.rb +53 -0
  1066. data/spec/models/update_sms_campaign_spec.rb +83 -0
  1067. data/spec/models/update_smtp_template_sender_spec.rb +53 -0
  1068. data/spec/models/update_smtp_template_spec.rb +95 -0
  1069. data/spec/models/update_webhook_spec.rb +63 -0
  1070. data/spec/models/update_whats_app_campaign_spec.rb +63 -0
  1071. data/spec/models/upload_image_model_spec.rb +41 -0
  1072. data/spec/models/upload_image_to_gallery_spec.rb +47 -0
  1073. data/spec/models/variables_items_spec.rb +53 -0
  1074. data/spec/models/whatsapp_camp_stats_spec.rb +65 -0
  1075. data/spec/models/whatsapp_camp_template_spec.rb +101 -0
  1076. data/spec/spec_helper.rb +111 -0
  1077. metadata +1675 -0
@@ -0,0 +1,1735 @@
1
+ =begin
2
+ #Brevo API
3
+
4
+ #Brevo 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/getbrevo **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
+
6
+ OpenAPI spec version: 3.0.0
7
+ Contact: contact@brevo.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.19
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module BrevoRuby
16
+ class ContactsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Set custom user_agent if explicitly passed in api
24
+ # default will still remain Swagger-Codegen/#{VERSION}/ruby
25
+ def setUserAgent(user_agent)
26
+ @user_agent = user_agent
27
+ if user_agent.is_a?(String) && user_agent.downcase.start_with?('brevo_')
28
+ @api_client.default_headers['User-Agent'] = @user_agent
29
+ end
30
+ end
31
+
32
+ # Add existing contacts to a list
33
+ # @param list_id Id of the list
34
+ # @param contact_emails Emails addresses OR IDs of the contacts
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [PostContactInfo]
37
+ def add_contact_to_list(list_id, contact_emails, opts = {})
38
+ data, _status_code, _headers = add_contact_to_list_with_http_info(list_id, contact_emails, opts)
39
+ data
40
+ end
41
+
42
+ # Add existing contacts to a list
43
+ # @param list_id Id of the list
44
+ # @param contact_emails Emails addresses OR IDs of the contacts
45
+ # @param [Hash] opts the optional parameters
46
+ # @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers
47
+ def add_contact_to_list_with_http_info(list_id, contact_emails, opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug 'Calling API: ContactsApi.add_contact_to_list ...'
50
+ end
51
+ # verify the required parameter 'list_id' is set
52
+ if @api_client.config.client_side_validation && list_id.nil?
53
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.add_contact_to_list"
54
+ end
55
+ # verify the required parameter 'contact_emails' is set
56
+ if @api_client.config.client_side_validation && contact_emails.nil?
57
+ fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ContactsApi.add_contact_to_list"
58
+ end
59
+ # resource path
60
+ local_var_path = '/contacts/lists/{listId}/contacts/add'.sub('{' + 'listId' + '}', list_id.to_s)
61
+
62
+ # query parameters
63
+ query_params = {}
64
+
65
+ # header parameters
66
+ header_params = {}
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
69
+ # HTTP header 'Content-Type'
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = @api_client.object_to_http_body(contact_emails)
77
+ auth_names = ['api-key', 'partner-key']
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'PostContactInfo')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: ContactsApi#add_contact_to_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+ # Create contact attribute
91
+ # @param attribute_category Category of the attribute
92
+ # @param attribute_name Name of the attribute
93
+ # @param create_attribute Values to create an attribute
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [nil]
96
+ def create_attribute(attribute_category, attribute_name, create_attribute, opts = {})
97
+ create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, opts)
98
+ nil
99
+ end
100
+
101
+ # Create contact attribute
102
+ # @param attribute_category Category of the attribute
103
+ # @param attribute_name Name of the attribute
104
+ # @param create_attribute Values to create an attribute
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
107
+ def create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_attribute ...'
110
+ end
111
+ # verify the required parameter 'attribute_category' is set
112
+ if @api_client.config.client_side_validation && attribute_category.nil?
113
+ fail ArgumentError, "Missing the required parameter 'attribute_category' when calling ContactsApi.create_attribute"
114
+ end
115
+ # verify enum value
116
+ if @api_client.config.client_side_validation && !['normal', 'transactional', 'category', 'calculated', 'global'].include?(attribute_category)
117
+ fail ArgumentError, "invalid value for 'attribute_category', must be one of normal, transactional, category, calculated, global"
118
+ end
119
+ # verify the required parameter 'attribute_name' is set
120
+ if @api_client.config.client_side_validation && attribute_name.nil?
121
+ fail ArgumentError, "Missing the required parameter 'attribute_name' when calling ContactsApi.create_attribute"
122
+ end
123
+ # verify the required parameter 'create_attribute' is set
124
+ if @api_client.config.client_side_validation && create_attribute.nil?
125
+ fail ArgumentError, "Missing the required parameter 'create_attribute' when calling ContactsApi.create_attribute"
126
+ end
127
+ # resource path
128
+ local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
129
+
130
+ # query parameters
131
+ query_params = {}
132
+
133
+ # header parameters
134
+ header_params = {}
135
+ # HTTP header 'Accept' (if needed)
136
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
137
+ # HTTP header 'Content-Type'
138
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
139
+
140
+ # form parameters
141
+ form_params = {}
142
+
143
+ # http body (model)
144
+ post_body = @api_client.object_to_http_body(create_attribute)
145
+ auth_names = ['api-key', 'partner-key']
146
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
147
+ :header_params => header_params,
148
+ :query_params => query_params,
149
+ :form_params => form_params,
150
+ :body => post_body,
151
+ :auth_names => auth_names)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: ContactsApi#create_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+ # Create a contact
158
+ # @param create_contact Values to create a contact
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [CreateUpdateContactModel]
161
+ def create_contact(create_contact, opts = {})
162
+ data, _status_code, _headers = create_contact_with_http_info(create_contact, opts)
163
+ data
164
+ end
165
+
166
+ # Create a contact
167
+ # @param create_contact Values to create a contact
168
+ # @param [Hash] opts the optional parameters
169
+ # @return [Array<(CreateUpdateContactModel, Fixnum, Hash)>] CreateUpdateContactModel data, response status code and response headers
170
+ def create_contact_with_http_info(create_contact, opts = {})
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_contact ...'
173
+ end
174
+ # verify the required parameter 'create_contact' is set
175
+ if @api_client.config.client_side_validation && create_contact.nil?
176
+ fail ArgumentError, "Missing the required parameter 'create_contact' when calling ContactsApi.create_contact"
177
+ end
178
+ # resource path
179
+ local_var_path = '/contacts'
180
+
181
+ # query parameters
182
+ query_params = {}
183
+
184
+ # header parameters
185
+ header_params = {}
186
+ # HTTP header 'Accept' (if needed)
187
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
188
+ # HTTP header 'Content-Type'
189
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
190
+
191
+ # form parameters
192
+ form_params = {}
193
+
194
+ # http body (model)
195
+ post_body = @api_client.object_to_http_body(create_contact)
196
+ auth_names = ['api-key', 'partner-key']
197
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names,
203
+ :return_type => 'CreateUpdateContactModel')
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: ContactsApi#create_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ return data, status_code, headers
208
+ end
209
+ # Create Contact via DOI (Double-Opt-In) Flow
210
+ # @param create_doi_contact Values to create the Double opt-in (DOI) contact
211
+ # @param [Hash] opts the optional parameters
212
+ # @return [nil]
213
+ def create_doi_contact(create_doi_contact, opts = {})
214
+ create_doi_contact_with_http_info(create_doi_contact, opts)
215
+ nil
216
+ end
217
+
218
+ # Create Contact via DOI (Double-Opt-In) Flow
219
+ # @param create_doi_contact Values to create the Double opt-in (DOI) contact
220
+ # @param [Hash] opts the optional parameters
221
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
222
+ def create_doi_contact_with_http_info(create_doi_contact, opts = {})
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_doi_contact ...'
225
+ end
226
+ # verify the required parameter 'create_doi_contact' is set
227
+ if @api_client.config.client_side_validation && create_doi_contact.nil?
228
+ fail ArgumentError, "Missing the required parameter 'create_doi_contact' when calling ContactsApi.create_doi_contact"
229
+ end
230
+ # resource path
231
+ local_var_path = '/contacts/doubleOptinConfirmation'
232
+
233
+ # query parameters
234
+ query_params = {}
235
+
236
+ # header parameters
237
+ header_params = {}
238
+ # HTTP header 'Accept' (if needed)
239
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
240
+ # HTTP header 'Content-Type'
241
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
242
+
243
+ # form parameters
244
+ form_params = {}
245
+
246
+ # http body (model)
247
+ post_body = @api_client.object_to_http_body(create_doi_contact)
248
+ auth_names = ['api-key', 'partner-key']
249
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
250
+ :header_params => header_params,
251
+ :query_params => query_params,
252
+ :form_params => form_params,
253
+ :body => post_body,
254
+ :auth_names => auth_names)
255
+ if @api_client.config.debugging
256
+ @api_client.config.logger.debug "API called: ContactsApi#create_doi_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
257
+ end
258
+ return data, status_code, headers
259
+ end
260
+ # Create a folder
261
+ # @param create_folder Name of the folder
262
+ # @param [Hash] opts the optional parameters
263
+ # @return [CreateModel]
264
+ def create_folder(create_folder, opts = {})
265
+ data, _status_code, _headers = create_folder_with_http_info(create_folder, opts)
266
+ data
267
+ end
268
+
269
+ # Create a folder
270
+ # @param create_folder Name of the folder
271
+ # @param [Hash] opts the optional parameters
272
+ # @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
273
+ def create_folder_with_http_info(create_folder, opts = {})
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_folder ...'
276
+ end
277
+ # verify the required parameter 'create_folder' is set
278
+ if @api_client.config.client_side_validation && create_folder.nil?
279
+ fail ArgumentError, "Missing the required parameter 'create_folder' when calling ContactsApi.create_folder"
280
+ end
281
+ # resource path
282
+ local_var_path = '/contacts/folders'
283
+
284
+ # query parameters
285
+ query_params = {}
286
+
287
+ # header parameters
288
+ header_params = {}
289
+ # HTTP header 'Accept' (if needed)
290
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
291
+ # HTTP header 'Content-Type'
292
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
293
+
294
+ # form parameters
295
+ form_params = {}
296
+
297
+ # http body (model)
298
+ post_body = @api_client.object_to_http_body(create_folder)
299
+ auth_names = ['api-key', 'partner-key']
300
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
301
+ :header_params => header_params,
302
+ :query_params => query_params,
303
+ :form_params => form_params,
304
+ :body => post_body,
305
+ :auth_names => auth_names,
306
+ :return_type => 'CreateModel')
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug "API called: ContactsApi#create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
309
+ end
310
+ return data, status_code, headers
311
+ end
312
+ # Create a list
313
+ # @param create_list Values to create a list
314
+ # @param [Hash] opts the optional parameters
315
+ # @return [CreateModel]
316
+ def create_list(create_list, opts = {})
317
+ data, _status_code, _headers = create_list_with_http_info(create_list, opts)
318
+ data
319
+ end
320
+
321
+ # Create a list
322
+ # @param create_list Values to create a list
323
+ # @param [Hash] opts the optional parameters
324
+ # @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
325
+ def create_list_with_http_info(create_list, opts = {})
326
+ if @api_client.config.debugging
327
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_list ...'
328
+ end
329
+ # verify the required parameter 'create_list' is set
330
+ if @api_client.config.client_side_validation && create_list.nil?
331
+ fail ArgumentError, "Missing the required parameter 'create_list' when calling ContactsApi.create_list"
332
+ end
333
+ # resource path
334
+ local_var_path = '/contacts/lists'
335
+
336
+ # query parameters
337
+ query_params = {}
338
+
339
+ # header parameters
340
+ header_params = {}
341
+ # HTTP header 'Accept' (if needed)
342
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
343
+ # HTTP header 'Content-Type'
344
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
345
+
346
+ # form parameters
347
+ form_params = {}
348
+
349
+ # http body (model)
350
+ post_body = @api_client.object_to_http_body(create_list)
351
+ auth_names = ['api-key', 'partner-key']
352
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
353
+ :header_params => header_params,
354
+ :query_params => query_params,
355
+ :form_params => form_params,
356
+ :body => post_body,
357
+ :auth_names => auth_names,
358
+ :return_type => 'CreateModel')
359
+ if @api_client.config.debugging
360
+ @api_client.config.logger.debug "API called: ContactsApi#create_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
361
+ end
362
+ return data, status_code, headers
363
+ end
364
+ # Delete an attribute
365
+ # @param attribute_category Category of the attribute
366
+ # @param attribute_name Name of the existing attribute
367
+ # @param [Hash] opts the optional parameters
368
+ # @return [nil]
369
+ def delete_attribute(attribute_category, attribute_name, opts = {})
370
+ delete_attribute_with_http_info(attribute_category, attribute_name, opts)
371
+ nil
372
+ end
373
+
374
+ # Delete an attribute
375
+ # @param attribute_category Category of the attribute
376
+ # @param attribute_name Name of the existing attribute
377
+ # @param [Hash] opts the optional parameters
378
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
379
+ def delete_attribute_with_http_info(attribute_category, attribute_name, opts = {})
380
+ if @api_client.config.debugging
381
+ @api_client.config.logger.debug 'Calling API: ContactsApi.delete_attribute ...'
382
+ end
383
+ # verify the required parameter 'attribute_category' is set
384
+ if @api_client.config.client_side_validation && attribute_category.nil?
385
+ fail ArgumentError, "Missing the required parameter 'attribute_category' when calling ContactsApi.delete_attribute"
386
+ end
387
+ # verify enum value
388
+ if @api_client.config.client_side_validation && !['normal', 'transactional', 'category', 'calculated', 'global'].include?(attribute_category)
389
+ fail ArgumentError, "invalid value for 'attribute_category', must be one of normal, transactional, category, calculated, global"
390
+ end
391
+ # verify the required parameter 'attribute_name' is set
392
+ if @api_client.config.client_side_validation && attribute_name.nil?
393
+ fail ArgumentError, "Missing the required parameter 'attribute_name' when calling ContactsApi.delete_attribute"
394
+ end
395
+ # resource path
396
+ local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
397
+
398
+ # query parameters
399
+ query_params = {}
400
+
401
+ # header parameters
402
+ header_params = {}
403
+ # HTTP header 'Accept' (if needed)
404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
405
+ # HTTP header 'Content-Type'
406
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
407
+
408
+ # form parameters
409
+ form_params = {}
410
+
411
+ # http body (model)
412
+ post_body = nil
413
+ auth_names = ['api-key', 'partner-key']
414
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
415
+ :header_params => header_params,
416
+ :query_params => query_params,
417
+ :form_params => form_params,
418
+ :body => post_body,
419
+ :auth_names => auth_names)
420
+ if @api_client.config.debugging
421
+ @api_client.config.logger.debug "API called: ContactsApi#delete_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
422
+ end
423
+ return data, status_code, headers
424
+ end
425
+ # Delete a contact
426
+ # @param identifier Email (urlencoded) OR ID of the contact
427
+ # @param [Hash] opts the optional parameters
428
+ # @return [nil]
429
+ def delete_contact(identifier, opts = {})
430
+ delete_contact_with_http_info(identifier, opts)
431
+ nil
432
+ end
433
+
434
+ # Delete a contact
435
+ # @param identifier Email (urlencoded) OR ID of the contact
436
+ # @param [Hash] opts the optional parameters
437
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
438
+ def delete_contact_with_http_info(identifier, opts = {})
439
+ if @api_client.config.debugging
440
+ @api_client.config.logger.debug 'Calling API: ContactsApi.delete_contact ...'
441
+ end
442
+ # verify the required parameter 'identifier' is set
443
+ if @api_client.config.client_side_validation && identifier.nil?
444
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactsApi.delete_contact"
445
+ end
446
+ # resource path
447
+ local_var_path = '/contacts/{identifier}'.sub('{' + 'identifier' + '}', identifier.to_s)
448
+
449
+ # query parameters
450
+ query_params = {}
451
+
452
+ # header parameters
453
+ header_params = {}
454
+ # HTTP header 'Accept' (if needed)
455
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
456
+ # HTTP header 'Content-Type'
457
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
458
+
459
+ # form parameters
460
+ form_params = {}
461
+
462
+ # http body (model)
463
+ post_body = nil
464
+ auth_names = ['api-key', 'partner-key']
465
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
466
+ :header_params => header_params,
467
+ :query_params => query_params,
468
+ :form_params => form_params,
469
+ :body => post_body,
470
+ :auth_names => auth_names)
471
+ if @api_client.config.debugging
472
+ @api_client.config.logger.debug "API called: ContactsApi#delete_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
473
+ end
474
+ return data, status_code, headers
475
+ end
476
+ # Delete a folder (and all its lists)
477
+ # @param folder_id Id of the folder
478
+ # @param [Hash] opts the optional parameters
479
+ # @return [nil]
480
+ def delete_folder(folder_id, opts = {})
481
+ delete_folder_with_http_info(folder_id, opts)
482
+ nil
483
+ end
484
+
485
+ # Delete a folder (and all its lists)
486
+ # @param folder_id Id of the folder
487
+ # @param [Hash] opts the optional parameters
488
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
489
+ def delete_folder_with_http_info(folder_id, opts = {})
490
+ if @api_client.config.debugging
491
+ @api_client.config.logger.debug 'Calling API: ContactsApi.delete_folder ...'
492
+ end
493
+ # verify the required parameter 'folder_id' is set
494
+ if @api_client.config.client_side_validation && folder_id.nil?
495
+ fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.delete_folder"
496
+ end
497
+ # resource path
498
+ local_var_path = '/contacts/folders/{folderId}'.sub('{' + 'folderId' + '}', folder_id.to_s)
499
+
500
+ # query parameters
501
+ query_params = {}
502
+
503
+ # header parameters
504
+ header_params = {}
505
+ # HTTP header 'Accept' (if needed)
506
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
507
+ # HTTP header 'Content-Type'
508
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
509
+
510
+ # form parameters
511
+ form_params = {}
512
+
513
+ # http body (model)
514
+ post_body = nil
515
+ auth_names = ['api-key', 'partner-key']
516
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
517
+ :header_params => header_params,
518
+ :query_params => query_params,
519
+ :form_params => form_params,
520
+ :body => post_body,
521
+ :auth_names => auth_names)
522
+ if @api_client.config.debugging
523
+ @api_client.config.logger.debug "API called: ContactsApi#delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
524
+ end
525
+ return data, status_code, headers
526
+ end
527
+ # Delete a list
528
+ # @param list_id Id of the list
529
+ # @param [Hash] opts the optional parameters
530
+ # @return [nil]
531
+ def delete_list(list_id, opts = {})
532
+ delete_list_with_http_info(list_id, opts)
533
+ nil
534
+ end
535
+
536
+ # Delete a list
537
+ # @param list_id Id of the list
538
+ # @param [Hash] opts the optional parameters
539
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
540
+ def delete_list_with_http_info(list_id, opts = {})
541
+ if @api_client.config.debugging
542
+ @api_client.config.logger.debug 'Calling API: ContactsApi.delete_list ...'
543
+ end
544
+ # verify the required parameter 'list_id' is set
545
+ if @api_client.config.client_side_validation && list_id.nil?
546
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.delete_list"
547
+ end
548
+ # resource path
549
+ local_var_path = '/contacts/lists/{listId}'.sub('{' + 'listId' + '}', list_id.to_s)
550
+
551
+ # query parameters
552
+ query_params = {}
553
+
554
+ # header parameters
555
+ header_params = {}
556
+ # HTTP header 'Accept' (if needed)
557
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
558
+ # HTTP header 'Content-Type'
559
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
560
+
561
+ # form parameters
562
+ form_params = {}
563
+
564
+ # http body (model)
565
+ post_body = nil
566
+ auth_names = ['api-key', 'partner-key']
567
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
568
+ :header_params => header_params,
569
+ :query_params => query_params,
570
+ :form_params => form_params,
571
+ :body => post_body,
572
+ :auth_names => auth_names)
573
+ if @api_client.config.debugging
574
+ @api_client.config.logger.debug "API called: ContactsApi#delete_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
575
+ end
576
+ return data, status_code, headers
577
+ end
578
+ # List all attributes
579
+ # @param [Hash] opts the optional parameters
580
+ # @return [GetAttributes]
581
+ def get_attributes(opts = {})
582
+ data, _status_code, _headers = get_attributes_with_http_info(opts)
583
+ data
584
+ end
585
+
586
+ # List all attributes
587
+ # @param [Hash] opts the optional parameters
588
+ # @return [Array<(GetAttributes, Fixnum, Hash)>] GetAttributes data, response status code and response headers
589
+ def get_attributes_with_http_info(opts = {})
590
+ if @api_client.config.debugging
591
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_attributes ...'
592
+ end
593
+ # resource path
594
+ local_var_path = '/contacts/attributes'
595
+
596
+ # query parameters
597
+ query_params = {}
598
+
599
+ # header parameters
600
+ header_params = {}
601
+ # HTTP header 'Accept' (if needed)
602
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
603
+ # HTTP header 'Content-Type'
604
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
605
+
606
+ # form parameters
607
+ form_params = {}
608
+
609
+ # http body (model)
610
+ post_body = nil
611
+ auth_names = ['api-key', 'partner-key']
612
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
613
+ :header_params => header_params,
614
+ :query_params => query_params,
615
+ :form_params => form_params,
616
+ :body => post_body,
617
+ :auth_names => auth_names,
618
+ :return_type => 'GetAttributes')
619
+ if @api_client.config.debugging
620
+ @api_client.config.logger.debug "API called: ContactsApi#get_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
621
+ end
622
+ return data, status_code, headers
623
+ end
624
+ # Get a contact's details
625
+ # Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.brevo.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges.
626
+ # @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value
627
+ # @param [Hash] opts the optional parameters
628
+ # @option opts [String] :start_date **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
629
+ # @option opts [String] :end_date **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate.
630
+ # @return [GetExtendedContactDetails]
631
+ def get_contact_info(identifier, opts = {})
632
+ data, _status_code, _headers = get_contact_info_with_http_info(identifier, opts)
633
+ data
634
+ end
635
+
636
+ # Get a contact&#39;s details
637
+ # Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.brevo.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges.
638
+ # @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value
639
+ # @param [Hash] opts the optional parameters
640
+ # @option opts [String] :start_date **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
641
+ # @option opts [String] :end_date **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate.
642
+ # @return [Array<(GetExtendedContactDetails, Fixnum, Hash)>] GetExtendedContactDetails data, response status code and response headers
643
+ def get_contact_info_with_http_info(identifier, opts = {})
644
+ if @api_client.config.debugging
645
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact_info ...'
646
+ end
647
+ # verify the required parameter 'identifier' is set
648
+ if @api_client.config.client_side_validation && identifier.nil?
649
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactsApi.get_contact_info"
650
+ end
651
+ # resource path
652
+ local_var_path = '/contacts/{identifier}'.sub('{' + 'identifier' + '}', identifier.to_s)
653
+
654
+ # query parameters
655
+ query_params = {}
656
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
657
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
658
+
659
+ # header parameters
660
+ header_params = {}
661
+ # HTTP header 'Accept' (if needed)
662
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
663
+ # HTTP header 'Content-Type'
664
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
665
+
666
+ # form parameters
667
+ form_params = {}
668
+
669
+ # http body (model)
670
+ post_body = nil
671
+ auth_names = ['api-key', 'partner-key']
672
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
673
+ :header_params => header_params,
674
+ :query_params => query_params,
675
+ :form_params => form_params,
676
+ :body => post_body,
677
+ :auth_names => auth_names,
678
+ :return_type => 'GetExtendedContactDetails')
679
+ if @api_client.config.debugging
680
+ @api_client.config.logger.debug "API called: ContactsApi#get_contact_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
681
+ end
682
+ return data, status_code, headers
683
+ end
684
+ # Get email campaigns' statistics for a contact
685
+ # @param identifier Email (urlencoded) OR ID of the contact
686
+ # @param [Hash] opts the optional parameters
687
+ # @option opts [String] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
688
+ # @option opts [String] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days
689
+ # @return [GetContactCampaignStats]
690
+ def get_contact_stats(identifier, opts = {})
691
+ data, _status_code, _headers = get_contact_stats_with_http_info(identifier, opts)
692
+ data
693
+ end
694
+
695
+ # Get email campaigns&#39; statistics for a contact
696
+ # @param identifier Email (urlencoded) OR ID of the contact
697
+ # @param [Hash] opts the optional parameters
698
+ # @option opts [String] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
699
+ # @option opts [String] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days
700
+ # @return [Array<(GetContactCampaignStats, Fixnum, Hash)>] GetContactCampaignStats data, response status code and response headers
701
+ def get_contact_stats_with_http_info(identifier, opts = {})
702
+ if @api_client.config.debugging
703
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact_stats ...'
704
+ end
705
+ # verify the required parameter 'identifier' is set
706
+ if @api_client.config.client_side_validation && identifier.nil?
707
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactsApi.get_contact_stats"
708
+ end
709
+ # resource path
710
+ local_var_path = '/contacts/{identifier}/campaignStats'.sub('{' + 'identifier' + '}', identifier.to_s)
711
+
712
+ # query parameters
713
+ query_params = {}
714
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
715
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
716
+
717
+ # header parameters
718
+ header_params = {}
719
+ # HTTP header 'Accept' (if needed)
720
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
721
+ # HTTP header 'Content-Type'
722
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
723
+
724
+ # form parameters
725
+ form_params = {}
726
+
727
+ # http body (model)
728
+ post_body = nil
729
+ auth_names = ['api-key', 'partner-key']
730
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
731
+ :header_params => header_params,
732
+ :query_params => query_params,
733
+ :form_params => form_params,
734
+ :body => post_body,
735
+ :auth_names => auth_names,
736
+ :return_type => 'GetContactCampaignStats')
737
+ if @api_client.config.debugging
738
+ @api_client.config.logger.debug "API called: ContactsApi#get_contact_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
739
+ end
740
+ return data, status_code, headers
741
+ end
742
+ # Get all the contacts
743
+ # @param [Hash] opts the optional parameters
744
+ # @option opts [Integer] :limit Number of documents per page (default to 50)
745
+ # @option opts [Integer] :offset Index of the first document of the page (default to 0)
746
+ # @option opts [String] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
747
+ # @option opts [String] :created_since Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
748
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (default to desc)
749
+ # @return [GetContacts]
750
+ def get_contacts(opts = {})
751
+ data, _status_code, _headers = get_contacts_with_http_info(opts)
752
+ data
753
+ end
754
+
755
+ # Get all the contacts
756
+ # @param [Hash] opts the optional parameters
757
+ # @option opts [Integer] :limit Number of documents per page
758
+ # @option opts [Integer] :offset Index of the first document of the page
759
+ # @option opts [String] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
760
+ # @option opts [String] :created_since Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
761
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed
762
+ # @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
763
+ def get_contacts_with_http_info(opts = {})
764
+ if @api_client.config.debugging
765
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contacts ...'
766
+ end
767
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
768
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts, must be smaller than or equal to 1000.'
769
+ end
770
+
771
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
772
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts, must be greater than or equal to 0.'
773
+ end
774
+
775
+ if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
776
+ fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
777
+ end
778
+ # resource path
779
+ local_var_path = '/contacts'
780
+
781
+ # query parameters
782
+ query_params = {}
783
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
784
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
785
+ query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
786
+ query_params[:'createdSince'] = opts[:'created_since'] if !opts[:'created_since'].nil?
787
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
788
+
789
+ # header parameters
790
+ header_params = {}
791
+ # HTTP header 'Accept' (if needed)
792
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
793
+ # HTTP header 'Content-Type'
794
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
795
+
796
+ # form parameters
797
+ form_params = {}
798
+
799
+ # http body (model)
800
+ post_body = nil
801
+ auth_names = ['api-key', 'partner-key']
802
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
803
+ :header_params => header_params,
804
+ :query_params => query_params,
805
+ :form_params => form_params,
806
+ :body => post_body,
807
+ :auth_names => auth_names,
808
+ :return_type => 'GetContacts')
809
+ if @api_client.config.debugging
810
+ @api_client.config.logger.debug "API called: ContactsApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
811
+ end
812
+ return data, status_code, headers
813
+ end
814
+ # Get contacts in a list
815
+ # @param list_id Id of the list
816
+ # @param [Hash] opts the optional parameters
817
+ # @option opts [String] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
818
+ # @option opts [Integer] :limit Number of documents per page (default to 50)
819
+ # @option opts [Integer] :offset Index of the first document of the page (default to 0)
820
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (default to desc)
821
+ # @return [GetContacts]
822
+ def get_contacts_from_list(list_id, opts = {})
823
+ data, _status_code, _headers = get_contacts_from_list_with_http_info(list_id, opts)
824
+ data
825
+ end
826
+
827
+ # Get contacts in a list
828
+ # @param list_id Id of the list
829
+ # @param [Hash] opts the optional parameters
830
+ # @option opts [String] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
831
+ # @option opts [Integer] :limit Number of documents per page
832
+ # @option opts [Integer] :offset Index of the first document of the page
833
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed
834
+ # @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
835
+ def get_contacts_from_list_with_http_info(list_id, opts = {})
836
+ if @api_client.config.debugging
837
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contacts_from_list ...'
838
+ end
839
+ # verify the required parameter 'list_id' is set
840
+ if @api_client.config.client_side_validation && list_id.nil?
841
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.get_contacts_from_list"
842
+ end
843
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
844
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts_from_list, must be smaller than or equal to 500.'
845
+ end
846
+
847
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
848
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts_from_list, must be greater than or equal to 0.'
849
+ end
850
+
851
+ if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
852
+ fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
853
+ end
854
+ # resource path
855
+ local_var_path = '/contacts/lists/{listId}/contacts'.sub('{' + 'listId' + '}', list_id.to_s)
856
+
857
+ # query parameters
858
+ query_params = {}
859
+ query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
860
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
861
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
862
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
863
+
864
+ # header parameters
865
+ header_params = {}
866
+ # HTTP header 'Accept' (if needed)
867
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
868
+ # HTTP header 'Content-Type'
869
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
870
+
871
+ # form parameters
872
+ form_params = {}
873
+
874
+ # http body (model)
875
+ post_body = nil
876
+ auth_names = ['api-key', 'partner-key']
877
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
878
+ :header_params => header_params,
879
+ :query_params => query_params,
880
+ :form_params => form_params,
881
+ :body => post_body,
882
+ :auth_names => auth_names,
883
+ :return_type => 'GetContacts')
884
+ if @api_client.config.debugging
885
+ @api_client.config.logger.debug "API called: ContactsApi#get_contacts_from_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
886
+ end
887
+ return data, status_code, headers
888
+ end
889
+ # Returns a folder's details
890
+ # @param folder_id id of the folder
891
+ # @param [Hash] opts the optional parameters
892
+ # @return [GetFolder]
893
+ def get_folder(folder_id, opts = {})
894
+ data, _status_code, _headers = get_folder_with_http_info(folder_id, opts)
895
+ data
896
+ end
897
+
898
+ # Returns a folder&#39;s details
899
+ # @param folder_id id of the folder
900
+ # @param [Hash] opts the optional parameters
901
+ # @return [Array<(GetFolder, Fixnum, Hash)>] GetFolder data, response status code and response headers
902
+ def get_folder_with_http_info(folder_id, opts = {})
903
+ if @api_client.config.debugging
904
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_folder ...'
905
+ end
906
+ # verify the required parameter 'folder_id' is set
907
+ if @api_client.config.client_side_validation && folder_id.nil?
908
+ fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.get_folder"
909
+ end
910
+ # resource path
911
+ local_var_path = '/contacts/folders/{folderId}'.sub('{' + 'folderId' + '}', folder_id.to_s)
912
+
913
+ # query parameters
914
+ query_params = {}
915
+
916
+ # header parameters
917
+ header_params = {}
918
+ # HTTP header 'Accept' (if needed)
919
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
920
+ # HTTP header 'Content-Type'
921
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
922
+
923
+ # form parameters
924
+ form_params = {}
925
+
926
+ # http body (model)
927
+ post_body = nil
928
+ auth_names = ['api-key', 'partner-key']
929
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
930
+ :header_params => header_params,
931
+ :query_params => query_params,
932
+ :form_params => form_params,
933
+ :body => post_body,
934
+ :auth_names => auth_names,
935
+ :return_type => 'GetFolder')
936
+ if @api_client.config.debugging
937
+ @api_client.config.logger.debug "API called: ContactsApi#get_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
938
+ end
939
+ return data, status_code, headers
940
+ end
941
+ # Get lists in a folder
942
+ # @param folder_id Id of the folder
943
+ # @param [Hash] opts the optional parameters
944
+ # @option opts [Integer] :limit Number of documents per page (default to 10)
945
+ # @option opts [Integer] :offset Index of the first document of the page (default to 0)
946
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (default to desc)
947
+ # @return [GetFolderLists]
948
+ def get_folder_lists(folder_id, opts = {})
949
+ data, _status_code, _headers = get_folder_lists_with_http_info(folder_id, opts)
950
+ data
951
+ end
952
+
953
+ # Get lists in a folder
954
+ # @param folder_id Id of the folder
955
+ # @param [Hash] opts the optional parameters
956
+ # @option opts [Integer] :limit Number of documents per page
957
+ # @option opts [Integer] :offset Index of the first document of the page
958
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed
959
+ # @return [Array<(GetFolderLists, Fixnum, Hash)>] GetFolderLists data, response status code and response headers
960
+ def get_folder_lists_with_http_info(folder_id, opts = {})
961
+ if @api_client.config.debugging
962
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_folder_lists ...'
963
+ end
964
+ # verify the required parameter 'folder_id' is set
965
+ if @api_client.config.client_side_validation && folder_id.nil?
966
+ fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.get_folder_lists"
967
+ end
968
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
969
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_folder_lists, must be smaller than or equal to 50.'
970
+ end
971
+
972
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
973
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_folder_lists, must be greater than or equal to 0.'
974
+ end
975
+
976
+ if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
977
+ fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
978
+ end
979
+ # resource path
980
+ local_var_path = '/contacts/folders/{folderId}/lists'.sub('{' + 'folderId' + '}', folder_id.to_s)
981
+
982
+ # query parameters
983
+ query_params = {}
984
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
985
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
986
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
987
+
988
+ # header parameters
989
+ header_params = {}
990
+ # HTTP header 'Accept' (if needed)
991
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
992
+ # HTTP header 'Content-Type'
993
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
994
+
995
+ # form parameters
996
+ form_params = {}
997
+
998
+ # http body (model)
999
+ post_body = nil
1000
+ auth_names = ['api-key', 'partner-key']
1001
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1002
+ :header_params => header_params,
1003
+ :query_params => query_params,
1004
+ :form_params => form_params,
1005
+ :body => post_body,
1006
+ :auth_names => auth_names,
1007
+ :return_type => 'GetFolderLists')
1008
+ if @api_client.config.debugging
1009
+ @api_client.config.logger.debug "API called: ContactsApi#get_folder_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1010
+ end
1011
+ return data, status_code, headers
1012
+ end
1013
+ # Get all folders
1014
+ # @param limit Number of documents per page
1015
+ # @param offset Index of the first document of the page
1016
+ # @param [Hash] opts the optional parameters
1017
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (default to desc)
1018
+ # @return [GetFolders]
1019
+ def get_folders(limit, offset, opts = {})
1020
+ data, _status_code, _headers = get_folders_with_http_info(limit, offset, opts)
1021
+ data
1022
+ end
1023
+
1024
+ # Get all folders
1025
+ # @param limit Number of documents per page
1026
+ # @param offset Index of the first document of the page
1027
+ # @param [Hash] opts the optional parameters
1028
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed
1029
+ # @return [Array<(GetFolders, Fixnum, Hash)>] GetFolders data, response status code and response headers
1030
+ def get_folders_with_http_info(limit, offset, opts = {})
1031
+ if @api_client.config.debugging
1032
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_folders ...'
1033
+ end
1034
+ # verify the required parameter 'limit' is set
1035
+ if @api_client.config.client_side_validation && limit.nil?
1036
+ fail ArgumentError, "Missing the required parameter 'limit' when calling ContactsApi.get_folders"
1037
+ end
1038
+ if @api_client.config.client_side_validation && limit > 50
1039
+ fail ArgumentError, 'invalid value for "limit" when calling ContactsApi.get_folders, must be smaller than or equal to 50.'
1040
+ end
1041
+
1042
+ if @api_client.config.client_side_validation && limit < 0
1043
+ fail ArgumentError, 'invalid value for "limit" when calling ContactsApi.get_folders, must be greater than or equal to 0.'
1044
+ end
1045
+
1046
+ # verify the required parameter 'offset' is set
1047
+ if @api_client.config.client_side_validation && offset.nil?
1048
+ fail ArgumentError, "Missing the required parameter 'offset' when calling ContactsApi.get_folders"
1049
+ end
1050
+ if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
1051
+ fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
1052
+ end
1053
+ # resource path
1054
+ local_var_path = '/contacts/folders'
1055
+
1056
+ # query parameters
1057
+ query_params = {}
1058
+ query_params[:'limit'] = limit
1059
+ query_params[:'offset'] = offset
1060
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1061
+
1062
+ # header parameters
1063
+ header_params = {}
1064
+ # HTTP header 'Accept' (if needed)
1065
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1066
+ # HTTP header 'Content-Type'
1067
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1068
+
1069
+ # form parameters
1070
+ form_params = {}
1071
+
1072
+ # http body (model)
1073
+ post_body = nil
1074
+ auth_names = ['api-key', 'partner-key']
1075
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1076
+ :header_params => header_params,
1077
+ :query_params => query_params,
1078
+ :form_params => form_params,
1079
+ :body => post_body,
1080
+ :auth_names => auth_names,
1081
+ :return_type => 'GetFolders')
1082
+ if @api_client.config.debugging
1083
+ @api_client.config.logger.debug "API called: ContactsApi#get_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1084
+ end
1085
+ return data, status_code, headers
1086
+ end
1087
+ # Get a list's details
1088
+ # @param list_id Id of the list
1089
+ # @param [Hash] opts the optional parameters
1090
+ # @return [GetExtendedList]
1091
+ def get_list(list_id, opts = {})
1092
+ data, _status_code, _headers = get_list_with_http_info(list_id, opts)
1093
+ data
1094
+ end
1095
+
1096
+ # Get a list&#39;s details
1097
+ # @param list_id Id of the list
1098
+ # @param [Hash] opts the optional parameters
1099
+ # @return [Array<(GetExtendedList, Fixnum, Hash)>] GetExtendedList data, response status code and response headers
1100
+ def get_list_with_http_info(list_id, opts = {})
1101
+ if @api_client.config.debugging
1102
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_list ...'
1103
+ end
1104
+ # verify the required parameter 'list_id' is set
1105
+ if @api_client.config.client_side_validation && list_id.nil?
1106
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.get_list"
1107
+ end
1108
+ # resource path
1109
+ local_var_path = '/contacts/lists/{listId}'.sub('{' + 'listId' + '}', list_id.to_s)
1110
+
1111
+ # query parameters
1112
+ query_params = {}
1113
+
1114
+ # header parameters
1115
+ header_params = {}
1116
+ # HTTP header 'Accept' (if needed)
1117
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1118
+ # HTTP header 'Content-Type'
1119
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1120
+
1121
+ # form parameters
1122
+ form_params = {}
1123
+
1124
+ # http body (model)
1125
+ post_body = nil
1126
+ auth_names = ['api-key', 'partner-key']
1127
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1128
+ :header_params => header_params,
1129
+ :query_params => query_params,
1130
+ :form_params => form_params,
1131
+ :body => post_body,
1132
+ :auth_names => auth_names,
1133
+ :return_type => 'GetExtendedList')
1134
+ if @api_client.config.debugging
1135
+ @api_client.config.logger.debug "API called: ContactsApi#get_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1136
+ end
1137
+ return data, status_code, headers
1138
+ end
1139
+ # Get all the lists
1140
+ # @param [Hash] opts the optional parameters
1141
+ # @option opts [Integer] :limit Number of documents per page (default to 10)
1142
+ # @option opts [Integer] :offset Index of the first document of the page (default to 0)
1143
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (default to desc)
1144
+ # @return [GetLists]
1145
+ def get_lists(opts = {})
1146
+ data, _status_code, _headers = get_lists_with_http_info(opts)
1147
+ data
1148
+ end
1149
+
1150
+ # Get all the lists
1151
+ # @param [Hash] opts the optional parameters
1152
+ # @option opts [Integer] :limit Number of documents per page
1153
+ # @option opts [Integer] :offset Index of the first document of the page
1154
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed
1155
+ # @return [Array<(GetLists, Fixnum, Hash)>] GetLists data, response status code and response headers
1156
+ def get_lists_with_http_info(opts = {})
1157
+ if @api_client.config.debugging
1158
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_lists ...'
1159
+ end
1160
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
1161
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_lists, must be smaller than or equal to 50.'
1162
+ end
1163
+
1164
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
1165
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_lists, must be greater than or equal to 0.'
1166
+ end
1167
+
1168
+ if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
1169
+ fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
1170
+ end
1171
+ # resource path
1172
+ local_var_path = '/contacts/lists'
1173
+
1174
+ # query parameters
1175
+ query_params = {}
1176
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1177
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1178
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1179
+
1180
+ # header parameters
1181
+ header_params = {}
1182
+ # HTTP header 'Accept' (if needed)
1183
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1184
+ # HTTP header 'Content-Type'
1185
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1186
+
1187
+ # form parameters
1188
+ form_params = {}
1189
+
1190
+ # http body (model)
1191
+ post_body = nil
1192
+ auth_names = ['api-key', 'partner-key']
1193
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1194
+ :header_params => header_params,
1195
+ :query_params => query_params,
1196
+ :form_params => form_params,
1197
+ :body => post_body,
1198
+ :auth_names => auth_names,
1199
+ :return_type => 'GetLists')
1200
+ if @api_client.config.debugging
1201
+ @api_client.config.logger.debug "API called: ContactsApi#get_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1202
+ end
1203
+ return data, status_code, headers
1204
+ end
1205
+ # Get all the Segments
1206
+ # @param limit Number of documents per page
1207
+ # @param offset Index of the first document of the page
1208
+ # @param [Hash] opts the optional parameters
1209
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (default to desc)
1210
+ # @return [GetSegments]
1211
+ def get_segments(limit, offset, opts = {})
1212
+ data, _status_code, _headers = get_segments_with_http_info(limit, offset, opts)
1213
+ data
1214
+ end
1215
+
1216
+ # Get all the Segments
1217
+ # @param limit Number of documents per page
1218
+ # @param offset Index of the first document of the page
1219
+ # @param [Hash] opts the optional parameters
1220
+ # @option opts [String] :sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed
1221
+ # @return [Array<(GetSegments, Fixnum, Hash)>] GetSegments data, response status code and response headers
1222
+ def get_segments_with_http_info(limit, offset, opts = {})
1223
+ if @api_client.config.debugging
1224
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_segments ...'
1225
+ end
1226
+ # verify the required parameter 'limit' is set
1227
+ if @api_client.config.client_side_validation && limit.nil?
1228
+ fail ArgumentError, "Missing the required parameter 'limit' when calling ContactsApi.get_segments"
1229
+ end
1230
+ if @api_client.config.client_side_validation && limit > 50
1231
+ fail ArgumentError, 'invalid value for "limit" when calling ContactsApi.get_segments, must be smaller than or equal to 50.'
1232
+ end
1233
+
1234
+ if @api_client.config.client_side_validation && limit < 0
1235
+ fail ArgumentError, 'invalid value for "limit" when calling ContactsApi.get_segments, must be greater than or equal to 0.'
1236
+ end
1237
+
1238
+ # verify the required parameter 'offset' is set
1239
+ if @api_client.config.client_side_validation && offset.nil?
1240
+ fail ArgumentError, "Missing the required parameter 'offset' when calling ContactsApi.get_segments"
1241
+ end
1242
+ if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
1243
+ fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
1244
+ end
1245
+ # resource path
1246
+ local_var_path = '/contacts/segments'
1247
+
1248
+ # query parameters
1249
+ query_params = {}
1250
+ query_params[:'limit'] = limit
1251
+ query_params[:'offset'] = offset
1252
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1253
+
1254
+ # header parameters
1255
+ header_params = {}
1256
+ # HTTP header 'Accept' (if needed)
1257
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1258
+ # HTTP header 'Content-Type'
1259
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1260
+
1261
+ # form parameters
1262
+ form_params = {}
1263
+
1264
+ # http body (model)
1265
+ post_body = nil
1266
+ auth_names = ['api-key', 'partner-key']
1267
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1268
+ :header_params => header_params,
1269
+ :query_params => query_params,
1270
+ :form_params => form_params,
1271
+ :body => post_body,
1272
+ :auth_names => auth_names,
1273
+ :return_type => 'GetSegments')
1274
+ if @api_client.config.debugging
1275
+ @api_client.config.logger.debug "API called: ContactsApi#get_segments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1276
+ end
1277
+ return data, status_code, headers
1278
+ end
1279
+ # Import contacts
1280
+ # It returns the background process ID which on completion calls the notify URL that you have set in the input.
1281
+ # @param request_contact_import Values to import contacts in Brevo. To know more about the expected format, please have a look at &#x60;&#x60;https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns&#x60;&#x60;
1282
+ # @param [Hash] opts the optional parameters
1283
+ # @return [CreatedProcessId]
1284
+ def import_contacts(request_contact_import, opts = {})
1285
+ data, _status_code, _headers = import_contacts_with_http_info(request_contact_import, opts)
1286
+ data
1287
+ end
1288
+
1289
+ # Import contacts
1290
+ # It returns the background process ID which on completion calls the notify URL that you have set in the input.
1291
+ # @param request_contact_import Values to import contacts in Brevo. To know more about the expected format, please have a look at &#x60;&#x60;https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns&#x60;&#x60;
1292
+ # @param [Hash] opts the optional parameters
1293
+ # @return [Array<(CreatedProcessId, Fixnum, Hash)>] CreatedProcessId data, response status code and response headers
1294
+ def import_contacts_with_http_info(request_contact_import, opts = {})
1295
+ if @api_client.config.debugging
1296
+ @api_client.config.logger.debug 'Calling API: ContactsApi.import_contacts ...'
1297
+ end
1298
+ # verify the required parameter 'request_contact_import' is set
1299
+ if @api_client.config.client_side_validation && request_contact_import.nil?
1300
+ fail ArgumentError, "Missing the required parameter 'request_contact_import' when calling ContactsApi.import_contacts"
1301
+ end
1302
+ # resource path
1303
+ local_var_path = '/contacts/import'
1304
+
1305
+ # query parameters
1306
+ query_params = {}
1307
+
1308
+ # header parameters
1309
+ header_params = {}
1310
+ # HTTP header 'Accept' (if needed)
1311
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1312
+ # HTTP header 'Content-Type'
1313
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1314
+
1315
+ # form parameters
1316
+ form_params = {}
1317
+
1318
+ # http body (model)
1319
+ post_body = @api_client.object_to_http_body(request_contact_import)
1320
+ auth_names = ['api-key', 'partner-key']
1321
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1322
+ :header_params => header_params,
1323
+ :query_params => query_params,
1324
+ :form_params => form_params,
1325
+ :body => post_body,
1326
+ :auth_names => auth_names,
1327
+ :return_type => 'CreatedProcessId')
1328
+ if @api_client.config.debugging
1329
+ @api_client.config.logger.debug "API called: ContactsApi#import_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1330
+ end
1331
+ return data, status_code, headers
1332
+ end
1333
+ # Delete a contact from a list
1334
+ # @param list_id Id of the list
1335
+ # @param contact_emails Emails addresses OR IDs of the contacts
1336
+ # @param [Hash] opts the optional parameters
1337
+ # @return [PostContactInfo]
1338
+ def remove_contact_from_list(list_id, contact_emails, opts = {})
1339
+ data, _status_code, _headers = remove_contact_from_list_with_http_info(list_id, contact_emails, opts)
1340
+ data
1341
+ end
1342
+
1343
+ # Delete a contact from a list
1344
+ # @param list_id Id of the list
1345
+ # @param contact_emails Emails addresses OR IDs of the contacts
1346
+ # @param [Hash] opts the optional parameters
1347
+ # @return [Array<(PostContactInfo, Fixnum, Hash)>] PostContactInfo data, response status code and response headers
1348
+ def remove_contact_from_list_with_http_info(list_id, contact_emails, opts = {})
1349
+ if @api_client.config.debugging
1350
+ @api_client.config.logger.debug 'Calling API: ContactsApi.remove_contact_from_list ...'
1351
+ end
1352
+ # verify the required parameter 'list_id' is set
1353
+ if @api_client.config.client_side_validation && list_id.nil?
1354
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.remove_contact_from_list"
1355
+ end
1356
+ # verify the required parameter 'contact_emails' is set
1357
+ if @api_client.config.client_side_validation && contact_emails.nil?
1358
+ fail ArgumentError, "Missing the required parameter 'contact_emails' when calling ContactsApi.remove_contact_from_list"
1359
+ end
1360
+ # resource path
1361
+ local_var_path = '/contacts/lists/{listId}/contacts/remove'.sub('{' + 'listId' + '}', list_id.to_s)
1362
+
1363
+ # query parameters
1364
+ query_params = {}
1365
+
1366
+ # header parameters
1367
+ header_params = {}
1368
+ # HTTP header 'Accept' (if needed)
1369
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1370
+ # HTTP header 'Content-Type'
1371
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1372
+
1373
+ # form parameters
1374
+ form_params = {}
1375
+
1376
+ # http body (model)
1377
+ post_body = @api_client.object_to_http_body(contact_emails)
1378
+ auth_names = ['api-key', 'partner-key']
1379
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1380
+ :header_params => header_params,
1381
+ :query_params => query_params,
1382
+ :form_params => form_params,
1383
+ :body => post_body,
1384
+ :auth_names => auth_names,
1385
+ :return_type => 'PostContactInfo')
1386
+ if @api_client.config.debugging
1387
+ @api_client.config.logger.debug "API called: ContactsApi#remove_contact_from_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1388
+ end
1389
+ return data, status_code, headers
1390
+ end
1391
+ # Export contacts
1392
+ # It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
1393
+ # @param request_contact_export Values to request a contact export
1394
+ # @param [Hash] opts the optional parameters
1395
+ # @return [CreatedProcessId]
1396
+ def request_contact_export(request_contact_export, opts = {})
1397
+ data, _status_code, _headers = request_contact_export_with_http_info(request_contact_export, opts)
1398
+ data
1399
+ end
1400
+
1401
+ # Export contacts
1402
+ # It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
1403
+ # @param request_contact_export Values to request a contact export
1404
+ # @param [Hash] opts the optional parameters
1405
+ # @return [Array<(CreatedProcessId, Fixnum, Hash)>] CreatedProcessId data, response status code and response headers
1406
+ def request_contact_export_with_http_info(request_contact_export, opts = {})
1407
+ if @api_client.config.debugging
1408
+ @api_client.config.logger.debug 'Calling API: ContactsApi.request_contact_export ...'
1409
+ end
1410
+ # verify the required parameter 'request_contact_export' is set
1411
+ if @api_client.config.client_side_validation && request_contact_export.nil?
1412
+ fail ArgumentError, "Missing the required parameter 'request_contact_export' when calling ContactsApi.request_contact_export"
1413
+ end
1414
+ # resource path
1415
+ local_var_path = '/contacts/export'
1416
+
1417
+ # query parameters
1418
+ query_params = {}
1419
+
1420
+ # header parameters
1421
+ header_params = {}
1422
+ # HTTP header 'Accept' (if needed)
1423
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1424
+ # HTTP header 'Content-Type'
1425
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1426
+
1427
+ # form parameters
1428
+ form_params = {}
1429
+
1430
+ # http body (model)
1431
+ post_body = @api_client.object_to_http_body(request_contact_export)
1432
+ auth_names = ['api-key', 'partner-key']
1433
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1434
+ :header_params => header_params,
1435
+ :query_params => query_params,
1436
+ :form_params => form_params,
1437
+ :body => post_body,
1438
+ :auth_names => auth_names,
1439
+ :return_type => 'CreatedProcessId')
1440
+ if @api_client.config.debugging
1441
+ @api_client.config.logger.debug "API called: ContactsApi#request_contact_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1442
+ end
1443
+ return data, status_code, headers
1444
+ end
1445
+ # Update contact attribute
1446
+ # @param attribute_category Category of the attribute
1447
+ # @param attribute_name Name of the existing attribute
1448
+ # @param update_attribute Values to update an attribute
1449
+ # @param [Hash] opts the optional parameters
1450
+ # @return [nil]
1451
+ def update_attribute(attribute_category, attribute_name, update_attribute, opts = {})
1452
+ update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, opts)
1453
+ nil
1454
+ end
1455
+
1456
+ # Update contact attribute
1457
+ # @param attribute_category Category of the attribute
1458
+ # @param attribute_name Name of the existing attribute
1459
+ # @param update_attribute Values to update an attribute
1460
+ # @param [Hash] opts the optional parameters
1461
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1462
+ def update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, opts = {})
1463
+ if @api_client.config.debugging
1464
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_attribute ...'
1465
+ end
1466
+ # verify the required parameter 'attribute_category' is set
1467
+ if @api_client.config.client_side_validation && attribute_category.nil?
1468
+ fail ArgumentError, "Missing the required parameter 'attribute_category' when calling ContactsApi.update_attribute"
1469
+ end
1470
+ # verify enum value
1471
+ if @api_client.config.client_side_validation && !['category', 'calculated', 'global'].include?(attribute_category)
1472
+ fail ArgumentError, "invalid value for 'attribute_category', must be one of category, calculated, global"
1473
+ end
1474
+ # verify the required parameter 'attribute_name' is set
1475
+ if @api_client.config.client_side_validation && attribute_name.nil?
1476
+ fail ArgumentError, "Missing the required parameter 'attribute_name' when calling ContactsApi.update_attribute"
1477
+ end
1478
+ # verify the required parameter 'update_attribute' is set
1479
+ if @api_client.config.client_side_validation && update_attribute.nil?
1480
+ fail ArgumentError, "Missing the required parameter 'update_attribute' when calling ContactsApi.update_attribute"
1481
+ end
1482
+ # resource path
1483
+ local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
1484
+
1485
+ # query parameters
1486
+ query_params = {}
1487
+
1488
+ # header parameters
1489
+ header_params = {}
1490
+ # HTTP header 'Accept' (if needed)
1491
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1492
+ # HTTP header 'Content-Type'
1493
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1494
+
1495
+ # form parameters
1496
+ form_params = {}
1497
+
1498
+ # http body (model)
1499
+ post_body = @api_client.object_to_http_body(update_attribute)
1500
+ auth_names = ['api-key', 'partner-key']
1501
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1502
+ :header_params => header_params,
1503
+ :query_params => query_params,
1504
+ :form_params => form_params,
1505
+ :body => post_body,
1506
+ :auth_names => auth_names)
1507
+ if @api_client.config.debugging
1508
+ @api_client.config.logger.debug "API called: ContactsApi#update_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1509
+ end
1510
+ return data, status_code, headers
1511
+ end
1512
+ # Update multiple contacts
1513
+ # @param update_batch_contacts Values to update multiple contacts
1514
+ # @param [Hash] opts the optional parameters
1515
+ # @return [nil]
1516
+ def update_batch_contacts(update_batch_contacts, opts = {})
1517
+ update_batch_contacts_with_http_info(update_batch_contacts, opts)
1518
+ nil
1519
+ end
1520
+
1521
+ # Update multiple contacts
1522
+ # @param update_batch_contacts Values to update multiple contacts
1523
+ # @param [Hash] opts the optional parameters
1524
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1525
+ def update_batch_contacts_with_http_info(update_batch_contacts, opts = {})
1526
+ if @api_client.config.debugging
1527
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_batch_contacts ...'
1528
+ end
1529
+ # verify the required parameter 'update_batch_contacts' is set
1530
+ if @api_client.config.client_side_validation && update_batch_contacts.nil?
1531
+ fail ArgumentError, "Missing the required parameter 'update_batch_contacts' when calling ContactsApi.update_batch_contacts"
1532
+ end
1533
+ # resource path
1534
+ local_var_path = '/contacts/batch'
1535
+
1536
+ # query parameters
1537
+ query_params = {}
1538
+
1539
+ # header parameters
1540
+ header_params = {}
1541
+ # HTTP header 'Accept' (if needed)
1542
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1543
+ # HTTP header 'Content-Type'
1544
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1545
+
1546
+ # form parameters
1547
+ form_params = {}
1548
+
1549
+ # http body (model)
1550
+ post_body = @api_client.object_to_http_body(update_batch_contacts)
1551
+ auth_names = ['api-key', 'partner-key']
1552
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1553
+ :header_params => header_params,
1554
+ :query_params => query_params,
1555
+ :form_params => form_params,
1556
+ :body => post_body,
1557
+ :auth_names => auth_names)
1558
+ if @api_client.config.debugging
1559
+ @api_client.config.logger.debug "API called: ContactsApi#update_batch_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1560
+ end
1561
+ return data, status_code, headers
1562
+ end
1563
+ # Update a contact
1564
+ # @param identifier Email (urlencoded) OR ID of the contact
1565
+ # @param update_contact Values to update a contact
1566
+ # @param [Hash] opts the optional parameters
1567
+ # @return [nil]
1568
+ def update_contact(identifier, update_contact, opts = {})
1569
+ update_contact_with_http_info(identifier, update_contact, opts)
1570
+ nil
1571
+ end
1572
+
1573
+ # Update a contact
1574
+ # @param identifier Email (urlencoded) OR ID of the contact
1575
+ # @param update_contact Values to update a contact
1576
+ # @param [Hash] opts the optional parameters
1577
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1578
+ def update_contact_with_http_info(identifier, update_contact, opts = {})
1579
+ if @api_client.config.debugging
1580
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_contact ...'
1581
+ end
1582
+ # verify the required parameter 'identifier' is set
1583
+ if @api_client.config.client_side_validation && identifier.nil?
1584
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactsApi.update_contact"
1585
+ end
1586
+ # verify the required parameter 'update_contact' is set
1587
+ if @api_client.config.client_side_validation && update_contact.nil?
1588
+ fail ArgumentError, "Missing the required parameter 'update_contact' when calling ContactsApi.update_contact"
1589
+ end
1590
+ # resource path
1591
+ local_var_path = '/contacts/{identifier}'.sub('{' + 'identifier' + '}', identifier.to_s)
1592
+
1593
+ # query parameters
1594
+ query_params = {}
1595
+
1596
+ # header parameters
1597
+ header_params = {}
1598
+ # HTTP header 'Accept' (if needed)
1599
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1600
+ # HTTP header 'Content-Type'
1601
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1602
+
1603
+ # form parameters
1604
+ form_params = {}
1605
+
1606
+ # http body (model)
1607
+ post_body = @api_client.object_to_http_body(update_contact)
1608
+ auth_names = ['api-key', 'partner-key']
1609
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1610
+ :header_params => header_params,
1611
+ :query_params => query_params,
1612
+ :form_params => form_params,
1613
+ :body => post_body,
1614
+ :auth_names => auth_names)
1615
+ if @api_client.config.debugging
1616
+ @api_client.config.logger.debug "API called: ContactsApi#update_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1617
+ end
1618
+ return data, status_code, headers
1619
+ end
1620
+ # Update a folder
1621
+ # @param folder_id Id of the folder
1622
+ # @param update_folder Name of the folder
1623
+ # @param [Hash] opts the optional parameters
1624
+ # @return [nil]
1625
+ def update_folder(folder_id, update_folder, opts = {})
1626
+ update_folder_with_http_info(folder_id, update_folder, opts)
1627
+ nil
1628
+ end
1629
+
1630
+ # Update a folder
1631
+ # @param folder_id Id of the folder
1632
+ # @param update_folder Name of the folder
1633
+ # @param [Hash] opts the optional parameters
1634
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1635
+ def update_folder_with_http_info(folder_id, update_folder, opts = {})
1636
+ if @api_client.config.debugging
1637
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_folder ...'
1638
+ end
1639
+ # verify the required parameter 'folder_id' is set
1640
+ if @api_client.config.client_side_validation && folder_id.nil?
1641
+ fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.update_folder"
1642
+ end
1643
+ # verify the required parameter 'update_folder' is set
1644
+ if @api_client.config.client_side_validation && update_folder.nil?
1645
+ fail ArgumentError, "Missing the required parameter 'update_folder' when calling ContactsApi.update_folder"
1646
+ end
1647
+ # resource path
1648
+ local_var_path = '/contacts/folders/{folderId}'.sub('{' + 'folderId' + '}', folder_id.to_s)
1649
+
1650
+ # query parameters
1651
+ query_params = {}
1652
+
1653
+ # header parameters
1654
+ header_params = {}
1655
+ # HTTP header 'Accept' (if needed)
1656
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1657
+ # HTTP header 'Content-Type'
1658
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1659
+
1660
+ # form parameters
1661
+ form_params = {}
1662
+
1663
+ # http body (model)
1664
+ post_body = @api_client.object_to_http_body(update_folder)
1665
+ auth_names = ['api-key', 'partner-key']
1666
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1667
+ :header_params => header_params,
1668
+ :query_params => query_params,
1669
+ :form_params => form_params,
1670
+ :body => post_body,
1671
+ :auth_names => auth_names)
1672
+ if @api_client.config.debugging
1673
+ @api_client.config.logger.debug "API called: ContactsApi#update_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1674
+ end
1675
+ return data, status_code, headers
1676
+ end
1677
+ # Update a list
1678
+ # @param list_id Id of the list
1679
+ # @param update_list Values to update a list
1680
+ # @param [Hash] opts the optional parameters
1681
+ # @return [nil]
1682
+ def update_list(list_id, update_list, opts = {})
1683
+ update_list_with_http_info(list_id, update_list, opts)
1684
+ nil
1685
+ end
1686
+
1687
+ # Update a list
1688
+ # @param list_id Id of the list
1689
+ # @param update_list Values to update a list
1690
+ # @param [Hash] opts the optional parameters
1691
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1692
+ def update_list_with_http_info(list_id, update_list, opts = {})
1693
+ if @api_client.config.debugging
1694
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_list ...'
1695
+ end
1696
+ # verify the required parameter 'list_id' is set
1697
+ if @api_client.config.client_side_validation && list_id.nil?
1698
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.update_list"
1699
+ end
1700
+ # verify the required parameter 'update_list' is set
1701
+ if @api_client.config.client_side_validation && update_list.nil?
1702
+ fail ArgumentError, "Missing the required parameter 'update_list' when calling ContactsApi.update_list"
1703
+ end
1704
+ # resource path
1705
+ local_var_path = '/contacts/lists/{listId}'.sub('{' + 'listId' + '}', list_id.to_s)
1706
+
1707
+ # query parameters
1708
+ query_params = {}
1709
+
1710
+ # header parameters
1711
+ header_params = {}
1712
+ # HTTP header 'Accept' (if needed)
1713
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1714
+ # HTTP header 'Content-Type'
1715
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1716
+
1717
+ # form parameters
1718
+ form_params = {}
1719
+
1720
+ # http body (model)
1721
+ post_body = @api_client.object_to_http_body(update_list)
1722
+ auth_names = ['api-key', 'partner-key']
1723
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1724
+ :header_params => header_params,
1725
+ :query_params => query_params,
1726
+ :form_params => form_params,
1727
+ :body => post_body,
1728
+ :auth_names => auth_names)
1729
+ if @api_client.config.debugging
1730
+ @api_client.config.logger.debug "API called: ContactsApi#update_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1731
+ end
1732
+ return data, status_code, headers
1733
+ end
1734
+ end
1735
+ end