Class: UltracartClient::CustomerApi
- Inherits:
-
Object
- Object
- UltracartClient::CustomerApi
- Defined in:
- lib/ultracart_api/api/customer_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_customer_store_credit(customer_profile_oid, store_credit_request, opts = {}) ⇒ BaseResponse
Adds store credit to a customer Adds store credit to a customer.
-
#add_customer_store_credit_with_http_info(customer_profile_oid, store_credit_request, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Adds store credit to a customer Adds store credit to a customer.
-
#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.
-
#adjust_internal_certificate_with_http_info(customer_profile_oid, adjust_internal_certificate_request, opts = {}) ⇒ Array<(AdjustInternalCertificateResponse, Fixnum, Hash)>
Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
-
#delete_customer(customer_profile_oid, opts = {}) ⇒ nil
Delete a customer Delete a customer on the UltraCart account.
-
#delete_customer_with_http_info(customer_profile_oid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a customer Delete a customer on the UltraCart account.
-
#get_customer(customer_profile_oid, opts = {}) ⇒ CustomerResponse
Retrieve a customer Retrieves a single customer using the specified customer profile oid.
-
#get_customer_by_email(email, opts = {}) ⇒ CustomerResponse
Retrieve a customer by Email Retrieves a single customer using the specified customer email address.
-
#get_customer_by_email_with_http_info(email, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Retrieve a customer by Email Retrieves a single customer using the specified customer email address.
-
#get_customer_editor_values(opts = {}) ⇒ CustomerEditorValues
Retrieve values needed for a customer profile editor Retrieve values needed for a customer profile editor.
-
#get_customer_editor_values_with_http_info(opts = {}) ⇒ Array<(CustomerEditorValues, Fixnum, Hash)>
Retrieve values needed for a customer profile editor Retrieve values needed for a customer profile editor.
-
#get_customer_email_lists(opts = {}) ⇒ EmailListsResponse
Retrieve all email lists across all storefronts Retrieve all email lists across all storefronts.
-
#get_customer_email_lists_with_http_info(opts = {}) ⇒ Array<(EmailListsResponse, Fixnum, Hash)>
Retrieve all email lists across all storefronts Retrieve all email lists across all storefronts.
-
#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.
-
#get_customer_store_credit_with_http_info(customer_profile_oid, opts = {}) ⇒ Array<(CustomerStoreCreditResponse, Fixnum, Hash)>
Retrieve the customer store credit accumulated through loyalty programs Retrieve the customer store credit accumulated through loyalty programs.
-
#get_customer_with_http_info(customer_profile_oid, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Retrieve a customer Retrieves a single customer using the specified customer profile oid.
-
#get_customers(opts = {}) ⇒ CustomersResponse
Retrieve customers Retrieves customers from the account.
-
#get_customers_by_query(customer_query, opts = {}) ⇒ CustomersResponse
Retrieve customers by query Retrieves customers from the account.
-
#get_customers_by_query_with_http_info(customer_query, opts = {}) ⇒ Array<(CustomersResponse, Fixnum, Hash)>
Retrieve customers by query Retrieves customers from the account.
-
#get_customers_for_data_tables(opts = {}) ⇒ DataTablesServerSideResponse
Retrieve customers for DataTables plugin Retrieves customers from the account.
-
#get_customers_for_data_tables_with_http_info(opts = {}) ⇒ Array<(DataTablesServerSideResponse, Fixnum, Hash)>
Retrieve customers for DataTables plugin Retrieves customers from the account.
-
#get_customers_with_http_info(opts = {}) ⇒ Array<(CustomersResponse, Fixnum, Hash)>
Retrieve customers Retrieves customers from the account.
-
#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.
-
#get_email_verification_token_with_http_info(token_request, opts = {}) ⇒ Array<(EmailVerifyTokenResponse, Fixnum, 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.
-
#initialize(api_client = ApiClient.default) ⇒ CustomerApi
constructor
A new instance of CustomerApi.
-
#insert_customer(customer, opts = {}) ⇒ CustomerResponse
Insert a customer Insert a customer on the UltraCart account.
-
#insert_customer_with_http_info(customer, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Insert a customer Insert a customer on the UltraCart account.
-
#merge_customer(customer, customer_profile_oid, opts = {}) ⇒ nil
Merge customer into this customer Merge customer into this customer.
-
#merge_customer_with_http_info(customer, customer_profile_oid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Merge customer into this customer Merge customer into this customer.
-
#search_customer_profile_values(lookup_request, opts = {}) ⇒ LookupResponse
Searches for all matching values (using POST).
-
#search_customer_profile_values_with_http_info(lookup_request, opts = {}) ⇒ Array<(LookupResponse, Fixnum, Hash)>
Searches for all matching values (using POST).
-
#update_customer(customer, customer_profile_oid, opts = {}) ⇒ CustomerResponse
Update a customer Update a customer on the UltraCart account.
-
#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.
-
#update_customer_email_lists_with_http_info(customer_profile_oid, list_changes, opts = {}) ⇒ Array<(CustomerEmailListChanges, Fixnum, Hash)>
Update email list subscriptions for a customer Update email list subscriptions for a customer.
-
#update_customer_with_http_info(customer, customer_profile_oid, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Update a customer Update a customer on the UltraCart account.
-
#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.
-
#validate_email_verification_token_with_http_info(validation_request, opts = {}) ⇒ Array<(EmailVerifyTokenValidateResponse, Fixnum, 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.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CustomerApi
Returns a new instance of 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_client ⇒ Object
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, Fixnum, 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 |
# 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' + '}', customer_profile_oid.to_s) # query parameters query_params = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(store_credit_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BaseResponse') 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.
102 103 104 105 |
# File 'lib/ultracart_api/api/customer_api.rb', line 102 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, Fixnum, 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.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 113 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' + '}', customer_profile_oid.to_s) # query parameters query_params = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(adjust_internal_certificate_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AdjustInternalCertificateResponse') 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.
162 163 164 165 |
# File 'lib/ultracart_api/api/customer_api.rb', line 162 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, Fixnum, Hash)>
Delete a customer Delete a customer on the UltraCart account.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/ultracart_api/api/customer_api.rb', line 172 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' + '}', customer_profile_oid.to_s) # query parameters query_params = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) 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 |
#get_customer(customer_profile_oid, opts = {}) ⇒ CustomerResponse
Retrieve a customer Retrieves a single customer using the specified customer profile oid.
217 218 219 220 |
# File 'lib/ultracart_api/api/customer_api.rb', line 217 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.
275 276 277 278 |
# File 'lib/ultracart_api/api/customer_api.rb', line 275 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, Fixnum, Hash)>
Retrieve a customer by Email Retrieves a single customer using the specified customer email address.
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 318 319 320 321 322 323 324 325 326 |
# File 'lib/ultracart_api/api/customer_api.rb', line 286 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' + '}', email.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomerResponse') 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.
331 332 333 334 |
# File 'lib/ultracart_api/api/customer_api.rb', line 331 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, Fixnum, Hash)>
Retrieve values needed for a customer profile editor Retrieve values needed for a customer profile editor.
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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 340 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 = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomerEditorValues') 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
380 381 382 383 |
# File 'lib/ultracart_api/api/customer_api.rb', line 380 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, Fixnum, Hash)>
Retrieve all email lists across all storefronts Retrieve all email lists across all storefronts
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/ultracart_api/api/customer_api.rb', line 389 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 = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EmailListsResponse') 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
430 431 432 433 |
# File 'lib/ultracart_api/api/customer_api.rb', line 430 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, Fixnum, Hash)>
Retrieve the customer store credit accumulated through loyalty programs Retrieve the customer store credit accumulated through loyalty programs
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
# File 'lib/ultracart_api/api/customer_api.rb', line 440 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' + '}', customer_profile_oid.to_s) # query parameters query_params = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomerStoreCreditResponse') 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_with_http_info(customer_profile_oid, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Retrieve a customer Retrieves a single customer using the specified customer profile oid.
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/ultracart_api/api/customer_api.rb', line 228 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' + '}', customer_profile_oid.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomerResponse') 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.
516 517 518 519 |
# File 'lib/ultracart_api/api/customer_api.rb', line 516 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.
635 636 637 638 |
# File 'lib/ultracart_api/api/customer_api.rb', line 635 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, Fixnum, 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.
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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 650 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 = {} 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 = {} 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(customer_query) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomersResponse') 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.
700 701 702 703 |
# File 'lib/ultracart_api/api/customer_api.rb', line 700 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, Fixnum, Hash)>
Retrieve customers for DataTables plugin Retrieves customers from the account. If no searches are specified, all customers will be returned.
710 711 712 713 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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 710 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 = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataTablesServerSideResponse') 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, Fixnum, 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.
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 557 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 = {} 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 = {} 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomersResponse') 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.
752 753 754 755 |
# File 'lib/ultracart_api/api/customer_api.rb', line 752 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, Fixnum, 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.
762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
# File 'lib/ultracart_api/api/customer_api.rb', line 762 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 = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(token_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EmailVerifyTokenResponse') 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 |
#insert_customer(customer, opts = {}) ⇒ CustomerResponse
Insert a customer Insert a customer on the UltraCart account.
808 809 810 811 |
# File 'lib/ultracart_api/api/customer_api.rb', line 808 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, Fixnum, Hash)>
Insert a customer Insert a customer on the UltraCart account.
819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/ultracart_api/api/customer_api.rb', line 819 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 = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(customer) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomerResponse') 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 |
#merge_customer(customer, customer_profile_oid, opts = {}) ⇒ nil
Merge customer into this customer Merge customer into this customer.
867 868 869 870 |
# File 'lib/ultracart_api/api/customer_api.rb', line 867 def merge_customer(customer, customer_profile_oid, opts = {}) merge_customer_with_http_info(customer, customer_profile_oid, opts) nil end |
#merge_customer_with_http_info(customer, customer_profile_oid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Merge customer into this customer Merge customer into this customer.
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 920 921 922 |
# File 'lib/ultracart_api/api/customer_api.rb', line 879 def merge_customer_with_http_info(customer, customer_profile_oid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: 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 # 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 # resource path local_var_path = '/customer/customers/{customer_profile_oid}/merge'.sub('{' + 'customer_profile_oid' + '}', customer_profile_oid.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(customer) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) 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)
927 928 929 930 |
# File 'lib/ultracart_api/api/customer_api.rb', line 927 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, Fixnum, Hash)>
Searches for all matching values (using POST)
936 937 938 939 940 941 942 943 944 945 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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 936 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 = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(lookup_request) auth_names = ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LookupResponse') 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, customer_profile_oid, opts = {}) ⇒ CustomerResponse
Update a customer Update a customer on the UltraCart account.
983 984 985 986 |
# File 'lib/ultracart_api/api/customer_api.rb', line 983 def update_customer(customer, customer_profile_oid, opts = {}) data, _status_code, _headers = update_customer_with_http_info(customer, customer_profile_oid, 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
1046 1047 1048 1049 |
# File 'lib/ultracart_api/api/customer_api.rb', line 1046 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, Fixnum, Hash)>
Update email list subscriptions for a customer Update email list subscriptions for a customer
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'lib/ultracart_api/api/customer_api.rb', line 1057 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' + '}', customer_profile_oid.to_s) # query parameters query_params = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(list_changes) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomerEmailListChanges') 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, customer_profile_oid, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Update a customer Update a customer on the UltraCart account.
995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 |
# File 'lib/ultracart_api/api/customer_api.rb', line 995 def update_customer_with_http_info(customer, customer_profile_oid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: 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 # 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 # resource path local_var_path = '/customer/customers/{customer_profile_oid}'.sub('{' + 'customer_profile_oid' + '}', customer_profile_oid.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(customer) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomerResponse') 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 |
#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.
1106 1107 1108 1109 |
# File 'lib/ultracart_api/api/customer_api.rb', line 1106 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, Fixnum, 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.
1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 |
# File 'lib/ultracart_api/api/customer_api.rb', line 1116 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 = {} # header parameters 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(validation_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EmailVerifyTokenValidateResponse') 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 |