Class: UltracartClient::CustomerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/api/customer_api.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CustomerApi



19
20
21
# File 'lib/ultracart_api/api/customer_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ultracart_api/api/customer_api.rb', line 17

def api_client
  @api_client
end

Class Method Details

.new_using_api_key(simple_key, verify_ssl = true, debugging = false) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ultracart_api/api/customer_api.rb', line 23

def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
  api_config = Configuration.new
  api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
  api_config.api_version = '2017-03-01'
  api_config.verify_ssl = verify_ssl

  api_client = ApiClient.new(api_config)
  api_client.config.debugging = debugging

  UltracartClient::CustomerApi.new(api_client)
end

Instance Method Details

#add_customer_store_credit(customer_profile_oid, store_credit_request, opts = {}) ⇒ BaseResponse

Adds store credit to a customer Adds store credit to a customer



41
42
43
44
# File 'lib/ultracart_api/api/customer_api.rb', line 41

def add_customer_store_credit(customer_profile_oid, store_credit_request, opts = {})
  data, _status_code, _headers = add_customer_store_credit_with_http_info(customer_profile_oid, store_credit_request, opts)
  data
end

#add_customer_store_credit_with_http_info(customer_profile_oid, store_credit_request, opts = {}) ⇒ Array<(BaseResponse, Integer, Hash)>

Adds store credit to a customer Adds store credit to a customer



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/ultracart_api/api/customer_api.rb', line 52

