sib-api-v3-sdk 7.5.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (317) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +130 -4
  4. data/docs/Body.md +9 -0
  5. data/docs/Body1.md +9 -0
  6. data/docs/Body10.md +11 -0
  7. data/docs/{SendTemplateEmail.md → Body11.md} +2 -2
  8. data/docs/Body12.md +11 -0
  9. data/docs/Body2.md +11 -0
  10. data/docs/Body3.md +9 -0
  11. data/docs/Body4.md +9 -0
  12. data/docs/Body5.md +11 -0
  13. data/docs/Body6.md +18 -0
  14. data/docs/Body7.md +17 -0
  15. data/docs/Body8.md +13 -0
  16. data/docs/Body9.md +8 -0
  17. data/docs/CompaniesApi.md +425 -0
  18. data/docs/CompaniesList.md +8 -0
  19. data/docs/Company.md +11 -0
  20. data/docs/CompanyAttributes.md +7 -0
  21. data/docs/CompanyAttributesInner.md +12 -0
  22. data/docs/ContactsApi.md +69 -4
  23. data/docs/ConversationsApi.md +542 -0
  24. data/docs/ConversationsMessage.md +17 -0
  25. data/docs/ConversationsMessageFile.md +12 -0
  26. data/docs/ConversationsMessageFileImageInfo.md +10 -0
  27. data/docs/CreateContact.md +1 -1
  28. data/docs/CreateSmsCampaign.md +1 -0
  29. data/docs/CreateSubAccount.md +11 -0
  30. data/docs/CreateSubAccountResponse.md +8 -0
  31. data/docs/CreateWebhook.md +2 -1
  32. data/docs/Deal.md +11 -0
  33. data/docs/DealAttributes.md +7 -0
  34. data/docs/DealAttributesInner.md +12 -0
  35. data/docs/DealsApi.md +476 -0
  36. data/docs/DealsList.md +8 -0
  37. data/docs/EmailCampaignsApi.md +6 -5
  38. data/docs/FileData.md +14 -0
  39. data/docs/FileDownloadableLink.md +8 -0
  40. data/docs/FileList.md +7 -0
  41. data/docs/FilesApi.md +318 -0
  42. data/docs/GetCampaignStats.md +3 -0
  43. data/docs/GetContactCampaignStats.md +1 -0
  44. data/docs/GetExtendedContactDetailsStatistics.md +1 -0
  45. data/docs/GetExtendedContactDetailsStatisticsDelivered.md +9 -0
  46. data/docs/GetInboundEmailEvents.md +8 -0
  47. data/docs/GetInboundEmailEventsByUuid.md +15 -0
  48. data/docs/GetInboundEmailEventsByUuidAttachments.md +11 -0
  49. data/docs/GetInboundEmailEventsByUuidLogs.md +9 -0
  50. data/docs/GetInboundEmailEventsEvents.md +11 -0
  51. data/docs/GetScheduledEmailByBatchId.md +9 -0
  52. data/docs/GetScheduledEmailByBatchIdBatches.md +10 -0
  53. data/docs/GetScheduledEmailByMessageId.md +10 -0
  54. data/docs/GetSsoToken.md +1 -1
  55. data/docs/InboundParsingApi.md +199 -0
  56. data/docs/InlineResponse200.md +8 -0
  57. data/docs/InlineResponse201.md +8 -0
  58. data/docs/InlineResponse2011.md +8 -0
  59. data/docs/MasterAccountApi.md +424 -0
  60. data/docs/MasterDetailsResponse.md +14 -0
  61. data/docs/MasterDetailsResponseBillingInfo.md +11 -0
  62. data/docs/MasterDetailsResponseBillingInfoAddress.md +12 -0
  63. data/docs/MasterDetailsResponseBillingInfoName.md +9 -0
  64. data/docs/MasterDetailsResponsePlanInfo.md +13 -0
  65. data/docs/MasterDetailsResponsePlanInfoFeatures.md +12 -0
  66. data/docs/Note.md +14 -0
  67. data/docs/NoteData.md +10 -0
  68. data/docs/NoteId.md +8 -0
  69. data/docs/NoteList.md +7 -0
  70. data/docs/NotesApi.md +312 -0
  71. data/docs/Pipeline.md +8 -0
  72. data/docs/PipelineStage.md +9 -0
  73. data/docs/RequestContactExport.md +1 -2
  74. data/docs/RequestContactImport.md +3 -2
  75. data/docs/ScheduleSmtpEmail.md +10 -0
  76. data/docs/SendSmtpEmail.md +6 -4
  77. data/docs/SendTransacSms.md +1 -0
  78. data/docs/SsoTokenRequest.md +9 -0
  79. data/docs/SubAccountDetailsResponse.md +11 -0
  80. data/docs/SubAccountDetailsResponsePlanInfo.md +10 -0
  81. data/docs/SubAccountDetailsResponsePlanInfoCredits.md +9 -0
  82. data/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md +9 -0
  83. data/docs/SubAccountDetailsResponsePlanInfoFeatures.md +10 -0
  84. data/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md +9 -0
  85. data/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md +9 -0
  86. data/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md +9 -0
  87. data/docs/SubAccountUpdatePlanRequest.md +9 -0
  88. data/docs/SubAccountUpdatePlanRequestCredits.md +8 -0
  89. data/docs/SubAccountUpdatePlanRequestFeatures.md +10 -0
  90. data/docs/SubAccountsResponse.md +9 -0
  91. data/docs/SubAccountsResponseSubAccounts.md +11 -0
  92. data/docs/Task.md +13 -0
  93. data/docs/TaskList.md +8 -0
  94. data/docs/TaskReminder.md +10 -0
  95. data/docs/TaskTypes.md +9 -0
  96. data/docs/TasksApi.md +376 -0
  97. data/docs/TransactionalEmailsApi.md +203 -63
  98. data/docs/UpdateBatchContacts.md +8 -0
  99. data/docs/UpdateBatchContactsContacts.md +16 -0
  100. data/docs/UpdateBatchContactsModel.md +9 -0
  101. data/docs/UpdateContact.md +1 -1
  102. data/docs/UpdateEmailCampaign.md +1 -1
  103. data/docs/UpdateSmsCampaign.md +1 -0
  104. data/docs/UpdateSmtpTemplate.md +1 -1
  105. data/docs/UpdateWebhook.md +2 -1
  106. data/docs/UploadImageModel.md +8 -0
  107. data/lib/sib-api-v3-sdk/api/companies_api.rb +409 -0
  108. data/lib/sib-api-v3-sdk/api/contacts_api.rb +61 -2
  109. data/lib/sib-api-v3-sdk/api/conversations_api.rb +504 -0
  110. data/lib/sib-api-v3-sdk/api/deals_api.rb +454 -0
  111. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +9 -8
  112. data/lib/sib-api-v3-sdk/api/files_api.rb +313 -0
  113. data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +213 -0
  114. data/lib/sib-api-v3-sdk/api/master_account_api.rb +416 -0
  115. data/lib/sib-api-v3-sdk/api/notes_api.rb +308 -0
  116. data/lib/sib-api-v3-sdk/api/tasks_api.rb +375 -0
  117. data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +201 -62
  118. data/lib/sib-api-v3-sdk/api/webhooks_api.rb +2 -2
  119. data/lib/sib-api-v3-sdk/models/{send_email_attachment.rb → body.rb} +16 -40
  120. data/lib/sib-api-v3-sdk/models/body_1.rb +195 -0
  121. data/lib/sib-api-v3-sdk/models/body_10.rb +225 -0
  122. data/lib/sib-api-v3-sdk/models/{send_template_email.rb → body_11.rb} +12 -12
  123. data/lib/sib-api-v3-sdk/models/body_12.rb +215 -0
  124. data/lib/sib-api-v3-sdk/models/body_2.rb +223 -0
  125. data/lib/sib-api-v3-sdk/models/body_3.rb +200 -0
  126. data/lib/sib-api-v3-sdk/models/body_4.rb +195 -0
  127. data/lib/sib-api-v3-sdk/models/body_5.rb +223 -0
  128. data/lib/sib-api-v3-sdk/models/body_6.rb +320 -0
  129. data/lib/sib-api-v3-sdk/models/body_7.rb +281 -0
  130. data/lib/sib-api-v3-sdk/models/body_8.rb +245 -0
  131. data/lib/sib-api-v3-sdk/models/body_9.rb +190 -0
  132. data/lib/sib-api-v3-sdk/models/companies_list.rb +188 -0
  133. data/lib/sib-api-v3-sdk/models/{send_email.rb → company.rb} +30 -90
  134. data/lib/sib-api-v3-sdk/models/company_attributes.rb +176 -0
  135. data/lib/sib-api-v3-sdk/models/company_attributes_inner.rb +223 -0
  136. data/lib/sib-api-v3-sdk/models/conversations_message.rb +324 -0
  137. data/lib/sib-api-v3-sdk/models/conversations_message_file.rb +239 -0
  138. data/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb +236 -0
  139. data/lib/sib-api-v3-sdk/models/create_contact.rb +1 -1
  140. data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +16 -4
  141. data/lib/sib-api-v3-sdk/models/create_sub_account.rb +259 -0
  142. data/lib/sib-api-v3-sdk/models/create_sub_account_response.rb +190 -0
  143. data/lib/sib-api-v3-sdk/models/create_webhook.rb +17 -7
  144. data/lib/sib-api-v3-sdk/models/deal.rb +220 -0
  145. data/lib/sib-api-v3-sdk/models/deal_attributes.rb +176 -0
  146. data/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb +223 -0
  147. data/lib/sib-api-v3-sdk/models/deals_list.rb +188 -0
  148. data/lib/sib-api-v3-sdk/models/file_data.rb +246 -0
  149. data/lib/sib-api-v3-sdk/models/file_downloadable_link.rb +190 -0
  150. data/lib/sib-api-v3-sdk/models/file_list.rb +176 -0
  151. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +36 -1
  152. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +15 -4
  153. data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +2 -2
  154. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +16 -4
  155. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_delivered.rb +205 -0
  156. data/lib/sib-api-v3-sdk/models/get_inbound_email_events.rb +186 -0
  157. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid.rb +259 -0
  158. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_attachments.rb +215 -0
  159. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_logs.rb +229 -0
  160. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_events.rb +235 -0
  161. data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb +196 -0
  162. data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id_batches.rb +254 -0
  163. data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb +254 -0
  164. data/lib/sib-api-v3-sdk/models/get_sso_token.rb +1 -1
  165. data/lib/sib-api-v3-sdk/models/inline_response_200.rb +191 -0
  166. data/lib/sib-api-v3-sdk/models/inline_response_201.rb +191 -0
  167. data/lib/sib-api-v3-sdk/models/inline_response_201_1.rb +191 -0
  168. data/lib/sib-api-v3-sdk/models/master_details_response.rb +243 -0
  169. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info.rb +214 -0
  170. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_address.rb +226 -0
  171. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_name.rb +196 -0
  172. data/lib/sib-api-v3-sdk/models/master_details_response_plan_info.rb +272 -0
  173. data/lib/sib-api-v3-sdk/models/master_details_response_plan_info_features.rb +225 -0
  174. data/lib/sib-api-v3-sdk/models/note.rb +283 -0
  175. data/lib/sib-api-v3-sdk/models/note_data.rb +243 -0
  176. data/lib/sib-api-v3-sdk/models/note_id.rb +186 -0
  177. data/lib/sib-api-v3-sdk/models/note_list.rb +176 -0
  178. data/lib/sib-api-v3-sdk/models/pipeline.rb +188 -0
  179. data/lib/sib-api-v3-sdk/models/pipeline_stage.rb +196 -0
  180. data/lib/sib-api-v3-sdk/models/request_contact_export.rb +6 -11
  181. data/lib/sib-api-v3-sdk/models/request_contact_export_custom_contact_filter.rb +1 -1
  182. data/lib/sib-api-v3-sdk/models/request_contact_import.rb +15 -3
  183. data/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb +206 -0
  184. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +28 -8
  185. data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +16 -4
  186. data/lib/sib-api-v3-sdk/models/sso_token_request.rb +200 -0
  187. data/lib/sib-api-v3-sdk/models/sub_account_details_response.rb +214 -0
  188. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info.rb +204 -0
  189. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +195 -0
  190. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +196 -0
  191. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +203 -0
  192. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_inbox.rb +196 -0
  193. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_landing_page.rb +196 -0
  194. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_users.rb +196 -0
  195. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request.rb +194 -0
  196. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_credits.rb +186 -0
  197. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_features.rb +206 -0
  198. data/lib/sib-api-v3-sdk/models/sub_accounts_response.rb +196 -0
  199. data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +235 -0
  200. data/lib/sib-api-v3-sdk/models/task.rb +252 -0
  201. data/lib/sib-api-v3-sdk/models/task_list.rb +188 -0
  202. data/lib/sib-api-v3-sdk/models/task_reminder.rb +257 -0
  203. data/lib/sib-api-v3-sdk/models/task_types.rb +196 -0
  204. data/lib/sib-api-v3-sdk/models/update_batch_contacts.rb +187 -0
  205. data/lib/sib-api-v3-sdk/models/update_batch_contacts_contacts.rb +273 -0
  206. data/lib/sib-api-v3-sdk/models/update_batch_contacts_model.rb +197 -0
  207. data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
  208. data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +1 -1
  209. data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +16 -4
  210. data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +1 -1
  211. data/lib/sib-api-v3-sdk/models/update_webhook.rb +15 -5
  212. data/lib/sib-api-v3-sdk/models/upload_image_model.rb +190 -0
  213. data/lib/sib-api-v3-sdk/version.rb +1 -1
  214. data/lib/sib-api-v3-sdk.rb +84 -3
  215. data/sib-api-v3-sdk.gemspec +2 -1
  216. data/spec/api/companies_api_spec.rb +119 -0
  217. data/spec/api/contacts_api_spec.rb +15 -1
  218. data/spec/api/conversations_api_spec.rb +140 -0
  219. data/spec/api/deals_api_spec.rb +129 -0
  220. data/spec/api/email_campaigns_api_spec.rb +1 -1
  221. data/spec/api/files_api_spec.rb +99 -0
  222. data/spec/api/inbound_parsing_api_spec.rb +76 -0
  223. data/spec/api/master_account_api_spec.rb +119 -0
  224. data/spec/api/notes_api_spec.rb +97 -0
  225. data/spec/api/tasks_api_spec.rb +113 -0
  226. data/spec/api/transactional_emails_api_spec.rb +46 -13
  227. data/spec/models/body_10_spec.rb +59 -0
  228. data/spec/models/{send_template_email_spec.rb → body_11_spec.rb} +7 -7
  229. data/spec/models/body_12_spec.rb +59 -0
  230. data/spec/models/{send_email_attachment_spec.rb → body_1_spec.rb} +8 -8
  231. data/spec/models/body_2_spec.rb +59 -0
  232. data/spec/models/body_3_spec.rb +47 -0
  233. data/spec/models/body_4_spec.rb +47 -0
  234. data/spec/models/body_5_spec.rb +59 -0
  235. data/spec/models/body_6_spec.rb +101 -0
  236. data/spec/models/body_7_spec.rb +95 -0
  237. data/spec/models/body_8_spec.rb +71 -0
  238. data/spec/models/body_9_spec.rb +41 -0
  239. data/spec/models/body_spec.rb +47 -0
  240. data/spec/models/companies_list_spec.rb +41 -0
  241. data/spec/models/company_attributes_inner_spec.rb +65 -0
  242. data/spec/models/company_attributes_spec.rb +35 -0
  243. data/spec/models/company_spec.rb +59 -0
  244. data/spec/models/conversations_message_file_image_info_spec.rb +53 -0
  245. data/spec/models/conversations_message_file_spec.rb +65 -0
  246. data/spec/models/conversations_message_spec.rb +99 -0
  247. data/spec/models/create_sms_campaign_spec.rb +6 -0
  248. data/spec/models/create_sub_account_response_spec.rb +41 -0
  249. data/spec/models/create_sub_account_spec.rb +63 -0
  250. data/spec/models/create_webhook_spec.rb +8 -2
  251. data/spec/models/deal_attributes_inner_spec.rb +65 -0
  252. data/spec/models/deal_attributes_spec.rb +35 -0
  253. data/spec/models/deal_spec.rb +59 -0
  254. data/spec/models/deals_list_spec.rb +41 -0
  255. data/spec/models/file_data_spec.rb +77 -0
  256. data/spec/models/file_downloadable_link_spec.rb +41 -0
  257. data/spec/models/file_list_spec.rb +35 -0
  258. data/spec/models/get_campaign_stats_spec.rb +18 -0
  259. data/spec/models/get_contact_campaign_stats_spec.rb +6 -0
  260. data/spec/models/get_email_event_report_events_spec.rb +1 -1
  261. data/spec/models/get_extended_contact_details_statistics_delivered_spec.rb +47 -0
  262. data/spec/models/get_extended_contact_details_statistics_spec.rb +6 -0
  263. data/spec/models/get_inbound_email_events_by_uuid_attachments_spec.rb +59 -0
  264. data/spec/models/get_inbound_email_events_by_uuid_logs_spec.rb +51 -0
  265. data/spec/models/get_inbound_email_events_by_uuid_spec.rb +83 -0
  266. data/spec/models/get_inbound_email_events_events_spec.rb +59 -0
  267. data/spec/models/get_inbound_email_events_spec.rb +41 -0
  268. data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +57 -0
  269. data/spec/models/get_scheduled_email_by_batch_id_spec.rb +47 -0
  270. data/spec/models/get_scheduled_email_by_message_id_spec.rb +57 -0
  271. data/spec/models/inline_response_200_spec.rb +41 -0
  272. data/spec/models/inline_response_201_1_spec.rb +41 -0
  273. data/spec/models/inline_response_201_spec.rb +41 -0
  274. data/spec/models/master_details_response_billing_info_address_spec.rb +65 -0
  275. data/spec/models/master_details_response_billing_info_name_spec.rb +47 -0
  276. data/spec/models/master_details_response_billing_info_spec.rb +59 -0
  277. data/spec/models/master_details_response_plan_info_features_spec.rb +65 -0
  278. data/spec/models/master_details_response_plan_info_spec.rb +75 -0
  279. data/spec/models/master_details_response_spec.rb +77 -0
  280. data/spec/models/note_data_spec.rb +53 -0
  281. data/spec/models/note_id_spec.rb +41 -0
  282. data/spec/models/note_list_spec.rb +35 -0
  283. data/spec/models/note_spec.rb +77 -0
  284. data/spec/models/pipeline_spec.rb +41 -0
  285. data/spec/models/pipeline_stage_spec.rb +47 -0
  286. data/spec/models/request_contact_export_spec.rb +0 -6
  287. data/spec/models/request_contact_import_spec.rb +6 -0
  288. data/spec/models/schedule_smtp_email_spec.rb +53 -0
  289. data/spec/models/send_smtp_email_spec.rb +12 -0
  290. data/spec/models/send_transac_sms_spec.rb +6 -0
  291. data/spec/models/sso_token_request_spec.rb +47 -0
  292. data/spec/models/sub_account_details_response_plan_info_credits_emails_spec.rb +47 -0
  293. data/spec/models/sub_account_details_response_plan_info_credits_spec.rb +47 -0
  294. data/spec/models/sub_account_details_response_plan_info_features_inbox_spec.rb +47 -0
  295. data/spec/models/sub_account_details_response_plan_info_features_landing_page_spec.rb +47 -0
  296. data/spec/models/sub_account_details_response_plan_info_features_spec.rb +53 -0
  297. data/spec/models/sub_account_details_response_plan_info_features_users_spec.rb +47 -0
  298. data/spec/models/sub_account_details_response_plan_info_spec.rb +53 -0
  299. data/spec/models/sub_account_details_response_spec.rb +59 -0
  300. data/spec/models/sub_account_update_plan_request_credits_spec.rb +41 -0
  301. data/spec/models/sub_account_update_plan_request_features_spec.rb +53 -0
  302. data/spec/models/sub_account_update_plan_request_spec.rb +47 -0
  303. data/spec/models/sub_accounts_response_spec.rb +47 -0
  304. data/spec/models/sub_accounts_response_sub_accounts_spec.rb +59 -0
  305. data/spec/models/task_list_spec.rb +41 -0
  306. data/spec/models/task_reminder_spec.rb +57 -0
  307. data/spec/models/task_spec.rb +71 -0
  308. data/spec/models/task_types_spec.rb +47 -0
  309. data/spec/models/{send_email_spec.rb → update_batch_contacts_contacts_spec.rb} +15 -15
  310. data/spec/models/update_batch_contacts_model_spec.rb +47 -0
  311. data/spec/models/update_batch_contacts_spec.rb +41 -0
  312. data/spec/models/update_sms_campaign_spec.rb +6 -0
  313. data/spec/models/update_webhook_spec.rb +7 -1
  314. data/spec/models/upload_image_model_spec.rb +41 -0
  315. metadata +359 -15
  316. data/docs/SendEmail.md +0 -16
  317. data/docs/SendEmailAttachment.md +0 -9
