sib-api-v3-sdk 8.1.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +82 -14
- data/docs/Body.md +2 -11
- data/docs/Body1.md +2 -11
- data/docs/Body10.md +11 -0
- data/docs/Body11.md +8 -0
- data/docs/Body12.md +11 -0
- data/docs/Body2.md +11 -0
- data/docs/Body3.md +9 -0
- data/docs/Body4.md +9 -0
- data/docs/Body5.md +11 -0
- data/docs/Body6.md +18 -0
- data/docs/Body7.md +17 -0
- data/docs/Body8.md +13 -0
- data/docs/Body9.md +8 -0
- data/docs/CompaniesApi.md +425 -0
- data/docs/CompaniesList.md +8 -0
- data/docs/Company.md +11 -0
- data/docs/CompanyAttributes.md +7 -0
- data/docs/CompanyAttributesInner.md +12 -0
- data/docs/ContactsApi.md +8 -2
- data/docs/ConversationsApi.md +542 -0
- data/docs/ConversationsMessage.md +17 -0
- data/docs/ConversationsMessageFile.md +12 -0
- data/docs/ConversationsMessageFileImageInfo.md +10 -0
- data/docs/CreateContact.md +1 -1
- data/docs/CreateSubAccount.md +3 -3
- data/docs/CreateSubAccountResponse.md +8 -0
- data/docs/Deal.md +11 -0
- data/docs/DealAttributes.md +7 -0
- data/docs/DealAttributesInner.md +12 -0
- data/docs/DealsApi.md +476 -0
- data/docs/DealsList.md +8 -0
- data/docs/EmailCampaignsApi.md +6 -5
- data/docs/FileData.md +3 -6
- data/docs/FileDownloadableLink.md +8 -0
- data/docs/FileList.md +7 -0
- data/docs/FilesApi.md +318 -0
- data/docs/GetCampaignStats.md +2 -0
- data/docs/GetScheduledEmailByBatchId.md +9 -0
- data/docs/GetScheduledEmailByBatchIdBatches.md +10 -0
- data/docs/GetScheduledEmailByMessageId.md +10 -0
- data/docs/GetSsoToken.md +1 -1
- data/docs/InboundParsingApi.md +60 -0
- data/docs/InlineResponse200.md +8 -0
- data/docs/InlineResponse201.md +8 -0
- data/docs/InlineResponse2011.md +8 -0
- data/docs/MasterAccountApi.md +6 -6
- data/docs/NoteId.md +8 -0
- data/docs/NoteList.md +7 -0
- data/docs/NotesApi.md +312 -0
- data/docs/Pipeline.md +8 -0
- data/docs/PipelineStage.md +9 -0
- data/docs/ScheduleSmtpEmail.md +10 -0
- data/docs/SendSmtpEmail.md +3 -1
- data/docs/SubAccountDetailsResponsePlanInfoCredits.md +1 -1
- data/docs/SubAccountsResponseSubAccounts.md +4 -4
- data/docs/Task.md +0 -11
- data/docs/TaskList.md +8 -0
- data/docs/TaskReminder.md +1 -1
- data/docs/TaskTypes.md +0 -1
- data/docs/TasksApi.md +376 -0
- data/docs/TransactionalEmailsApi.md +199 -0
- data/docs/UpdateContact.md +1 -1
- data/docs/UpdateEmailCampaign.md +1 -1
- data/docs/UpdateSmtpTemplate.md +1 -1
- data/docs/UploadImageModel.md +8 -0
- data/lib/sib-api-v3-sdk/api/companies_api.rb +409 -0
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +6 -0
- data/lib/sib-api-v3-sdk/api/conversations_api.rb +504 -0
- data/lib/sib-api-v3-sdk/api/deals_api.rb +454 -0
- data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +9 -8
- data/lib/sib-api-v3-sdk/api/files_api.rb +313 -0
- data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +53 -1
- data/lib/sib-api-v3-sdk/api/master_account_api.rb +9 -9
- data/lib/sib-api-v3-sdk/api/notes_api.rb +308 -0
- data/lib/sib-api-v3-sdk/api/tasks_api.rb +375 -0
- data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +195 -0
- data/lib/sib-api-v3-sdk/models/body.rb +9 -114
- data/lib/sib-api-v3-sdk/models/body_1.rb +9 -119
- data/lib/sib-api-v3-sdk/models/body_10.rb +225 -0
- data/lib/sib-api-v3-sdk/models/body_11.rb +190 -0
- data/lib/sib-api-v3-sdk/models/body_12.rb +215 -0
- data/lib/sib-api-v3-sdk/models/body_2.rb +223 -0
- data/lib/sib-api-v3-sdk/models/body_3.rb +200 -0
- data/lib/sib-api-v3-sdk/models/body_4.rb +195 -0
- data/lib/sib-api-v3-sdk/models/body_5.rb +223 -0
- data/lib/sib-api-v3-sdk/models/body_6.rb +320 -0
- data/lib/sib-api-v3-sdk/models/body_7.rb +281 -0
- data/lib/sib-api-v3-sdk/models/body_8.rb +245 -0
- data/lib/sib-api-v3-sdk/models/body_9.rb +190 -0
- data/lib/sib-api-v3-sdk/models/companies_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/company.rb +220 -0
- data/lib/sib-api-v3-sdk/models/company_attributes.rb +176 -0
- data/lib/sib-api-v3-sdk/models/company_attributes_inner.rb +223 -0
- data/lib/sib-api-v3-sdk/models/conversations_message.rb +324 -0
- data/lib/sib-api-v3-sdk/models/conversations_message_file.rb +239 -0
- data/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb +236 -0
- data/lib/sib-api-v3-sdk/models/create_contact.rb +1 -1
- data/lib/sib-api-v3-sdk/models/create_sub_account.rb +3 -3
- data/lib/sib-api-v3-sdk/models/create_sub_account_response.rb +190 -0
- data/lib/sib-api-v3-sdk/models/deal.rb +220 -0
- data/lib/sib-api-v3-sdk/models/deal_attributes.rb +176 -0
- data/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb +223 -0
- data/lib/sib-api-v3-sdk/models/deals_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/file_data.rb +22 -54
- data/lib/sib-api-v3-sdk/models/file_downloadable_link.rb +190 -0
- data/lib/sib-api-v3-sdk/models/file_list.rb +176 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +21 -1
- data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb +196 -0
- data/lib/sib-api-v3-sdk/models/{contact.rb → get_scheduled_email_by_batch_id_batches.rb} +62 -74
- data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb +254 -0
- data/lib/sib-api-v3-sdk/models/get_sso_token.rb +1 -1
- data/lib/sib-api-v3-sdk/models/inline_response_200.rb +191 -0
- data/lib/sib-api-v3-sdk/models/inline_response_201.rb +191 -0
- data/lib/sib-api-v3-sdk/models/inline_response_201_1.rb +191 -0
- data/lib/sib-api-v3-sdk/models/note_id.rb +186 -0
- data/lib/sib-api-v3-sdk/models/note_list.rb +176 -0
- data/lib/sib-api-v3-sdk/models/pipeline.rb +188 -0
- data/lib/sib-api-v3-sdk/models/pipeline_stage.rb +196 -0
- data/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb +206 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +24 -4
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +2 -2
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +1 -1
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +1 -1
- data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +4 -4
- data/lib/sib-api-v3-sdk/models/task.rb +4 -119
- data/lib/sib-api-v3-sdk/models/task_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/task_reminder.rb +1 -1
- data/lib/sib-api-v3-sdk/models/task_types.rb +1 -11
- data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +1 -1
- data/lib/sib-api-v3-sdk/models/upload_image_model.rb +190 -0
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/lib/sib-api-v3-sdk.rb +44 -2
- data/spec/api/companies_api_spec.rb +119 -0
- data/spec/api/contacts_api_spec.rb +2 -0
- data/spec/api/conversations_api_spec.rb +140 -0
- data/spec/api/deals_api_spec.rb +129 -0
- data/spec/api/email_campaigns_api_spec.rb +1 -1
- data/spec/api/files_api_spec.rb +99 -0
- data/spec/api/inbound_parsing_api_spec.rb +12 -0
- data/spec/api/master_account_api_spec.rb +4 -4
- data/spec/api/notes_api_spec.rb +97 -0
- data/spec/api/{crm_api_spec.rb → tasks_api_spec.rb} +25 -92
- data/spec/api/transactional_emails_api_spec.rb +44 -0
- data/spec/models/body_10_spec.rb +59 -0
- data/spec/models/body_11_spec.rb +41 -0
- data/spec/models/body_12_spec.rb +59 -0
- data/spec/models/body_1_spec.rb +1 -55
- data/spec/models/body_2_spec.rb +59 -0
- data/spec/models/body_3_spec.rb +47 -0
- data/spec/models/body_4_spec.rb +47 -0
- data/spec/models/body_5_spec.rb +59 -0
- data/spec/models/body_6_spec.rb +101 -0
- data/spec/models/{contact_spec.rb → body_7_spec.rb} +26 -14
- data/spec/models/body_8_spec.rb +71 -0
- data/spec/models/body_9_spec.rb +41 -0
- data/spec/models/body_spec.rb +1 -55
- data/spec/models/companies_list_spec.rb +41 -0
- data/spec/models/company_attributes_inner_spec.rb +65 -0
- data/spec/models/company_attributes_spec.rb +35 -0
- data/spec/models/company_spec.rb +59 -0
- data/spec/models/conversations_message_file_image_info_spec.rb +53 -0
- data/spec/models/conversations_message_file_spec.rb +65 -0
- data/spec/models/conversations_message_spec.rb +99 -0
- data/spec/models/create_sub_account_response_spec.rb +41 -0
- data/spec/models/deal_attributes_inner_spec.rb +65 -0
- data/spec/models/deal_attributes_spec.rb +35 -0
- data/spec/models/deal_spec.rb +59 -0
- data/spec/models/deals_list_spec.rb +41 -0
- data/spec/models/file_data_spec.rb +3 -21
- data/spec/models/file_downloadable_link_spec.rb +41 -0
- data/spec/models/file_list_spec.rb +35 -0
- data/spec/models/get_campaign_stats_spec.rb +12 -0
- data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +57 -0
- data/spec/models/get_scheduled_email_by_batch_id_spec.rb +47 -0
- data/spec/models/get_scheduled_email_by_message_id_spec.rb +57 -0
- data/spec/models/inline_response_200_spec.rb +41 -0
- data/spec/models/inline_response_201_1_spec.rb +41 -0
- data/spec/models/inline_response_201_spec.rb +41 -0
- data/spec/models/note_id_spec.rb +41 -0
- data/spec/models/note_list_spec.rb +35 -0
- data/spec/models/pipeline_spec.rb +41 -0
- data/spec/models/pipeline_stage_spec.rb +47 -0
- data/spec/models/schedule_smtp_email_spec.rb +53 -0
- data/spec/models/send_smtp_email_spec.rb +12 -0
- data/spec/models/task_list_spec.rb +41 -0
- data/spec/models/task_spec.rb +0 -66
- data/spec/models/task_types_spec.rb +0 -6
- data/spec/models/upload_image_model_spec.rb +41 -0
- metadata +179 -11
- data/docs/CRMApi.md +0 -762
- data/docs/Contact.md +0 -15
- data/lib/sib-api-v3-sdk/api/crm_api.rb +0 -716
@@ -0,0 +1,308 @@
|
|
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 NotesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get all notes
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [String] :entity Filter by note entity type
|
25
|
+
# @option opts [String] :entity_ids Filter by note entity IDs
|
26
|
+
# @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds)
|
27
|
+
# @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds)
|
28
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
29
|
+
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
30
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed
|
31
|
+
# @return [NoteList]
|
32
|
+
def crm_notes_get(opts = {})
|
33
|
+
data, _status_code, _headers = crm_notes_get_with_http_info(opts)
|
34
|
+
data
|
35
|
+
end
|
36
|
+
|
37
|
+
# Get all notes
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :entity Filter by note entity type
|
40
|
+
# @option opts [String] :entity_ids Filter by note entity IDs
|
41
|
+
# @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds)
|
42
|
+
# @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds)
|
43
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
44
|
+
# @option opts [Integer] :limit Number of documents per page
|
45
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed
|
46
|
+
# @return [Array<(NoteList, Fixnum, Hash)>] NoteList data, response status code and response headers
|
47
|
+
def crm_notes_get_with_http_info(opts = {})
|
48
|
+
if @api_client.config.debugging
|
49
|
+
@api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_get ...'
|
50
|
+
end
|
51
|
+
if @api_client.config.client_side_validation && opts[:'entity'] && !['companies', 'deals', 'contacts'].include?(opts[:'entity'])
|
52
|
+
fail ArgumentError, 'invalid value for "entity", must be one of companies, deals, contacts'
|
53
|
+
end
|
54
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
55
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
56
|
+
end
|
57
|
+
# resource path
|
58
|
+
local_var_path = '/crm/notes'
|
59
|
+
|
60
|
+
# query parameters
|
61
|
+
query_params = {}
|
62
|
+
query_params[:'entity'] = opts[:'entity'] if !opts[:'entity'].nil?
|
63
|
+
query_params[:'entityIds'] = opts[:'entity_ids'] if !opts[:'entity_ids'].nil?
|
64
|
+
query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil?
|
65
|
+
query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
66
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
67
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
68
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
69
|
+
|
70
|
+
# header parameters
|
71
|
+
header_params = {}
|
72
|
+
# HTTP header 'Accept' (if needed)
|
73
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
74
|
+
# HTTP header 'Content-Type'
|
75
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
76
|
+
|
77
|
+
# form parameters
|
78
|
+
form_params = {}
|
79
|
+
|
80
|
+
# http body (model)
|
81
|
+
post_body = nil
|
82
|
+
auth_names = ['api-key', 'partner-key']
|
83
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
84
|
+
:header_params => header_params,
|
85
|
+
:query_params => query_params,
|
86
|
+
:form_params => form_params,
|
87
|
+
:body => post_body,
|
88
|
+
:auth_names => auth_names,
|
89
|
+
:return_type => 'NoteList')
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug "API called: NotesApi#crm_notes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
|
+
end
|
93
|
+
return data, status_code, headers
|
94
|
+
end
|
95
|
+
# Delete a note
|
96
|
+
# @param id Note ID to delete
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [nil]
|
99
|
+
def crm_notes_id_delete(id, opts = {})
|
100
|
+
crm_notes_id_delete_with_http_info(id, opts)
|
101
|
+
nil
|
102
|
+
end
|
103
|
+
|
104
|
+
# Delete a note
|
105
|
+
# @param id Note ID to delete
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
108
|
+
def crm_notes_id_delete_with_http_info(id, opts = {})
|
109
|
+
if @api_client.config.debugging
|
110
|
+
@api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_id_delete ...'
|
111
|
+
end
|
112
|
+
# verify the required parameter 'id' is set
|
113
|
+
if @api_client.config.client_side_validation && id.nil?
|
114
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.crm_notes_id_delete"
|
115
|
+
end
|
116
|
+
# resource path
|
117
|
+
local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s)
|
118
|
+
|
119
|
+
# query parameters
|
120
|
+
query_params = {}
|
121
|
+
|
122
|
+
# header parameters
|
123
|
+
header_params = {}
|
124
|
+
# HTTP header 'Accept' (if needed)
|
125
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
126
|
+
# HTTP header 'Content-Type'
|
127
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
128
|
+
|
129
|
+
# form parameters
|
130
|
+
form_params = {}
|
131
|
+
|
132
|
+
# http body (model)
|
133
|
+
post_body = nil
|
134
|
+
auth_names = ['api-key', 'partner-key']
|
135
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
136
|
+
:header_params => header_params,
|
137
|
+
:query_params => query_params,
|
138
|
+
:form_params => form_params,
|
139
|
+
:body => post_body,
|
140
|
+
:auth_names => auth_names)
|
141
|
+
if @api_client.config.debugging
|
142
|
+
@api_client.config.logger.debug "API called: NotesApi#crm_notes_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
143
|
+
end
|
144
|
+
return data, status_code, headers
|
145
|
+
end
|
146
|
+
# Get a note
|
147
|
+
# @param id Note ID to get
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @return [Note]
|
150
|
+
def crm_notes_id_get(id, opts = {})
|
151
|
+
data, _status_code, _headers = crm_notes_id_get_with_http_info(id, opts)
|
152
|
+
data
|
153
|
+
end
|
154
|
+
|
155
|
+
# Get a note
|
156
|
+
# @param id Note ID to get
|
157
|
+
# @param [Hash] opts the optional parameters
|
158
|
+
# @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
|
159
|
+
def crm_notes_id_get_with_http_info(id, opts = {})
|
160
|
+
if @api_client.config.debugging
|
161
|
+
@api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_id_get ...'
|
162
|
+
end
|
163
|
+
# verify the required parameter 'id' is set
|
164
|
+
if @api_client.config.client_side_validation && id.nil?
|
165
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.crm_notes_id_get"
|
166
|
+
end
|
167
|
+
# resource path
|
168
|
+
local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s)
|
169
|
+
|
170
|
+
# query parameters
|
171
|
+
query_params = {}
|
172
|
+
|
173
|
+
# header parameters
|
174
|
+
header_params = {}
|
175
|
+
# HTTP header 'Accept' (if needed)
|
176
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
177
|
+
# HTTP header 'Content-Type'
|
178
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
179
|
+
|
180
|
+
# form parameters
|
181
|
+
form_params = {}
|
182
|
+
|
183
|
+
# http body (model)
|
184
|
+
post_body = nil
|
185
|
+
auth_names = ['api-key', 'partner-key']
|
186
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
187
|
+
:header_params => header_params,
|
188
|
+
:query_params => query_params,
|
189
|
+
:form_params => form_params,
|
190
|
+
:body => post_body,
|
191
|
+
:auth_names => auth_names,
|
192
|
+
:return_type => 'Note')
|
193
|
+
if @api_client.config.debugging
|
194
|
+
@api_client.config.logger.debug "API called: NotesApi#crm_notes_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
195
|
+
end
|
196
|
+
return data, status_code, headers
|
197
|
+
end
|
198
|
+
# Update a note
|
199
|
+
# @param id Note ID to update
|
200
|
+
# @param body Note data to update a note
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [nil]
|
203
|
+
def crm_notes_id_patch(id, body, opts = {})
|
204
|
+
crm_notes_id_patch_with_http_info(id, body, opts)
|
205
|
+
nil
|
206
|
+
end
|
207
|
+
|
208
|
+
# Update a note
|
209
|
+
# @param id Note ID to update
|
210
|
+
# @param body Note data to update a note
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
213
|
+
def crm_notes_id_patch_with_http_info(id, body, opts = {})
|
214
|
+
if @api_client.config.debugging
|
215
|
+
@api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_id_patch ...'
|
216
|
+
end
|
217
|
+
# verify the required parameter 'id' is set
|
218
|
+
if @api_client.config.client_side_validation && id.nil?
|
219
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.crm_notes_id_patch"
|
220
|
+
end
|
221
|
+
# verify the required parameter 'body' is set
|
222
|
+
if @api_client.config.client_side_validation && body.nil?
|
223
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling NotesApi.crm_notes_id_patch"
|
224
|
+
end
|
225
|
+
# resource path
|
226
|
+
local_var_path = '/crm/notes/{id}'.sub('{' + 'id' + '}', id.to_s)
|
227
|
+
|
228
|
+
# query parameters
|
229
|
+
query_params = {}
|
230
|
+
|
231
|
+
# header parameters
|
232
|
+
header_params = {}
|
233
|
+
# HTTP header 'Accept' (if needed)
|
234
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
235
|
+
# HTTP header 'Content-Type'
|
236
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
237
|
+
|
238
|
+
# form parameters
|
239
|
+
form_params = {}
|
240
|
+
|
241
|
+
# http body (model)
|
242
|
+
post_body = @api_client.object_to_http_body(body)
|
243
|
+
auth_names = ['api-key', 'partner-key']
|
244
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
245
|
+
:header_params => header_params,
|
246
|
+
:query_params => query_params,
|
247
|
+
:form_params => form_params,
|
248
|
+
:body => post_body,
|
249
|
+
:auth_names => auth_names)
|
250
|
+
if @api_client.config.debugging
|
251
|
+
@api_client.config.logger.debug "API called: NotesApi#crm_notes_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
252
|
+
end
|
253
|
+
return data, status_code, headers
|
254
|
+
end
|
255
|
+
# Create a note
|
256
|
+
# @param body Note data to create a note.
|
257
|
+
# @param [Hash] opts the optional parameters
|
258
|
+
# @return [NoteId]
|
259
|
+
def crm_notes_post(body, opts = {})
|
260
|
+
data, _status_code, _headers = crm_notes_post_with_http_info(body, opts)
|
261
|
+
data
|
262
|
+
end
|
263
|
+
|
264
|
+
# Create a note
|
265
|
+
# @param body Note data to create a note.
|
266
|
+
# @param [Hash] opts the optional parameters
|
267
|
+
# @return [Array<(NoteId, Fixnum, Hash)>] NoteId data, response status code and response headers
|
268
|
+
def crm_notes_post_with_http_info(body, opts = {})
|
269
|
+
if @api_client.config.debugging
|
270
|
+
@api_client.config.logger.debug 'Calling API: NotesApi.crm_notes_post ...'
|
271
|
+
end
|
272
|
+
# verify the required parameter 'body' is set
|
273
|
+
if @api_client.config.client_side_validation && body.nil?
|
274
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling NotesApi.crm_notes_post"
|
275
|
+
end
|
276
|
+
# resource path
|
277
|
+
local_var_path = '/crm/notes'
|
278
|
+
|
279
|
+
# query parameters
|
280
|
+
query_params = {}
|
281
|
+
|
282
|
+
# header parameters
|
283
|
+
header_params = {}
|
284
|
+
# HTTP header 'Accept' (if needed)
|
285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
286
|
+
# HTTP header 'Content-Type'
|
287
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
288
|
+
|
289
|
+
# form parameters
|
290
|
+
form_params = {}
|
291
|
+
|
292
|
+
# http body (model)
|
293
|
+
post_body = @api_client.object_to_http_body(body)
|
294
|
+
auth_names = ['api-key', 'partner-key']
|
295
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
296
|
+
:header_params => header_params,
|
297
|
+
:query_params => query_params,
|
298
|
+
:form_params => form_params,
|
299
|
+
:body => post_body,
|
300
|
+
:auth_names => auth_names,
|
301
|
+
:return_type => 'NoteId')
|
302
|
+
if @api_client.config.debugging
|
303
|
+
@api_client.config.logger.debug "API called: NotesApi#crm_notes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
304
|
+
end
|
305
|
+
return data, status_code, headers
|
306
|
+
end
|
307
|
+
end
|
308
|
+
end
|
@@ -0,0 +1,375 @@
|
|
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 TasksApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get all tasks
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [String] :filter_type Filter by task type (ID)
|
25
|
+
# @option opts [String] :filter_status Filter by task status
|
26
|
+
# @option opts [String] :filter_date Filter by date
|
27
|
+
# @option opts [String] :filter_assign_to Filter by assignTo id
|
28
|
+
# @option opts [String] :filter_contacts Filter by contact ids
|
29
|
+
# @option opts [String] :filter_deals Filter by deals ids
|
30
|
+
# @option opts [String] :filter_companies Filter by companies ids
|
31
|
+
# @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds)
|
32
|
+
# @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds)
|
33
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
34
|
+
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
35
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed
|
36
|
+
# @option opts [String] :sort_by The field used to sort field names.
|
37
|
+
# @return [TaskList]
|
38
|
+
def crm_tasks_get(opts = {})
|
39
|
+
data, _status_code, _headers = crm_tasks_get_with_http_info(opts)
|
40
|
+
data
|
41
|
+
end
|
42
|
+
|
43
|
+
# Get all tasks
|
44
|
+
# @param [Hash] opts the optional parameters
|
45
|
+
# @option opts [String] :filter_type Filter by task type (ID)
|
46
|
+
# @option opts [String] :filter_status Filter by task status
|
47
|
+
# @option opts [String] :filter_date Filter by date
|
48
|
+
# @option opts [String] :filter_assign_to Filter by assignTo id
|
49
|
+
# @option opts [String] :filter_contacts Filter by contact ids
|
50
|
+
# @option opts [String] :filter_deals Filter by deals ids
|
51
|
+
# @option opts [String] :filter_companies Filter by companies ids
|
52
|
+
# @option opts [Integer] :date_from dateFrom to date range filter type (timestamp in milliseconds)
|
53
|
+
# @option opts [Integer] :date_to dateTo to date range filter type (timestamp in milliseconds)
|
54
|
+
# @option opts [Integer] :offset Index of the first document of the page
|
55
|
+
# @option opts [Integer] :limit Number of documents per page
|
56
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed
|
57
|
+
# @option opts [String] :sort_by The field used to sort field names.
|
58
|
+
# @return [Array<(TaskList, Fixnum, Hash)>] TaskList data, response status code and response headers
|
59
|
+
def crm_tasks_get_with_http_info(opts = {})
|
60
|
+
if @api_client.config.debugging
|
61
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_get ...'
|
62
|
+
end
|
63
|
+
if @api_client.config.client_side_validation && opts[:'filter_status'] && !['done', 'undone'].include?(opts[:'filter_status'])
|
64
|
+
fail ArgumentError, 'invalid value for "filter_status", must be one of done, undone'
|
65
|
+
end
|
66
|
+
if @api_client.config.client_side_validation && opts[:'filter_date'] && !['overdue', 'today', 'tomorrow', 'week', 'range'].include?(opts[:'filter_date'])
|
67
|
+
fail ArgumentError, 'invalid value for "filter_date", must be one of overdue, today, tomorrow, week, range'
|
68
|
+
end
|
69
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
70
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
71
|
+
end
|
72
|
+
# resource path
|
73
|
+
local_var_path = '/crm/tasks'
|
74
|
+
|
75
|
+
# query parameters
|
76
|
+
query_params = {}
|
77
|
+
query_params[:'filter[type]'] = opts[:'filter_type'] if !opts[:'filter_type'].nil?
|
78
|
+
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
|
79
|
+
query_params[:'filter[date]'] = opts[:'filter_date'] if !opts[:'filter_date'].nil?
|
80
|
+
query_params[:'filter[assignTo]'] = opts[:'filter_assign_to'] if !opts[:'filter_assign_to'].nil?
|
81
|
+
query_params[:'filter[contacts]'] = opts[:'filter_contacts'] if !opts[:'filter_contacts'].nil?
|
82
|
+
query_params[:'filter[deals]'] = opts[:'filter_deals'] if !opts[:'filter_deals'].nil?
|
83
|
+
query_params[:'filter[companies]'] = opts[:'filter_companies'] if !opts[:'filter_companies'].nil?
|
84
|
+
query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil?
|
85
|
+
query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
86
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
87
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
88
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
89
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
90
|
+
|
91
|
+
# header parameters
|
92
|
+
header_params = {}
|
93
|
+
# HTTP header 'Accept' (if needed)
|
94
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
95
|
+
# HTTP header 'Content-Type'
|
96
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
97
|
+
|
98
|
+
# form parameters
|
99
|
+
form_params = {}
|
100
|
+
|
101
|
+
# http body (model)
|
102
|
+
post_body = nil
|
103
|
+
auth_names = ['api-key', 'partner-key']
|
104
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
105
|
+
:header_params => header_params,
|
106
|
+
:query_params => query_params,
|
107
|
+
:form_params => form_params,
|
108
|
+
:body => post_body,
|
109
|
+
:auth_names => auth_names,
|
110
|
+
:return_type => 'TaskList')
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug "API called: TasksApi#crm_tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
113
|
+
end
|
114
|
+
return data, status_code, headers
|
115
|
+
end
|
116
|
+
# Delete a task
|
117
|
+
# @param id
|
118
|
+
# @param [Hash] opts the optional parameters
|
119
|
+
# @return [nil]
|
120
|
+
def crm_tasks_id_delete(id, opts = {})
|
121
|
+
crm_tasks_id_delete_with_http_info(id, opts)
|
122
|
+
nil
|
123
|
+
end
|
124
|
+
|
125
|
+
# Delete a task
|
126
|
+
# @param id
|
127
|
+
# @param [Hash] opts the optional parameters
|
128
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
129
|
+
def crm_tasks_id_delete_with_http_info(id, opts = {})
|
130
|
+
if @api_client.config.debugging
|
131
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_id_delete ...'
|
132
|
+
end
|
133
|
+
# verify the required parameter 'id' is set
|
134
|
+
if @api_client.config.client_side_validation && id.nil?
|
135
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TasksApi.crm_tasks_id_delete"
|
136
|
+
end
|
137
|
+
# resource path
|
138
|
+
local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s)
|
139
|
+
|
140
|
+
# query parameters
|
141
|
+
query_params = {}
|
142
|
+
|
143
|
+
# header parameters
|
144
|
+
header_params = {}
|
145
|
+
# HTTP header 'Accept' (if needed)
|
146
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
147
|
+
# HTTP header 'Content-Type'
|
148
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
149
|
+
|
150
|
+
# form parameters
|
151
|
+
form_params = {}
|
152
|
+
|
153
|
+
# http body (model)
|
154
|
+
post_body = nil
|
155
|
+
auth_names = ['api-key', 'partner-key']
|
156
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
157
|
+
:header_params => header_params,
|
158
|
+
:query_params => query_params,
|
159
|
+
:form_params => form_params,
|
160
|
+
:body => post_body,
|
161
|
+
:auth_names => auth_names)
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: TasksApi#crm_tasks_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
# Get a task
|
168
|
+
# @param id
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @return [Task]
|
171
|
+
def crm_tasks_id_get(id, opts = {})
|
172
|
+
data, _status_code, _headers = crm_tasks_id_get_with_http_info(id, opts)
|
173
|
+
data
|
174
|
+
end
|
175
|
+
|
176
|
+
# Get a task
|
177
|
+
# @param id
|
178
|
+
# @param [Hash] opts the optional parameters
|
179
|
+
# @return [Array<(Task, Fixnum, Hash)>] Task data, response status code and response headers
|
180
|
+
def crm_tasks_id_get_with_http_info(id, opts = {})
|
181
|
+
if @api_client.config.debugging
|
182
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_id_get ...'
|
183
|
+
end
|
184
|
+
# verify the required parameter 'id' is set
|
185
|
+
if @api_client.config.client_side_validation && id.nil?
|
186
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TasksApi.crm_tasks_id_get"
|
187
|
+
end
|
188
|
+
# resource path
|
189
|
+
local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s)
|
190
|
+
|
191
|
+
# query parameters
|
192
|
+
query_params = {}
|
193
|
+
|
194
|
+
# header parameters
|
195
|
+
header_params = {}
|
196
|
+
# HTTP header 'Accept' (if needed)
|
197
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
198
|
+
# HTTP header 'Content-Type'
|
199
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
200
|
+
|
201
|
+
# form parameters
|
202
|
+
form_params = {}
|
203
|
+
|
204
|
+
# http body (model)
|
205
|
+
post_body = nil
|
206
|
+
auth_names = ['api-key', 'partner-key']
|
207
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
208
|
+
:header_params => header_params,
|
209
|
+
:query_params => query_params,
|
210
|
+
:form_params => form_params,
|
211
|
+
:body => post_body,
|
212
|
+
:auth_names => auth_names,
|
213
|
+
:return_type => 'Task')
|
214
|
+
if @api_client.config.debugging
|
215
|
+
@api_client.config.logger.debug "API called: TasksApi#crm_tasks_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
216
|
+
end
|
217
|
+
return data, status_code, headers
|
218
|
+
end
|
219
|
+
# Update a task
|
220
|
+
# @param id
|
221
|
+
# @param body Updated task details.
|
222
|
+
# @param [Hash] opts the optional parameters
|
223
|
+
# @return [nil]
|
224
|
+
def crm_tasks_id_patch(id, body, opts = {})
|
225
|
+
crm_tasks_id_patch_with_http_info(id, body, opts)
|
226
|
+
nil
|
227
|
+
end
|
228
|
+
|
229
|
+
# Update a task
|
230
|
+
# @param id
|
231
|
+
# @param body Updated task details.
|
232
|
+
# @param [Hash] opts the optional parameters
|
233
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
234
|
+
def crm_tasks_id_patch_with_http_info(id, body, opts = {})
|
235
|
+
if @api_client.config.debugging
|
236
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_id_patch ...'
|
237
|
+
end
|
238
|
+
# verify the required parameter 'id' is set
|
239
|
+
if @api_client.config.client_side_validation && id.nil?
|
240
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TasksApi.crm_tasks_id_patch"
|
241
|
+
end
|
242
|
+
# verify the required parameter 'body' is set
|
243
|
+
if @api_client.config.client_side_validation && body.nil?
|
244
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TasksApi.crm_tasks_id_patch"
|
245
|
+
end
|
246
|
+
# resource path
|
247
|
+
local_var_path = '/crm/tasks/{id}'.sub('{' + 'id' + '}', id.to_s)
|
248
|
+
|
249
|
+
# query parameters
|
250
|
+
query_params = {}
|
251
|
+
|
252
|
+
# header parameters
|
253
|
+
header_params = {}
|
254
|
+
# HTTP header 'Accept' (if needed)
|
255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
256
|
+
# HTTP header 'Content-Type'
|
257
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
258
|
+
|
259
|
+
# form parameters
|
260
|
+
form_params = {}
|
261
|
+
|
262
|
+
# http body (model)
|
263
|
+
post_body = @api_client.object_to_http_body(body)
|
264
|
+
auth_names = ['api-key', 'partner-key']
|
265
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
266
|
+
:header_params => header_params,
|
267
|
+
:query_params => query_params,
|
268
|
+
:form_params => form_params,
|
269
|
+
:body => post_body,
|
270
|
+
:auth_names => auth_names)
|
271
|
+
if @api_client.config.debugging
|
272
|
+
@api_client.config.logger.debug "API called: TasksApi#crm_tasks_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
273
|
+
end
|
274
|
+
return data, status_code, headers
|
275
|
+
end
|
276
|
+
# Create a task
|
277
|
+
# @param body Task name.
|
278
|
+
# @param [Hash] opts the optional parameters
|
279
|
+
# @return [InlineResponse2011]
|
280
|
+
def crm_tasks_post(body, opts = {})
|
281
|
+
data, _status_code, _headers = crm_tasks_post_with_http_info(body, opts)
|
282
|
+
data
|
283
|
+
end
|
284
|
+
|
285
|
+
# Create a task
|
286
|
+
# @param body Task name.
|
287
|
+
# @param [Hash] opts the optional parameters
|
288
|
+
# @return [Array<(InlineResponse2011, Fixnum, Hash)>] InlineResponse2011 data, response status code and response headers
|
289
|
+
def crm_tasks_post_with_http_info(body, opts = {})
|
290
|
+
if @api_client.config.debugging
|
291
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_post ...'
|
292
|
+
end
|
293
|
+
# verify the required parameter 'body' is set
|
294
|
+
if @api_client.config.client_side_validation && body.nil?
|
295
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TasksApi.crm_tasks_post"
|
296
|
+
end
|
297
|
+
# resource path
|
298
|
+
local_var_path = '/crm/tasks'
|
299
|
+
|
300
|
+
# query parameters
|
301
|
+
query_params = {}
|
302
|
+
|
303
|
+
# header parameters
|
304
|
+
header_params = {}
|
305
|
+
# HTTP header 'Accept' (if needed)
|
306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
307
|
+
# HTTP header 'Content-Type'
|
308
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
309
|
+
|
310
|
+
# form parameters
|
311
|
+
form_params = {}
|
312
|
+
|
313
|
+
# http body (model)
|
314
|
+
post_body = @api_client.object_to_http_body(body)
|
315
|
+
auth_names = ['api-key', 'partner-key']
|
316
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
317
|
+
:header_params => header_params,
|
318
|
+
:query_params => query_params,
|
319
|
+
:form_params => form_params,
|
320
|
+
:body => post_body,
|
321
|
+
:auth_names => auth_names,
|
322
|
+
:return_type => 'InlineResponse2011')
|
323
|
+
if @api_client.config.debugging
|
324
|
+
@api_client.config.logger.debug "API called: TasksApi#crm_tasks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
325
|
+
end
|
326
|
+
return data, status_code, headers
|
327
|
+
end
|
328
|
+
# Get all task types
|
329
|
+
# @param [Hash] opts the optional parameters
|
330
|
+
# @return [TaskTypes]
|
331
|
+
def crm_tasktypes_get(opts = {})
|
332
|
+
data, _status_code, _headers = crm_tasktypes_get_with_http_info(opts)
|
333
|
+
data
|
334
|
+
end
|
335
|
+
|
336
|
+
# Get all task types
|
337
|
+
# @param [Hash] opts the optional parameters
|
338
|
+
# @return [Array<(TaskTypes, Fixnum, Hash)>] TaskTypes data, response status code and response headers
|
339
|
+
def crm_tasktypes_get_with_http_info(opts = {})
|
340
|
+
if @api_client.config.debugging
|
341
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.crm_tasktypes_get ...'
|
342
|
+
end
|
343
|
+
# resource path
|
344
|
+
local_var_path = '/crm/tasktypes'
|
345
|
+
|
346
|
+
# query parameters
|
347
|
+
query_params = {}
|
348
|
+
|
349
|
+
# header parameters
|
350
|
+
header_params = {}
|
351
|
+
# HTTP header 'Accept' (if needed)
|
352
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
353
|
+
# HTTP header 'Content-Type'
|
354
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
355
|
+
|
356
|
+
# form parameters
|
357
|
+
form_params = {}
|
358
|
+
|
359
|
+
# http body (model)
|
360
|
+
post_body = nil
|
361
|
+
auth_names = ['api-key', 'partner-key']
|
362
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
363
|
+
:header_params => header_params,
|
364
|
+
:query_params => query_params,
|
365
|
+
:form_params => form_params,
|
366
|
+
:body => post_body,
|
367
|
+
:auth_names => auth_names,
|
368
|
+
:return_type => 'TaskTypes')
|
369
|
+
if @api_client.config.debugging
|
370
|
+
@api_client.config.logger.debug "API called: TasksApi#crm_tasktypes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
371
|
+
end
|
372
|
+
return data, status_code, headers
|
373
|
+
end
|
374
|
+
end
|
375
|
+
end
|