sib-api-v3-sdk 7.5.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +59 -4
  3. data/docs/Body.md +18 -0
  4. data/docs/Body1.md +18 -0
  5. data/docs/CRMApi.md +710 -0
  6. data/docs/Contact.md +15 -0
  7. data/docs/ContactsApi.md +61 -2
  8. data/docs/CreateSmsCampaign.md +1 -0
  9. data/docs/CreateSubAccount.md +10 -0
  10. data/docs/CreateWebhook.md +2 -1
  11. data/docs/FileData.md +17 -0
  12. data/docs/GetCampaignStats.md +1 -0
  13. data/docs/GetContactCampaignStats.md +1 -0
  14. data/docs/GetExtendedContactDetailsStatistics.md +1 -0
  15. data/docs/GetExtendedContactDetailsStatisticsDelivered.md +9 -0
  16. data/docs/GetInboundEmailEvents.md +8 -0
  17. data/docs/GetInboundEmailEventsByUuid.md +15 -0
  18. data/docs/GetInboundEmailEventsByUuidAttachments.md +11 -0
  19. data/docs/GetInboundEmailEventsByUuidLogs.md +9 -0
  20. data/docs/GetInboundEmailEventsEvents.md +11 -0
  21. data/docs/InboundParsingApi.md +139 -0
  22. data/docs/MasterAccountApi.md +367 -0
  23. data/docs/MasterDetailsResponse.md +14 -0
  24. data/docs/MasterDetailsResponseBillingInfo.md +11 -0
  25. data/docs/MasterDetailsResponseBillingInfoAddress.md +12 -0
  26. data/docs/MasterDetailsResponseBillingInfoName.md +9 -0
  27. data/docs/MasterDetailsResponsePlanInfo.md +13 -0
  28. data/docs/MasterDetailsResponsePlanInfoFeatures.md +12 -0
  29. data/docs/Note.md +14 -0
  30. data/docs/NoteData.md +10 -0
  31. data/docs/RequestContactExport.md +1 -2
  32. data/docs/SendSmtpEmail.md +3 -3
  33. data/docs/SendTransacSms.md +1 -0
  34. data/docs/SsoTokenRequest.md +9 -0
  35. data/docs/SubAccountDetailsResponse.md +11 -0
  36. data/docs/SubAccountDetailsResponsePlanInfo.md +10 -0
  37. data/docs/SubAccountDetailsResponsePlanInfoCredits.md +9 -0
  38. data/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md +9 -0
  39. data/docs/SubAccountDetailsResponsePlanInfoFeatures.md +10 -0
  40. data/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md +9 -0
  41. data/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md +9 -0
  42. data/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md +9 -0
  43. data/docs/SubAccountUpdatePlanRequest.md +9 -0
  44. data/docs/SubAccountUpdatePlanRequestCredits.md +8 -0
  45. data/docs/SubAccountUpdatePlanRequestFeatures.md +10 -0
  46. data/docs/SubAccountsResponse.md +9 -0
  47. data/docs/SubAccountsResponseSubAccounts.md +11 -0
  48. data/docs/Task.md +24 -0
  49. data/docs/TaskReminder.md +10 -0
  50. data/docs/TransactionalEmailsApi.md +4 -63
  51. data/docs/UpdateBatchContacts.md +8 -0
  52. data/docs/UpdateBatchContactsContacts.md +16 -0
  53. data/docs/UpdateBatchContactsModel.md +9 -0
  54. data/docs/UpdateSmsCampaign.md +1 -0
  55. data/docs/UpdateWebhook.md +2 -1
  56. data/lib/sib-api-v3-sdk/api/contacts_api.rb +55 -2
  57. data/lib/sib-api-v3-sdk/api/crm_api.rb +670 -0
  58. data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +161 -0
  59. data/lib/sib-api-v3-sdk/api/master_account_api.rb +365 -0
  60. data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +4 -60
  61. data/lib/sib-api-v3-sdk/api/webhooks_api.rb +2 -2
  62. data/lib/sib-api-v3-sdk/models/body.rb +305 -0
  63. data/lib/sib-api-v3-sdk/models/body_1.rb +305 -0
  64. data/lib/sib-api-v3-sdk/models/{send_email.rb → contact.rb} +64 -78
  65. data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +16 -4
  66. data/lib/sib-api-v3-sdk/models/create_sub_account.rb +244 -0
  67. data/lib/sib-api-v3-sdk/models/create_webhook.rb +17 -7
  68. data/lib/sib-api-v3-sdk/models/file_data.rb +278 -0
  69. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +16 -1
  70. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +15 -4
  71. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +16 -4
  72. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_delivered.rb +205 -0
  73. data/lib/sib-api-v3-sdk/models/{send_template_email.rb → get_inbound_email_events.rb} +10 -14
  74. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid.rb +259 -0
  75. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_attachments.rb +215 -0
  76. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_logs.rb +229 -0
  77. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_events.rb +235 -0
  78. data/lib/sib-api-v3-sdk/models/master_details_response.rb +243 -0
  79. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info.rb +214 -0
  80. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_address.rb +226 -0
  81. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_name.rb +196 -0
  82. data/lib/sib-api-v3-sdk/models/master_details_response_plan_info.rb +272 -0
  83. data/lib/sib-api-v3-sdk/models/{send_email_attachment.rb → master_details_response_plan_info_features.rb} +45 -44
  84. data/lib/sib-api-v3-sdk/models/note.rb +283 -0
  85. data/lib/sib-api-v3-sdk/models/note_data.rb +243 -0
  86. data/lib/sib-api-v3-sdk/models/request_contact_export.rb +6 -11
  87. data/lib/sib-api-v3-sdk/models/request_contact_export_custom_contact_filter.rb +1 -1
  88. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +3 -3
  89. data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +16 -4
  90. data/lib/sib-api-v3-sdk/models/sso_token_request.rb +200 -0
  91. data/lib/sib-api-v3-sdk/models/sub_account_details_response.rb +214 -0
  92. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info.rb +204 -0
  93. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +195 -0
  94. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +196 -0
  95. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +203 -0
  96. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_inbox.rb +196 -0
  97. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_landing_page.rb +196 -0
  98. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_users.rb +196 -0
  99. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request.rb +194 -0
  100. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_credits.rb +186 -0
  101. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_features.rb +206 -0
  102. data/lib/sib-api-v3-sdk/models/sub_accounts_response.rb +196 -0
  103. data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +235 -0
  104. data/lib/sib-api-v3-sdk/models/task.rb +367 -0
  105. data/lib/sib-api-v3-sdk/models/task_reminder.rb +257 -0
  106. data/lib/sib-api-v3-sdk/models/update_batch_contacts.rb +187 -0
  107. data/lib/sib-api-v3-sdk/models/update_batch_contacts_contacts.rb +273 -0
  108. data/lib/sib-api-v3-sdk/models/update_batch_contacts_model.rb +197 -0
  109. data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +16 -4
  110. data/lib/sib-api-v3-sdk/models/update_webhook.rb +15 -5
  111. data/lib/sib-api-v3-sdk/version.rb +1 -1
  112. data/lib/sib-api-v3-sdk.rb +41 -3
  113. data/sib-api-v3-sdk.gemspec +2 -1
  114. data/spec/api/contacts_api_spec.rb +13 -1
  115. data/spec/api/crm_api_spec.rb +170 -0
  116. data/spec/api/inbound_parsing_api_spec.rb +64 -0
  117. data/spec/api/master_account_api_spec.rb +108 -0
  118. data/spec/api/transactional_emails_api_spec.rb +2 -13
  119. data/spec/models/body_1_spec.rb +101 -0
  120. data/spec/models/body_spec.rb +101 -0
  121. data/spec/models/contact_spec.rb +83 -0
  122. data/spec/models/create_sms_campaign_spec.rb +6 -0
  123. data/spec/models/create_sub_account_spec.rb +57 -0
  124. data/spec/models/create_webhook_spec.rb +8 -2
  125. data/spec/models/file_data_spec.rb +95 -0
  126. data/spec/models/get_campaign_stats_spec.rb +6 -0
  127. data/spec/models/get_contact_campaign_stats_spec.rb +6 -0
  128. data/spec/models/get_extended_contact_details_statistics_delivered_spec.rb +47 -0
  129. data/spec/models/get_extended_contact_details_statistics_spec.rb +6 -0
  130. data/spec/models/get_inbound_email_events_by_uuid_attachments_spec.rb +59 -0
  131. data/spec/models/get_inbound_email_events_by_uuid_logs_spec.rb +51 -0
  132. data/spec/models/get_inbound_email_events_by_uuid_spec.rb +83 -0
  133. data/spec/models/get_inbound_email_events_events_spec.rb +59 -0
  134. data/spec/models/get_inbound_email_events_spec.rb +41 -0
  135. data/spec/models/master_details_response_billing_info_address_spec.rb +65 -0
  136. data/spec/models/master_details_response_billing_info_name_spec.rb +47 -0
  137. data/spec/models/master_details_response_billing_info_spec.rb +59 -0
  138. data/spec/models/master_details_response_plan_info_features_spec.rb +65 -0
  139. data/spec/models/master_details_response_plan_info_spec.rb +75 -0
  140. data/spec/models/master_details_response_spec.rb +77 -0
  141. data/spec/models/note_data_spec.rb +53 -0
  142. data/spec/models/note_spec.rb +77 -0
  143. data/spec/models/request_contact_export_spec.rb +0 -6
  144. data/spec/models/send_transac_sms_spec.rb +6 -0
  145. data/spec/models/{send_email_attachment_spec.rb → sso_token_request_spec.rb} +8 -8
  146. data/spec/models/sub_account_details_response_plan_info_credits_emails_spec.rb +47 -0
  147. data/spec/models/sub_account_details_response_plan_info_credits_spec.rb +47 -0
  148. data/spec/models/sub_account_details_response_plan_info_features_inbox_spec.rb +47 -0
  149. data/spec/models/sub_account_details_response_plan_info_features_landing_page_spec.rb +47 -0
  150. data/spec/models/sub_account_details_response_plan_info_features_spec.rb +53 -0
  151. data/spec/models/sub_account_details_response_plan_info_features_users_spec.rb +47 -0
  152. data/spec/models/sub_account_details_response_plan_info_spec.rb +53 -0
  153. data/spec/models/sub_account_details_response_spec.rb +59 -0
  154. data/spec/models/sub_account_update_plan_request_credits_spec.rb +41 -0
  155. data/spec/models/sub_account_update_plan_request_features_spec.rb +53 -0
  156. data/spec/models/sub_account_update_plan_request_spec.rb +47 -0
  157. data/spec/models/sub_accounts_response_spec.rb +47 -0
  158. data/spec/models/sub_accounts_response_sub_accounts_spec.rb +59 -0
  159. data/spec/models/task_reminder_spec.rb +57 -0
  160. data/spec/models/task_spec.rb +137 -0
  161. data/spec/models/{send_email_spec.rb → update_batch_contacts_contacts_spec.rb} +15 -15
  162. data/spec/models/update_batch_contacts_model_spec.rb +47 -0
  163. data/spec/models/{send_template_email_spec.rb → update_batch_contacts_spec.rb} +7 -7
  164. data/spec/models/update_sms_campaign_spec.rb +6 -0
  165. data/spec/models/update_webhook_spec.rb +7 -1
  166. metadata +186 -14
  167. data/docs/SendEmail.md +0 -16
  168. data/docs/SendEmailAttachment.md +0 -9
  169. data/docs/SendTemplateEmail.md +0 -8
