dock_genius_api_ruby_client 0.1.1.pre.g582ac6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/README.md +200 -0
  4. data/dock_genius_api_ruby_client.gemspec +55 -0
  5. data/docs/AccessToken.md +11 -0
  6. data/docs/Address.md +16 -0
  7. data/docs/Customer.md +22 -0
  8. data/docs/CustomerApi.md +1938 -0
  9. data/docs/Dock.md +20 -0
  10. data/docs/DockApi.md +1112 -0
  11. data/docs/EmailAddress.md +9 -0
  12. data/docs/GeoPoint.md +9 -0
  13. data/docs/InlineResponse200.md +8 -0
  14. data/docs/InlineResponse2001.md +8 -0
  15. data/docs/InlineResponse2002.md +8 -0
  16. data/docs/ListingAgent.md +12 -0
  17. data/docs/Marina.md +15 -0
  18. data/docs/MarinaApi.md +1602 -0
  19. data/docs/Phone.md +9 -0
  20. data/git_push.sh +67 -0
  21. data/lib/dock_genius_api_ruby_client/api/customer_api.rb +2363 -0
  22. data/lib/dock_genius_api_ruby_client/api/dock_api.rb +1352 -0
  23. data/lib/dock_genius_api_ruby_client/api/marina_api.rb +1945 -0
  24. data/lib/dock_genius_api_ruby_client/api_client.rb +378 -0
  25. data/lib/dock_genius_api_ruby_client/api_error.rb +47 -0
  26. data/lib/dock_genius_api_ruby_client/configuration.rb +207 -0
  27. data/lib/dock_genius_api_ruby_client/models/access_token.rb +230 -0
  28. data/lib/dock_genius_api_ruby_client/models/address.rb +281 -0
  29. data/lib/dock_genius_api_ruby_client/models/customer.rb +330 -0
  30. data/lib/dock_genius_api_ruby_client/models/dock.rb +327 -0
  31. data/lib/dock_genius_api_ruby_client/models/email_address.rb +208 -0
  32. data/lib/dock_genius_api_ruby_client/models/geo_point.rb +208 -0
  33. data/lib/dock_genius_api_ruby_client/models/inline_response_200.rb +199 -0
  34. data/lib/dock_genius_api_ruby_client/models/inline_response_200_1.rb +200 -0
  35. data/lib/dock_genius_api_ruby_client/models/inline_response_200_2.rb +199 -0
  36. data/lib/dock_genius_api_ruby_client/models/listing_agent.rb +239 -0
  37. data/lib/dock_genius_api_ruby_client/models/marina.rb +263 -0
  38. data/lib/dock_genius_api_ruby_client/models/phone.rb +209 -0
  39. data/lib/dock_genius_api_ruby_client/version.rb +26 -0
  40. data/lib/dock_genius_api_ruby_client.rb +65 -0
  41. data/spec/api/customer_api_spec.rb +551 -0
  42. data/spec/api/dock_api_spec.rb +332 -0
  43. data/spec/api/marina_api_spec.rb +461 -0
  44. data/spec/api_client_spec.rb +237 -0
  45. data/spec/configuration_spec.rb +53 -0
  46. data/spec/models/access_token_spec.rb +71 -0
  47. data/spec/models/address_spec.rb +101 -0
  48. data/spec/models/customer_spec.rb +137 -0
  49. data/spec/models/dock_spec.rb +125 -0
  50. data/spec/models/email_address_spec.rb +59 -0
  51. data/spec/models/geo_point_spec.rb +59 -0
  52. data/spec/models/inline_response_200_1_spec.rb +53 -0
  53. data/spec/models/inline_response_200_2_spec.rb +53 -0
  54. data/spec/models/inline_response_200_spec.rb +53 -0
  55. data/spec/models/listing_agent_spec.rb +77 -0
  56. data/spec/models/marina_spec.rb +95 -0
  57. data/spec/models/phone_spec.rb +59 -0
  58. data/spec/spec_helper.rb +122 -0
  59. metadata +299 -0
