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
-
#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_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.
-
#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
#delete_customer(customer_profile_oid, opts = {}) ⇒ nil
Delete a customer Delete a customer on the UltraCart account.
40 41 42 43 |
# File 'lib/ultracart_api/api/customer_api.rb', line 40 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.
50 51 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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 50 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; charset=UTF-8']) # 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.
95 96 97 98 |
# File 'lib/ultracart_api/api/customer_api.rb', line 95 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.
153 154 155 156 |
# File 'lib/ultracart_api/api/customer_api.rb', line 153 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.
164 165 166 167 168 169 170 171 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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 164 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.
209 210 211 212 |
# File 'lib/ultracart_api/api/customer_api.rb', line 209 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.
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 248 249 250 251 252 253 |
# File 'lib/ultracart_api/api/customer_api.rb', line 218 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
258 259 260 261 |
# File 'lib/ultracart_api/api/customer_api.rb', line 258 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
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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 267 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_with_http_info(customer_profile_oid, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Retrieve a customer Retrieves a single customer using the specified customer profile oid.
106 107 108 109 110 111 112 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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 106 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.
339 340 341 342 |
# File 'lib/ultracart_api/api/customer_api.rb', line 339 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.
458 459 460 461 |
# File 'lib/ultracart_api/api/customer_api.rb', line 458 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.
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 510 511 512 513 514 515 516 517 |
# File 'lib/ultracart_api/api/customer_api.rb', line 473 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.
523 524 525 526 |
# File 'lib/ultracart_api/api/customer_api.rb', line 523 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.
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 568 569 |
# File 'lib/ultracart_api/api/customer_api.rb', line 533 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.
380 381 382 383 384 385 386 387 388 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 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/ultracart_api/api/customer_api.rb', line 380 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.
575 576 577 578 |
# File 'lib/ultracart_api/api/customer_api.rb', line 575 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.
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 585 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.
631 632 633 634 |
# File 'lib/ultracart_api/api/customer_api.rb', line 631 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.
642 643 644 645 646 647 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 |
# File 'lib/ultracart_api/api/customer_api.rb', line 642 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 |
#update_customer(customer, customer_profile_oid, opts = {}) ⇒ CustomerResponse
Update a customer Update a customer on the UltraCart account.
690 691 692 693 |
# File 'lib/ultracart_api/api/customer_api.rb', line 690 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
753 754 755 756 |
# File 'lib/ultracart_api/api/customer_api.rb', line 753 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
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 802 803 804 805 806 807 |
# File 'lib/ultracart_api/api/customer_api.rb', line 764 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.
702 703 704 705 706 707 708 709 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 702 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.
813 814 815 816 |
# File 'lib/ultracart_api/api/customer_api.rb', line 813 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.
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 860 861 862 |
# File 'lib/ultracart_api/api/customer_api.rb', line 823 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 |