sib-api-v3-sdk 8.1.0 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +82 -33
  3. data/docs/Body.md +3 -11
  4. data/docs/Body1.md +3 -11
  5. data/docs/Body10.md +11 -0
  6. data/docs/Body11.md +8 -0
  7. data/docs/Body12.md +11 -0
  8. data/docs/Body2.md +11 -0
  9. data/docs/Body3.md +9 -0
  10. data/docs/Body4.md +9 -0
  11. data/docs/Body5.md +11 -0
  12. data/docs/Body6.md +18 -0
  13. data/docs/Body7.md +17 -0
  14. data/docs/Body8.md +13 -0
  15. data/docs/Body9.md +8 -0
  16. data/docs/CompaniesApi.md +425 -0
  17. data/docs/CompaniesList.md +8 -0
  18. data/docs/Company.md +11 -0
  19. data/docs/CompanyAttributes.md +7 -0
  20. data/docs/CompanyAttributesInner.md +12 -0
  21. data/docs/ContactsApi.md +8 -2
  22. data/docs/{ListsApi.md → ConversationsApi.md} +115 -133
  23. data/docs/ConversationsMessage.md +17 -0
  24. data/docs/ConversationsMessageFile.md +12 -0
  25. data/docs/ConversationsMessageFileImageInfo.md +10 -0
  26. data/docs/CreateContact.md +1 -1
  27. data/docs/CreateEmailCampaign.md +2 -0
  28. data/docs/CreateEmailCampaignRecipients.md +1 -0
  29. data/docs/CreateSubAccount.md +3 -3
  30. data/docs/CreateSubAccountResponse.md +8 -0
  31. data/docs/Deal.md +11 -0
  32. data/docs/DealAttributes.md +7 -0
  33. data/docs/DealAttributesInner.md +12 -0
  34. data/docs/DealsApi.md +476 -0
  35. data/docs/DealsList.md +8 -0
  36. data/docs/EmailCampaignsApi.md +6 -5
  37. data/docs/FileData.md +3 -6
  38. data/docs/FileDownloadableLink.md +8 -0
  39. data/docs/FileList.md +7 -0
  40. data/docs/FilesApi.md +318 -0
  41. data/docs/GetCampaignStats.md +2 -0
  42. data/docs/GetScheduledEmailByBatchId.md +9 -0
  43. data/docs/GetScheduledEmailByBatchIdBatches.md +10 -0
  44. data/docs/GetScheduledEmailByMessageId.md +10 -0
  45. data/docs/GetSsoToken.md +1 -1
  46. data/docs/InboundParsingApi.md +60 -0
  47. data/docs/InlineResponse200.md +8 -0
  48. data/docs/InlineResponse201.md +8 -0
  49. data/docs/InlineResponse2011.md +8 -0
  50. data/docs/MasterAccountApi.md +6 -6
  51. data/docs/NoteData.md +1 -0
  52. data/docs/NoteId.md +8 -0
  53. data/docs/NoteList.md +7 -0
  54. data/docs/NotesApi.md +312 -0
  55. data/docs/Pipeline.md +8 -0
  56. data/docs/PipelineStage.md +9 -0
  57. data/docs/ScheduleSmtpEmail.md +10 -0
  58. data/docs/SendSmtpEmail.md +3 -1
  59. data/docs/SubAccountDetailsResponsePlanInfoCredits.md +1 -1
  60. data/docs/SubAccountsResponseSubAccounts.md +4 -4
  61. data/docs/Task.md +0 -11
  62. data/docs/TaskList.md +8 -0
  63. data/docs/TaskReminder.md +1 -1
  64. data/docs/TaskTypes.md +0 -1
  65. data/docs/{FoldersApi.md → TasksApi.md} +95 -91
  66. data/docs/TransactionalEmailsApi.md +201 -2
  67. data/docs/UpdateContact.md +1 -1
  68. data/docs/UpdateEmailCampaign.md +3 -1
  69. data/docs/UpdateEmailCampaignRecipients.md +2 -1
  70. data/docs/UpdateSmtpTemplate.md +1 -1
  71. data/docs/UploadImageModel.md +8 -0
  72. data/lib/sib-api-v3-sdk/api/companies_api.rb +409 -0
  73. data/lib/sib-api-v3-sdk/api/contacts_api.rb +26 -0
  74. data/lib/sib-api-v3-sdk/api/conversations_api.rb +504 -0
  75. data/lib/sib-api-v3-sdk/api/deals_api.rb +454 -0
  76. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +13 -8
  77. data/lib/sib-api-v3-sdk/api/files_api.rb +313 -0
  78. data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +57 -1
  79. data/lib/sib-api-v3-sdk/api/master_account_api.rb +9 -9
  80. data/lib/sib-api-v3-sdk/api/notes_api.rb +308 -0
  81. data/lib/sib-api-v3-sdk/api/process_api.rb +4 -0
  82. data/lib/sib-api-v3-sdk/api/reseller_api.rb +4 -0
  83. data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +4 -0
  84. data/lib/sib-api-v3-sdk/api/tasks_api.rb +375 -0
  85. data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +222 -3
  86. data/lib/sib-api-v3-sdk/models/body.rb +16 -111
  87. data/lib/sib-api-v3-sdk/models/body_1.rb +16 -116
  88. data/lib/sib-api-v3-sdk/models/body_10.rb +225 -0
  89. data/lib/sib-api-v3-sdk/models/body_11.rb +190 -0
  90. data/lib/sib-api-v3-sdk/models/body_12.rb +215 -0
  91. data/lib/sib-api-v3-sdk/models/body_2.rb +223 -0
  92. data/lib/sib-api-v3-sdk/models/body_3.rb +200 -0
  93. data/lib/sib-api-v3-sdk/models/body_4.rb +195 -0
  94. data/lib/sib-api-v3-sdk/models/body_5.rb +223 -0
  95. data/lib/sib-api-v3-sdk/models/body_6.rb +320 -0
  96. data/lib/sib-api-v3-sdk/models/body_7.rb +281 -0
  97. data/lib/sib-api-v3-sdk/models/body_8.rb +245 -0
  98. data/lib/sib-api-v3-sdk/models/body_9.rb +190 -0
  99. data/lib/sib-api-v3-sdk/models/companies_list.rb +188 -0
  100. data/lib/sib-api-v3-sdk/models/company.rb +220 -0
  101. data/lib/sib-api-v3-sdk/models/company_attributes.rb +176 -0
  102. data/lib/sib-api-v3-sdk/models/company_attributes_inner.rb +223 -0
  103. data/lib/sib-api-v3-sdk/models/conversations_message.rb +324 -0
  104. data/lib/sib-api-v3-sdk/models/conversations_message_file.rb +239 -0
  105. data/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb +236 -0
  106. data/lib/sib-api-v3-sdk/models/create_contact.rb +1 -1
  107. data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +24 -4
  108. data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +17 -5
  109. data/lib/sib-api-v3-sdk/models/create_sub_account.rb +3 -3
  110. data/lib/sib-api-v3-sdk/models/create_sub_account_response.rb +190 -0
  111. data/lib/sib-api-v3-sdk/models/deal.rb +220 -0
  112. data/lib/sib-api-v3-sdk/models/deal_attributes.rb +176 -0
  113. data/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb +223 -0
  114. data/lib/sib-api-v3-sdk/models/deals_list.rb +188 -0
  115. data/lib/sib-api-v3-sdk/models/file_data.rb +22 -54
  116. data/lib/sib-api-v3-sdk/models/file_downloadable_link.rb +190 -0
  117. data/lib/sib-api-v3-sdk/models/file_list.rb +176 -0
  118. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +21 -1
  119. data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb +196 -0
  120. data/lib/sib-api-v3-sdk/models/{contact.rb → get_scheduled_email_by_batch_id_batches.rb} +62 -74
  121. data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb +254 -0
  122. data/lib/sib-api-v3-sdk/models/get_sso_token.rb +1 -1
  123. data/lib/sib-api-v3-sdk/models/inline_response_200.rb +191 -0
  124. data/lib/sib-api-v3-sdk/models/inline_response_201.rb +191 -0
  125. data/lib/sib-api-v3-sdk/models/inline_response_201_1.rb +191 -0
  126. data/lib/sib-api-v3-sdk/models/note_data.rb +16 -4
  127. data/lib/sib-api-v3-sdk/models/note_id.rb +186 -0
  128. data/lib/sib-api-v3-sdk/models/note_list.rb +176 -0
  129. data/lib/sib-api-v3-sdk/models/pipeline.rb +188 -0
  130. data/lib/sib-api-v3-sdk/models/pipeline_stage.rb +196 -0
  131. data/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb +206 -0
  132. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +24 -4
  133. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +2 -2
  134. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +1 -1
  135. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +1 -1
  136. data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +4 -4
  137. data/lib/sib-api-v3-sdk/models/task.rb +4 -119
  138. data/lib/sib-api-v3-sdk/models/task_list.rb +188 -0
  139. data/lib/sib-api-v3-sdk/models/task_reminder.rb +1 -1
  140. data/lib/sib-api-v3-sdk/models/task_types.rb +1 -11
  141. data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
  142. data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +25 -5
  143. data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +18 -6
  144. data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +1 -1
  145. data/lib/sib-api-v3-sdk/models/upload_image_model.rb +190 -0
  146. data/lib/sib-api-v3-sdk/version.rb +1 -1
  147. data/lib/sib-api-v3-sdk.rb +44 -5
  148. data/spec/api/companies_api_spec.rb +119 -0
  149. data/spec/api/contacts_api_spec.rb +2 -0
  150. data/spec/api/{crm_api_spec.rb → conversations_api_spec.rb} +54 -94
  151. data/spec/api/{lists_api_spec.rb → deals_api_spec.rb} +51 -68
  152. data/spec/api/email_campaigns_api_spec.rb +1 -1
  153. data/spec/api/files_api_spec.rb +99 -0
  154. data/spec/api/inbound_parsing_api_spec.rb +12 -0
  155. data/spec/api/master_account_api_spec.rb +4 -4
  156. data/spec/api/notes_api_spec.rb +97 -0
  157. data/spec/api/{folders_api_spec.rb → tasks_api_spec.rb} +47 -41
  158. data/spec/api/transactional_emails_api_spec.rb +44 -0
  159. data/spec/models/body_10_spec.rb +59 -0
  160. data/spec/models/body_11_spec.rb +41 -0
  161. data/spec/models/body_12_spec.rb +59 -0
  162. data/spec/models/body_1_spec.rb +2 -50
  163. data/spec/models/body_2_spec.rb +59 -0
  164. data/spec/models/body_3_spec.rb +47 -0
  165. data/spec/models/body_4_spec.rb +47 -0
  166. data/spec/models/body_5_spec.rb +59 -0
  167. data/spec/models/body_6_spec.rb +101 -0
  168. data/spec/models/{contact_spec.rb → body_7_spec.rb} +26 -14
  169. data/spec/{api/attributes_api_spec.rb → models/body_8_spec.rb} +22 -34
  170. data/spec/models/body_9_spec.rb +41 -0
  171. data/spec/models/body_spec.rb +2 -50
  172. data/spec/models/companies_list_spec.rb +41 -0
  173. data/spec/models/company_attributes_inner_spec.rb +65 -0
  174. data/spec/models/company_attributes_spec.rb +35 -0
  175. data/spec/models/company_spec.rb +59 -0
  176. data/spec/models/conversations_message_file_image_info_spec.rb +53 -0
  177. data/spec/models/conversations_message_file_spec.rb +65 -0
  178. data/spec/models/conversations_message_spec.rb +99 -0
  179. data/spec/models/create_email_campaign_recipients_spec.rb +6 -0
  180. data/spec/models/create_email_campaign_spec.rb +12 -0
  181. data/spec/models/create_sub_account_response_spec.rb +41 -0
  182. data/spec/models/deal_attributes_inner_spec.rb +65 -0
  183. data/spec/models/deal_attributes_spec.rb +35 -0
  184. data/spec/models/deal_spec.rb +59 -0
  185. data/spec/models/deals_list_spec.rb +41 -0
  186. data/spec/models/file_data_spec.rb +3 -21
  187. data/spec/models/file_downloadable_link_spec.rb +41 -0
  188. data/spec/models/file_list_spec.rb +35 -0
  189. data/spec/models/get_campaign_stats_spec.rb +12 -0
  190. data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +57 -0
  191. data/spec/models/get_scheduled_email_by_batch_id_spec.rb +47 -0
  192. data/spec/models/get_scheduled_email_by_message_id_spec.rb +57 -0
  193. data/spec/models/inline_response_200_spec.rb +41 -0
  194. data/spec/models/inline_response_201_1_spec.rb +41 -0
  195. data/spec/models/inline_response_201_spec.rb +41 -0
  196. data/spec/models/note_data_spec.rb +6 -0
  197. data/spec/models/note_id_spec.rb +41 -0
  198. data/spec/models/note_list_spec.rb +35 -0
  199. data/spec/models/pipeline_spec.rb +41 -0
  200. data/spec/models/pipeline_stage_spec.rb +47 -0
  201. data/spec/models/schedule_smtp_email_spec.rb +53 -0
  202. data/spec/models/send_smtp_email_spec.rb +12 -0
  203. data/spec/models/task_list_spec.rb +41 -0
  204. data/spec/models/task_spec.rb +0 -66
  205. data/spec/models/task_types_spec.rb +0 -6
  206. data/spec/models/update_email_campaign_recipients_spec.rb +6 -0
  207. data/spec/models/update_email_campaign_spec.rb +12 -0
  208. data/spec/models/upload_image_model_spec.rb +41 -0
  209. metadata +179 -23
  210. data/docs/AttributesApi.md +0 -246
  211. data/docs/CRMApi.md +0 -762
  212. data/docs/Contact.md +0 -15
  213. data/lib/sib-api-v3-sdk/api/attributes_api.rb +0 -274
  214. data/lib/sib-api-v3-sdk/api/crm_api.rb +0 -716
  215. data/lib/sib-api-v3-sdk/api/folders_api.rb +0 -383
  216. data/lib/sib-api-v3-sdk/api/lists_api.rb +0 -562
