MailchimpMarketing 3.0.1 → 3.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/MailchimpMarketing.gemspec +1 -1
- data/README.md +55 -46
- data/lib/MailchimpMarketing.rb +5 -6
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +13 -69
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +20 -113
- data/lib/MailchimpMarketing/api/automations_api.rb +130 -685
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +33 -182
- data/lib/MailchimpMarketing/api/batches_api.rb +26 -146
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +33 -182
- data/lib/MailchimpMarketing/api/campaigns_api.rb +144 -803
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +32 -179
- data/lib/MailchimpMarketing/api/conversations_api.rb +36 -205
- data/lib/MailchimpMarketing/api/dashboard_api.rb +32 -221
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +447 -2312
- data/lib/MailchimpMarketing/api/external_auths_api.rb +20 -113
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +16 -83
- data/lib/MailchimpMarketing/api/file_manager_api.rb +71 -413
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +51 -286
- data/lib/MailchimpMarketing/api/lists_api.rb +721 -2876
- data/lib/MailchimpMarketing/api/ping_api.rb +7 -33
- data/lib/MailchimpMarketing/api/postcards_api.rb +9 -41
- data/lib/MailchimpMarketing/api/reporting_api.rb +41 -237
- data/lib/MailchimpMarketing/api/reports_api.rb +153 -903
- data/lib/MailchimpMarketing/api/root_api.rb +7 -37
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +8 -39
- data/lib/MailchimpMarketing/api/search_members_api.rb +8 -41
- data/lib/MailchimpMarketing/api/template_folders_api.rb +33 -182
- data/lib/MailchimpMarketing/api/templates_api.rb +40 -234
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +32 -170
- data/lib/MailchimpMarketing/api_client.rb +94 -64
- data/lib/MailchimpMarketing/api_error.rb +4 -4
- data/lib/MailchimpMarketing/configuration.rb +1 -1
- data/lib/MailchimpMarketing/version.rb +2 -2
- metadata +2 -2
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.8
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'uri'
|
14
|
+
require 'json'
|
14
15
|
|
15
16
|
module MailchimpMarketing
|
16
17
|
class ConnectedSitesApi
|
@@ -19,238 +20,90 @@ module MailchimpMarketing
|
|
19
20
|
def initialize(api_client)
|
20
21
|
@api_client = api_client
|
21
22
|
end
|
22
|
-
# Delete a connected site
|
23
|
-
# Remove a connected site from your Mailchimp account.
|
24
|
-
# @param connected_site_id The unique identifier for the site.
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [nil]
|
27
|
-
def remove(connected_site_id = {}, opts = {})
|
28
|
-
remove_with_http_info(connected_site_id, opts)
|
29
|
-
nil
|
30
|
-
end
|
31
23
|
|
32
|
-
# Delete
|
33
|
-
|
34
|
-
|
35
|
-
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
37
|
-
def remove_with_http_info(connected_site_id, opts = {})
|
38
|
-
# resource path
|
39
|
-
local_var_path = '/connected-sites/{connected_site_id}'.sub('{' + 'connected_site_id' + '}', connected_site_id.to_s)
|
24
|
+
# Delete connected site
|
25
|
+
def remove(connected_site_id, opts = {})
|
26
|
+
fail ArgumentError, "Missing required param: 'connected_site_id'" if connected_site_id.nil?
|
40
27
|
|
41
|
-
# query parameters
|
42
28
|
query_params = {}
|
43
|
-
|
44
|
-
# header parameters
|
45
|
-
header_params = {}
|
46
|
-
# HTTP header 'Accept' (if needed)
|
47
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
48
|
-
# HTTP header 'Content-Type'
|
49
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
50
|
-
|
51
|
-
# form parameters
|
52
29
|
form_params = {}
|
53
|
-
|
54
|
-
# http body (model)
|
55
30
|
post_body = nil
|
56
|
-
|
31
|
+
|
32
|
+
local_var_path = '/connected-sites/{connected_site_id}'.sub('{' + 'connected_site_id' + '}', connected_site_id.to_s)
|
57
33
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
58
|
-
:header_params => header_params,
|
59
34
|
:query_params => query_params,
|
60
35
|
:form_params => form_params,
|
61
|
-
:body => post_body
|
62
|
-
:auth_names => auth_names)
|
36
|
+
:body => post_body)
|
63
37
|
return data, status_code, headers
|
64
38
|
end
|
65
|
-
# Get all connected sites
|
66
|
-
# Get all connected sites in an account.
|
67
|
-
# @param [Hash] opts the optional parameters
|
68
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
69
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
70
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
71
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
72
|
-
# @return [ConnectedSites]
|
73
|
-
def list(opts = {})
|
74
|
-
data, _status_code, _headers = list_with_http_info(opts)
|
75
|
-
data
|
76
|
-
end
|
77
39
|
|
78
|
-
#
|
79
|
-
|
80
|
-
|
81
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
82
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
83
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
|
84
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
|
85
|
-
# @return [Array<(ConnectedSites, Fixnum, Hash)>] ConnectedSites data, response status code and response headers
|
86
|
-
def list_with_http_info(opts = {})
|
87
|
-
# resource path
|
88
|
-
local_var_path = '/connected-sites'
|
40
|
+
# List connected sites
|
41
|
+
def list(opts = {})
|
42
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
89
43
|
|
90
|
-
# query parameters
|
91
44
|
query_params = {}
|
92
45
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
93
46
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
94
47
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
95
48
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
96
|
-
|
97
|
-
# header parameters
|
98
|
-
header_params = {}
|
99
|
-
# HTTP header 'Accept' (if needed)
|
100
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
101
|
-
# HTTP header 'Content-Type'
|
102
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
103
|
-
|
104
|
-
# form parameters
|
105
49
|
form_params = {}
|
106
|
-
|
107
|
-
# http body (model)
|
108
50
|
post_body = nil
|
109
|
-
|
51
|
+
|
52
|
+
local_var_path = '/connected-sites'
|
110
53
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
111
|
-
:header_params => header_params,
|
112
54
|
:query_params => query_params,
|
113
55
|
:form_params => form_params,
|
114
|
-
:body => post_body
|
115
|
-
:auth_names => auth_names,
|
116
|
-
:return_type => 'ConnectedSites')
|
56
|
+
:body => post_body)
|
117
57
|
return data, status_code, headers
|
118
58
|
end
|
119
|
-
# Get information about a specific connected site
|
120
|
-
# Get information about a specific connected site.
|
121
|
-
# @param connected_site_id The unique identifier for the site.
|
122
|
-
# @param [Hash] opts the optional parameters
|
123
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
124
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
125
|
-
# @return [ConnectedSite]
|
126
|
-
def get(connected_site_id = {}, opts = {})
|
127
|
-
data, _status_code, _headers = get_with_http_info(connected_site_id, opts)
|
128
|
-
data
|
129
|
-
end
|
130
59
|
|
131
|
-
# Get
|
132
|
-
|
133
|
-
|
134
|
-
# @param [Hash] opts the optional parameters
|
135
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
136
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
137
|
-
# @return [Array<(ConnectedSite, Fixnum, Hash)>] ConnectedSite data, response status code and response headers
|
138
|
-
def get_with_http_info(connected_site_id, opts = {})
|
139
|
-
# resource path
|
140
|
-
local_var_path = '/connected-sites/{connected_site_id}'.sub('{' + 'connected_site_id' + '}', connected_site_id.to_s)
|
60
|
+
# Get connected site
|
61
|
+
def get(connected_site_id, opts = {})
|
62
|
+
fail ArgumentError, "Missing required param: 'connected_site_id'" if connected_site_id.nil?
|
141
63
|
|
142
|
-
# query parameters
|
143
64
|
query_params = {}
|
144
65
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
145
66
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
146
|
-
|
147
|
-
# header parameters
|
148
|
-
header_params = {}
|
149
|
-
# HTTP header 'Accept' (if needed)
|
150
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
151
|
-
# HTTP header 'Content-Type'
|
152
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
153
|
-
|
154
|
-
# form parameters
|
155
67
|
form_params = {}
|
156
|
-
|
157
|
-
# http body (model)
|
158
68
|
post_body = nil
|
159
|
-
|
69
|
+
|
70
|
+
local_var_path = '/connected-sites/{connected_site_id}'.sub('{' + 'connected_site_id' + '}', connected_site_id.to_s)
|
160
71
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
161
|
-
:header_params => header_params,
|
162
72
|
:query_params => query_params,
|
163
73
|
:form_params => form_params,
|
164
|
-
:body => post_body
|
165
|
-
:auth_names => auth_names,
|
166
|
-
:return_type => 'ConnectedSite')
|
74
|
+
:body => post_body)
|
167
75
|
return data, status_code, headers
|
168
76
|
end
|
169
|
-
# Create a new connected site
|
170
|
-
# Create a new Mailchimp connected site.
|
171
|
-
# @param body
|
172
|
-
# @param [Hash] opts the optional parameters
|
173
|
-
# @return [ConnectedSite]
|
174
|
-
def create(body = {}, opts = {})
|
175
|
-
data, _status_code, _headers = create_with_http_info(body, opts)
|
176
|
-
data
|
177
|
-
end
|
178
77
|
|
179
|
-
#
|
180
|
-
|
181
|
-
|
182
|
-
# @param [Hash] opts the optional parameters
|
183
|
-
# @return [Array<(ConnectedSite, Fixnum, Hash)>] ConnectedSite data, response status code and response headers
|
184
|
-
def create_with_http_info(body, opts = {})
|
185
|
-
# resource path
|
186
|
-
local_var_path = '/connected-sites'
|
78
|
+
# Add connected site
|
79
|
+
def create(body, opts = {})
|
80
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
187
81
|
|
188
|
-
# query parameters
|
189
82
|
query_params = {}
|
190
|
-
|
191
|
-
# header parameters
|
192
|
-
header_params = {}
|
193
|
-
# HTTP header 'Accept' (if needed)
|
194
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
195
|
-
# HTTP header 'Content-Type'
|
196
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
197
|
-
|
198
|
-
# form parameters
|
199
83
|
form_params = {}
|
200
|
-
|
201
|
-
# http body (model)
|
202
84
|
post_body = @api_client.object_to_http_body(body)
|
203
|
-
|
85
|
+
|
86
|
+
local_var_path = '/connected-sites'
|
204
87
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
205
|
-
:header_params => header_params,
|
206
88
|
:query_params => query_params,
|
207
89
|
:form_params => form_params,
|
208
|
-
:body => post_body
|
209
|
-
:auth_names => auth_names,
|
210
|
-
:return_type => 'ConnectedSite')
|
90
|
+
:body => post_body)
|
211
91
|
return data, status_code, headers
|
212
92
|
end
|
213
|
-
# Verify script installation for a connected site
|
214
|
-
# Verify that the connected sites script has been installed, either via the script URL or fragment.
|
215
|
-
# @param connected_site_id The unique identifier for the site.
|
216
|
-
# @param [Hash] opts the optional parameters
|
217
|
-
# @return [nil]
|
218
|
-
def verify_script_installation(connected_site_id = {}, opts = {})
|
219
|
-
verify_script_installation_with_http_info(connected_site_id, opts)
|
220
|
-
nil
|
221
|
-
end
|
222
93
|
|
223
|
-
# Verify
|
224
|
-
|
225
|
-
|
226
|
-
# @param [Hash] opts the optional parameters
|
227
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
228
|
-
def verify_script_installation_with_http_info(connected_site_id, opts = {})
|
229
|
-
# resource path
|
230
|
-
local_var_path = '/connected-sites/{connected_site_id}/actions/verify-script-installation'.sub('{' + 'connected_site_id' + '}', connected_site_id.to_s)
|
94
|
+
# Verify connected site script
|
95
|
+
def verify_script_installation(connected_site_id, opts = {})
|
96
|
+
fail ArgumentError, "Missing required param: 'connected_site_id'" if connected_site_id.nil?
|
231
97
|
|
232
|
-
# query parameters
|
233
98
|
query_params = {}
|
234
|
-
|
235
|
-
# header parameters
|
236
|
-
header_params = {}
|
237
|
-
# HTTP header 'Accept' (if needed)
|
238
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
239
|
-
# HTTP header 'Content-Type'
|
240
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
241
|
-
|
242
|
-
# form parameters
|
243
99
|
form_params = {}
|
244
|
-
|
245
|
-
# http body (model)
|
246
100
|
post_body = nil
|
247
|
-
|
101
|
+
|
102
|
+
local_var_path = '/connected-sites/{connected_site_id}/actions/verify-script-installation'.sub('{' + 'connected_site_id' + '}', connected_site_id.to_s)
|
248
103
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
249
|
-
:header_params => header_params,
|
250
104
|
:query_params => query_params,
|
251
105
|
:form_params => form_params,
|
252
|
-
:body => post_body
|
253
|
-
:auth_names => auth_names)
|
106
|
+
:body => post_body)
|
254
107
|
return data, status_code, headers
|
255
108
|
end
|
256
109
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.8
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'uri'
|
14
|
+
require 'json'
|
14
15
|
|
15
16
|
module MailchimpMarketing
|
16
17
|
class ConversationsApi
|
@@ -19,38 +20,12 @@ module MailchimpMarketing
|
|
19
20
|
def initialize(api_client)
|
20
21
|
@api_client = api_client
|
21
22
|
end
|
22
|
-
# Get a list of conversations
|
23
|
-
# Get a list of conversations for the account.
|
24
|
-
# @param [Hash] opts the optional parameters
|
25
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
26
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
27
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
28
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
29
|
-
# @option opts [String] :has_unread_messages Whether the conversation has any unread messages.
|
30
|
-
# @option opts [String] :list_id The unique id for the list.
|
31
|
-
# @option opts [String] :campaign_id The unique id for the campaign.
|
32
|
-
# @return [TrackedConversations]
|
33
|
-
def list(opts = {})
|
34
|
-
data, _status_code, _headers = list_with_http_info(opts)
|
35
|
-
data
|
36
|
-
end
|
37
23
|
|
38
|
-
#
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
43
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
|
44
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
|
45
|
-
# @option opts [String] :has_unread_messages Whether the conversation has any unread messages.
|
46
|
-
# @option opts [String] :list_id The unique id for the list.
|
47
|
-
# @option opts [String] :campaign_id The unique id for the campaign.
|
48
|
-
# @return [Array<(TrackedConversations, Fixnum, Hash)>] TrackedConversations data, response status code and response headers
|
49
|
-
def list_with_http_info(opts = {})
|
50
|
-
# resource path
|
51
|
-
local_var_path = '/conversations'
|
24
|
+
# List conversations
|
25
|
+
def list(opts = {})
|
26
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
27
|
+
fail ArgumentError, 'invalid value for "has_unread_messages", must be one of true, false' if opts[:'has_unread_messages'] && !['true', 'false'].include?(opts[:'has_unread_messages'])
|
52
28
|
|
53
|
-
# query parameters
|
54
29
|
query_params = {}
|
55
30
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
56
31
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
@@ -59,234 +34,90 @@ module MailchimpMarketing
|
|
59
34
|
query_params[:'has_unread_messages'] = opts[:'has_unread_messages'] if !opts[:'has_unread_messages'].nil?
|
60
35
|
query_params[:'list_id'] = opts[:'list_id'] if !opts[:'list_id'].nil?
|
61
36
|
query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
|
62
|
-
|
63
|
-
# header parameters
|
64
|
-
header_params = {}
|
65
|
-
# HTTP header 'Accept' (if needed)
|
66
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
67
|
-
# HTTP header 'Content-Type'
|
68
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
69
|
-
|
70
|
-
# form parameters
|
71
37
|
form_params = {}
|
72
|
-
|
73
|
-
# http body (model)
|
74
38
|
post_body = nil
|
75
|
-
|
39
|
+
|
40
|
+
local_var_path = '/conversations'
|
76
41
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
77
|
-
:header_params => header_params,
|
78
42
|
:query_params => query_params,
|
79
43
|
:form_params => form_params,
|
80
|
-
:body => post_body
|
81
|
-
:auth_names => auth_names,
|
82
|
-
:return_type => 'TrackedConversations')
|
44
|
+
:body => post_body)
|
83
45
|
return data, status_code, headers
|
84
46
|
end
|
85
|
-
# Get information about a conversation
|
86
|
-
# Get details about an individual conversation.
|
87
|
-
# @param conversation_id The unique id for the conversation.
|
88
|
-
# @param [Hash] opts the optional parameters
|
89
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
90
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
91
|
-
# @return [Conversation]
|
92
|
-
def get(conversation_id = {}, opts = {})
|
93
|
-
data, _status_code, _headers = get_with_http_info(conversation_id, opts)
|
94
|
-
data
|
95
|
-
end
|
96
47
|
|
97
|
-
# Get
|
98
|
-
|
99
|
-
|
100
|
-
# @param [Hash] opts the optional parameters
|
101
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
102
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
103
|
-
# @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers
|
104
|
-
def get_with_http_info(conversation_id, opts = {})
|
105
|
-
# resource path
|
106
|
-
local_var_path = '/conversations/{conversation_id}'.sub('{' + 'conversation_id' + '}', conversation_id.to_s)
|
48
|
+
# Get conversation
|
49
|
+
def get(conversation_id, opts = {})
|
50
|
+
fail ArgumentError, "Missing required param: 'conversation_id'" if conversation_id.nil?
|
107
51
|
|
108
|
-
# query parameters
|
109
52
|
query_params = {}
|
110
53
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
111
54
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].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', 'application/problem+json'])
|
117
|
-
# HTTP header 'Content-Type'
|
118
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
119
|
-
|
120
|
-
# form parameters
|
121
55
|
form_params = {}
|
122
|
-
|
123
|
-
# http body (model)
|
124
56
|
post_body = nil
|
125
|
-
|
57
|
+
|
58
|
+
local_var_path = '/conversations/{conversation_id}'.sub('{' + 'conversation_id' + '}', conversation_id.to_s)
|
126
59
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
127
|
-
:header_params => header_params,
|
128
60
|
:query_params => query_params,
|
129
61
|
:form_params => form_params,
|
130
|
-
:body => post_body
|
131
|
-
:auth_names => auth_names,
|
132
|
-
:return_type => 'Conversation')
|
62
|
+
:body => post_body)
|
133
63
|
return data, status_code, headers
|
134
64
|
end
|
135
|
-
# Get conversation messages
|
136
|
-
# Get messages from a specific conversation.
|
137
|
-
# @param conversation_id The unique id for the conversation.
|
138
|
-
# @param [Hash] opts the optional parameters
|
139
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
140
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
141
|
-
# @option opts [String] :is_read Whether a conversation message has been marked as read.
|
142
|
-
# @option opts [DateTime] :before_timestamp Restrict the response to messages created before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
143
|
-
# @option opts [DateTime] :since_timestamp Restrict the response to messages created after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
144
|
-
# @return [CollectionOfConversationMessages]
|
145
|
-
def get_conversation_messages(conversation_id = {}, opts = {})
|
146
|
-
data, _status_code, _headers = get_conversation_messages_with_http_info(conversation_id, opts)
|
147
|
-
data
|
148
|
-
end
|
149
65
|
|
150
|
-
#
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
155
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
156
|
-
# @option opts [String] :is_read Whether a conversation message has been marked as read.
|
157
|
-
# @option opts [DateTime] :before_timestamp Restrict the response to messages created before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
158
|
-
# @option opts [DateTime] :since_timestamp Restrict the response to messages created after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
159
|
-
# @return [Array<(CollectionOfConversationMessages, Fixnum, Hash)>] CollectionOfConversationMessages data, response status code and response headers
|
160
|
-
def get_conversation_messages_with_http_info(conversation_id, opts = {})
|
161
|
-
# resource path
|
162
|
-
local_var_path = '/conversations/{conversation_id}/messages'.sub('{' + 'conversation_id' + '}', conversation_id.to_s)
|
66
|
+
# List messages
|
67
|
+
def get_conversation_messages(conversation_id, opts = {})
|
68
|
+
fail ArgumentError, "Missing required param: 'conversation_id'" if conversation_id.nil?
|
69
|
+
fail ArgumentError, 'invalid value for "is_read", must be one of true, false' if opts[:'is_read'] && !['true', 'false'].include?(opts[:'is_read'])
|
163
70
|
|
164
|
-
# query parameters
|
165
71
|
query_params = {}
|
166
72
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
167
73
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
168
74
|
query_params[:'is_read'] = opts[:'is_read'] if !opts[:'is_read'].nil?
|
169
75
|
query_params[:'before_timestamp'] = opts[:'before_timestamp'] if !opts[:'before_timestamp'].nil?
|
170
76
|
query_params[:'since_timestamp'] = opts[:'since_timestamp'] if !opts[:'since_timestamp'].nil?
|
171
|
-
|
172
|
-
# header parameters
|
173
|
-
header_params = {}
|
174
|
-
# HTTP header 'Accept' (if needed)
|
175
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
176
|
-
# HTTP header 'Content-Type'
|
177
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
178
|
-
|
179
|
-
# form parameters
|
180
77
|
form_params = {}
|
181
|
-
|
182
|
-
# http body (model)
|
183
78
|
post_body = nil
|
184
|
-
|
79
|
+
|
80
|
+
local_var_path = '/conversations/{conversation_id}/messages'.sub('{' + 'conversation_id' + '}', conversation_id.to_s)
|
185
81
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
186
|
-
:header_params => header_params,
|
187
82
|
:query_params => query_params,
|
188
83
|
:form_params => form_params,
|
189
|
-
:body => post_body
|
190
|
-
:auth_names => auth_names,
|
191
|
-
:return_type => 'CollectionOfConversationMessages')
|
84
|
+
:body => post_body)
|
192
85
|
return data, status_code, headers
|
193
86
|
end
|
194
|
-
# Get a specific conversation message
|
195
|
-
# Get an individual message in a conversation.
|
196
|
-
# @param conversation_id The unique id for the conversation.
|
197
|
-
# @param message_id The unique id for the conversation message.
|
198
|
-
# @param [Hash] opts the optional parameters
|
199
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
200
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
201
|
-
# @return [ConversationMessage]
|
202
|
-
def get_conversation_message(conversation_id = {}, message_id = {}, opts = {})
|
203
|
-
data, _status_code, _headers = get_conversation_message_with_http_info(conversation_id, message_id, opts)
|
204
|
-
data
|
205
|
-
end
|
206
87
|
|
207
|
-
# Get
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
# @param [Hash] opts the optional parameters
|
212
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
213
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
214
|
-
# @return [Array<(ConversationMessage, Fixnum, Hash)>] ConversationMessage data, response status code and response headers
|
215
|
-
def get_conversation_message_with_http_info(conversation_id, message_id, opts = {})
|
216
|
-
# resource path
|
217
|
-
local_var_path = '/conversations/{conversation_id}/messages/{message_id}'.sub('{' + 'conversation_id' + '}', conversation_id.to_s).sub('{' + 'message_id' + '}', message_id.to_s)
|
88
|
+
# Get message
|
89
|
+
def get_conversation_message(conversation_id, message_id, opts = {})
|
90
|
+
fail ArgumentError, "Missing required param: 'conversation_id'" if conversation_id.nil?
|
91
|
+
fail ArgumentError, "Missing required param: 'message_id'" if message_id.nil?
|
218
92
|
|
219
|
-
# query parameters
|
220
93
|
query_params = {}
|
221
94
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
222
95
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
223
|
-
|
224
|
-
# header parameters
|
225
|
-
header_params = {}
|
226
|
-
# HTTP header 'Accept' (if needed)
|
227
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
228
|
-
# HTTP header 'Content-Type'
|
229
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
230
|
-
|
231
|
-
# form parameters
|
232
96
|
form_params = {}
|
233
|
-
|
234
|
-
# http body (model)
|
235
97
|
post_body = nil
|
236
|
-
|
98
|
+
|
99
|
+
local_var_path = '/conversations/{conversation_id}/messages/{message_id}'.sub('{' + 'conversation_id' + '}', conversation_id.to_s).sub('{' + 'message_id' + '}', message_id.to_s)
|
237
100
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
238
|
-
:header_params => header_params,
|
239
101
|
:query_params => query_params,
|
240
102
|
:form_params => form_params,
|
241
|
-
:body => post_body
|
242
|
-
:auth_names => auth_names,
|
243
|
-
:return_type => 'ConversationMessage')
|
103
|
+
:body => post_body)
|
244
104
|
return data, status_code, headers
|
245
105
|
end
|
246
|
-
# Post a new conversation message
|
247
|
-
# Post a new message to a conversation.
|
248
|
-
# @param conversation_id The unique id for the conversation.
|
249
|
-
# @param body
|
250
|
-
# @param [Hash] opts the optional parameters
|
251
|
-
# @return [ConversationMessage]
|
252
|
-
def create_conversation_message(conversation_id = {}, body = {}, opts = {})
|
253
|
-
data, _status_code, _headers = create_conversation_message_with_http_info(conversation_id, body, opts)
|
254
|
-
data
|
255
|
-
end
|
256
106
|
|
257
|
-
# Post
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
# @param [Hash] opts the optional parameters
|
262
|
-
# @return [Array<(ConversationMessage, Fixnum, Hash)>] ConversationMessage data, response status code and response headers
|
263
|
-
def create_conversation_message_with_http_info(conversation_id, body, opts = {})
|
264
|
-
# resource path
|
265
|
-
local_var_path = '/conversations/{conversation_id}/messages'.sub('{' + 'conversation_id' + '}', conversation_id.to_s)
|
107
|
+
# Post message
|
108
|
+
def create_conversation_message(conversation_id, body, opts = {})
|
109
|
+
fail ArgumentError, "Missing required param: 'conversation_id'" if conversation_id.nil?
|
110
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
266
111
|
|
267
|
-
# query parameters
|
268
112
|
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', 'application/problem+json'])
|
274
|
-
# HTTP header 'Content-Type'
|
275
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
276
|
-
|
277
|
-
# form parameters
|
278
113
|
form_params = {}
|
279
|
-
|
280
|
-
# http body (model)
|
281
114
|
post_body = @api_client.object_to_http_body(body)
|
282
|
-
|
115
|
+
|
116
|
+
local_var_path = '/conversations/{conversation_id}/messages'.sub('{' + 'conversation_id' + '}', conversation_id.to_s)
|
283
117
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
284
|
-
:header_params => header_params,
|
285
118
|
:query_params => query_params,
|
286
119
|
:form_params => form_params,
|
287
|
-
:body => post_body
|
288
|
-
:auth_names => auth_names,
|
289
|
-
:return_type => 'ConversationMessage')
|
120
|
+
:body => post_body)
|
290
121
|
return data, status_code, headers
|
291
122
|
end
|
292
123
|
end
|