@@ -0,0 +1,504 @@
1
+ =begin
2
+ #SendinBlue API
3
+
4
+ #SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
5
+
6
+ OpenAPI spec version: 3.0.0
7
+ Contact: contact@sendinblue.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.19
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module SibApiV3Sdk
16
+ class ConversationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Sets agent’s status to online for 2-3 minutes
23
+ # We recommend pinging this endpoint every minute for as long as the agent has to be considered online.
24
+ # @param body Agent fields.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def conversations_agent_online_ping_post(body, opts = {})
28
+ conversations_agent_online_ping_post_with_http_info(body, opts)
29
+ nil
30
+ end
31
+
32
+ # Sets agent’s status to online for 2-3 minutes
33
+ # We recommend pinging this endpoint every minute for as long as the agent has to be considered online.
34
+ # @param body Agent fields.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
37
+ def conversations_agent_online_ping_post_with_http_info(body, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_agent_online_ping_post ...'
40
+ end
41
+ # verify the required parameter 'body' is set
42
+ if @api_client.config.client_side_validation && body.nil?
43
+ fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.conversations_agent_online_ping_post"
44
+ end
45
+ # resource path
46
+ local_var_path = '/conversations/agentOnlinePing'
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = @api_client.object_to_http_body(body)
63
+ auth_names = ['api-key', 'partner-key']
64
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names)
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "API called: ConversationsApi#conversations_agent_online_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
+ end
73
+ return data, status_code, headers
74
+ end
75
+ # Delete a message sent by an agent
76
+ # Only agents’ messages can be deleted.
77
+ # @param id ID of the message
78
+ # @param [Hash] opts the optional parameters
79
+ # @return [nil]
80
+ def conversations_messages_id_delete(id, opts = {})
81
+ conversations_messages_id_delete_with_http_info(id, opts)
82
+ nil
83
+ end
84
+
85
+ # Delete a message sent by an agent
86
+ # Only agents’ messages can be deleted.
87
+ # @param id ID of the message
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
90
+ def conversations_messages_id_delete_with_http_info(id, opts = {})
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_messages_id_delete ...'
93
+ end
94
+ # verify the required parameter 'id' is set
95
+ if @api_client.config.client_side_validation && id.nil?
96
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.conversations_messages_id_delete"
97
+ end
98
+ # resource path
99
+ local_var_path = '/conversations/messages/{id}'.sub('{' + 'id' + '}', id.to_s)
100
+
101
+ # query parameters
102
+ query_params = {}
103
+
104
+ # header parameters
105
+ header_params = {}
106
+ # HTTP header 'Accept' (if needed)
107
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
108
+ # HTTP header 'Content-Type'
109
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
110
+
111
+ # form parameters
112
+ form_params = {}
113
+
114
+ # http body (model)
115
+ post_body = nil
116
+ auth_names = ['api-key', 'partner-key']
117
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
118
+ :header_params => header_params,
119
+ :query_params => query_params,
120
+ :form_params => form_params,
121
+ :body => post_body,
122
+ :auth_names => auth_names)
123
+ if @api_client.config.debugging
124
+ @api_client.config.logger.debug "API called: ConversationsApi#conversations_messages_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
125
+ end
126
+ return data, status_code, headers
127
+ end
128
+ # Get a message
129
+ # @param id ID of the message
130
+ # @param [Hash] opts the optional parameters
131
+ # @return [ConversationsMessage]
132
+ def conversations_messages_id_get(id, opts = {})
133
+ data, _status_code, _headers = conversations_messages_id_get_with_http_info(id, opts)
134
+ data
135
+ end
136
+
137
+ # Get a message
138
+ # @param id ID of the message
139
+ # @param [Hash] opts the optional parameters
140
+ # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers
141
+ def conversations_messages_id_get_with_http_info(id, opts = {})
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_messages_id_get ...'
144
+ end
145
+ # verify the required parameter 'id' is set
146
+ if @api_client.config.client_side_validation && id.nil?
147
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.conversations_messages_id_get"
148
+ end
149
+ # resource path
150
+ local_var_path = '/conversations/messages/{id}'.sub('{' + 'id' + '}', id.to_s)
151
+
152
+ # query parameters
153
+ query_params = {}
154
+
155
+ # header parameters
156
+ header_params = {}
157
+ # HTTP header 'Accept' (if needed)
158
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
159
+ # HTTP header 'Content-Type'
160
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
161
+
162
+ # form parameters
163
+ form_params = {}
164
+
165
+ # http body (model)
166
+ post_body = nil
167
+ auth_names = ['api-key', 'partner-key']
168
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
169
+ :header_params => header_params,
170
+ :query_params => query_params,
171
+ :form_params => form_params,
172
+ :body => post_body,
173
+ :auth_names => auth_names,
174
+ :return_type => 'ConversationsMessage')
175
+ if @api_client.config.debugging
176
+ @api_client.config.logger.debug "API called: ConversationsApi#conversations_messages_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
177
+ end
178
+ return data, status_code, headers
179
+ end
180
+ # Update a message sent by an agent
181
+ # Only agents’ messages can be edited.
182
+ # @param id ID of the message
183
+ # @param [Hash] opts the optional parameters
184
+ # @option opts [Body9] :body
185
+ # @return [ConversationsMessage]
186
+ def conversations_messages_id_put(id, opts = {})
187
+ data, _status_code, _headers = conversations_messages_id_put_with_http_info(id, opts)
188
+ data
189
+ end
190
+
191
+ # Update a message sent by an agent
192
+ # Only agents’ messages can be edited.
193
+ # @param id ID of the message
194
+ # @param [Hash] opts the optional parameters
195
+ # @option opts [Body9] :body
196
+ # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers
197
+ def conversations_messages_id_put_with_http_info(id, opts = {})
198
+ if @api_client.config.debugging
199
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_messages_id_put ...'
200
+ end
201
+ # verify the required parameter 'id' is set
202
+ if @api_client.config.client_side_validation && id.nil?
203
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.conversations_messages_id_put"
204
+ end
205
+ # resource path
206
+ local_var_path = '/conversations/messages/{id}'.sub('{' + 'id' + '}', id.to_s)
207
+
208
+ # query parameters
209
+ query_params = {}
210
+
211
+ # header parameters
212
+ header_params = {}
213
+ # HTTP header 'Accept' (if needed)
214
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
215
+ # HTTP header 'Content-Type'
216
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
217
+
218
+ # form parameters
219
+ form_params = {}
220
+
221
+ # http body (model)
222
+ post_body = @api_client.object_to_http_body(opts[:'body'])
223
+ auth_names = ['api-key', 'partner-key']
224
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
225
+ :header_params => header_params,
226
+ :query_params => query_params,
227
+ :form_params => form_params,
228
+ :body => post_body,
229
+ :auth_names => auth_names,
230
+ :return_type => 'ConversationsMessage')
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "API called: ConversationsApi#conversations_messages_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
+ end
234
+ return data, status_code, headers
235
+ end
236
+ # Send a message as an agent
237
+ # @param body Message fields.
238
+ # @param [Hash] opts the optional parameters
239
+ # @return [ConversationsMessage]
240
+ def conversations_messages_post(body, opts = {})
241
+ data, _status_code, _headers = conversations_messages_post_with_http_info(body, opts)
242
+ data
243
+ end
244
+
245
+ # Send a message as an agent
246
+ # @param body Message fields.
247
+ # @param [Hash] opts the optional parameters
248
+ # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers
249
+ def conversations_messages_post_with_http_info(body, opts = {})
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_messages_post ...'
252
+ end
253
+ # verify the required parameter 'body' is set
254
+ if @api_client.config.client_side_validation && body.nil?
255
+ fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.conversations_messages_post"
256
+ end
257
+ # resource path
258
+ local_var_path = '/conversations/messages'
259
+
260
+ # query parameters
261
+ query_params = {}
262
+
263
+ # header parameters
264
+ header_params = {}
265
+ # HTTP header 'Accept' (if needed)
266
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
267
+ # HTTP header 'Content-Type'
268
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
269
+
270
+ # form parameters
271
+ form_params = {}
272
+
273
+ # http body (model)
274
+ post_body = @api_client.object_to_http_body(body)
275
+ auth_names = ['api-key', 'partner-key']
276
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
277
+ :header_params => header_params,
278
+ :query_params => query_params,
279
+ :form_params => form_params,
280
+ :body => post_body,
281
+ :auth_names => auth_names,
282
+ :return_type => 'ConversationsMessage')
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug "API called: ConversationsApi#conversations_messages_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
285
+ end
286
+ return data, status_code, headers
287
+ end
288
+ # Delete an automated message
289
+ # @param id ID of the message
290
+ # @param [Hash] opts the optional parameters
291
+ # @return [nil]
292
+ def conversations_pushed_messages_id_delete(id, opts = {})
293
+ conversations_pushed_messages_id_delete_with_http_info(id, opts)
294
+ nil
295
+ end
296
+
297
+ # Delete an automated message
298
+ # @param id ID of the message
299
+ # @param [Hash] opts the optional parameters
300
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
301
+ def conversations_pushed_messages_id_delete_with_http_info(id, opts = {})
302
+ if @api_client.config.debugging
303
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_pushed_messages_id_delete ...'
304
+ end
305
+ # verify the required parameter 'id' is set
306
+ if @api_client.config.client_side_validation && id.nil?
307
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.conversations_pushed_messages_id_delete"
308
+ end
309
+ # resource path
310
+ local_var_path = '/conversations/pushedMessages/{id}'.sub('{' + 'id' + '}', id.to_s)
311
+
312
+ # query parameters
313
+ query_params = {}
314
+
315
+ # header parameters
316
+ header_params = {}
317
+ # HTTP header 'Accept' (if needed)
318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
319
+ # HTTP header 'Content-Type'
320
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
321
+
322
+ # form parameters
323
+ form_params = {}
324
+
325
+ # http body (model)
326
+ post_body = nil
327
+ auth_names = ['api-key', 'partner-key']
328
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
329
+ :header_params => header_params,
330
+ :query_params => query_params,
331
+ :form_params => form_params,
332
+ :body => post_body,
333
+ :auth_names => auth_names)
334
+ if @api_client.config.debugging
335
+ @api_client.config.logger.debug "API called: ConversationsApi#conversations_pushed_messages_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
336
+ end
337
+ return data, status_code, headers
338
+ end
339
+ # Get an automated message
340
+ # @param id ID of the message sent previously
341
+ # @param [Hash] opts the optional parameters
342
+ # @return [ConversationsMessage]
343
+ def conversations_pushed_messages_id_get(id, opts = {})
344
+ data, _status_code, _headers = conversations_pushed_messages_id_get_with_http_info(id, opts)
345
+ data
346
+ end
347
+
348
+ # Get an automated message
349
+ # @param id ID of the message sent previously
350
+ # @param [Hash] opts the optional parameters
351
+ # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers
352
+ def conversations_pushed_messages_id_get_with_http_info(id, opts = {})
353
+ if @api_client.config.debugging
354
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_pushed_messages_id_get ...'
355
+ end
356
+ # verify the required parameter 'id' is set
357
+ if @api_client.config.client_side_validation && id.nil?
358
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.conversations_pushed_messages_id_get"
359
+ end
360
+ # resource path
361
+ local_var_path = '/conversations/pushedMessages/{id}'.sub('{' + 'id' + '}', id.to_s)
362
+
363
+ # query parameters
364
+ query_params = {}
365
+
366
+ # header parameters
367
+ header_params = {}
368
+ # HTTP header 'Accept' (if needed)
369
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
370
+ # HTTP header 'Content-Type'
371
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
372
+
373
+ # form parameters
374
+ form_params = {}
375
+
376
+ # http body (model)
377
+ post_body = nil
378
+ auth_names = ['api-key', 'partner-key']
379
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
380
+ :header_params => header_params,
381
+ :query_params => query_params,
382
+ :form_params => form_params,
383
+ :body => post_body,
384
+ :auth_names => auth_names,
385
+ :return_type => 'ConversationsMessage')
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug "API called: ConversationsApi#conversations_pushed_messages_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
388
+ end
389
+ return data, status_code, headers
390
+ end
391
+ # Update an automated message
392
+ # @param id ID of the message
393
+ # @param body
394
+ # @param [Hash] opts the optional parameters
395
+ # @return [ConversationsMessage]
396
+ def conversations_pushed_messages_id_put(id, body, opts = {})
397
+ data, _status_code, _headers = conversations_pushed_messages_id_put_with_http_info(id, body, opts)
398
+ data
399
+ end
400
+
401
+ # Update an automated message
402
+ # @param id ID of the message
403
+ # @param body
404
+ # @param [Hash] opts the optional parameters
405
+ # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers
406
+ def conversations_pushed_messages_id_put_with_http_info(id, body, opts = {})
407
+ if @api_client.config.debugging
408
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_pushed_messages_id_put ...'
409
+ end
410
+ # verify the required parameter 'id' is set
411
+ if @api_client.config.client_side_validation && id.nil?
412
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.conversations_pushed_messages_id_put"
413
+ end
414
+ # verify the required parameter 'body' is set
415
+ if @api_client.config.client_side_validation && body.nil?
416
+ fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.conversations_pushed_messages_id_put"
417
+ end
418
+ # resource path
419
+ local_var_path = '/conversations/pushedMessages/{id}'.sub('{' + 'id' + '}', id.to_s)
420
+
421
+ # query parameters
422
+ query_params = {}
423
+
424
+ # header parameters
425
+ header_params = {}
426
+ # HTTP header 'Accept' (if needed)
427
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
428
+ # HTTP header 'Content-Type'
429
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
430
+
431
+ # form parameters
432
+ form_params = {}
433
+
434
+ # http body (model)
435
+ post_body = @api_client.object_to_http_body(body)
436
+ auth_names = ['api-key', 'partner-key']
437
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
438
+ :header_params => header_params,
439
+ :query_params => query_params,
440
+ :form_params => form_params,
441
+ :body => post_body,
442
+ :auth_names => auth_names,
443
+ :return_type => 'ConversationsMessage')
444
+ if @api_client.config.debugging
445
+ @api_client.config.logger.debug "API called: ConversationsApi#conversations_pushed_messages_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
446
+ end
447
+ return data, status_code, headers
448
+ end
449
+ # Send an automated message to a visitor
450
+ # Example of automated messages: order status, announce new features in your web app, etc.
451
+ # @param body
452
+ # @param [Hash] opts the optional parameters
453
+ # @return [ConversationsMessage]
454
+ def conversations_pushed_messages_post(body, opts = {})
455
+ data, _status_code, _headers = conversations_pushed_messages_post_with_http_info(body, opts)
456
+ data
457
+ end
458
+
459
+ # Send an automated message to a visitor
460
+ # Example of automated messages: order status, announce new features in your web app, etc.
461
+ # @param body
462
+ # @param [Hash] opts the optional parameters
463
+ # @return [Array<(ConversationsMessage, Fixnum, Hash)>] ConversationsMessage data, response status code and response headers
464
+ def conversations_pushed_messages_post_with_http_info(body, opts = {})
465
+ if @api_client.config.debugging
466
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.conversations_pushed_messages_post ...'
467
+ end
468
+ # verify the required parameter 'body' is set
469
+ if @api_client.config.client_side_validation && body.nil?
470
+ fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.conversations_pushed_messages_post"
471
+ end
472
+ # resource path
473
+ local_var_path = '/conversations/pushedMessages'
474
+
475
+ # query parameters
476
+ query_params = {}
477
+
478
+ # header parameters
479
+ header_params = {}
480
+ # HTTP header 'Accept' (if needed)
481
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
482
+ # HTTP header 'Content-Type'
483
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
484
+
485
+ # form parameters
486
+ form_params = {}
487
+
488
+ # http body (model)
489
+ post_body = @api_client.object_to_http_body(body)
490
+ auth_names = ['api-key', 'partner-key']
491
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
492
+ :header_params => header_params,
493
+ :query_params => query_params,
494
+ :form_params => form_params,
495
+ :body => post_body,
496
+ :auth_names => auth_names,
497
+ :return_type => 'ConversationsMessage')
498
+ if @api_client.config.debugging
499
+ @api_client.config.logger.debug "API called: ConversationsApi#conversations_pushed_messages_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
500
+ end
501
+ return data, status_code, headers
502
+ end
503
+ end
504
+ end