@@ -0,0 +1,454 @@
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 DealsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get deal attributes
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [DealAttributes]
25
+ def crm_attributes_deals_get(opts = {})
26
+ data, _status_code, _headers = crm_attributes_deals_get_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # Get deal attributes
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(DealAttributes, Fixnum, Hash)>] DealAttributes data, response status code and response headers
33
+ def crm_attributes_deals_get_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: DealsApi.crm_attributes_deals_get ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/crm/attributes/deals'
39
+
40
+ # query parameters
41
+ query_params = {}
42
+
43
+ # header parameters
44
+ header_params = {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
47
+ # HTTP header 'Content-Type'
48
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = {}
52
+
53
+ # http body (model)
54
+ post_body = nil
55
+ auth_names = ['api-key', 'partner-key']
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => 'DealAttributes')
63
+ if @api_client.config.debugging
64
+ @api_client.config.logger.debug "API called: DealsApi#crm_attributes_deals_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ end
66
+ return data, status_code, headers
67
+ end
68
+ # Get all deals
69
+ # @param [Hash] opts the optional parameters
70
+ # @option opts [String] :filter_attributes Filter by attrbutes. If you have filter for owner on your side please send it as &#x60;attributes.owner&#x60;.\&quot;
71
+ # @option opts [String] :filter_linked_companies_ids Filter by linked companies ids
72
+ # @option opts [String] :filter_linked_contacts_ids Filter by linked companies ids
73
+ # @option opts [Integer] :offset Index of the first document of the page
74
+ # @option opts [Integer] :limit Number of documents per page (default to 50)
75
+ # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if &#x60;sort&#x60; is not passed
76
+ # @option opts [String] :sort_by The field used to sort field names.
77
+ # @return [DealsList]
78
+ def crm_deals_get(opts = {})
79
+ data, _status_code, _headers = crm_deals_get_with_http_info(opts)
80
+ data
81
+ end
82
+
83
+ # Get all deals
84
+ # @param [Hash] opts the optional parameters
85
+ # @option opts [String] :filter_attributes Filter by attrbutes. If you have filter for owner on your side please send it as &#x60;attributes.owner&#x60;.\&quot;
86
+ # @option opts [String] :filter_linked_companies_ids Filter by linked companies ids
87
+ # @option opts [String] :filter_linked_contacts_ids Filter by linked companies ids
88
+ # @option opts [Integer] :offset Index of the first document of the page
89
+ # @option opts [Integer] :limit Number of documents per page
90
+ # @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if &#x60;sort&#x60; is not passed
91
+ # @option opts [String] :sort_by The field used to sort field names.
92
+ # @return [Array<(DealsList, Fixnum, Hash)>] DealsList data, response status code and response headers
93
+ def crm_deals_get_with_http_info(opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_get ...'
96
+ end
97
+ if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
98
+ fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
99
+ end
100
+ # resource path
101
+ local_var_path = '/crm/deals'
102
+
103
+ # query parameters
104
+ query_params = {}
105
+ query_params[:'filter[attributes]'] = opts[:'filter_attributes'] if !opts[:'filter_attributes'].nil?
106
+ query_params[:'filter[linkedCompaniesIds]'] = opts[:'filter_linked_companies_ids'] if !opts[:'filter_linked_companies_ids'].nil?
107
+ query_params[:'filter[linkedContactsIds]'] = opts[:'filter_linked_contacts_ids'] if !opts[:'filter_linked_contacts_ids'].nil?
108
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
109
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
110
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
111
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
112
+
113
+ # header parameters
114
+ header_params = {}
115
+ # HTTP header 'Accept' (if needed)
116
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
117
+ # HTTP header 'Content-Type'
118
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = {}
122
+
123
+ # http body (model)
124
+ post_body = nil
125
+ auth_names = ['api-key', 'partner-key']
126
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
127
+ :header_params => header_params,
128
+ :query_params => query_params,
129
+ :form_params => form_params,
130
+ :body => post_body,
131
+ :auth_names => auth_names,
132
+ :return_type => 'DealsList')
133
+ if @api_client.config.debugging
134
+ @api_client.config.logger.debug "API called: DealsApi#crm_deals_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
135
+ end
136
+ return data, status_code, headers
137
+ end
138
+ # Delete a deal
139
+ # @param id
140
+ # @param [Hash] opts the optional parameters
141
+ # @return [nil]
142
+ def crm_deals_id_delete(id, opts = {})
143
+ crm_deals_id_delete_with_http_info(id, opts)
144
+ nil
145
+ end
146
+
147
+ # Delete a deal
148
+ # @param id
149
+ # @param [Hash] opts the optional parameters
150
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
151
+ def crm_deals_id_delete_with_http_info(id, opts = {})
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_id_delete ...'
154
+ end
155
+ # verify the required parameter 'id' is set
156
+ if @api_client.config.client_side_validation && id.nil?
157
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.crm_deals_id_delete"
158
+ end
159
+ # resource path
160
+ local_var_path = '/crm/deals/{id}'.sub('{' + 'id' + '}', id.to_s)
161
+
162
+ # query parameters
163
+ query_params = {}
164
+
165
+ # header parameters
166
+ header_params = {}
167
+ # HTTP header 'Accept' (if needed)
168
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
169
+ # HTTP header 'Content-Type'
170
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
171
+
172
+ # form parameters
173
+ form_params = {}
174
+
175
+ # http body (model)
176
+ post_body = nil
177
+ auth_names = ['api-key', 'partner-key']
178
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
179
+ :header_params => header_params,
180
+ :query_params => query_params,
181
+ :form_params => form_params,
182
+ :body => post_body,
183
+ :auth_names => auth_names)
184
+ if @api_client.config.debugging
185
+ @api_client.config.logger.debug "API called: DealsApi#crm_deals_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
186
+ end
187
+ return data, status_code, headers
188
+ end
189
+ # Get a deal
190
+ # @param id
191
+ # @param [Hash] opts the optional parameters
192
+ # @return [Deal]
193
+ def crm_deals_id_get(id, opts = {})
194
+ data, _status_code, _headers = crm_deals_id_get_with_http_info(id, opts)
195
+ data
196
+ end
197
+
198
+ # Get a deal
199
+ # @param id
200
+ # @param [Hash] opts the optional parameters
201
+ # @return [Array<(Deal, Fixnum, Hash)>] Deal data, response status code and response headers
202
+ def crm_deals_id_get_with_http_info(id, opts = {})
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_id_get ...'
205
+ end
206
+ # verify the required parameter 'id' is set
207
+ if @api_client.config.client_side_validation && id.nil?
208
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.crm_deals_id_get"
209
+ end
210
+ # resource path
211
+ local_var_path = '/crm/deals/{id}'.sub('{' + 'id' + '}', id.to_s)
212
+
213
+ # query parameters
214
+ query_params = {}
215
+
216
+ # header parameters
217
+ header_params = {}
218
+ # HTTP header 'Accept' (if needed)
219
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
220
+ # HTTP header 'Content-Type'
221
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
222
+
223
+ # form parameters
224
+ form_params = {}
225
+
226
+ # http body (model)
227
+ post_body = nil
228
+ auth_names = ['api-key', 'partner-key']
229
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
230
+ :header_params => header_params,
231
+ :query_params => query_params,
232
+ :form_params => form_params,
233
+ :body => post_body,
234
+ :auth_names => auth_names,
235
+ :return_type => 'Deal')
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug "API called: DealsApi#crm_deals_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
238
+ end
239
+ return data, status_code, headers
240
+ end
241
+ # Update a deal
242
+ # @param id
243
+ # @param body Updated deal details.
244
+ # @param [Hash] opts the optional parameters
245
+ # @return [nil]
246
+ def crm_deals_id_patch(id, body, opts = {})
247
+ crm_deals_id_patch_with_http_info(id, body, opts)
248
+ nil
249
+ end
250
+
251
+ # Update a deal
252
+ # @param id
253
+ # @param body Updated deal details.
254
+ # @param [Hash] opts the optional parameters
255
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
256
+ def crm_deals_id_patch_with_http_info(id, body, opts = {})
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_id_patch ...'
259
+ end
260
+ # verify the required parameter 'id' is set
261
+ if @api_client.config.client_side_validation && id.nil?
262
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.crm_deals_id_patch"
263
+ end
264
+ # verify the required parameter 'body' is set
265
+ if @api_client.config.client_side_validation && body.nil?
266
+ fail ArgumentError, "Missing the required parameter 'body' when calling DealsApi.crm_deals_id_patch"
267
+ end
268
+ # resource path
269
+ local_var_path = '/crm/deals/{id}'.sub('{' + 'id' + '}', id.to_s)
270
+
271
+ # query parameters
272
+ query_params = {}
273
+
274
+ # header parameters
275
+ header_params = {}
276
+ # HTTP header 'Accept' (if needed)
277
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
278
+ # HTTP header 'Content-Type'
279
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
280
+
281
+ # form parameters
282
+ form_params = {}
283
+
284
+ # http body (model)
285
+ post_body = @api_client.object_to_http_body(body)
286
+ auth_names = ['api-key', 'partner-key']
287
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
288
+ :header_params => header_params,
289
+ :query_params => query_params,
290
+ :form_params => form_params,
291
+ :body => post_body,
292
+ :auth_names => auth_names)
293
+ if @api_client.config.debugging
294
+ @api_client.config.logger.debug "API called: DealsApi#crm_deals_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
295
+ end
296
+ return data, status_code, headers
297
+ end
298
+ # Link and Unlink a deal with contacts and companies
299
+ # @param id
300
+ # @param body Linked / Unlinked contacts and companies ids.
301
+ # @param [Hash] opts the optional parameters
302
+ # @return [nil]
303
+ def crm_deals_link_unlink_id_patch(id, body, opts = {})
304
+ crm_deals_link_unlink_id_patch_with_http_info(id, body, opts)
305
+ nil
306
+ end
307
+
308
+ # Link and Unlink a deal with contacts and companies
309
+ # @param id
310
+ # @param body Linked / Unlinked contacts and companies ids.
311
+ # @param [Hash] opts the optional parameters
312
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
313
+ def crm_deals_link_unlink_id_patch_with_http_info(id, body, opts = {})
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_link_unlink_id_patch ...'
316
+ end
317
+ # verify the required parameter 'id' is set
318
+ if @api_client.config.client_side_validation && id.nil?
319
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.crm_deals_link_unlink_id_patch"
320
+ end
321
+ # verify the required parameter 'body' is set
322
+ if @api_client.config.client_side_validation && body.nil?
323
+ fail ArgumentError, "Missing the required parameter 'body' when calling DealsApi.crm_deals_link_unlink_id_patch"
324
+ end
325
+ # resource path
326
+ local_var_path = '/crm/deals/link-unlink/{id}'.sub('{' + 'id' + '}', id.to_s)
327
+
328
+ # query parameters
329
+ query_params = {}
330
+
331
+ # header parameters
332
+ header_params = {}
333
+ # HTTP header 'Accept' (if needed)
334
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
335
+ # HTTP header 'Content-Type'
336
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
337
+
338
+ # form parameters
339
+ form_params = {}
340
+
341
+ # http body (model)
342
+ post_body = @api_client.object_to_http_body(body)
343
+ auth_names = ['api-key', 'partner-key']
344
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
345
+ :header_params => header_params,
346
+ :query_params => query_params,
347
+ :form_params => form_params,
348
+ :body => post_body,
349
+ :auth_names => auth_names)
350
+ if @api_client.config.debugging
351
+ @api_client.config.logger.debug "API called: DealsApi#crm_deals_link_unlink_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
352
+ end
353
+ return data, status_code, headers
354
+ end
355
+ # Create a deal
356
+ # @param body Deal create data.
357
+ # @param [Hash] opts the optional parameters
358
+ # @return [InlineResponse201]
359
+ def crm_deals_post(body, opts = {})
360
+ data, _status_code, _headers = crm_deals_post_with_http_info(body, opts)
361
+ data
362
+ end
363
+
364
+ # Create a deal
365
+ # @param body Deal create data.
366
+ # @param [Hash] opts the optional parameters
367
+ # @return [Array<(InlineResponse201, Fixnum, Hash)>] InlineResponse201 data, response status code and response headers
368
+ def crm_deals_post_with_http_info(body, opts = {})
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug 'Calling API: DealsApi.crm_deals_post ...'
371
+ end
372
+ # verify the required parameter 'body' is set
373
+ if @api_client.config.client_side_validation && body.nil?
374
+ fail ArgumentError, "Missing the required parameter 'body' when calling DealsApi.crm_deals_post"
375
+ end
376
+ # resource path
377
+ local_var_path = '/crm/deals'
378
+
379
+ # query parameters
380
+ query_params = {}
381
+
382
+ # header parameters
383
+ header_params = {}
384
+ # HTTP header 'Accept' (if needed)
385
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
386
+ # HTTP header 'Content-Type'
387
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
388
+
389
+ # form parameters
390
+ form_params = {}
391
+
392
+ # http body (model)
393
+ post_body = @api_client.object_to_http_body(body)
394
+ auth_names = ['api-key', 'partner-key']
395
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
396
+ :header_params => header_params,
397
+ :query_params => query_params,
398
+ :form_params => form_params,
399
+ :body => post_body,
400
+ :auth_names => auth_names,
401
+ :return_type => 'InlineResponse201')
402
+ if @api_client.config.debugging
403
+ @api_client.config.logger.debug "API called: DealsApi#crm_deals_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
404
+ end
405
+ return data, status_code, headers
406
+ end
407
+ # Get pipeline stages
408
+ # @param [Hash] opts the optional parameters
409
+ # @return [Pipeline]
410
+ def crm_pipeline_details_get(opts = {})
411
+ data, _status_code, _headers = crm_pipeline_details_get_with_http_info(opts)
412
+ data
413
+ end
414
+
415
+ # Get pipeline stages
416
+ # @param [Hash] opts the optional parameters
417
+ # @return [Array<(Pipeline, Fixnum, Hash)>] Pipeline data, response status code and response headers
418
+ def crm_pipeline_details_get_with_http_info(opts = {})
419
+ if @api_client.config.debugging
420
+ @api_client.config.logger.debug 'Calling API: DealsApi.crm_pipeline_details_get ...'
421
+ end
422
+ # resource path
423
+ local_var_path = '/crm/pipeline/details'
424
+
425
+ # query parameters
426
+ query_params = {}
427
+
428
+ # header parameters
429
+ header_params = {}
430
+ # HTTP header 'Accept' (if needed)
431
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
432
+ # HTTP header 'Content-Type'
433
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
434
+
435
+ # form parameters
436
+ form_params = {}
437
+
438
+ # http body (model)
439
+ post_body = nil
440
+ auth_names = ['api-key', 'partner-key']
441
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
442
+ :header_params => header_params,
443
+ :query_params => query_params,
444
+ :form_params => form_params,
445
+ :body => post_body,
446
+ :auth_names => auth_names,
447
+ :return_type => 'Pipeline')
448
+ if @api_client.config.debugging
449
+ @api_client.config.logger.debug "API called: DealsApi#crm_pipeline_details_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
450
+ end
451
+ return data, status_code, headers
452
+ end
453
+ end
454
+ end
@@ -298,7 +298,7 @@ module SibApiV3Sdk
298
298
  # @option opts [String] :status Filter on the status of the campaign