def add_customer_store_credit_with_http_info(customer_profile_oid, store_credit_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.add_customer_store_credit ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.add_customer_store_credit"
  end
  # verify the required parameter 'store_credit_request' is set
  if @api_client.config.client_side_validation && store_credit_request.nil?
    fail ArgumentError, "Missing the required parameter 'store_credit_request' when calling CustomerApi.add_customer_store_credit"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/store_credit'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(store_credit_request)

  # return_type
  return_type = opts[:debug_return_type] || 'BaseResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.add_customer_store_credit",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#add_customer_store_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#adjust_internal_certificate(customer_profile_oid, adjust_internal_certificate_request, opts = {}) ⇒ AdjustInternalCertificateResponse

Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed. Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.



116
117
118
119
# File 'lib/ultracart_api/api/customer_api.rb', line 116

def adjust_internal_certificate(customer_profile_oid, adjust_internal_certificate_request, opts = {})
  data, _status_code, _headers = adjust_internal_certificate_with_http_info(customer_profile_oid, adjust_internal_certificate_request, opts)
  data
end

#adjust_internal_certificate_with_http_info(customer_profile_oid, adjust_internal_certificate_request, opts = {}) ⇒ Array<(AdjustInternalCertificateResponse, Integer, Hash)>

Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed. Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/ultracart_api/api/customer_api.rb', line 127

def adjust_internal_certificate_with_http_info(customer_profile_oid, adjust_internal_certificate_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.adjust_internal_certificate ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.adjust_internal_certificate"
  end
  # verify the required parameter 'adjust_internal_certificate_request' is set
  if @api_client.config.client_side_validation && adjust_internal_certificate_request.nil?
    fail ArgumentError, "Missing the required parameter 'adjust_internal_certificate_request' when calling CustomerApi.adjust_internal_certificate"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/adjust_cashback_balance'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(adjust_internal_certificate_request)

  # return_type
  return_type = opts[:debug_return_type] || 'AdjustInternalCertificateResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.adjust_internal_certificate",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#adjust_internal_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_customer(customer_profile_oid, opts = {}) ⇒ nil

Delete a customer Delete a customer on the UltraCart account.



190
191
192
193
# File 'lib/ultracart_api/api/customer_api.rb', line 190

def delete_customer(customer_profile_oid, opts = {})
  delete_customer_with_http_info(customer_profile_oid, opts)
  nil
end

#delete_customer_with_http_info(customer_profile_oid, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a customer Delete a customer on the UltraCart account.



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/ultracart_api/api/customer_api.rb', line 200

def delete_customer_with_http_info(customer_profile_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.delete_customer ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.delete_customer"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.delete_customer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#delete_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_wish_list_item(customer_profile_oid, customer_wishlist_item_oid, opts = {}) ⇒ CustomerWishListItem

Delete a customer wishlist item Delete a customer wishlist item



255
256
257
258
# File 'lib/ultracart_api/api/customer_api.rb', line 255

def delete_wish_list_item(customer_profile_oid, customer_wishlist_item_oid, opts = {})
  data, _status_code, _headers = delete_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts)
  data
end

#delete_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts = {}) ⇒ Array<(CustomerWishListItem, Integer, Hash)>

Delete a customer wishlist item Delete a customer wishlist item



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/ultracart_api/api/customer_api.rb', line 266

def delete_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.delete_wish_list_item ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.delete_wish_list_item"
  end
  # verify the required parameter 'customer_wishlist_item_oid' is set
  if @api_client.config.client_side_validation && customer_wishlist_item_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_wishlist_item_oid' when calling CustomerApi.delete_wish_list_item"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s)).sub('{' + 'customer_wishlist_item_oid' + '}', CGI.escape(customer_wishlist_item_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerWishListItem'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.delete_wish_list_item",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#delete_wish_list_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customer(customer_profile_oid, opts = {}) ⇒ CustomerResponse

Retrieve a customer Retrieves a single customer using the specified customer profile oid.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



325
326
327
328
# File 'lib/ultracart_api/api/customer_api.rb', line 325

def get_customer(customer_profile_oid, opts = {})
  data, _status_code, _headers = get_customer_with_http_info(customer_profile_oid, opts)
  data
end

#get_customer_by_email(email, opts = {}) ⇒ CustomerResponse

Retrieve a customer by Email Retrieves a single customer using the specified customer email address.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



392
393
394
395
# File 'lib/ultracart_api/api/customer_api.rb', line 392

def get_customer_by_email(email, opts = {})
  data, _status_code, _headers = get_customer_by_email_with_http_info(email, opts)
  data
end

#get_customer_by_email_with_http_info(email, opts = {}) ⇒ Array<(CustomerResponse, Integer, Hash)>

Retrieve a customer by Email Retrieves a single customer using the specified customer email address.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/ultracart_api/api/customer_api.rb', line 403

def get_customer_by_email_with_http_info(email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customer_by_email ...'
  end
  # verify the required parameter 'email' is set
  if @api_client.config.client_side_validation && email.nil?
    fail ArgumentError, "Missing the required parameter 'email' when calling CustomerApi.get_customer_by_email"
  end
  # resource path
  local_var_path = '/customer/customers/by_email/{email}'.sub('{' + 'email' + '}', CGI.escape(email.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customer_by_email",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customer_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customer_editor_values(opts = {}) ⇒ CustomerEditorValues

Retrieve values needed for a customer profile editor Retrieve values needed for a customer profile editor.



457
458
459
460
# File 'lib/ultracart_api/api/customer_api.rb', line 457

def get_customer_editor_values(opts = {})
  data, _status_code, _headers = get_customer_editor_values_with_http_info(opts)
  data
end

#get_customer_editor_values_with_http_info(opts = {}) ⇒ Array<(CustomerEditorValues, Integer, Hash)>

Retrieve values needed for a customer profile editor Retrieve values needed for a customer profile editor.



466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'lib/ultracart_api/api/customer_api.rb', line 466

def get_customer_editor_values_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customer_editor_values ...'
  end
  # resource path
  local_var_path = '/customer/editor_values'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerEditorValues'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customer_editor_values",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customer_editor_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customer_email_lists(opts = {}) ⇒ EmailListsResponse

Retrieve all email lists across all storefronts Retrieve all email lists across all storefronts



515
516
517
518
# File 'lib/ultracart_api/api/customer_api.rb', line 515

def get_customer_email_lists(opts = {})
  data, _status_code, _headers = get_customer_email_lists_with_http_info(opts)
  data
end

#get_customer_email_lists_with_http_info(opts = {}) ⇒ Array<(EmailListsResponse, Integer, Hash)>

Retrieve all email lists across all storefronts Retrieve all email lists across all storefronts



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
# File 'lib/ultracart_api/api/customer_api.rb', line 524

def get_customer_email_lists_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customer_email_lists ...'
  end
  # resource path
  local_var_path = '/customer/email_lists'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EmailListsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customer_email_lists",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customer_email_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customer_store_credit(customer_profile_oid, opts = {}) ⇒ CustomerStoreCreditResponse

Retrieve the customer store credit accumulated through loyalty programs Retrieve the customer store credit accumulated through loyalty programs



574
575
576
577
# File 'lib/ultracart_api/api/customer_api.rb', line 574

def get_customer_store_credit(customer_profile_oid, opts = {})
  data, _status_code, _headers = get_customer_store_credit_with_http_info(customer_profile_oid, opts)
  data
end

#get_customer_store_credit_with_http_info(customer_profile_oid, opts = {}) ⇒ Array<(CustomerStoreCreditResponse, Integer, Hash)>

Retrieve the customer store credit accumulated through loyalty programs Retrieve the customer store credit accumulated through loyalty programs



584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/ultracart_api/api/customer_api.rb', line 584

def get_customer_store_credit_with_http_info(customer_profile_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customer_store_credit ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.get_customer_store_credit"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/store_credit'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerStoreCreditResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customer_store_credit",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customer_store_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customer_wish_list(customer_profile_oid, opts = {}) ⇒ CustomerWishListItemsResponse

Retrieve wishlist items for customer Retrieve wishlist items for customer.



638
639
640
641
# File 'lib/ultracart_api/api/customer_api.rb', line 638

def get_customer_wish_list(customer_profile_oid, opts = {})
  data, _status_code, _headers = get_customer_wish_list_with_http_info(customer_profile_oid, opts)
  data
end

#get_customer_wish_list_item(customer_profile_oid, customer_wishlist_item_oid, opts = {}) ⇒ CustomerWishListItemResponse

Retrieve wishlist item for customer Retrieve wishlist item for customer.



703
704
705
706
# File 'lib/ultracart_api/api/customer_api.rb', line 703

def get_customer_wish_list_item(customer_profile_oid, customer_wishlist_item_oid, opts = {})
  data, _status_code, _headers = get_customer_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts)
  data
end

#get_customer_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts = {}) ⇒ Array<(CustomerWishListItemResponse, Integer, Hash)>

Retrieve wishlist item for customer Retrieve wishlist item for customer.



714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
# File 'lib/ultracart_api/api/customer_api.rb', line 714

def get_customer_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customer_wish_list_item ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.get_customer_wish_list_item"
  end
  # verify the required parameter 'customer_wishlist_item_oid' is set
  if @api_client.config.client_side_validation && customer_wishlist_item_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_wishlist_item_oid' when calling CustomerApi.get_customer_wish_list_item"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s)).sub('{' + 'customer_wishlist_item_oid' + '}', CGI.escape(customer_wishlist_item_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerWishListItemResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customer_wish_list_item",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customer_wish_list_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customer_wish_list_with_http_info(customer_profile_oid, opts = {}) ⇒ Array<(CustomerWishListItemsResponse, Integer, Hash)>

Retrieve wishlist items for customer Retrieve wishlist items for customer.



648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/ultracart_api/api/customer_api.rb', line 648

def get_customer_wish_list_with_http_info(customer_profile_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customer_wish_list ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.get_customer_wish_list"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/wishlist'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerWishListItemsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customer_wish_list",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customer_wish_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customer_with_http_info(customer_profile_oid, opts = {}) ⇒ Array<(CustomerResponse, Integer, Hash)>

Retrieve a customer Retrieves a single customer using the specified customer profile oid.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/ultracart_api/api/customer_api.rb', line 336

def get_customer_with_http_info(customer_profile_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customer ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.get_customer"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customers(opts = {}) ⇒ CustomersResponse

Retrieve customers Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

Options Hash (opts):

  • :email (String)

    Email

  • :qb_class (String)

    Quickbooks class

  • :quickbooks_code (String)

    Quickbooks code

  • :last_modified_dts_start (String)

    Last modified date start

  • :last_modified_dts_end (String)

    Last modified date end

  • :signup_dts_start (String)

    Signup date start

  • :signup_dts_end (String)

    Signup date end

  • :billing_first_name (String)

    Billing first name

  • :billing_last_name (String)

    Billing last name

  • :billing_company (String)

    Billing company

  • :billing_city (String)

    Billing city

  • :billing_state (String)

    Billing state

  • :billing_postal_code (String)

    Billing postal code

  • :billing_country_code (String)

    Billing country code

  • :billing_day_phone (String)

    Billing day phone

  • :billing_evening_phone (String)

    Billing evening phone

  • :shipping_first_name (String)

    Shipping first name

  • :shipping_last_name (String)

    Shipping last name

  • :shipping_company (String)

    Shipping company

  • :shipping_city (String)

    Shipping city

  • :shipping_state (String)

    Shipping state

  • :shipping_postal_code (String)

    Shipping postal code

  • :shipping_country_code (String)

    Shipping country code

  • :shipping_day_phone (String)

    Shipping day phone

  • :shipping_evening_phone (String)

    Shipping evening phone

  • :pricing_tier_oid (Integer)

    Pricing tier oid

  • :pricing_tier_name (String)

    Pricing tier name

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Max 200) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

  • :_since (String)

    Fetch customers that have been created/modified since this date/time.

  • :_sort (String)

    The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



803
804
805
806
# File 'lib/ultracart_api/api/customer_api.rb', line 803

def get_customers(opts = {})
  data, _status_code, _headers = get_customers_with_http_info(opts)
  data
end

#get_customers_by_query(customer_query, opts = {}) ⇒ CustomersResponse

Retrieve customers by query Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Max 200) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

  • :_since (String)

    Fetch customers that have been created/modified since this date/time.

  • :_sort (String)

    The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



931
932
933
934
# File 'lib/ultracart_api/api/customer_api.rb', line 931

def get_customers_by_query(customer_query, opts = {})
  data, _status_code, _headers = get_customers_by_query_with_http_info(customer_query, opts)
  data
end

#get_customers_by_query_with_http_info(customer_query, opts = {}) ⇒ Array<(CustomersResponse, Integer, Hash)>

Retrieve customers by query Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Max 200) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

  • :_since (String)

    Fetch customers that have been created/modified since this date/time.

  • :_sort (String)

    The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
# File 'lib/ultracart_api/api/customer_api.rb', line 946

def get_customers_by_query_with_http_info(customer_query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customers_by_query ...'
  end
  # verify the required parameter 'customer_query' is set
  if @api_client.config.client_side_validation && customer_query.nil?
    fail ArgumentError, "Missing the required parameter 'customer_query' when calling CustomerApi.get_customers_by_query"
  end
  # resource path
  local_var_path = '/customer/customers/query'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
  query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
  query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
  query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
  query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(customer_query)

  # return_type
  return_type = opts[:debug_return_type] || 'CustomersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customers_by_query",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customers_by_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customers_for_data_tables(opts = {}) ⇒ DataTablesServerSideResponse

Retrieve customers for DataTables plugin Retrieves customers from the account. If no searches are specified, all customers will be returned.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



1010
1011
1012
1013
# File 'lib/ultracart_api/api/customer_api.rb', line 1010

def get_customers_for_data_tables(opts = {})
  data, _status_code, _headers = get_customers_for_data_tables_with_http_info(opts)
  data
end

#get_customers_for_data_tables_with_http_info(opts = {}) ⇒ Array<(DataTablesServerSideResponse, Integer, Hash)>

Retrieve customers for DataTables plugin Retrieves customers from the account. If no searches are specified, all customers will be returned.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
# File 'lib/ultracart_api/api/customer_api.rb', line 1020

def get_customers_for_data_tables_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customers_for_data_tables ...'
  end
  # resource path
  local_var_path = '/customer/customers/dataTables'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DataTablesServerSideResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customers_for_data_tables",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customers_for_data_tables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customers_with_http_info(opts = {}) ⇒ Array<(CustomersResponse, Integer, Hash)>

Retrieve customers Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

Options Hash (opts):

  • :email (String)

    Email

  • :qb_class (String)

    Quickbooks class

  • :quickbooks_code (String)

    Quickbooks code

  • :last_modified_dts_start (String)

    Last modified date start

  • :last_modified_dts_end (String)

    Last modified date end

  • :signup_dts_start (String)

    Signup date start

  • :signup_dts_end (String)

    Signup date end

  • :billing_first_name (String)

    Billing first name

  • :billing_last_name (String)

    Billing last name

  • :billing_company (String)

    Billing company

  • :billing_city (String)

    Billing city

  • :billing_state (String)

    Billing state

  • :billing_postal_code (String)

    Billing postal code

  • :billing_country_code (String)

    Billing country code

  • :billing_day_phone (String)

    Billing day phone

  • :billing_evening_phone (String)

    Billing evening phone

  • :shipping_first_name (String)

    Shipping first name

  • :shipping_last_name (String)

    Shipping last name

  • :shipping_company (String)

    Shipping company

  • :shipping_city (String)

    Shipping city

  • :shipping_state (String)

    Shipping state

  • :shipping_postal_code (String)

    Shipping postal code

  • :shipping_country_code (String)

    Shipping country code

  • :shipping_day_phone (String)

    Shipping day phone

  • :shipping_evening_phone (String)

    Shipping evening phone

  • :pricing_tier_oid (Integer)

    Pricing tier oid

  • :pricing_tier_name (String)

    Pricing tier name

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Max 200) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

  • :_since (String)

    Fetch customers that have been created/modified since this date/time.

  • :_sort (String)

    The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
# File 'lib/ultracart_api/api/customer_api.rb', line 844

def get_customers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_customers ...'
  end
  # resource path
  local_var_path = '/customer/customers'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
  query_params[:'qb_class'] = opts[:'qb_class'] if !opts[:'qb_class'].nil?
  query_params[:'quickbooks_code'] = opts[:'quickbooks_code'] if !opts[:'quickbooks_code'].nil?
  query_params[:'last_modified_dts_start'] = opts[:'last_modified_dts_start'] if !opts[:'last_modified_dts_start'].nil?
  query_params[:'last_modified_dts_end'] = opts[:'last_modified_dts_end'] if !opts[:'last_modified_dts_end'].nil?
  query_params[:'signup_dts_start'] = opts[:'signup_dts_start'] if !opts[:'signup_dts_start'].nil?
  query_params[:'signup_dts_end'] = opts[:'signup_dts_end'] if !opts[:'signup_dts_end'].nil?
  query_params[:'billing_first_name'] = opts[:'billing_first_name'] if !opts[:'billing_first_name'].nil?
  query_params[:'billing_last_name'] = opts[:'billing_last_name'] if !opts[:'billing_last_name'].nil?
  query_params[:'billing_company'] = opts[:'billing_company'] if !opts[:'billing_company'].nil?
  query_params[:'billing_city'] = opts[:'billing_city'] if !opts[:'billing_city'].nil?
  query_params[:'billing_state'] = opts[:'billing_state'] if !opts[:'billing_state'].nil?
  query_params[:'billing_postal_code'] = opts[:'billing_postal_code'] if !opts[:'billing_postal_code'].nil?
  query_params[:'billing_country_code'] = opts[:'billing_country_code'] if !opts[:'billing_country_code'].nil?
  query_params[:'billing_day_phone'] = opts[:'billing_day_phone'] if !opts[:'billing_day_phone'].nil?
  query_params[:'billing_evening_phone'] = opts[:'billing_evening_phone'] if !opts[:'billing_evening_phone'].nil?
  query_params[:'shipping_first_name'] = opts[:'shipping_first_name'] if !opts[:'shipping_first_name'].nil?
  query_params[:'shipping_last_name'] = opts[:'shipping_last_name'] if !opts[:'shipping_last_name'].nil?
  query_params[:'shipping_company'] = opts[:'shipping_company'] if !opts[:'shipping_company'].nil?
  query_params[:'shipping_city'] = opts[:'shipping_city'] if !opts[:'shipping_city'].nil?
  query_params[:'shipping_state'] = opts[:'shipping_state'] if !opts[:'shipping_state'].nil?
  query_params[:'shipping_postal_code'] = opts[:'shipping_postal_code'] if !opts[:'shipping_postal_code'].nil?
  query_params[:'shipping_country_code'] = opts[:'shipping_country_code'] if !opts[:'shipping_country_code'].nil?
  query_params[:'shipping_day_phone'] = opts[:'shipping_day_phone'] if !opts[:'shipping_day_phone'].nil?
  query_params[:'shipping_evening_phone'] = opts[:'shipping_evening_phone'] if !opts[:'shipping_evening_phone'].nil?
  query_params[:'pricing_tier_oid'] = opts[:'pricing_tier_oid'] if !opts[:'pricing_tier_oid'].nil?
  query_params[:'pricing_tier_name'] = opts[:'pricing_tier_name'] if !opts[:'pricing_tier_name'].nil?
  query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
  query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
  query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
  query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
  query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CustomersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_customers",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_email_verification_token(token_request, opts = {}) ⇒ EmailVerifyTokenResponse

Create a token that can be used to verify a customer email address Create a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.



1071
1072
1073
1074
# File 'lib/ultracart_api/api/customer_api.rb', line 1071

def get_email_verification_token(token_request, opts = {})
  data, _status_code, _headers = get_email_verification_token_with_http_info(token_request, opts)
  data
end

#get_email_verification_token_with_http_info(token_request, opts = {}) ⇒ Array<(EmailVerifyTokenResponse, Integer, Hash)>

Create a token that can be used to verify a customer email address Create a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.



1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
# File 'lib/ultracart_api/api/customer_api.rb', line 1081

def get_email_verification_token_with_http_info(token_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_email_verification_token ...'
  end
  # verify the required parameter 'token_request' is set
  if @api_client.config.client_side_validation && token_request.nil?
    fail ArgumentError, "Missing the required parameter 'token_request' when calling CustomerApi.get_email_verification_token"
  end
  # resource path
  local_var_path = '/customer/customers/email_verify/get_token'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(token_request)

  # return_type
  return_type = opts[:debug_return_type] || 'EmailVerifyTokenResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_email_verification_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_email_verification_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

getMagicLink Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.



1141
1142
1143
1144
# File 'lib/ultracart_api/api/customer_api.rb', line 1141

def get_magic_link(customer_profile_oid, storefront_host_name, opts = {})
  data, _status_code, _headers = get_magic_link_with_http_info(customer_profile_oid, storefront_host_name, opts)
  data
end

getMagicLink Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.



1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
# File 'lib/ultracart_api/api/customer_api.rb', line 1152

def get_magic_link_with_http_info(customer_profile_oid, storefront_host_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.get_magic_link ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.get_magic_link"
  end
  # verify the required parameter 'storefront_host_name' is set
  if @api_client.config.client_side_validation && storefront_host_name.nil?
    fail ArgumentError, "Missing the required parameter 'storefront_host_name' when calling CustomerApi.get_magic_link"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/magic_link/{storefront_host_name}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s)).sub('{' + 'storefront_host_name' + '}', CGI.escape(storefront_host_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerMagicLinkResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.get_magic_link",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#get_magic_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#insert_customer(customer, opts = {}) ⇒ CustomerResponse

Insert a customer Insert a customer on the UltraCart account.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



1211
1212
1213
1214
# File 'lib/ultracart_api/api/customer_api.rb', line 1211

def insert_customer(customer, opts = {})
  data, _status_code, _headers = insert_customer_with_http_info(customer, opts)
  data
end

#insert_customer_with_http_info(customer, opts = {}) ⇒ Array<(CustomerResponse, Integer, Hash)>

Insert a customer Insert a customer on the UltraCart account.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
# File 'lib/ultracart_api/api/customer_api.rb', line 1222

def insert_customer_with_http_info(customer, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.insert_customer ...'
  end
  # verify the required parameter 'customer' is set
  if @api_client.config.client_side_validation && customer.nil?
    fail ArgumentError, "Missing the required parameter 'customer' when calling CustomerApi.insert_customer"
  end
  # resource path
  local_var_path = '/customer/customers'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(customer)

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.insert_customer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#insert_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#insert_wish_list_item(customer_profile_oid, wishlist_item, opts = {}) ⇒ CustomerWishListItem

Insert a customer wishlist item Insert a customer wishlist item



1283
1284
1285
1286
# File 'lib/ultracart_api/api/customer_api.rb', line 1283

def insert_wish_list_item(customer_profile_oid, wishlist_item, opts = {})
  data, _status_code, _headers = insert_wish_list_item_with_http_info(customer_profile_oid, wishlist_item, opts)
  data
end

#insert_wish_list_item_with_http_info(customer_profile_oid, wishlist_item, opts = {}) ⇒ Array<(CustomerWishListItem, Integer, Hash)>

Insert a customer wishlist item Insert a customer wishlist item



1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
# File 'lib/ultracart_api/api/customer_api.rb', line 1294

def insert_wish_list_item_with_http_info(customer_profile_oid, wishlist_item, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.insert_wish_list_item ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.insert_wish_list_item"
  end
  # verify the required parameter 'wishlist_item' is set
  if @api_client.config.client_side_validation && wishlist_item.nil?
    fail ArgumentError, "Missing the required parameter 'wishlist_item' when calling CustomerApi.insert_wish_list_item"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/wishlist'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(wishlist_item)

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerWishListItem'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.insert_wish_list_item",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#insert_wish_list_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#merge_customer(customer_profile_oid, customer, opts = {}) ⇒ nil

Merge customer into this customer Merge customer into this customer.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



1359
1360
1361
1362
# File 'lib/ultracart_api/api/customer_api.rb', line 1359

def merge_customer(customer_profile_oid, customer, opts = {})
  merge_customer_with_http_info(customer_profile_oid, customer, opts)
  nil
end

#merge_customer_with_http_info(customer_profile_oid, customer, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Merge customer into this customer Merge customer into this customer.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
# File 'lib/ultracart_api/api/customer_api.rb', line 1371

def merge_customer_with_http_info(customer_profile_oid, customer, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.merge_customer ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.merge_customer"
  end
  # verify the required parameter 'customer' is set
  if @api_client.config.client_side_validation && customer.nil?
    fail ArgumentError, "Missing the required parameter 'customer' when calling CustomerApi.merge_customer"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/merge'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(customer)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.merge_customer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#merge_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_customer_profile_values(lookup_request, opts = {}) ⇒ LookupResponse

Searches for all matching values (using POST)



1434
1435
1436
1437
# File 'lib/ultracart_api/api/customer_api.rb', line 1434

def search_customer_profile_values(lookup_request, opts = {})
  data, _status_code, _headers = search_customer_profile_values_with_http_info(lookup_request, opts)
  data
end

#search_customer_profile_values_with_http_info(lookup_request, opts = {}) ⇒ Array<(LookupResponse, Integer, Hash)>

Searches for all matching values (using POST)



1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
# File 'lib/ultracart_api/api/customer_api.rb', line 1443

def search_customer_profile_values_with_http_info(lookup_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.search_customer_profile_values ...'
  end
  # verify the required parameter 'lookup_request' is set
  if @api_client.config.client_side_validation && lookup_request.nil?
    fail ArgumentError, "Missing the required parameter 'lookup_request' when calling CustomerApi.search_customer_profile_values"
  end
  # resource path
  local_var_path = '/customer/search'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(lookup_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LookupResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.search_customer_profile_values",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#search_customer_profile_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_customer(customer_profile_oid, customer, opts = {}) ⇒ CustomerResponse

Update a customer Update a customer on the UltraCart account.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



1504
1505
1506
1507
# File 'lib/ultracart_api/api/customer_api.rb', line 1504

def update_customer(customer_profile_oid, customer, opts = {})
  data, _status_code, _headers = update_customer_with_http_info(customer_profile_oid, customer, opts)
  data
end

#update_customer_email_lists(customer_profile_oid, list_changes, opts = {}) ⇒ CustomerEmailListChanges

Update email list subscriptions for a customer Update email list subscriptions for a customer



1581
1582
1583
1584
# File 'lib/ultracart_api/api/customer_api.rb', line 1581

def update_customer_email_lists(customer_profile_oid, list_changes, opts = {})
  data, _status_code, _headers = update_customer_email_lists_with_http_info(customer_profile_oid, list_changes, opts)
  data
end

#update_customer_email_lists_with_http_info(customer_profile_oid, list_changes, opts = {}) ⇒ Array<(CustomerEmailListChanges, Integer, Hash)>

Update email list subscriptions for a customer Update email list subscriptions for a customer



1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
# File 'lib/ultracart_api/api/customer_api.rb', line 1592

def update_customer_email_lists_with_http_info(customer_profile_oid, list_changes, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.update_customer_email_lists ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.update_customer_email_lists"
  end
  # verify the required parameter 'list_changes' is set
  if @api_client.config.client_side_validation && list_changes.nil?
    fail ArgumentError, "Missing the required parameter 'list_changes' when calling CustomerApi.update_customer_email_lists"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/email_lists'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(list_changes)

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerEmailListChanges'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.update_customer_email_lists",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#update_customer_email_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_customer_with_http_info(customer_profile_oid, customer, opts = {}) ⇒ Array<(CustomerResponse, Integer, Hash)>

Update a customer Update a customer on the UltraCart account.

Options Hash (opts):

  • :_expand (String)

    The object expansion to perform on the result. See documentation for examples



1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
# File 'lib/ultracart_api/api/customer_api.rb', line 1516

def update_customer_with_http_info(customer_profile_oid, customer, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.update_customer ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.update_customer"
  end
  # verify the required parameter 'customer' is set
  if @api_client.config.client_side_validation && customer.nil?
    fail ArgumentError, "Missing the required parameter 'customer' when calling CustomerApi.update_customer"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(customer)

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.update_customer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#update_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_wish_list_item(customer_profile_oid, customer_wishlist_item_oid, wishlist_item, opts = {}) ⇒ CustomerWishListItem

Update a customer wishlist item Update a customer wishlist item



1657
1658
1659
1660
# File 'lib/ultracart_api/api/customer_api.rb', line 1657

def update_wish_list_item(customer_profile_oid, customer_wishlist_item_oid, wishlist_item, opts = {})
  data, _status_code, _headers = update_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, wishlist_item, opts)
  data
end

#update_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, wishlist_item, opts = {}) ⇒ Array<(CustomerWishListItem, Integer, Hash)>

Update a customer wishlist item Update a customer wishlist item



1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
# File 'lib/ultracart_api/api/customer_api.rb', line 1669

def update_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, wishlist_item, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.update_wish_list_item ...'
  end
  # verify the required parameter 'customer_profile_oid' is set
  if @api_client.config.client_side_validation && customer_profile_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.update_wish_list_item"
  end
  # verify the required parameter 'customer_wishlist_item_oid' is set
  if @api_client.config.client_side_validation && customer_wishlist_item_oid.nil?
    fail ArgumentError, "Missing the required parameter 'customer_wishlist_item_oid' when calling CustomerApi.update_wish_list_item"
  end
  # verify the required parameter 'wishlist_item' is set
  if @api_client.config.client_side_validation && wishlist_item.nil?
    fail ArgumentError, "Missing the required parameter 'wishlist_item' when calling CustomerApi.update_wish_list_item"
  end
  # resource path
  local_var_path = '/customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s)).sub('{' + 'customer_wishlist_item_oid' + '}', CGI.escape(customer_wishlist_item_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(wishlist_item)

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerWishListItem'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.update_wish_list_item",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#update_wish_list_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_email_verification_token(validation_request, opts = {}) ⇒ EmailVerifyTokenValidateResponse

Validate a token that can be used to verify a customer email address Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.



1736
1737
1738
1739
# File 'lib/ultracart_api/api/customer_api.rb', line 1736

def validate_email_verification_token(validation_request, opts = {})
  data, _status_code, _headers = validate_email_verification_token_with_http_info(validation_request, opts)
  data
end

#validate_email_verification_token_with_http_info(validation_request, opts = {}) ⇒ Array<(EmailVerifyTokenValidateResponse, Integer, Hash)>

Validate a token that can be used to verify a customer email address Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.



1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
# File 'lib/ultracart_api/api/customer_api.rb', line 1746

def validate_email_verification_token_with_http_info(validation_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomerApi.validate_email_verification_token ...'
  end
  # verify the required parameter 'validation_request' is set
  if @api_client.config.client_side_validation && validation_request.nil?
    fail ArgumentError, "Missing the required parameter 'validation_request' when calling CustomerApi.validate_email_verification_token"
  end
  # resource path
  local_var_path = '/customer/customers/email_verify/validate_token'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(validation_request)

  # return_type
  return_type = opts[:debug_return_type] || 'EmailVerifyTokenValidateResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"CustomerApi.validate_email_verification_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomerApi#validate_email_verification_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end