@@ -0,0 +1,2363 @@
1
+ =begin
2
+ #dockgenius-sl
3
+
4
+ #No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 0.1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module DockGeniusApiRubyClient
27
+ class CustomerApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Confirm a user registration with email verification token.
35
+ #
36
+ # @param uid
37
+ # @param token
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :redirect
40
+ # @return [nil]
41
+ def customer_confirm(uid, token, opts = {})
42
+ customer_confirm_with_http_info(uid, token, opts)
43
+ return nil
44
+ end
45
+
46
+ # Confirm a user registration with email verification token.
47
+ #
48
+ # @param uid
49
+ # @param token
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [String] :redirect
52
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
53
+ def customer_confirm_with_http_info(uid, token, opts = {})
54
+ if @api_client.config.debugging
55
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_confirm ..."
56
+ end
57
+ # verify the required parameter 'uid' is set
58
+ fail ArgumentError, "Missing the required parameter 'uid' when calling CustomerApi.customer_confirm" if uid.nil?
59
+ # verify the required parameter 'token' is set
60
+ fail ArgumentError, "Missing the required parameter 'token' when calling CustomerApi.customer_confirm" if token.nil?
61
+ # resource path
62
+ local_var_path = "/Customers/confirm".sub('{format}','json')
63
+
64
+ # query parameters
65
+ query_params = {}
66
+ query_params[:'uid'] = uid
67
+ query_params[:'token'] = token
68
+ query_params[:'redirect'] = opts[:'redirect'] if !opts[:'redirect'].nil?
69
+
70
+ # header parameters
71
+ header_params = {}
72
+
73
+ # HTTP header 'Accept' (if needed)
74
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
75
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
76
+
77
+ # HTTP header 'Content-Type'
78
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
79
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
80
+
81
+ # form parameters
82
+ form_params = {}
83
+
84
+ # http body (model)
85
+ post_body = nil
86
+ auth_names = []
87
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
88
+ :header_params => header_params,
89
+ :query_params => query_params,
90
+ :form_params => form_params,
91
+ :body => post_body,
92
+ :auth_names => auth_names)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: CustomerApi#customer_confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
99
+ # Count instances of the model matched by where from the data source.
100
+ #
101
+ # @param [Hash] opts the optional parameters
102
+ # @option opts [String] :where Criteria to match model instances
103
+ # @return [InlineResponse200]
104
+ def customer_count(opts = {})
105
+ data, _status_code, _headers = customer_count_with_http_info(opts)
106
+ return data
107
+ end
108
+
109
+ # Count instances of the model matched by where from the data source.
110
+ #
111
+ # @param [Hash] opts the optional parameters
112
+ # @option opts [String] :where Criteria to match model instances
113
+ # @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
114
+ def customer_count_with_http_info(opts = {})
115
+ if @api_client.config.debugging
116
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_count ..."
117
+ end
118
+ # resource path
119
+ local_var_path = "/Customers/count".sub('{format}','json')
120
+
121
+ # query parameters
122
+ query_params = {}
123
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
124
+
125
+ # header parameters
126
+ header_params = {}
127
+
128
+ # HTTP header 'Accept' (if needed)
129
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
130
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
131
+
132
+ # HTTP header 'Content-Type'
133
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
134
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
135
+
136
+ # form parameters
137
+ form_params = {}
138
+
139
+ # http body (model)
140
+ post_body = nil
141
+ auth_names = []
142
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => 'InlineResponse200')
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "API called: CustomerApi#customer_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
151
+ end
152
+ return data, status_code, headers
153
+ end
154
+
155
+ # Create a new instance of the model and persist it into the data source.
156
+ #
157
+ # @param [Hash] opts the optional parameters
158
+ # @option opts [Customer] :data Model instance data
159
+ # @return [Customer]
160
+ def customer_create(opts = {})
161
+ data, _status_code, _headers = customer_create_with_http_info(opts)
162
+ return data
163
+ end
164
+
165
+ # Create a new instance of the model and persist it into the data source.
166
+ #
167
+ # @param [Hash] opts the optional parameters
168
+ # @option opts [Customer] :data Model instance data
169
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
170
+ def customer_create_with_http_info(opts = {})
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_create ..."
173
+ end
174
+ # resource path
175
+ local_var_path = "/Customers".sub('{format}','json')
176
+
177
+ # query parameters
178
+ query_params = {}
179
+
180
+ # header parameters
181
+ header_params = {}
182
+
183
+ # HTTP header 'Accept' (if needed)
184
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
185
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
186
+
187
+ # HTTP header 'Content-Type'
188
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
189
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
190
+
191
+ # form parameters
192
+ form_params = {}
193
+
194
+ # http body (model)
195
+ post_body = @api_client.object_to_http_body(opts[:'data'])
196
+ auth_names = []
197
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names,
203
+ :return_type => 'Customer')
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: CustomerApi#customer_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ return data, status_code, headers
208
+ end
209
+
210
+ # Create a change stream.
211
+ #
212
+ # @param [Hash] opts the optional parameters
213
+ # @option opts [String] :options
214
+ # @return [File]
215
+ def customer_create_change_stream_get_customers_change_stream(opts = {})
216
+ data, _status_code, _headers = customer_create_change_stream_get_customers_change_stream_with_http_info(opts)
217
+ return data
218
+ end
219
+
220
+ # Create a change stream.
221
+ #
222
+ # @param [Hash] opts the optional parameters
223
+ # @option opts [String] :options
224
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
225
+ def customer_create_change_stream_get_customers_change_stream_with_http_info(opts = {})
226
+ if @api_client.config.debugging
227
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_create_change_stream_get_customers_change_stream ..."
228
+ end
229
+ # resource path
230
+ local_var_path = "/Customers/change-stream".sub('{format}','json')
231
+
232
+ # query parameters
233
+ query_params = {}
234
+ query_params[:'options'] = opts[:'options'] if !opts[:'options'].nil?
235
+
236
+ # header parameters
237
+ header_params = {}
238
+
239
+ # HTTP header 'Accept' (if needed)
240
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
241
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
242
+
243
+ # HTTP header 'Content-Type'
244
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
245
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
246
+
247
+ # form parameters
248
+ form_params = {}
249
+
250
+ # http body (model)
251
+ post_body = nil
252
+ auth_names = []
253
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
254
+ :header_params => header_params,
255
+ :query_params => query_params,
256
+ :form_params => form_params,
257
+ :body => post_body,
258
+ :auth_names => auth_names,
259
+ :return_type => 'File')
260
+ if @api_client.config.debugging
261
+ @api_client.config.logger.debug "API called: CustomerApi#customer_create_change_stream_get_customers_change_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
262
+ end
263
+ return data, status_code, headers
264
+ end
265
+
266
+ # Create a change stream.
267
+ #
268
+ # @param [Hash] opts the optional parameters
269
+ # @option opts [String] :options
270
+ # @return [File]
271
+ def customer_create_change_stream_post_customers_change_stream(opts = {})
272
+ data, _status_code, _headers = customer_create_change_stream_post_customers_change_stream_with_http_info(opts)
273
+ return data
274
+ end
275
+
276
+ # Create a change stream.
277
+ #
278
+ # @param [Hash] opts the optional parameters
279
+ # @option opts [String] :options
280
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
281
+ def customer_create_change_stream_post_customers_change_stream_with_http_info(opts = {})
282
+ if @api_client.config.debugging
283
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_create_change_stream_post_customers_change_stream ..."
284
+ end
285
+ # resource path
286
+ local_var_path = "/Customers/change-stream".sub('{format}','json')
287
+
288
+ # query parameters
289
+ query_params = {}
290
+
291
+ # header parameters
292
+ header_params = {}
293
+
294
+ # HTTP header 'Accept' (if needed)
295
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
296
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
297
+
298
+ # HTTP header 'Content-Type'
299
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
300
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
301
+
302
+ # form parameters
303
+ form_params = {}
304
+ form_params["options"] = opts[:'options'] if !opts[:'options'].nil?
305
+
306
+ # http body (model)
307
+ post_body = nil
308
+ auth_names = []
309
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
310
+ :header_params => header_params,
311
+ :query_params => query_params,
312
+ :form_params => form_params,
313
+ :body => post_body,
314
+ :auth_names => auth_names,
315
+ :return_type => 'File')
316
+ if @api_client.config.debugging
317
+ @api_client.config.logger.debug "API called: CustomerApi#customer_create_change_stream_post_customers_change_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
318
+ end
319
+ return data, status_code, headers
320
+ end
321
+
322
+ # Delete a model instance by {{id}} from the data source.
323
+ #
324
+ # @param id Model id
325
+ # @param [Hash] opts the optional parameters
326
+ # @return [Object]
327
+ def customer_delete_by_id(id, opts = {})
328
+ data, _status_code, _headers = customer_delete_by_id_with_http_info(id, opts)
329
+ return data
330
+ end
331
+
332
+ # Delete a model instance by {{id}} from the data source.
333
+ #
334
+ # @param id Model id
335
+ # @param [Hash] opts the optional parameters
336
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
337
+ def customer_delete_by_id_with_http_info(id, opts = {})
338
+ if @api_client.config.debugging
339
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_delete_by_id ..."
340
+ end
341
+ # verify the required parameter 'id' is set
342
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_delete_by_id" if id.nil?
343
+ # resource path
344
+ local_var_path = "/Customers/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
345
+
346
+ # query parameters
347
+ query_params = {}
348
+
349
+ # header parameters
350
+ header_params = {}
351
+
352
+ # HTTP header 'Accept' (if needed)
353
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
354
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
355
+
356
+ # HTTP header 'Content-Type'
357
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
358
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
359
+
360
+ # form parameters
361
+ form_params = {}
362
+
363
+ # http body (model)
364
+ post_body = nil
365
+ auth_names = []
366
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
367
+ :header_params => header_params,
368
+ :query_params => query_params,
369
+ :form_params => form_params,
370
+ :body => post_body,
371
+ :auth_names => auth_names,
372
+ :return_type => 'Object')
373
+ if @api_client.config.debugging
374
+ @api_client.config.logger.debug "API called: CustomerApi#customer_delete_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
375
+ end
376
+ return data, status_code, headers
377
+ end
378
+
379
+ # Check whether a model instance exists in the data source.
380
+ #
381
+ # @param id Model id
382
+ # @param [Hash] opts the optional parameters
383
+ # @return [InlineResponse2002]
384
+ def customer_exists_get_customersid_exists(id, opts = {})
385
+ data, _status_code, _headers = customer_exists_get_customersid_exists_with_http_info(id, opts)
386
+ return data
387
+ end
388
+
389
+ # Check whether a model instance exists in the data source.
390
+ #
391
+ # @param id Model id
392
+ # @param [Hash] opts the optional parameters
393
+ # @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers
394
+ def customer_exists_get_customersid_exists_with_http_info(id, opts = {})
395
+ if @api_client.config.debugging
396
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_exists_get_customersid_exists ..."
397
+ end
398
+ # verify the required parameter 'id' is set
399
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_exists_get_customersid_exists" if id.nil?
400
+ # resource path
401
+ local_var_path = "/Customers/{id}/exists".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
402
+
403
+ # query parameters
404
+ query_params = {}
405
+
406
+ # header parameters
407
+ header_params = {}
408
+
409
+ # HTTP header 'Accept' (if needed)
410
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
411
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
412
+
413
+ # HTTP header 'Content-Type'
414
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
415
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
416
+
417
+ # form parameters
418
+ form_params = {}
419
+
420
+ # http body (model)
421
+ post_body = nil
422
+ auth_names = []
423
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
424
+ :header_params => header_params,
425
+ :query_params => query_params,
426
+ :form_params => form_params,
427
+ :body => post_body,
428
+ :auth_names => auth_names,
429
+ :return_type => 'InlineResponse2002')
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug "API called: CustomerApi#customer_exists_get_customersid_exists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
432
+ end
433
+ return data, status_code, headers
434
+ end
435
+
436
+ # Check whether a model instance exists in the data source.
437
+ #
438
+ # @param id Model id
439
+ # @param [Hash] opts the optional parameters
440
+ # @return [InlineResponse2002]
441
+ def customer_exists_head_customersid(id, opts = {})
442
+ data, _status_code, _headers = customer_exists_head_customersid_with_http_info(id, opts)
443
+ return data
444
+ end
445
+
446
+ # Check whether a model instance exists in the data source.
447
+ #
448
+ # @param id Model id
449
+ # @param [Hash] opts the optional parameters
450
+ # @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers
451
+ def customer_exists_head_customersid_with_http_info(id, opts = {})
452
+ if @api_client.config.debugging
453
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_exists_head_customersid ..."
454
+ end
455
+ # verify the required parameter 'id' is set
456
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_exists_head_customersid" if id.nil?
457
+ # resource path
458
+ local_var_path = "/Customers/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
459
+
460
+ # query parameters
461
+ query_params = {}
462
+
463
+ # header parameters
464
+ header_params = {}
465
+
466
+ # HTTP header 'Accept' (if needed)
467
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
468
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
469
+
470
+ # HTTP header 'Content-Type'
471
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
472
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
473
+
474
+ # form parameters
475
+ form_params = {}
476
+
477
+ # http body (model)
478
+ post_body = nil
479
+ auth_names = []
480
+ data, status_code, headers = @api_client.call_api(:HEAD, local_var_path,
481
+ :header_params => header_params,
482
+ :query_params => query_params,
483
+ :form_params => form_params,
484
+ :body => post_body,
485
+ :auth_names => auth_names,
486
+ :return_type => 'InlineResponse2002')
487
+ if @api_client.config.debugging
488
+ @api_client.config.logger.debug "API called: CustomerApi#customer_exists_head_customersid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
489
+ end
490
+ return data, status_code, headers
491
+ end
492
+
493
+ # Find all instances of the model matched by filter from the data source.
494
+ #
495
+ # @param [Hash] opts the optional parameters
496
+ # @option opts [String] :filter Filter defining fields, where, include, order, offset, and limit
497
+ # @return [Array<Customer>]
498
+ def customer_find(opts = {})
499
+ data, _status_code, _headers = customer_find_with_http_info(opts)
500
+ return data
501
+ end
502
+
503
+ # Find all instances of the model matched by filter from the data source.
504
+ #
505
+ # @param [Hash] opts the optional parameters
506
+ # @option opts [String] :filter Filter defining fields, where, include, order, offset, and limit
507
+ # @return [Array<(Array<Customer>, Fixnum, Hash)>] Array<Customer> data, response status code and response headers
508
+ def customer_find_with_http_info(opts = {})
509
+ if @api_client.config.debugging
510
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_find ..."
511
+ end
512
+ # resource path
513
+ local_var_path = "/Customers".sub('{format}','json')
514
+
515
+ # query parameters
516
+ query_params = {}
517
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
518
+
519
+ # header parameters
520
+ header_params = {}
521
+
522
+ # HTTP header 'Accept' (if needed)
523
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
524
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
525
+
526
+ # HTTP header 'Content-Type'
527
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
528
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
529
+
530
+ # form parameters
531
+ form_params = {}
532
+
533
+ # http body (model)
534
+ post_body = nil
535
+ auth_names = []
536
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
537
+ :header_params => header_params,
538
+ :query_params => query_params,
539
+ :form_params => form_params,
540
+ :body => post_body,
541
+ :auth_names => auth_names,
542
+ :return_type => 'Array<Customer>')
543
+ if @api_client.config.debugging
544
+ @api_client.config.logger.debug "API called: CustomerApi#customer_find\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
545
+ end
546
+ return data, status_code, headers
547
+ end
548
+
549
+ # Find a model instance by {{id}} from the data source.
550
+ #
551
+ # @param id Model id
552
+ # @param [Hash] opts the optional parameters
553
+ # @option opts [String] :filter Filter defining fields and include
554
+ # @return [Customer]
555
+ def customer_find_by_id(id, opts = {})
556
+ data, _status_code, _headers = customer_find_by_id_with_http_info(id, opts)
557
+ return data
558
+ end
559
+
560
+ # Find a model instance by {{id}} from the data source.
561
+ #
562
+ # @param id Model id
563
+ # @param [Hash] opts the optional parameters
564
+ # @option opts [String] :filter Filter defining fields and include
565
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
566
+ def customer_find_by_id_with_http_info(id, opts = {})
567
+ if @api_client.config.debugging
568
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_find_by_id ..."
569
+ end
570
+ # verify the required parameter 'id' is set
571
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_find_by_id" if id.nil?
572
+ # resource path
573
+ local_var_path = "/Customers/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
574
+
575
+ # query parameters
576
+ query_params = {}
577
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
578
+
579
+ # header parameters
580
+ header_params = {}
581
+
582
+ # HTTP header 'Accept' (if needed)
583
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
584
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
585
+
586
+ # HTTP header 'Content-Type'
587
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
588
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
589
+
590
+ # form parameters
591
+ form_params = {}
592
+
593
+ # http body (model)
594
+ post_body = nil
595
+ auth_names = []
596
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
597
+ :header_params => header_params,
598
+ :query_params => query_params,
599
+ :form_params => form_params,
600
+ :body => post_body,
601
+ :auth_names => auth_names,
602
+ :return_type => 'Customer')
603
+ if @api_client.config.debugging
604
+ @api_client.config.logger.debug "API called: CustomerApi#customer_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
605
+ end
606
+ return data, status_code, headers
607
+ end
608
+
609
+ # Find first instance of the model matched by filter from the data source.
610
+ #
611
+ # @param [Hash] opts the optional parameters
612
+ # @option opts [String] :filter Filter defining fields, where, include, order, offset, and limit
613
+ # @return [Customer]
614
+ def customer_find_one(opts = {})
615
+ data, _status_code, _headers = customer_find_one_with_http_info(opts)
616
+ return data
617
+ end
618
+
619
+ # Find first instance of the model matched by filter from the data source.
620
+ #
621
+ # @param [Hash] opts the optional parameters
622
+ # @option opts [String] :filter Filter defining fields, where, include, order, offset, and limit
623
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
624
+ def customer_find_one_with_http_info(opts = {})
625
+ if @api_client.config.debugging
626
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_find_one ..."
627
+ end
628
+ # resource path
629
+ local_var_path = "/Customers/findOne".sub('{format}','json')
630
+
631
+ # query parameters
632
+ query_params = {}
633
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
634
+
635
+ # header parameters
636
+ header_params = {}
637
+
638
+ # HTTP header 'Accept' (if needed)
639
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
640
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
641
+
642
+ # HTTP header 'Content-Type'
643
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
644
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
645
+
646
+ # form parameters
647
+ form_params = {}
648
+
649
+ # http body (model)
650
+ post_body = nil
651
+ auth_names = []
652
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
653
+ :header_params => header_params,
654
+ :query_params => query_params,
655
+ :form_params => form_params,
656
+ :body => post_body,
657
+ :auth_names => auth_names,
658
+ :return_type => 'Customer')
659
+ if @api_client.config.debugging
660
+ @api_client.config.logger.debug "API called: CustomerApi#customer_find_one\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
661
+ end
662
+ return data, status_code, headers
663
+ end
664
+
665
+ # Login a user with username/email and password.
666
+ #
667
+ # @param credentials
668
+ # @param [Hash] opts the optional parameters
669
+ # @option opts [String] :include Related objects to include in the response. See the description of return value for more details.
670
+ # @return [Object]
671
+ def customer_login(credentials, opts = {})
672
+ data, _status_code, _headers = customer_login_with_http_info(credentials, opts)
673
+ return data
674
+ end
675
+
676
+ # Login a user with username/email and password.
677
+ #
678
+ # @param credentials
679
+ # @param [Hash] opts the optional parameters
680
+ # @option opts [String] :include Related objects to include in the response. See the description of return value for more details.
681
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
682
+ def customer_login_with_http_info(credentials, opts = {})
683
+ if @api_client.config.debugging
684
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_login ..."
685
+ end
686
+ # verify the required parameter 'credentials' is set
687
+ fail ArgumentError, "Missing the required parameter 'credentials' when calling CustomerApi.customer_login" if credentials.nil?
688
+ # resource path
689
+ local_var_path = "/Customers/login".sub('{format}','json')
690
+
691
+ # query parameters
692
+ query_params = {}
693
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
694
+
695
+ # header parameters
696
+ header_params = {}
697
+
698
+ # HTTP header 'Accept' (if needed)
699
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
700
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
701
+
702
+ # HTTP header 'Content-Type'
703
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
704
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
705
+
706
+ # form parameters
707
+ form_params = {}
708
+
709
+ # http body (model)
710
+ post_body = @api_client.object_to_http_body(credentials)
711
+ auth_names = []
712
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
713
+ :header_params => header_params,
714
+ :query_params => query_params,
715
+ :form_params => form_params,
716
+ :body => post_body,
717
+ :auth_names => auth_names,
718
+ :return_type => 'Object')
719
+ if @api_client.config.debugging
720
+ @api_client.config.logger.debug "API called: CustomerApi#customer_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
721
+ end
722
+ return data, status_code, headers
723
+ end
724
+
725
+ # Logout a user with access token.
726
+ #
727
+ # @param [Hash] opts the optional parameters
728
+ # @return [nil]
729
+ def customer_logout(opts = {})
730
+ customer_logout_with_http_info(opts)
731
+ return nil
732
+ end
733
+
734
+ # Logout a user with access token.
735
+ #
736
+ # @param [Hash] opts the optional parameters
737
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
738
+ def customer_logout_with_http_info(opts = {})
739
+ if @api_client.config.debugging
740
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_logout ..."
741
+ end
742
+ # resource path
743
+ local_var_path = "/Customers/logout".sub('{format}','json')
744
+
745
+ # query parameters
746
+ query_params = {}
747
+
748
+ # header parameters
749
+ header_params = {}
750
+
751
+ # HTTP header 'Accept' (if needed)
752
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
753
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
754
+
755
+ # HTTP header 'Content-Type'
756
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
757
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
758
+
759
+ # form parameters
760
+ form_params = {}
761
+
762
+ # http body (model)
763
+ post_body = nil
764
+ auth_names = []
765
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
766
+ :header_params => header_params,
767
+ :query_params => query_params,
768
+ :form_params => form_params,
769
+ :body => post_body,
770
+ :auth_names => auth_names)
771
+ if @api_client.config.debugging
772
+ @api_client.config.logger.debug "API called: CustomerApi#customer_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
773
+ end
774
+ return data, status_code, headers
775
+ end
776
+
777
+ # Counts accessTokens of Customer.
778
+ #
779
+ # @param id User id
780
+ # @param [Hash] opts the optional parameters
781
+ # @option opts [String] :where Criteria to match model instances
782
+ # @return [InlineResponse200]
783
+ def customer_prototype_count_access_tokens(id, opts = {})
784
+ data, _status_code, _headers = customer_prototype_count_access_tokens_with_http_info(id, opts)
785
+ return data
786
+ end
787
+
788
+ # Counts accessTokens of Customer.
789
+ #
790
+ # @param id User id
791
+ # @param [Hash] opts the optional parameters
792
+ # @option opts [String] :where Criteria to match model instances
793
+ # @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
794
+ def customer_prototype_count_access_tokens_with_http_info(id, opts = {})
795
+ if @api_client.config.debugging
796
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_count_access_tokens ..."
797
+ end
798
+ # verify the required parameter 'id' is set
799
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_count_access_tokens" if id.nil?
800
+ # resource path
801
+ local_var_path = "/Customers/{id}/accessTokens/count".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
802
+
803
+ # query parameters
804
+ query_params = {}
805
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
806
+
807
+ # header parameters
808
+ header_params = {}
809
+
810
+ # HTTP header 'Accept' (if needed)
811
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
812
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
813
+
814
+ # HTTP header 'Content-Type'
815
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
816
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
817
+
818
+ # form parameters
819
+ form_params = {}
820
+
821
+ # http body (model)
822
+ post_body = nil
823
+ auth_names = []
824
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
825
+ :header_params => header_params,
826
+ :query_params => query_params,
827
+ :form_params => form_params,
828
+ :body => post_body,
829
+ :auth_names => auth_names,
830
+ :return_type => 'InlineResponse200')
831
+ if @api_client.config.debugging
832
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_count_access_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
833
+ end
834
+ return data, status_code, headers
835
+ end
836
+
837
+ # Counts emails of Customer.
838
+ #
839
+ # @param id User id
840
+ # @param [Hash] opts the optional parameters
841
+ # @option opts [String] :where Criteria to match model instances
842
+ # @return [InlineResponse200]
843
+ def customer_prototype_count_emails(id, opts = {})
844
+ data, _status_code, _headers = customer_prototype_count_emails_with_http_info(id, opts)
845
+ return data
846
+ end
847
+
848
+ # Counts emails of Customer.
849
+ #
850
+ # @param id User id
851
+ # @param [Hash] opts the optional parameters
852
+ # @option opts [String] :where Criteria to match model instances
853
+ # @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
854
+ def customer_prototype_count_emails_with_http_info(id, opts = {})
855
+ if @api_client.config.debugging
856
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_count_emails ..."
857
+ end
858
+ # verify the required parameter 'id' is set
859
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_count_emails" if id.nil?
860
+ # resource path
861
+ local_var_path = "/Customers/{id}/emails/count".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
862
+
863
+ # query parameters
864
+ query_params = {}
865
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
866
+
867
+ # header parameters
868
+ header_params = {}
869
+
870
+ # HTTP header 'Accept' (if needed)
871
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
872
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
873
+
874
+ # HTTP header 'Content-Type'
875
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
876
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
877
+
878
+ # form parameters
879
+ form_params = {}
880
+
881
+ # http body (model)
882
+ post_body = nil
883
+ auth_names = []
884
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
885
+ :header_params => header_params,
886
+ :query_params => query_params,
887
+ :form_params => form_params,
888
+ :body => post_body,
889
+ :auth_names => auth_names,
890
+ :return_type => 'InlineResponse200')
891
+ if @api_client.config.debugging
892
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_count_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
893
+ end
894
+ return data, status_code, headers
895
+ end
896
+
897
+ # Creates a new instance in accessTokens of this model.
898
+ #
899
+ # @param id User id
900
+ # @param [Hash] opts the optional parameters
901
+ # @option opts [AccessToken] :data
902
+ # @return [AccessToken]
903
+ def customer_prototype_create_access_tokens(id, opts = {})
904
+ data, _status_code, _headers = customer_prototype_create_access_tokens_with_http_info(id, opts)
905
+ return data
906
+ end
907
+
908
+ # Creates a new instance in accessTokens of this model.
909
+ #
910
+ # @param id User id
911
+ # @param [Hash] opts the optional parameters
912
+ # @option opts [AccessToken] :data
913
+ # @return [Array<(AccessToken, Fixnum, Hash)>] AccessToken data, response status code and response headers
914
+ def customer_prototype_create_access_tokens_with_http_info(id, opts = {})
915
+ if @api_client.config.debugging
916
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_create_access_tokens ..."
917
+ end
918
+ # verify the required parameter 'id' is set
919
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_create_access_tokens" if id.nil?
920
+ # resource path
921
+ local_var_path = "/Customers/{id}/accessTokens".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
922
+
923
+ # query parameters
924
+ query_params = {}
925
+
926
+ # header parameters
927
+ header_params = {}
928
+
929
+ # HTTP header 'Accept' (if needed)
930
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
931
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
932
+
933
+ # HTTP header 'Content-Type'
934
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
935
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
936
+
937
+ # form parameters
938
+ form_params = {}
939
+
940
+ # http body (model)
941
+ post_body = @api_client.object_to_http_body(opts[:'data'])
942
+ auth_names = []
943
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
944
+ :header_params => header_params,
945
+ :query_params => query_params,
946
+ :form_params => form_params,
947
+ :body => post_body,
948
+ :auth_names => auth_names,
949
+ :return_type => 'AccessToken')
950
+ if @api_client.config.debugging
951
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_create_access_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
952
+ end
953
+ return data, status_code, headers
954
+ end
955
+
956
+ # Creates a new instance in address of this model.
957
+ #
958
+ # @param id User id
959
+ # @param [Hash] opts the optional parameters
960
+ # @option opts [Address] :data
961
+ # @return [Address]
962
+ def customer_prototype_create_address(id, opts = {})
963
+ data, _status_code, _headers = customer_prototype_create_address_with_http_info(id, opts)
964
+ return data
965
+ end
966
+
967
+ # Creates a new instance in address of this model.
968
+ #
969
+ # @param id User id
970
+ # @param [Hash] opts the optional parameters
971
+ # @option opts [Address] :data
972
+ # @return [Array<(Address, Fixnum, Hash)>] Address data, response status code and response headers
973
+ def customer_prototype_create_address_with_http_info(id, opts = {})
974
+ if @api_client.config.debugging
975
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_create_address ..."
976
+ end
977
+ # verify the required parameter 'id' is set
978
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_create_address" if id.nil?
979
+ # resource path
980
+ local_var_path = "/Customers/{id}/address".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
981
+
982
+ # query parameters
983
+ query_params = {}
984
+
985
+ # header parameters
986
+ header_params = {}
987
+
988
+ # HTTP header 'Accept' (if needed)
989
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
990
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
991
+
992
+ # HTTP header 'Content-Type'
993
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
994
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
995
+
996
+ # form parameters
997
+ form_params = {}
998
+
999
+ # http body (model)
1000
+ post_body = @api_client.object_to_http_body(opts[:'data'])
1001
+ auth_names = []
1002
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1003
+ :header_params => header_params,
1004
+ :query_params => query_params,
1005
+ :form_params => form_params,
1006
+ :body => post_body,
1007
+ :auth_names => auth_names,
1008
+ :return_type => 'Address')
1009
+ if @api_client.config.debugging
1010
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_create_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1011
+ end
1012
+ return data, status_code, headers
1013
+ end
1014
+
1015
+ # Creates a new instance in emails of this model.
1016
+ #
1017
+ # @param id User id
1018
+ # @param [Hash] opts the optional parameters
1019
+ # @option opts [EmailAddress] :data
1020
+ # @return [EmailAddress]
1021
+ def customer_prototype_create_emails(id, opts = {})
1022
+ data, _status_code, _headers = customer_prototype_create_emails_with_http_info(id, opts)
1023
+ return data
1024
+ end
1025
+
1026
+ # Creates a new instance in emails of this model.
1027
+ #
1028
+ # @param id User id
1029
+ # @param [Hash] opts the optional parameters
1030
+ # @option opts [EmailAddress] :data
1031
+ # @return [Array<(EmailAddress, Fixnum, Hash)>] EmailAddress data, response status code and response headers
1032
+ def customer_prototype_create_emails_with_http_info(id, opts = {})
1033
+ if @api_client.config.debugging
1034
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_create_emails ..."
1035
+ end
1036
+ # verify the required parameter 'id' is set
1037
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_create_emails" if id.nil?
1038
+ # resource path
1039
+ local_var_path = "/Customers/{id}/emails".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1040
+
1041
+ # query parameters
1042
+ query_params = {}
1043
+
1044
+ # header parameters
1045
+ header_params = {}
1046
+
1047
+ # HTTP header 'Accept' (if needed)
1048
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1049
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1050
+
1051
+ # HTTP header 'Content-Type'
1052
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1053
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1054
+
1055
+ # form parameters
1056
+ form_params = {}
1057
+
1058
+ # http body (model)
1059
+ post_body = @api_client.object_to_http_body(opts[:'data'])
1060
+ auth_names = []
1061
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1062
+ :header_params => header_params,
1063
+ :query_params => query_params,
1064
+ :form_params => form_params,
1065
+ :body => post_body,
1066
+ :auth_names => auth_names,
1067
+ :return_type => 'EmailAddress')
1068
+ if @api_client.config.debugging
1069
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_create_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1070
+ end
1071
+ return data, status_code, headers
1072
+ end
1073
+
1074
+ # Deletes all accessTokens of this model.
1075
+ #
1076
+ # @param id User id
1077
+ # @param [Hash] opts the optional parameters
1078
+ # @return [nil]
1079
+ def customer_prototype_delete_access_tokens(id, opts = {})
1080
+ customer_prototype_delete_access_tokens_with_http_info(id, opts)
1081
+ return nil
1082
+ end
1083
+
1084
+ # Deletes all accessTokens of this model.
1085
+ #
1086
+ # @param id User id
1087
+ # @param [Hash] opts the optional parameters
1088
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1089
+ def customer_prototype_delete_access_tokens_with_http_info(id, opts = {})
1090
+ if @api_client.config.debugging
1091
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_delete_access_tokens ..."
1092
+ end
1093
+ # verify the required parameter 'id' is set
1094
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_delete_access_tokens" if id.nil?
1095
+ # resource path
1096
+ local_var_path = "/Customers/{id}/accessTokens".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1097
+
1098
+ # query parameters
1099
+ query_params = {}
1100
+
1101
+ # header parameters
1102
+ header_params = {}
1103
+
1104
+ # HTTP header 'Accept' (if needed)
1105
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1106
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1107
+
1108
+ # HTTP header 'Content-Type'
1109
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1110
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1111
+
1112
+ # form parameters
1113
+ form_params = {}
1114
+
1115
+ # http body (model)
1116
+ post_body = nil
1117
+ auth_names = []
1118
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1119
+ :header_params => header_params,
1120
+ :query_params => query_params,
1121
+ :form_params => form_params,
1122
+ :body => post_body,
1123
+ :auth_names => auth_names)
1124
+ if @api_client.config.debugging
1125
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_delete_access_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1126
+ end
1127
+ return data, status_code, headers
1128
+ end
1129
+
1130
+ # Deletes all emails of this model.
1131
+ #
1132
+ # @param id User id
1133
+ # @param [Hash] opts the optional parameters
1134
+ # @return [nil]
1135
+ def customer_prototype_delete_emails(id, opts = {})
1136
+ customer_prototype_delete_emails_with_http_info(id, opts)
1137
+ return nil
1138
+ end
1139
+
1140
+ # Deletes all emails of this model.
1141
+ #
1142
+ # @param id User id
1143
+ # @param [Hash] opts the optional parameters
1144
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1145
+ def customer_prototype_delete_emails_with_http_info(id, opts = {})
1146
+ if @api_client.config.debugging
1147
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_delete_emails ..."
1148
+ end
1149
+ # verify the required parameter 'id' is set
1150
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_delete_emails" if id.nil?
1151
+ # resource path
1152
+ local_var_path = "/Customers/{id}/emails".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1153
+
1154
+ # query parameters
1155
+ query_params = {}
1156
+
1157
+ # header parameters
1158
+ header_params = {}
1159
+
1160
+ # HTTP header 'Accept' (if needed)
1161
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1162
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1163
+
1164
+ # HTTP header 'Content-Type'
1165
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1166
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1167
+
1168
+ # form parameters
1169
+ form_params = {}
1170
+
1171
+ # http body (model)
1172
+ post_body = nil
1173
+ auth_names = []
1174
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1175
+ :header_params => header_params,
1176
+ :query_params => query_params,
1177
+ :form_params => form_params,
1178
+ :body => post_body,
1179
+ :auth_names => auth_names)
1180
+ if @api_client.config.debugging
1181
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_delete_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1182
+ end
1183
+ return data, status_code, headers
1184
+ end
1185
+
1186
+ # Deletes address of this model.
1187
+ #
1188
+ # @param id User id
1189
+ # @param [Hash] opts the optional parameters
1190
+ # @return [nil]
1191
+ def customer_prototype_destroy_address(id, opts = {})
1192
+ customer_prototype_destroy_address_with_http_info(id, opts)
1193
+ return nil
1194
+ end
1195
+
1196
+ # Deletes address of this model.
1197
+ #
1198
+ # @param id User id
1199
+ # @param [Hash] opts the optional parameters
1200
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1201
+ def customer_prototype_destroy_address_with_http_info(id, opts = {})
1202
+ if @api_client.config.debugging
1203
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_destroy_address ..."
1204
+ end
1205
+ # verify the required parameter 'id' is set
1206
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_destroy_address" if id.nil?
1207
+ # resource path
1208
+ local_var_path = "/Customers/{id}/address".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1209
+
1210
+ # query parameters
1211
+ query_params = {}
1212
+
1213
+ # header parameters
1214
+ header_params = {}
1215
+
1216
+ # HTTP header 'Accept' (if needed)
1217
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1218
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1219
+
1220
+ # HTTP header 'Content-Type'
1221
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1222
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1223
+
1224
+ # form parameters
1225
+ form_params = {}
1226
+
1227
+ # http body (model)
1228
+ post_body = nil
1229
+ auth_names = []
1230
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1231
+ :header_params => header_params,
1232
+ :query_params => query_params,
1233
+ :form_params => form_params,
1234
+ :body => post_body,
1235
+ :auth_names => auth_names)
1236
+ if @api_client.config.debugging
1237
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_destroy_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1238
+ end
1239
+ return data, status_code, headers
1240
+ end
1241
+
1242
+ # Delete a related item by id for accessTokens.
1243
+ #
1244
+ # @param fk Foreign key for accessTokens
1245
+ # @param id User id
1246
+ # @param [Hash] opts the optional parameters
1247
+ # @return [nil]
1248
+ def customer_prototype_destroy_by_id_access_tokens(fk, id, opts = {})
1249
+ customer_prototype_destroy_by_id_access_tokens_with_http_info(fk, id, opts)
1250
+ return nil
1251
+ end
1252
+
1253
+ # Delete a related item by id for accessTokens.
1254
+ #
1255
+ # @param fk Foreign key for accessTokens
1256
+ # @param id User id
1257
+ # @param [Hash] opts the optional parameters
1258
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1259
+ def customer_prototype_destroy_by_id_access_tokens_with_http_info(fk, id, opts = {})
1260
+ if @api_client.config.debugging
1261
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_destroy_by_id_access_tokens ..."
1262
+ end
1263
+ # verify the required parameter 'fk' is set
1264
+ fail ArgumentError, "Missing the required parameter 'fk' when calling CustomerApi.customer_prototype_destroy_by_id_access_tokens" if fk.nil?
1265
+ # verify the required parameter 'id' is set
1266
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_destroy_by_id_access_tokens" if id.nil?
1267
+ # resource path
1268
+ local_var_path = "/Customers/{id}/accessTokens/{fk}".sub('{format}','json').sub('{' + 'fk' + '}', fk.to_s).sub('{' + 'id' + '}', id.to_s)
1269
+
1270
+ # query parameters
1271
+ query_params = {}
1272
+
1273
+ # header parameters
1274
+ header_params = {}
1275
+
1276
+ # HTTP header 'Accept' (if needed)
1277
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1278
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1279
+
1280
+ # HTTP header 'Content-Type'
1281
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1282
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1283
+
1284
+ # form parameters
1285
+ form_params = {}
1286
+
1287
+ # http body (model)
1288
+ post_body = nil
1289
+ auth_names = []
1290
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1291
+ :header_params => header_params,
1292
+ :query_params => query_params,
1293
+ :form_params => form_params,
1294
+ :body => post_body,
1295
+ :auth_names => auth_names)
1296
+ if @api_client.config.debugging
1297
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_destroy_by_id_access_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1298
+ end
1299
+ return data, status_code, headers
1300
+ end
1301
+
1302
+ # Delete a related item by id for emails.
1303
+ #
1304
+ # @param fk Foreign key for emails
1305
+ # @param id User id
1306
+ # @param [Hash] opts the optional parameters
1307
+ # @return [nil]
1308
+ def customer_prototype_destroy_by_id_emails(fk, id, opts = {})
1309
+ customer_prototype_destroy_by_id_emails_with_http_info(fk, id, opts)
1310
+ return nil
1311
+ end
1312
+
1313
+ # Delete a related item by id for emails.
1314
+ #
1315
+ # @param fk Foreign key for emails
1316
+ # @param id User id
1317
+ # @param [Hash] opts the optional parameters
1318
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1319
+ def customer_prototype_destroy_by_id_emails_with_http_info(fk, id, opts = {})
1320
+ if @api_client.config.debugging
1321
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_destroy_by_id_emails ..."
1322
+ end
1323
+ # verify the required parameter 'fk' is set
1324
+ fail ArgumentError, "Missing the required parameter 'fk' when calling CustomerApi.customer_prototype_destroy_by_id_emails" if fk.nil?
1325
+ # verify the required parameter 'id' is set
1326
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_destroy_by_id_emails" if id.nil?
1327
+ # resource path
1328
+ local_var_path = "/Customers/{id}/emails/{fk}".sub('{format}','json').sub('{' + 'fk' + '}', fk.to_s).sub('{' + 'id' + '}', id.to_s)
1329
+
1330
+ # query parameters
1331
+ query_params = {}
1332
+
1333
+ # header parameters
1334
+ header_params = {}
1335
+
1336
+ # HTTP header 'Accept' (if needed)
1337
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1338
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1339
+
1340
+ # HTTP header 'Content-Type'
1341
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1342
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1343
+
1344
+ # form parameters
1345
+ form_params = {}
1346
+
1347
+ # http body (model)
1348
+ post_body = nil
1349
+ auth_names = []
1350
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1351
+ :header_params => header_params,
1352
+ :query_params => query_params,
1353
+ :form_params => form_params,
1354
+ :body => post_body,
1355
+ :auth_names => auth_names)
1356
+ if @api_client.config.debugging
1357
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_destroy_by_id_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1358
+ end
1359
+ return data, status_code, headers
1360
+ end
1361
+
1362
+ # Find a related item by id for accessTokens.
1363
+ #
1364
+ # @param fk Foreign key for accessTokens
1365
+ # @param id User id
1366
+ # @param [Hash] opts the optional parameters
1367
+ # @return [AccessToken]
1368
+ def customer_prototype_find_by_id_access_tokens(fk, id, opts = {})
1369
+ data, _status_code, _headers = customer_prototype_find_by_id_access_tokens_with_http_info(fk, id, opts)
1370
+ return data
1371
+ end
1372
+
1373
+ # Find a related item by id for accessTokens.
1374
+ #
1375
+ # @param fk Foreign key for accessTokens
1376
+ # @param id User id
1377
+ # @param [Hash] opts the optional parameters
1378
+ # @return [Array<(AccessToken, Fixnum, Hash)>] AccessToken data, response status code and response headers
1379
+ def customer_prototype_find_by_id_access_tokens_with_http_info(fk, id, opts = {})
1380
+ if @api_client.config.debugging
1381
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_find_by_id_access_tokens ..."
1382
+ end
1383
+ # verify the required parameter 'fk' is set
1384
+ fail ArgumentError, "Missing the required parameter 'fk' when calling CustomerApi.customer_prototype_find_by_id_access_tokens" if fk.nil?
1385
+ # verify the required parameter 'id' is set
1386
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_find_by_id_access_tokens" if id.nil?
1387
+ # resource path
1388
+ local_var_path = "/Customers/{id}/accessTokens/{fk}".sub('{format}','json').sub('{' + 'fk' + '}', fk.to_s).sub('{' + 'id' + '}', id.to_s)
1389
+
1390
+ # query parameters
1391
+ query_params = {}
1392
+
1393
+ # header parameters
1394
+ header_params = {}
1395
+
1396
+ # HTTP header 'Accept' (if needed)
1397
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1398
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1399
+
1400
+ # HTTP header 'Content-Type'
1401
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1402
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1403
+
1404
+ # form parameters
1405
+ form_params = {}
1406
+
1407
+ # http body (model)
1408
+ post_body = nil
1409
+ auth_names = []
1410
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1411
+ :header_params => header_params,
1412
+ :query_params => query_params,
1413
+ :form_params => form_params,
1414
+ :body => post_body,
1415
+ :auth_names => auth_names,
1416
+ :return_type => 'AccessToken')
1417
+ if @api_client.config.debugging
1418
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_find_by_id_access_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1419
+ end
1420
+ return data, status_code, headers
1421
+ end
1422
+
1423
+ # Find a related item by id for emails.
1424
+ #
1425
+ # @param fk Foreign key for emails
1426
+ # @param id User id
1427
+ # @param [Hash] opts the optional parameters
1428
+ # @return [EmailAddress]
1429
+ def customer_prototype_find_by_id_emails(fk, id, opts = {})
1430
+ data, _status_code, _headers = customer_prototype_find_by_id_emails_with_http_info(fk, id, opts)
1431
+ return data
1432
+ end
1433
+
1434
+ # Find a related item by id for emails.
1435
+ #
1436
+ # @param fk Foreign key for emails
1437
+ # @param id User id
1438
+ # @param [Hash] opts the optional parameters
1439
+ # @return [Array<(EmailAddress, Fixnum, Hash)>] EmailAddress data, response status code and response headers
1440
+ def customer_prototype_find_by_id_emails_with_http_info(fk, id, opts = {})
1441
+ if @api_client.config.debugging
1442
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_find_by_id_emails ..."
1443
+ end
1444
+ # verify the required parameter 'fk' is set
1445
+ fail ArgumentError, "Missing the required parameter 'fk' when calling CustomerApi.customer_prototype_find_by_id_emails" if fk.nil?
1446
+ # verify the required parameter 'id' is set
1447
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_find_by_id_emails" if id.nil?
1448
+ # resource path
1449
+ local_var_path = "/Customers/{id}/emails/{fk}".sub('{format}','json').sub('{' + 'fk' + '}', fk.to_s).sub('{' + 'id' + '}', id.to_s)
1450
+
1451
+ # query parameters
1452
+ query_params = {}
1453
+
1454
+ # header parameters
1455
+ header_params = {}
1456
+
1457
+ # HTTP header 'Accept' (if needed)
1458
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1459
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1460
+
1461
+ # HTTP header 'Content-Type'
1462
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1463
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1464
+
1465
+ # form parameters
1466
+ form_params = {}
1467
+
1468
+ # http body (model)
1469
+ post_body = nil
1470
+ auth_names = []
1471
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1472
+ :header_params => header_params,
1473
+ :query_params => query_params,
1474
+ :form_params => form_params,
1475
+ :body => post_body,
1476
+ :auth_names => auth_names,
1477
+ :return_type => 'EmailAddress')
1478
+ if @api_client.config.debugging
1479
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_find_by_id_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1480
+ end
1481
+ return data, status_code, headers
1482
+ end
1483
+
1484
+ # Queries accessTokens of Customer.
1485
+ #
1486
+ # @param id User id
1487
+ # @param [Hash] opts the optional parameters
1488
+ # @option opts [String] :filter
1489
+ # @return [Array<AccessToken>]
1490
+ def customer_prototype_get_access_tokens(id, opts = {})
1491
+ data, _status_code, _headers = customer_prototype_get_access_tokens_with_http_info(id, opts)
1492
+ return data
1493
+ end
1494
+
1495
+ # Queries accessTokens of Customer.
1496
+ #
1497
+ # @param id User id
1498
+ # @param [Hash] opts the optional parameters
1499
+ # @option opts [String] :filter
1500
+ # @return [Array<(Array<AccessToken>, Fixnum, Hash)>] Array<AccessToken> data, response status code and response headers
1501
+ def customer_prototype_get_access_tokens_with_http_info(id, opts = {})
1502
+ if @api_client.config.debugging
1503
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_get_access_tokens ..."
1504
+ end
1505
+ # verify the required parameter 'id' is set
1506
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_get_access_tokens" if id.nil?
1507
+ # resource path
1508
+ local_var_path = "/Customers/{id}/accessTokens".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1509
+
1510
+ # query parameters
1511
+ query_params = {}
1512
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1513
+
1514
+ # header parameters
1515
+ header_params = {}
1516
+
1517
+ # HTTP header 'Accept' (if needed)
1518
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1519
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1520
+
1521
+ # HTTP header 'Content-Type'
1522
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1523
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1524
+
1525
+ # form parameters
1526
+ form_params = {}
1527
+
1528
+ # http body (model)
1529
+ post_body = nil
1530
+ auth_names = []
1531
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1532
+ :header_params => header_params,
1533
+ :query_params => query_params,
1534
+ :form_params => form_params,
1535
+ :body => post_body,
1536
+ :auth_names => auth_names,
1537
+ :return_type => 'Array<AccessToken>')
1538
+ if @api_client.config.debugging
1539
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_get_access_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1540
+ end
1541
+ return data, status_code, headers
1542
+ end
1543
+
1544
+ # Fetches hasOne relation address.
1545
+ #
1546
+ # @param id User id
1547
+ # @param [Hash] opts the optional parameters
1548
+ # @option opts [BOOLEAN] :refresh
1549
+ # @return [Address]
1550
+ def customer_prototype_get_address(id, opts = {})
1551
+ data, _status_code, _headers = customer_prototype_get_address_with_http_info(id, opts)
1552
+ return data
1553
+ end
1554
+
1555
+ # Fetches hasOne relation address.
1556
+ #
1557
+ # @param id User id
1558
+ # @param [Hash] opts the optional parameters
1559
+ # @option opts [BOOLEAN] :refresh
1560
+ # @return [Array<(Address, Fixnum, Hash)>] Address data, response status code and response headers
1561
+ def customer_prototype_get_address_with_http_info(id, opts = {})
1562
+ if @api_client.config.debugging
1563
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_get_address ..."
1564
+ end
1565
+ # verify the required parameter 'id' is set
1566
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_get_address" if id.nil?
1567
+ # resource path
1568
+ local_var_path = "/Customers/{id}/address".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1569
+
1570
+ # query parameters
1571
+ query_params = {}
1572
+ query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
1573
+
1574
+ # header parameters
1575
+ header_params = {}
1576
+
1577
+ # HTTP header 'Accept' (if needed)
1578
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1579
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1580
+
1581
+ # HTTP header 'Content-Type'
1582
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1583
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1584
+
1585
+ # form parameters
1586
+ form_params = {}
1587
+
1588
+ # http body (model)
1589
+ post_body = nil
1590
+ auth_names = []
1591
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1592
+ :header_params => header_params,
1593
+ :query_params => query_params,
1594
+ :form_params => form_params,
1595
+ :body => post_body,
1596
+ :auth_names => auth_names,
1597
+ :return_type => 'Address')
1598
+ if @api_client.config.debugging
1599
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_get_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1600
+ end
1601
+ return data, status_code, headers
1602
+ end
1603
+
1604
+ # Queries emails of Customer.
1605
+ #
1606
+ # @param id User id
1607
+ # @param [Hash] opts the optional parameters
1608
+ # @option opts [String] :filter
1609
+ # @return [Array<EmailAddress>]
1610
+ def customer_prototype_get_emails(id, opts = {})
1611
+ data, _status_code, _headers = customer_prototype_get_emails_with_http_info(id, opts)
1612
+ return data
1613
+ end
1614
+
1615
+ # Queries emails of Customer.
1616
+ #
1617
+ # @param id User id
1618
+ # @param [Hash] opts the optional parameters
1619
+ # @option opts [String] :filter
1620
+ # @return [Array<(Array<EmailAddress>, Fixnum, Hash)>] Array<EmailAddress> data, response status code and response headers
1621
+ def customer_prototype_get_emails_with_http_info(id, opts = {})
1622
+ if @api_client.config.debugging
1623
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_get_emails ..."
1624
+ end
1625
+ # verify the required parameter 'id' is set
1626
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_get_emails" if id.nil?
1627
+ # resource path
1628
+ local_var_path = "/Customers/{id}/emails".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1629
+
1630
+ # query parameters
1631
+ query_params = {}
1632
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1633
+
1634
+ # header parameters
1635
+ header_params = {}
1636
+
1637
+ # HTTP header 'Accept' (if needed)
1638
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1639
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1640
+
1641
+ # HTTP header 'Content-Type'
1642
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1643
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1644
+
1645
+ # form parameters
1646
+ form_params = {}
1647
+
1648
+ # http body (model)
1649
+ post_body = nil
1650
+ auth_names = []
1651
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1652
+ :header_params => header_params,
1653
+ :query_params => query_params,
1654
+ :form_params => form_params,
1655
+ :body => post_body,
1656
+ :auth_names => auth_names,
1657
+ :return_type => 'Array<EmailAddress>')
1658
+ if @api_client.config.debugging
1659
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_get_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1660
+ end
1661
+ return data, status_code, headers
1662
+ end
1663
+
1664
+ # Update address of this model.
1665
+ #
1666
+ # @param id User id
1667
+ # @param [Hash] opts the optional parameters
1668
+ # @option opts [Address] :data
1669
+ # @return [Address]
1670
+ def customer_prototype_update_address(id, opts = {})
1671
+ data, _status_code, _headers = customer_prototype_update_address_with_http_info(id, opts)
1672
+ return data
1673
+ end
1674
+
1675
+ # Update address of this model.
1676
+ #
1677
+ # @param id User id
1678
+ # @param [Hash] opts the optional parameters
1679
+ # @option opts [Address] :data
1680
+ # @return [Array<(Address, Fixnum, Hash)>] Address data, response status code and response headers
1681
+ def customer_prototype_update_address_with_http_info(id, opts = {})
1682
+ if @api_client.config.debugging
1683
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_update_address ..."
1684
+ end
1685
+ # verify the required parameter 'id' is set
1686
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_update_address" if id.nil?
1687
+ # resource path
1688
+ local_var_path = "/Customers/{id}/address".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1689
+
1690
+ # query parameters
1691
+ query_params = {}
1692
+
1693
+ # header parameters
1694
+ header_params = {}
1695
+
1696
+ # HTTP header 'Accept' (if needed)
1697
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1698
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1699
+
1700
+ # HTTP header 'Content-Type'
1701
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1702
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1703
+
1704
+ # form parameters
1705
+ form_params = {}
1706
+
1707
+ # http body (model)
1708
+ post_body = @api_client.object_to_http_body(opts[:'data'])
1709
+ auth_names = []
1710
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1711
+ :header_params => header_params,
1712
+ :query_params => query_params,
1713
+ :form_params => form_params,
1714
+ :body => post_body,
1715
+ :auth_names => auth_names,
1716
+ :return_type => 'Address')
1717
+ if @api_client.config.debugging
1718
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_update_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1719
+ end
1720
+ return data, status_code, headers
1721
+ end
1722
+
1723
+ # Patch attributes for a model instance and persist it into the data source.
1724
+ #
1725
+ # @param id User id
1726
+ # @param [Hash] opts the optional parameters
1727
+ # @option opts [Customer] :data An object of model property name/value pairs
1728
+ # @return [Customer]
1729
+ def customer_prototype_update_attributes_patch_customersid(id, opts = {})
1730
+ data, _status_code, _headers = customer_prototype_update_attributes_patch_customersid_with_http_info(id, opts)
1731
+ return data
1732
+ end
1733
+
1734
+ # Patch attributes for a model instance and persist it into the data source.
1735
+ #
1736
+ # @param id User id
1737
+ # @param [Hash] opts the optional parameters
1738
+ # @option opts [Customer] :data An object of model property name/value pairs
1739
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
1740
+ def customer_prototype_update_attributes_patch_customersid_with_http_info(id, opts = {})
1741
+ if @api_client.config.debugging
1742
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_update_attributes_patch_customersid ..."
1743
+ end
1744
+ # verify the required parameter 'id' is set
1745
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_update_attributes_patch_customersid" if id.nil?
1746
+ # resource path
1747
+ local_var_path = "/Customers/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1748
+
1749
+ # query parameters
1750
+ query_params = {}
1751
+
1752
+ # header parameters
1753
+ header_params = {}
1754
+
1755
+ # HTTP header 'Accept' (if needed)
1756
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1757
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1758
+
1759
+ # HTTP header 'Content-Type'
1760
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1761
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1762
+
1763
+ # form parameters
1764
+ form_params = {}
1765
+
1766
+ # http body (model)
1767
+ post_body = @api_client.object_to_http_body(opts[:'data'])
1768
+ auth_names = []
1769
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
1770
+ :header_params => header_params,
1771
+ :query_params => query_params,
1772
+ :form_params => form_params,
1773
+ :body => post_body,
1774
+ :auth_names => auth_names,
1775
+ :return_type => 'Customer')
1776
+ if @api_client.config.debugging
1777
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_update_attributes_patch_customersid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1778
+ end
1779
+ return data, status_code, headers
1780
+ end
1781
+
1782
+ # Patch attributes for a model instance and persist it into the data source.
1783
+ #
1784
+ # @param id User id
1785
+ # @param [Hash] opts the optional parameters
1786
+ # @option opts [Customer] :data An object of model property name/value pairs
1787
+ # @return [Customer]
1788
+ def customer_prototype_update_attributes_put_customersid(id, opts = {})
1789
+ data, _status_code, _headers = customer_prototype_update_attributes_put_customersid_with_http_info(id, opts)
1790
+ return data
1791
+ end
1792
+
1793
+ # Patch attributes for a model instance and persist it into the data source.
1794
+ #
1795
+ # @param id User id
1796
+ # @param [Hash] opts the optional parameters
1797
+ # @option opts [Customer] :data An object of model property name/value pairs
1798
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
1799
+ def customer_prototype_update_attributes_put_customersid_with_http_info(id, opts = {})
1800
+ if @api_client.config.debugging
1801
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_update_attributes_put_customersid ..."
1802
+ end
1803
+ # verify the required parameter 'id' is set
1804
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_update_attributes_put_customersid" if id.nil?
1805
+ # resource path
1806
+ local_var_path = "/Customers/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1807
+
1808
+ # query parameters
1809
+ query_params = {}
1810
+
1811
+ # header parameters
1812
+ header_params = {}
1813
+
1814
+ # HTTP header 'Accept' (if needed)
1815
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1816
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1817
+
1818
+ # HTTP header 'Content-Type'
1819
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1820
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1821
+
1822
+ # form parameters
1823
+ form_params = {}
1824
+
1825
+ # http body (model)
1826
+ post_body = @api_client.object_to_http_body(opts[:'data'])
1827
+ auth_names = []
1828
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1829
+ :header_params => header_params,
1830
+ :query_params => query_params,
1831
+ :form_params => form_params,
1832
+ :body => post_body,
1833
+ :auth_names => auth_names,
1834
+ :return_type => 'Customer')
1835
+ if @api_client.config.debugging
1836
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_update_attributes_put_customersid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1837
+ end
1838
+ return data, status_code, headers
1839
+ end
1840
+
1841
+ # Update a related item by id for accessTokens.
1842
+ #
1843
+ # @param fk Foreign key for accessTokens
1844
+ # @param id User id
1845
+ # @param [Hash] opts the optional parameters
1846
+ # @option opts [AccessToken] :data
1847
+ # @return [AccessToken]
1848
+ def customer_prototype_update_by_id_access_tokens(fk, id, opts = {})
1849
+ data, _status_code, _headers = customer_prototype_update_by_id_access_tokens_with_http_info(fk, id, opts)
1850
+ return data
1851
+ end
1852
+
1853
+ # Update a related item by id for accessTokens.
1854
+ #
1855
+ # @param fk Foreign key for accessTokens
1856
+ # @param id User id
1857
+ # @param [Hash] opts the optional parameters
1858
+ # @option opts [AccessToken] :data
1859
+ # @return [Array<(AccessToken, Fixnum, Hash)>] AccessToken data, response status code and response headers
1860
+ def customer_prototype_update_by_id_access_tokens_with_http_info(fk, id, opts = {})
1861
+ if @api_client.config.debugging
1862
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_update_by_id_access_tokens ..."
1863
+ end
1864
+ # verify the required parameter 'fk' is set
1865
+ fail ArgumentError, "Missing the required parameter 'fk' when calling CustomerApi.customer_prototype_update_by_id_access_tokens" if fk.nil?
1866
+ # verify the required parameter 'id' is set
1867
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_update_by_id_access_tokens" if id.nil?
1868
+ # resource path
1869
+ local_var_path = "/Customers/{id}/accessTokens/{fk}".sub('{format}','json').sub('{' + 'fk' + '}', fk.to_s).sub('{' + 'id' + '}', id.to_s)
1870
+
1871
+ # query parameters
1872
+ query_params = {}
1873
+
1874
+ # header parameters
1875
+ header_params = {}
1876
+
1877
+ # HTTP header 'Accept' (if needed)
1878
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1879
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1880
+
1881
+ # HTTP header 'Content-Type'
1882
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1883
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1884
+
1885
+ # form parameters
1886
+ form_params = {}
1887
+
1888
+ # http body (model)
1889
+ post_body = @api_client.object_to_http_body(opts[:'data'])
1890
+ auth_names = []
1891
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1892
+ :header_params => header_params,
1893
+ :query_params => query_params,
1894
+ :form_params => form_params,
1895
+ :body => post_body,
1896
+ :auth_names => auth_names,
1897
+ :return_type => 'AccessToken')
1898
+ if @api_client.config.debugging
1899
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_update_by_id_access_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1900
+ end
1901
+ return data, status_code, headers
1902
+ end
1903
+
1904
+ # Update a related item by id for emails.
1905
+ #
1906
+ # @param fk Foreign key for emails
1907
+ # @param id User id
1908
+ # @param [Hash] opts the optional parameters
1909
+ # @option opts [EmailAddress] :data
1910
+ # @return [EmailAddress]
1911
+ def customer_prototype_update_by_id_emails(fk, id, opts = {})
1912
+ data, _status_code, _headers = customer_prototype_update_by_id_emails_with_http_info(fk, id, opts)
1913
+ return data
1914
+ end
1915
+
1916
+ # Update a related item by id for emails.
1917
+ #
1918
+ # @param fk Foreign key for emails
1919
+ # @param id User id
1920
+ # @param [Hash] opts the optional parameters
1921
+ # @option opts [EmailAddress] :data
1922
+ # @return [Array<(EmailAddress, Fixnum, Hash)>] EmailAddress data, response status code and response headers
1923
+ def customer_prototype_update_by_id_emails_with_http_info(fk, id, opts = {})
1924
+ if @api_client.config.debugging
1925
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_prototype_update_by_id_emails ..."
1926
+ end
1927
+ # verify the required parameter 'fk' is set
1928
+ fail ArgumentError, "Missing the required parameter 'fk' when calling CustomerApi.customer_prototype_update_by_id_emails" if fk.nil?
1929
+ # verify the required parameter 'id' is set
1930
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_prototype_update_by_id_emails" if id.nil?
1931
+ # resource path
1932
+ local_var_path = "/Customers/{id}/emails/{fk}".sub('{format}','json').sub('{' + 'fk' + '}', fk.to_s).sub('{' + 'id' + '}', id.to_s)
1933
+
1934
+ # query parameters
1935
+ query_params = {}
1936
+
1937
+ # header parameters
1938
+ header_params = {}
1939
+
1940
+ # HTTP header 'Accept' (if needed)
1941
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
1942
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1943
+
1944
+ # HTTP header 'Content-Type'
1945
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
1946
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1947
+
1948
+ # form parameters
1949
+ form_params = {}
1950
+
1951
+ # http body (model)
1952
+ post_body = @api_client.object_to_http_body(opts[:'data'])
1953
+ auth_names = []
1954
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1955
+ :header_params => header_params,
1956
+ :query_params => query_params,
1957
+ :form_params => form_params,
1958
+ :body => post_body,
1959
+ :auth_names => auth_names,
1960
+ :return_type => 'EmailAddress')
1961
+ if @api_client.config.debugging
1962
+ @api_client.config.logger.debug "API called: CustomerApi#customer_prototype_update_by_id_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1963
+ end
1964
+ return data, status_code, headers
1965
+ end
1966
+
1967
+ # Replace attributes for a model instance and persist it into the data source.
1968
+ #
1969
+ # @param id Model id
1970
+ # @param [Hash] opts the optional parameters
1971
+ # @option opts [Customer] :data Model instance data
1972
+ # @return [Customer]
1973
+ def customer_replace_by_id(id, opts = {})
1974
+ data, _status_code, _headers = customer_replace_by_id_with_http_info(id, opts)
1975
+ return data
1976
+ end
1977
+
1978
+ # Replace attributes for a model instance and persist it into the data source.
1979
+ #
1980
+ # @param id Model id
1981
+ # @param [Hash] opts the optional parameters
1982
+ # @option opts [Customer] :data Model instance data
1983
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
1984
+ def customer_replace_by_id_with_http_info(id, opts = {})
1985
+ if @api_client.config.debugging
1986
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_replace_by_id ..."
1987
+ end
1988
+ # verify the required parameter 'id' is set
1989
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomerApi.customer_replace_by_id" if id.nil?
1990
+ # resource path
1991
+ local_var_path = "/Customers/{id}/replace".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
1992
+
1993
+ # query parameters
1994
+ query_params = {}
1995
+
1996
+ # header parameters
1997
+ header_params = {}
1998
+
1999
+ # HTTP header 'Accept' (if needed)
2000
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
2001
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2002
+
2003
+ # HTTP header 'Content-Type'
2004
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
2005
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2006
+
2007
+ # form parameters
2008
+ form_params = {}
2009
+
2010
+ # http body (model)
2011
+ post_body = @api_client.object_to_http_body(opts[:'data'])
2012
+ auth_names = []
2013
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2014
+ :header_params => header_params,
2015
+ :query_params => query_params,
2016
+ :form_params => form_params,
2017
+ :body => post_body,
2018
+ :auth_names => auth_names,
2019
+ :return_type => 'Customer')
2020
+ if @api_client.config.debugging
2021
+ @api_client.config.logger.debug "API called: CustomerApi#customer_replace_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2022
+ end
2023
+ return data, status_code, headers
2024
+ end
2025
+
2026
+ # Replace an existing model instance or insert a new one into the data source.
2027
+ #
2028
+ # @param [Hash] opts the optional parameters
2029
+ # @option opts [Customer] :data Model instance data
2030
+ # @return [Customer]
2031
+ def customer_replace_or_create(opts = {})
2032
+ data, _status_code, _headers = customer_replace_or_create_with_http_info(opts)
2033
+ return data
2034
+ end
2035
+
2036
+ # Replace an existing model instance or insert a new one into the data source.
2037
+ #
2038
+ # @param [Hash] opts the optional parameters
2039
+ # @option opts [Customer] :data Model instance data
2040
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
2041
+ def customer_replace_or_create_with_http_info(opts = {})
2042
+ if @api_client.config.debugging
2043
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_replace_or_create ..."
2044
+ end
2045
+ # resource path
2046
+ local_var_path = "/Customers/replaceOrCreate".sub('{format}','json')
2047
+
2048
+ # query parameters
2049
+ query_params = {}
2050
+
2051
+ # header parameters
2052
+ header_params = {}
2053
+
2054
+ # HTTP header 'Accept' (if needed)
2055
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
2056
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2057
+
2058
+ # HTTP header 'Content-Type'
2059
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
2060
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2061
+
2062
+ # form parameters
2063
+ form_params = {}
2064
+
2065
+ # http body (model)
2066
+ post_body = @api_client.object_to_http_body(opts[:'data'])
2067
+ auth_names = []
2068
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2069
+ :header_params => header_params,
2070
+ :query_params => query_params,
2071
+ :form_params => form_params,
2072
+ :body => post_body,
2073
+ :auth_names => auth_names,
2074
+ :return_type => 'Customer')
2075
+ if @api_client.config.debugging
2076
+ @api_client.config.logger.debug "API called: CustomerApi#customer_replace_or_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2077
+ end
2078
+ return data, status_code, headers
2079
+ end
2080
+
2081
+ # Reset password for a user with email.
2082
+ #
2083
+ # @param options
2084
+ # @param [Hash] opts the optional parameters
2085
+ # @return [nil]
2086
+ def customer_reset_password(options, opts = {})
2087
+ customer_reset_password_with_http_info(options, opts)
2088
+ return nil
2089
+ end
2090
+
2091
+ # Reset password for a user with email.
2092
+ #
2093
+ # @param options
2094
+ # @param [Hash] opts the optional parameters
2095
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
2096
+ def customer_reset_password_with_http_info(options, opts = {})
2097
+ if @api_client.config.debugging
2098
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_reset_password ..."
2099
+ end
2100
+ # verify the required parameter 'options' is set
2101
+ fail ArgumentError, "Missing the required parameter 'options' when calling CustomerApi.customer_reset_password" if options.nil?
2102
+ # resource path
2103
+ local_var_path = "/Customers/reset".sub('{format}','json')
2104
+
2105
+ # query parameters
2106
+ query_params = {}
2107
+
2108
+ # header parameters
2109
+ header_params = {}
2110
+
2111
+ # HTTP header 'Accept' (if needed)
2112
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
2113
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2114
+
2115
+ # HTTP header 'Content-Type'
2116
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
2117
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2118
+
2119
+ # form parameters
2120
+ form_params = {}
2121
+
2122
+ # http body (model)
2123
+ post_body = @api_client.object_to_http_body(options)
2124
+ auth_names = []
2125
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2126
+ :header_params => header_params,
2127
+ :query_params => query_params,
2128
+ :form_params => form_params,
2129
+ :body => post_body,
2130
+ :auth_names => auth_names)
2131
+ if @api_client.config.debugging
2132
+ @api_client.config.logger.debug "API called: CustomerApi#customer_reset_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2133
+ end
2134
+ return data, status_code, headers
2135
+ end
2136
+
2137
+ # Update instances of the model matched by {{where}} from the data source.
2138
+ #
2139
+ # @param [Hash] opts the optional parameters
2140
+ # @option opts [String] :where Criteria to match model instances
2141
+ # @option opts [Customer] :data An object of model property name/value pairs
2142
+ # @return [InlineResponse2001]
2143
+ def customer_update_all(opts = {})
2144
+ data, _status_code, _headers = customer_update_all_with_http_info(opts)
2145
+ return data
2146
+ end
2147
+
2148
+ # Update instances of the model matched by {{where}} from the data source.
2149
+ #
2150
+ # @param [Hash] opts the optional parameters
2151
+ # @option opts [String] :where Criteria to match model instances
2152
+ # @option opts [Customer] :data An object of model property name/value pairs
2153
+ # @return [Array<(InlineResponse2001, Fixnum, Hash)>] InlineResponse2001 data, response status code and response headers
2154
+ def customer_update_all_with_http_info(opts = {})
2155
+ if @api_client.config.debugging
2156
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_update_all ..."
2157
+ end
2158
+ # resource path
2159
+ local_var_path = "/Customers/update".sub('{format}','json')
2160
+
2161
+ # query parameters
2162
+ query_params = {}
2163
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
2164
+
2165
+ # header parameters
2166
+ header_params = {}
2167
+
2168
+ # HTTP header 'Accept' (if needed)
2169
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
2170
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2171
+
2172
+ # HTTP header 'Content-Type'
2173
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
2174
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2175
+
2176
+ # form parameters
2177
+ form_params = {}
2178
+
2179
+ # http body (model)
2180
+ post_body = @api_client.object_to_http_body(opts[:'data'])
2181
+ auth_names = []
2182
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2183
+ :header_params => header_params,
2184
+ :query_params => query_params,
2185
+ :form_params => form_params,
2186
+ :body => post_body,
2187
+ :auth_names => auth_names,
2188
+ :return_type => 'InlineResponse2001')
2189
+ if @api_client.config.debugging
2190
+ @api_client.config.logger.debug "API called: CustomerApi#customer_update_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2191
+ end
2192
+ return data, status_code, headers
2193
+ end
2194
+
2195
+ # Patch an existing model instance or insert a new one into the data source.
2196
+ #
2197
+ # @param [Hash] opts the optional parameters
2198
+ # @option opts [Customer] :data Model instance data
2199
+ # @return [Customer]
2200
+ def customer_upsert_patch_customers(opts = {})
2201
+ data, _status_code, _headers = customer_upsert_patch_customers_with_http_info(opts)
2202
+ return data
2203
+ end
2204
+
2205
+ # Patch an existing model instance or insert a new one into the data source.
2206
+ #
2207
+ # @param [Hash] opts the optional parameters
2208
+ # @option opts [Customer] :data Model instance data
2209
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
2210
+ def customer_upsert_patch_customers_with_http_info(opts = {})
2211
+ if @api_client.config.debugging
2212
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_upsert_patch_customers ..."
2213
+ end
2214
+ # resource path
2215
+ local_var_path = "/Customers".sub('{format}','json')
2216
+
2217
+ # query parameters
2218
+ query_params = {}
2219
+
2220
+ # header parameters
2221
+ header_params = {}
2222
+
2223
+ # HTTP header 'Accept' (if needed)
2224
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
2225
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2226
+
2227
+ # HTTP header 'Content-Type'
2228
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
2229
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2230
+
2231
+ # form parameters
2232
+ form_params = {}
2233
+
2234
+ # http body (model)
2235
+ post_body = @api_client.object_to_http_body(opts[:'data'])
2236
+ auth_names = []
2237
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2238
+ :header_params => header_params,
2239
+ :query_params => query_params,
2240
+ :form_params => form_params,
2241
+ :body => post_body,
2242
+ :auth_names => auth_names,
2243
+ :return_type => 'Customer')
2244
+ if @api_client.config.debugging
2245
+ @api_client.config.logger.debug "API called: CustomerApi#customer_upsert_patch_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2246
+ end
2247
+ return data, status_code, headers
2248
+ end
2249
+
2250
+ # Patch an existing model instance or insert a new one into the data source.
2251
+ #
2252
+ # @param [Hash] opts the optional parameters
2253
+ # @option opts [Customer] :data Model instance data
2254
+ # @return [Customer]
2255
+ def customer_upsert_put_customers(opts = {})
2256
+ data, _status_code, _headers = customer_upsert_put_customers_with_http_info(opts)
2257
+ return data
2258
+ end
2259
+
2260
+ # Patch an existing model instance or insert a new one into the data source.
2261
+ #
2262
+ # @param [Hash] opts the optional parameters
2263
+ # @option opts [Customer] :data Model instance data
2264
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
2265
+ def customer_upsert_put_customers_with_http_info(opts = {})
2266
+ if @api_client.config.debugging
2267
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_upsert_put_customers ..."
2268
+ end
2269
+ # resource path
2270
+ local_var_path = "/Customers".sub('{format}','json')
2271
+
2272
+ # query parameters
2273
+ query_params = {}
2274
+
2275
+ # header parameters
2276
+ header_params = {}
2277
+
2278
+ # HTTP header 'Accept' (if needed)
2279
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
2280
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2281
+
2282
+ # HTTP header 'Content-Type'
2283
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
2284
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2285
+
2286
+ # form parameters
2287
+ form_params = {}
2288
+
2289
+ # http body (model)
2290
+ post_body = @api_client.object_to_http_body(opts[:'data'])
2291
+ auth_names = []
2292
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2293
+ :header_params => header_params,
2294
+ :query_params => query_params,
2295
+ :form_params => form_params,
2296
+ :body => post_body,
2297
+ :auth_names => auth_names,
2298
+ :return_type => 'Customer')
2299
+ if @api_client.config.debugging
2300
+ @api_client.config.logger.debug "API called: CustomerApi#customer_upsert_put_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2301
+ end
2302
+ return data, status_code, headers
2303
+ end
2304
+
2305
+ # Update an existing model instance or insert a new one into the data source based on the where criteria.
2306
+ #
2307
+ # @param [Hash] opts the optional parameters
2308
+ # @option opts [String] :where Criteria to match model instances
2309
+ # @option opts [Customer] :data An object of model property name/value pairs
2310
+ # @return [Customer]
2311
+ def customer_upsert_with_where(opts = {})
2312
+ data, _status_code, _headers = customer_upsert_with_where_with_http_info(opts)
2313
+ return data
2314
+ end
2315
+
2316
+ # Update an existing model instance or insert a new one into the data source based on the where criteria.
2317
+ #
2318
+ # @param [Hash] opts the optional parameters
2319
+ # @option opts [String] :where Criteria to match model instances
2320
+ # @option opts [Customer] :data An object of model property name/value pairs
2321
+ # @return [Array<(Customer, Fixnum, Hash)>] Customer data, response status code and response headers
2322
+ def customer_upsert_with_where_with_http_info(opts = {})
2323
+ if @api_client.config.debugging
2324
+ @api_client.config.logger.debug "Calling API: CustomerApi.customer_upsert_with_where ..."
2325
+ end
2326
+ # resource path
2327
+ local_var_path = "/Customers/upsertWithWhere".sub('{format}','json')
2328
+
2329
+ # query parameters
2330
+ query_params = {}
2331
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
2332
+
2333
+ # header parameters
2334
+ header_params = {}
2335
+
2336
+ # HTTP header 'Accept' (if needed)
2337
+ local_header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
2338
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2339
+
2340
+ # HTTP header 'Content-Type'
2341
+ local_header_content_type = ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml']
2342
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2343
+
2344
+ # form parameters
2345
+ form_params = {}
2346
+
2347
+ # http body (model)
2348
+ post_body = @api_client.object_to_http_body(opts[:'data'])
2349
+ auth_names = []
2350
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2351
+ :header_params => header_params,
2352
+ :query_params => query_params,
2353
+ :form_params => form_params,
2354
+ :body => post_body,
2355
+ :auth_names => auth_names,
2356
+ :return_type => 'Customer')
2357
+ if @api_client.config.debugging
2358
+ @api_client.config.logger.debug "API called: CustomerApi#customer_upsert_with_where\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2359
+ end
2360
+ return data, status_code, headers
2361
+ end
2362
+ end
2363
+ end