299
299
  # @option opts [String] :start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; )
300
300
  # @option opts [String] :end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; )
301
- # @option opts [Integer] :limit Number of documents per page (default to 500)
301
+ # @option opts [Integer] :limit Number of documents per page (default to 50)
302
302
  # @option opts [Integer] :offset Index of the first document in the page (default to 0)
303
303
  # @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)
304
304
  # @return [GetEmailCampaigns]
@@ -327,8 +327,12 @@ module SibApiV3Sdk
327
327
  if @api_client.config.client_side_validation && opts[:'status'] && !['suspended', 'archive', 'sent', 'queued', 'draft', 'inProcess'].include?(opts[:'status'])
328
328
  fail ArgumentError, 'invalid value for "status", must be one of suspended, archive, sent, queued, draft, inProcess'
329
329
  end
330
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
331
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailCampaignsApi.get_email_campaigns, must be smaller than or equal to 1000.'
330
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
331
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailCampaignsApi.get_email_campaigns, must be smaller than or equal to 100.'
332
+ end
333
+
334
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
335
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailCampaignsApi.get_email_campaigns, must be greater than or equal to 0.'
332
336
  end
333
337
 
334
338
  if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
@@ -710,16 +714,16 @@ module SibApiV3Sdk
710
714
  # Upload an image to your account's image gallery