@@ -0,0 +1,670 @@
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 CRMApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Set custom user_agent if explicitly passed in api
24
+ # default will still remain Swagger-Codegen/#{VERSION}/ruby
25
+ def setUserAgent(user_agent)
26
+ @user_agent = user_agent
27
+ if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
28
+ @api_client.default_headers['User-Agent'] = @user_agent
29
+ end
30
+ end
31
+
32
+
33
+ # Get file data by id.
34
+ # @param id File id to get file data.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [FileData]
37
+ def crm_files_id_data_get(id, opts = {})
38
+ data, _status_code, _headers = crm_files_id_data_get_with_http_info(id, opts)
39
+ data
40
+ end
41
+
42
+ # Get file data by id.
43
+ # @param id File id to get file data.
44
+ # @param [Hash] opts the optional parameters
45
+ # @return [Array<(FileData, Fixnum, Hash)>] FileData data, response status code and response headers
46
+ def crm_files_id_data_get_with_http_info(id, opts = {})
47
+ if @api_client.config.debugging
48
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_files_id_data_get ...'
49
+ end
50
+ # verify the required parameter 'id' is set
51
+ if @api_client.config.client_side_validation && id.nil?
52
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.crm_files_id_data_get"
53
+ end
54
+ # resource path
55
+ local_var_path = '/crm/files/{id}/data'.sub('{' + 'id' + '}', id.to_s)
56
+
57
+ # query parameters
58
+ query_params = {}
59
+
60
+ # header parameters
61
+ header_params = {}
62
+ # HTTP header 'Accept' (if needed)
63
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
64
+ # HTTP header 'Content-Type'
65
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
66
+
67
+ # form parameters
68
+ form_params = {}
69
+
70
+ # http body (model)
71
+ post_body = nil
72
+ auth_names = ['api-key', 'partner-key']
73
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => 'FileData')
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: CRMApi#crm_files_id_data_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+ # Delete file.
86
+ # @param id File id to delete.
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [nil]
89
+ def crm_files_id_delete(id, opts = {})
90
+ crm_files_id_delete_with_http_info(id, opts)
91
+ nil
92
+ end
93
+
94
+ # Delete file.
95
+ # @param id File id to delete.
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
98
+ def crm_files_id_delete_with_http_info(id, opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_files_id_delete ...'
101
+ end
102
+ # verify the required parameter 'id' is set
103
+ if @api_client.config.client_side_validation && id.nil?
104
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.crm_files_id_delete"
105
+ end
106
+ # resource path
107
+ local_var_path = '/crm/files/{id}'.sub('{' + 'id' + '}', id.to_s)
108
+
109
+ # query parameters
110
+ query_params = {}
111
+
112
+ # header parameters
113
+ header_params = {}
114
+ # HTTP header 'Accept' (if needed)
115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
116
+ # HTTP header 'Content-Type'
117
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
118
+
119
+ # form parameters
120
+ form_params = {}
121
+
122
+ # http body (model)
123
+ post_body = nil
124
+ auth_names = ['api-key', 'partner-key']
125
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
126
+ :header_params => header_params,
127
+ :query_params => query_params,
128
+ :form_params => form_params,
129
+ :body => post_body,
130
+ :auth_names => auth_names)
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug "API called: CRMApi#crm_files_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
133
+ end
134
+ return data, status_code, headers
135
+ end
136
+ # Download file by id.
137
+ # @param id File id to download.
138
+ # @param [Hash] opts the optional parameters
139
+ # @return [nil]
140
+ def crm_files_id_get(id, opts = {})
141
+ crm_files_id_get_with_http_info(id, opts)
142
+ nil
143
+ end
144
+
145
+ # Download file by id.
146
+ # @param id File id to download.
147
+ # @param [Hash] opts the optional parameters
148
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
149
+ def crm_files_id_get_with_http_info(id, opts = {})
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_files_id_get ...'
152
+ end
153
+ # verify the required parameter 'id' is set
154
+ if @api_client.config.client_side_validation && id.nil?
155
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.crm_files_id_get"
156
+ end
157
+ # resource path
158
+ local_var_path = '/crm/files/{id}'.sub('{' + 'id' + '}', id.to_s)
159
+
160
+ # query parameters
161
+ query_params = {}
162
+
163
+ # header parameters
164
+ header_params = {}
165
+ # HTTP header 'Accept' (if needed)
166
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
167
+ # HTTP header 'Content-Type'
168
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
169
+
170
+ # form parameters
171
+ form_params = {}
172
+
173
+ # http body (model)
174
+ post_body = nil
175
+ auth_names = ['api-key', 'partner-key']
176
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
177
+ :header_params => header_params,
178
+ :query_params => query_params,
179
+ :form_params => form_params,
180
+ :body => post_body,
181
+ :auth_names => auth_names)
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "API called: CRMApi#crm_files_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
187
+ # Upload and create file.
188
+ # @param file File data to create a file.
189
+ # @param [Hash] opts the optional parameters
190
+ # @option opts [Array<String>] :deals_ids Deal ids linked to a file
191
+ # @return [FileData]
192
+ def crm_files_post(file, opts = {})
193
+ data, _status_code, _headers = crm_files_post_with_http_info(file, opts)
194
+ data
195
+ end
196
+
197
+ # Upload and create file.
198
+ # @param file File data to create a file.
199
+ # @param [Hash] opts the optional parameters
200
+ # @option opts [Array<String>] :deals_ids Deal ids linked to a file
201
+ # @return [Array<(FileData, Fixnum, Hash)>] FileData data, response status code and response headers
202
+ def crm_files_post_with_http_info(file, opts = {})
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_files_post ...'
205
+ end
206
+ # verify the required parameter 'file' is set
207
+ if @api_client.config.client_side_validation && file.nil?
208
+ fail ArgumentError, "Missing the required parameter 'file' when calling CRMApi.crm_files_post"
209
+ end
210
+ # resource path
211
+ local_var_path = '/crm/files'
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(['multipart/form-data'])
222
+
223
+ # form parameters
224
+ form_params = {}
225
+ form_params['file'] = file
226
+ form_params['dealsIds'] = @api_client.build_collection_param(opts[:'deals_ids'], :csv) if !opts[:'deals_ids'].nil?
227
+
228
+ # http body (model)
229
+ post_body = nil
230
+ auth_names = ['api-key', 'partner-key']
231
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
232
+ :header_params => header_params,
233
+ :query_params => query_params,
234
+ :form_params => form_params,
235
+ :body => post_body,
236
+ :auth_names => auth_names,
237
+ :return_type => 'FileData')
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug "API called: CRMApi#crm_files_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
240
+ end
241
+ return data, status_code, headers
242
+ end
243
+ # Delete Note by ID
244
+ # @param id Note ID to delete
245
+ # @param [Hash] opts the optional parameters
246
+ # @return [nil]
247
+ def crm_notes_id_delete(id, opts = {})
248
+ crm_notes_id_delete_with_http_info(id, opts)
249
+ nil
250
+ end
251
+
252
+ # Delete Note by ID
253
+ # @param id Note ID to delete
254
+ # @param [Hash] opts the optional parameters
255
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
256
+ def crm_notes_id_delete_with_http_info(id, opts = {})
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_notes_id_delete ...'
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 CRMApi.crm_notes_id_delete"
263
+ end
264
+ # resource path
265
+ local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s)
266
+
267
+ # query parameters
268
+ query_params = {}
269
+
270
+ # header parameters
271
+ header_params = {}
272
+ # HTTP header 'Accept' (if needed)
273
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
274
+ # HTTP header 'Content-Type'
275
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
276
+
277
+ # form parameters
278
+ form_params = {}
279
+
280
+ # http body (model)
281
+ post_body = nil
282
+ auth_names = ['api-key', 'partner-key']
283
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
284
+ :header_params => header_params,
285
+ :query_params => query_params,
286
+ :form_params => form_params,
287
+ :body => post_body,
288
+ :auth_names => auth_names)
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug "API called: CRMApi#crm_notes_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
291
+ end
292
+ return data, status_code, headers
293
+ end
294
+ # Get one Note by ID
295
+ # @param id Note ID to get
296
+ # @param [Hash] opts the optional parameters
297
+ # @return [Note]
298
+ def crm_notes_id_get(id, opts = {})
299
+ data, _status_code, _headers = crm_notes_id_get_with_http_info(id, opts)
300
+ data
301
+ end
302
+
303
+ # Get one Note by ID
304
+ # @param id Note ID to get
305
+ # @param [Hash] opts the optional parameters
306
+ # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
307
+ def crm_notes_id_get_with_http_info(id, opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_notes_id_get ...'
310
+ end
311
+ # verify the required parameter 'id' is set
312
+ if @api_client.config.client_side_validation && id.nil?
313
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.crm_notes_id_get"
314
+ end
315
+ # resource path
316
+ local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s)
317
+
318
+ # query parameters
319
+ query_params = {}
320
+
321
+ # header parameters
322
+ header_params = {}
323
+ # HTTP header 'Accept' (if needed)
324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
325
+ # HTTP header 'Content-Type'
326
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
327
+
328
+ # form parameters
329
+ form_params = {}
330
+
331
+ # http body (model)
332
+ post_body = nil
333
+ auth_names = ['api-key', 'partner-key']
334
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
335
+ :header_params => header_params,
336
+ :query_params => query_params,
337
+ :form_params => form_params,
338
+ :body => post_body,
339
+ :auth_names => auth_names,
340
+ :return_type => 'Note')
341
+ if @api_client.config.debugging
342
+ @api_client.config.logger.debug "API called: CRMApi#crm_notes_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
343
+ end
344
+ return data, status_code, headers
345
+ end
346
+ # Update a note
347
+ # @param id Note ID to update
348
+ # @param body Note data to update a note
349
+ # @param [Hash] opts the optional parameters
350
+ # @return [Note]
351
+ def crm_notes_id_patch(id, body, opts = {})
352
+ data, _status_code, _headers = crm_notes_id_patch_with_http_info(id, body, opts)
353
+ data
354
+ end
355
+
356
+ # Update a note
357
+ # @param id Note ID to update
358
+ # @param body Note data to update a note
359
+ # @param [Hash] opts the optional parameters
360
+ # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
361
+ def crm_notes_id_patch_with_http_info(id, body, opts = {})
362
+ if @api_client.config.debugging
363
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_notes_id_patch ...'
364
+ end
365
+ # verify the required parameter 'id' is set
366
+ if @api_client.config.client_side_validation && id.nil?
367
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.crm_notes_id_patch"
368
+ end
369
+ # verify the required parameter 'body' is set
370
+ if @api_client.config.client_side_validation && body.nil?
371
+ fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.crm_notes_id_patch"
372
+ end
373
+ # resource path
374
+ local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s)
375
+
376
+ # query parameters
377
+ query_params = {}
378
+
379
+ # header parameters
380
+ header_params = {}
381
+ # HTTP header 'Accept' (if needed)
382
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
383
+ # HTTP header 'Content-Type'
384
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
385
+
386
+ # form parameters
387
+ form_params = {}
388
+
389
+ # http body (model)
390
+ post_body = @api_client.object_to_http_body(body)
391
+ auth_names = ['api-key', 'partner-key']
392
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
393
+ :header_params => header_params,
394
+ :query_params => query_params,
395
+ :form_params => form_params,
396
+ :body => post_body,
397
+ :auth_names => auth_names,
398
+ :return_type => 'Note')
399
+ if @api_client.config.debugging
400
+ @api_client.config.logger.debug "API called: CRMApi#crm_notes_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
401
+ end
402
+ return data, status_code, headers
403
+ end
404
+ # Create a new Note
405
+ # @param body Note data to create a note.
406
+ # @param [Hash] opts the optional parameters
407
+ # @return [Note]
408
+ def crm_notes_post(body, opts = {})
409
+ data, _status_code, _headers = crm_notes_post_with_http_info(body, opts)
410
+ data
411
+ end
412
+
413
+ # Create a new Note
414
+ # @param body Note data to create a note.
415
+ # @param [Hash] opts the optional parameters
416
+ # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
417
+ def crm_notes_post_with_http_info(body, opts = {})
418
+ if @api_client.config.debugging
419
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_notes_post ...'
420
+ end
421
+ # verify the required parameter 'body' is set
422
+ if @api_client.config.client_side_validation && body.nil?
423
+ fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.crm_notes_post"
424
+ end
425
+ # resource path
426
+ local_var_path = '/crm/notes'
427
+
428
+ # query parameters
429
+ query_params = {}
430
+
431
+ # header parameters
432
+ header_params = {}
433
+ # HTTP header 'Accept' (if needed)
434
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
435
+ # HTTP header 'Content-Type'
436
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
437
+
438
+ # form parameters
439
+ form_params = {}
440
+
441
+ # http body (model)
442
+ post_body = @api_client.object_to_http_body(body)
443
+ auth_names = ['api-key', 'partner-key']
444
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
445
+ :header_params => header_params,
446
+ :query_params => query_params,
447
+ :form_params => form_params,
448
+ :body => post_body,
449
+ :auth_names => auth_names,
450
+ :return_type => 'Note')
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug "API called: CRMApi#crm_notes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
453
+ end
454
+ return data, status_code, headers
455
+ end
456
+ # Delete Task by id
457
+ # @param id
458
+ # @param [Hash] opts the optional parameters
459
+ # @return [nil]
460
+ def crm_tasks_id_delete(id, opts = {})
461
+ crm_tasks_id_delete_with_http_info(id, opts)
462
+ nil
463
+ end
464
+
465
+ # Delete Task by id
466
+ # @param id
467
+ # @param [Hash] opts the optional parameters
468
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
469
+ def crm_tasks_id_delete_with_http_info(id, opts = {})
470
+ if @api_client.config.debugging
471
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasks_id_delete ...'
472
+ end
473
+ # verify the required parameter 'id' is set
474
+ if @api_client.config.client_side_validation && id.nil?
475
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.crm_tasks_id_delete"
476
+ end
477
+ # resource path
478
+ local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s)
479
+
480
+ # query parameters
481
+ query_params = {}
482
+
483
+ # header parameters
484
+ header_params = {}
485
+ # HTTP header 'Accept' (if needed)
486
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
487
+ # HTTP header 'Content-Type'
488
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
489
+
490
+ # form parameters
491
+ form_params = {}
492
+
493
+ # http body (model)
494
+ post_body = nil
495
+ auth_names = ['api-key', 'partner-key']
496
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
497
+ :header_params => header_params,
498
+ :query_params => query_params,
499
+ :form_params => form_params,
500
+ :body => post_body,
501
+ :auth_names => auth_names)
502
+ if @api_client.config.debugging
503
+ @api_client.config.logger.debug "API called: CRMApi#crm_tasks_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
504
+ end
505
+ return data, status_code, headers
506
+ end
507
+ # Get one Task by ID
508
+ # @param id
509
+ # @param [Hash] opts the optional parameters
510
+ # @return [Task]
511
+ def crm_tasks_id_get(id, opts = {})
512
+ data, _status_code, _headers = crm_tasks_id_get_with_http_info(id, opts)
513
+ data
514
+ end
515
+
516
+ # Get one Task by ID
517
+ # @param id
518
+ # @param [Hash] opts the optional parameters
519
+ # @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers
520
+ def crm_tasks_id_get_with_http_info(id, opts = {})
521
+ if @api_client.config.debugging
522
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasks_id_get ...'
523
+ end
524
+ # verify the required parameter 'id' is set
525
+ if @api_client.config.client_side_validation && id.nil?
526
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.crm_tasks_id_get"
527
+ end
528
+ # resource path
529
+ local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s)
530
+
531
+ # query parameters
532
+ query_params = {}
533
+
534
+ # header parameters
535
+ header_params = {}
536
+ # HTTP header 'Accept' (if needed)
537
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
538
+ # HTTP header 'Content-Type'
539
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
540
+
541
+ # form parameters
542
+ form_params = {}
543
+
544
+ # http body (model)
545
+ post_body = nil
546
+ auth_names = ['api-key', 'partner-key']
547
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
548
+ :header_params => header_params,
549
+ :query_params => query_params,
550
+ :form_params => form_params,
551
+ :body => post_body,
552
+ :auth_names => auth_names,
553
+ :return_type => 'Task')
554
+ if @api_client.config.debugging
555
+ @api_client.config.logger.debug "API called: CRMApi#crm_tasks_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
556
+ end
557
+ return data, status_code, headers
558
+ end
559
+ # Update partial existing task
560
+ # @param id
561
+ # @param body Updated task details.
562
+ # @param [Hash] opts the optional parameters
563
+ # @return [Task]
564
+ def crm_tasks_id_patch(id, body, opts = {})
565
+ data, _status_code, _headers = crm_tasks_id_patch_with_http_info(id, body, opts)
566
+ data
567
+ end
568
+
569
+ # Update partial existing task
570
+ # @param id
571
+ # @param body Updated task details.
572
+ # @param [Hash] opts the optional parameters
573
+ # @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers
574
+ def crm_tasks_id_patch_with_http_info(id, body, opts = {})
575
+ if @api_client.config.debugging
576
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasks_id_patch ...'
577
+ end
578
+ # verify the required parameter 'id' is set
579
+ if @api_client.config.client_side_validation && id.nil?
580
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.crm_tasks_id_patch"
581
+ end
582
+ # verify the required parameter 'body' is set
583
+ if @api_client.config.client_side_validation && body.nil?
584
+ fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.crm_tasks_id_patch"
585
+ end
586
+ # resource path
587
+ local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s)
588
+
589
+ # query parameters
590
+ query_params = {}
591
+
592
+ # header parameters
593
+ header_params = {}
594
+ # HTTP header 'Accept' (if needed)
595
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
596
+ # HTTP header 'Content-Type'
597
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
598
+
599
+ # form parameters
600
+ form_params = {}
601
+
602
+ # http body (model)
603
+ post_body = @api_client.object_to_http_body(body)
604
+ auth_names = ['api-key', 'partner-key']
605
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
606
+ :header_params => header_params,
607
+ :query_params => query_params,
608
+ :form_params => form_params,
609
+ :body => post_body,
610
+ :auth_names => auth_names,
611
+ :return_type => 'Task')
612
+ if @api_client.config.debugging
613
+ @api_client.config.logger.debug "API called: CRMApi#crm_tasks_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
614
+ end
615
+ return data, status_code, headers
616
+ end
617
+ # Create a new Task
618
+ # @param body Task name.
619
+ # @param [Hash] opts the optional parameters
620
+ # @return [Task]
621
+ def crm_tasks_post(body, opts = {})
622
+ data, _status_code, _headers = crm_tasks_post_with_http_info(body, opts)
623
+ data
624
+ end
625
+
626
+ # Create a new Task
627
+ # @param body Task name.
628
+ # @param [Hash] opts the optional parameters
629
+ # @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers
630
+ def crm_tasks_post_with_http_info(body, opts = {})
631
+ if @api_client.config.debugging
632
+ @api_client.config.logger.debug 'Calling API: CRMApi.crm_tasks_post ...'
633
+ end
634
+ # verify the required parameter 'body' is set
635
+ if @api_client.config.client_side_validation && body.nil?
636
+ fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.crm_tasks_post"
637
+ end
638
+ # resource path
639
+ local_var_path = '/crm/tasks'
640
+
641
+ # query parameters
642
+ query_params = {}
643
+
644
+ # header parameters
645
+ header_params = {}
646
+ # HTTP header 'Accept' (if needed)
647
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
648
+ # HTTP header 'Content-Type'
649
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
650
+
651
+ # form parameters
652
+ form_params = {}
653
+
654
+ # http body (model)
655
+ post_body = @api_client.object_to_http_body(body)
656
+ auth_names = ['api-key', 'partner-key']
657
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
658
+ :header_params => header_params,
659
+ :query_params => query_params,
660
+ :form_params => form_params,
661
+ :body => post_body,
662
+ :auth_names => auth_names,
663
+ :return_type => 'Task')
664
+ if @api_client.config.debugging
665
+ @api_client.config.logger.debug "API called: CRMApi#crm_tasks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
666
+ end
667
+ return data, status_code, headers
668
+ end
669
+ end
670
+ end