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,281 @@
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 'date'
14
+
15
+ module SibApiV3Sdk
16
+ class Body7
17
+ # Name of task
18
+ attr_accessor :name
19
+
20
+ # Duration of task in milliseconds [1 minute = 60000 ms]
21
+ attr_accessor :duration
22
+
23
+ # Id for type of task e.g Call / Email / Meeting etc.
24
+ attr_accessor :task_type_id
25
+
26
+ # Task date/time
27
+ attr_accessor :date
28
+
29
+ # Notes added to a task
30
+ attr_accessor :notes
31
+
32
+ # Task marked as done
33
+ attr_accessor :done
34
+
35
+ # User id to whom task is assigned
36
+ attr_accessor :assign_to_id
37
+
38
+ # Contact ids for contacts linked to this task
39
+ attr_accessor :contacts_ids
40
+
41
+ # Deal ids for deals a task is linked to
42
+ attr_accessor :deals_ids
43
+
44
+ # Companies ids for companies a task is linked to
45
+ attr_accessor :companies_ids
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'name' => :'name',
51
+ :'duration' => :'duration',
52
+ :'task_type_id' => :'taskTypeId',
53
+ :'date' => :'date',
54
+ :'notes' => :'notes',
55
+ :'done' => :'done',
56
+ :'assign_to_id' => :'assignToId',
57
+ :'contacts_ids' => :'contactsIds',
58
+ :'deals_ids' => :'dealsIds',
59
+ :'companies_ids' => :'companiesIds'
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.swagger_types
65
+ {
66
+ :'name' => :'String',
67
+ :'duration' => :'Integer',
68
+ :'task_type_id' => :'String',
69
+ :'date' => :'DateTime',
70
+ :'notes' => :'String',
71
+ :'done' => :'BOOLEAN',
72
+ :'assign_to_id' => :'String',
73
+ :'contacts_ids' => :'Array<Integer>',
74
+ :'deals_ids' => :'Array<String>',
75
+ :'companies_ids' => :'Array<String>'
76
+ }
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ return unless attributes.is_a?(Hash)
83
+
84
+ # convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
86
+
87
+ if attributes.has_key?(:'name')
88
+ self.name = attributes[:'name']
89
+ end
90
+
91
+ if attributes.has_key?(:'duration')
92
+ self.duration = attributes[:'duration']
93
+ end
94
+
95
+ if attributes.has_key?(:'taskTypeId')
96
+ self.task_type_id = attributes[:'taskTypeId']
97
+ end
98
+
99
+ if attributes.has_key?(:'date')
100
+ self.date = attributes[:'date']
101
+ end
102
+
103
+ if attributes.has_key?(:'notes')
104
+ self.notes = attributes[:'notes']
105
+ end
106
+
107
+ if attributes.has_key?(:'done')
108
+ self.done = attributes[:'done']
109
+ end
110
+
111
+ if attributes.has_key?(:'assignToId')
112
+ self.assign_to_id = attributes[:'assignToId']
113
+ end
114
+
115
+ if attributes.has_key?(:'contactsIds')
116
+ if (value = attributes[:'contactsIds']).is_a?(Array)
117
+ self.contacts_ids = value
118
+ end
119
+ end
120
+
121
+ if attributes.has_key?(:'dealsIds')
122
+ if (value = attributes[:'dealsIds']).is_a?(Array)
123
+ self.deals_ids = value
124
+ end
125
+ end
126
+
127
+ if attributes.has_key?(:'companiesIds')
128
+ if (value = attributes[:'companiesIds']).is_a?(Array)
129
+ self.companies_ids = value
130
+ end
131
+ end
132
+ end
133
+
134
+ # Show invalid properties with the reasons. Usually used together with valid?
135
+ # @return Array for valid properties with the reasons
136
+ def list_invalid_properties
137
+ invalid_properties = Array.new
138
+ invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+ true
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ name == o.name &&
153
+ duration == o.duration &&
154
+ task_type_id == o.task_type_id &&
155
+ date == o.date &&
156
+ notes == o.notes &&
157
+ done == o.done &&
158
+ assign_to_id == o.assign_to_id &&
159
+ contacts_ids == o.contacts_ids &&
160
+ deals_ids == o.deals_ids &&
161
+ companies_ids == o.companies_ids
162
+ end
163
+
164
+ # @see the `==` method
165
+ # @param [Object] Object to be compared
166
+ def eql?(o)
167
+ self == o
168
+ end
169
+
170
+ # Calculates hash code according to all attributes.
171
+ # @return [Fixnum] Hash code
172
+ def hash
173
+ [name, duration, task_type_id, date, notes, done, assign_to_id, contacts_ids, deals_ids, companies_ids].hash
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def build_from_hash(attributes)
180
+ return nil unless attributes.is_a?(Hash)
181
+ self.class.swagger_types.each_pair do |key, type|
182
+ if type =~ /\AArray<(.*)>/i
183
+ # check to ensure the input is an array given that the attribute
184
+ # is documented as an array but the input is not
185
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
186
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
187
+ end
188
+ elsif !attributes[self.class.attribute_map[key]].nil?
189
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
190
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
191
+ end
192
+
193
+ self
194
+ end
195
+
196
+ # Deserializes the data based on type
197
+ # @param string type Data type
198
+ # @param string value Value to be deserialized
199
+ # @return [Object] Deserialized data
200
+ def _deserialize(type, value)
201
+ case type.to_sym
202
+ when :DateTime
203
+ DateTime.parse(value)
204
+ when :Date
205
+ Date.parse(value)
206
+ when :String
207
+ value.to_s
208
+ when :Integer
209
+ value.to_i
210
+ when :Float
211
+ value.to_f
212
+ when :BOOLEAN
213
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
214
+ true
215
+ else
216
+ false
217
+ end
218
+ when :Object
219
+ # generic object (usually a Hash), return directly
220
+ value
221
+ when /\AArray<(?<inner_type>.+)>\z/
222
+ inner_type = Regexp.last_match[:inner_type]
223
+ value.map { |v| _deserialize(inner_type, v) }
224
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
225
+ k_type = Regexp.last_match[:k_type]
226
+ v_type = Regexp.last_match[:v_type]
227
+ {}.tap do |hash|
228
+ value.each do |k, v|
229
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
230
+ end
231
+ end
232
+ else # model
233
+ temp_model = SibApiV3Sdk.const_get(type).new
234
+ temp_model.build_from_hash(value)
235
+ end
236
+ end
237
+
238
+ # Returns the string representation of the object
239
+ # @return [String] String presentation of the object
240
+ def to_s
241
+ to_hash.to_s
242
+ end
243
+
244
+ # to_body is an alias to to_hash (backward compatibility)
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_body
247
+ to_hash
248
+ end
249
+
250
+ # Returns the object in the form of hash
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_hash
253
+ hash = {}
254
+ self.class.attribute_map.each_pair do |attr, param|
255
+ value = self.send(attr)
256
+ next if value.nil?
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ # Outputs non-array value in the form of hash
263
+ # For object, use to_hash. Otherwise, just return the value
264
+ # @param [Object] value Any valid value
265
+ # @return [Hash] Returns the value in the form of hash
266
+ def _to_hash(value)
267
+ if value.is_a?(Array)
268
+ value.compact.map { |v| _to_hash(v) }
269
+ elsif value.is_a?(Hash)
270
+ {}.tap do |hash|
271
+ value.each { |k, v| hash[k] = _to_hash(v) }
272
+ end
273
+ elsif value.respond_to? :to_hash
274
+ value.to_hash
275
+ else
276
+ value
277
+ end
278
+ end
279
+
280
+ end
281
+ end
@@ -0,0 +1,245 @@
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 'date'
14
+
15
+ module SibApiV3Sdk
16
+ class Body8
17
+ # visitor’s ID received from a webhook or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>
18
+ attr_accessor :visitor_id
19
+
20
+ # message text
21
+ attr_accessor :text
22
+
23
+ # agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required).
24
+ attr_accessor :agent_id
25
+
26
+ # mark your messages to distinguish messages created by you from the others.
27
+ attr_accessor :received_from
28
+
29
+ # agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address.
30
+ attr_accessor :agent_email
31
+
32
+ # agent name
33
+ attr_accessor :agent_name
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'visitor_id' => :'visitorId',
39
+ :'text' => :'text',
40
+ :'agent_id' => :'agentId',
41
+ :'received_from' => :'receivedFrom',
42
+ :'agent_email' => :'agentEmail',
43
+ :'agent_name' => :'agentName'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.swagger_types
49
+ {
50
+ :'visitor_id' => :'String',
51
+ :'text' => :'String',
52
+ :'agent_id' => :'String',
53
+ :'received_from' => :'String',
54
+ :'agent_email' => :'String',
55
+ :'agent_name' => :'String'
56
+ }
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ return unless attributes.is_a?(Hash)
63
+
64
+ # convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
66
+
67
+ if attributes.has_key?(:'visitorId')
68
+ self.visitor_id = attributes[:'visitorId']
69
+ end
70
+
71
+ if attributes.has_key?(:'text')
72
+ self.text = attributes[:'text']
73
+ end
74
+
75
+ if attributes.has_key?(:'agentId')
76
+ self.agent_id = attributes[:'agentId']
77
+ end
78
+
79
+ if attributes.has_key?(:'receivedFrom')
80
+ self.received_from = attributes[:'receivedFrom']
81
+ end
82
+
83
+ if attributes.has_key?(:'agentEmail')
84
+ self.agent_email = attributes[:'agentEmail']
85
+ end
86
+
87
+ if attributes.has_key?(:'agentName')
88
+ self.agent_name = attributes[:'agentName']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ if @visitor_id.nil?
97
+ invalid_properties.push('invalid value for "visitor_id", visitor_id cannot be nil.')
98
+ end
99
+
100
+ if @text.nil?
101
+ invalid_properties.push('invalid value for "text", text cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ return false if @visitor_id.nil?
111
+ return false if @text.nil?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ visitor_id == o.visitor_id &&
121
+ text == o.text &&
122
+ agent_id == o.agent_id &&
123
+ received_from == o.received_from &&
124
+ agent_email == o.agent_email &&
125
+ agent_name == o.agent_name
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Fixnum] Hash code
136
+ def hash
137
+ [visitor_id, text, agent_id, received_from, agent_email, agent_name].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ self.class.swagger_types.each_pair do |key, type|
146
+ if type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :DateTime
167
+ DateTime.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value.to_s
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :BOOLEAN
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ temp_model = SibApiV3Sdk.const_get(type).new
198
+ temp_model.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ next if value.nil?
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+ end