711
715
  # @param upload_image Parameters to upload an image
712
716
  # @param [Hash] opts the optional parameters
713
- # @return [nil]
717
+ # @return [UploadImageModel]
714
718
  def upload_image_to_gallery(upload_image, opts = {})
715
- upload_image_to_gallery_with_http_info(upload_image, opts)
716
- nil
719
+ data, _status_code, _headers = upload_image_to_gallery_with_http_info(upload_image, opts)
720
+ data
717
721
  end
718
722
 
719
723
  # Upload an image to your account&#39;s image gallery
720
724
  # @param upload_image Parameters to upload an image
721
725
  # @param [Hash] opts the optional parameters
722
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
726
+ # @return [Array<(UploadImageModel, Fixnum, Hash)>] UploadImageModel data, response status code and response headers
723
727
  def upload_image_to_gallery_with_http_info(upload_image, opts = {})
724
728
  if @api_client.config.debugging
725
729
  @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.upload_image_to_gallery ...'
@@ -752,7 +756,8 @@ module SibApiV3Sdk
752
756
  :query_params => query_params,
753
757
  :form_params => form_params,
754
758
  :body => post_body,
755
- :auth_names => auth_names)
759
+ :auth_names => auth_names,
760
+ :return_type => 'UploadImageModel')
756
761
  if @api_client.config.debugging
757
762
  @api_client.config.logger.debug "API called: EmailCampaignsApi#upload_image_to_gallery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
758
763
  end