Class: SyncteraRubySdk::CustomersApi
- Inherits:
-
Object
- Object
- SyncteraRubySdk::CustomersApi
- Defined in:
- lib/synctera_ruby_sdk/api/customers_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_customer(customer_in_body, opts = {}) ⇒ CustomerInBody
Create a Customer The customer object represents your customer’s identity.
-
#create_customer_employment(customer_id, employment, opts = {}) ⇒ Employment
Create employment record Create a customer employment record.
-
#create_customer_employment_with_http_info(customer_id, employment, opts = {}) ⇒ Array<(Employment, Integer, Hash)>
Create employment record Create a customer employment record.
-
#create_customer_risk_rating(customer_id, opts = {}) ⇒ RiskRating
Create customer risk rating Create customer risk rating.
-
#create_customer_risk_rating_with_http_info(customer_id, opts = {}) ⇒ Array<(RiskRating, Integer, Hash)>
Create customer risk rating Create customer risk rating.
-
#create_customer_with_http_info(customer_in_body, opts = {}) ⇒ Array<(CustomerInBody, Integer, Hash)>
Create a Customer The customer object represents your customer's identity.
-
#get_all_customer_employment(customer_id, opts = {}) ⇒ EmploymentList
List customer employment records Get a list of customer’s current employment records.
-
#get_all_customer_employment_with_http_info(customer_id, opts = {}) ⇒ Array<(EmploymentList, Integer, Hash)>
List customer employment records Get a list of customer's current employment records.
-
#get_all_customer_risk_ratings(customer_id, opts = {}) ⇒ RiskRatingList
List customer risk ratings Get list of customer risk ratings.
-
#get_all_customer_risk_ratings_with_http_info(customer_id, opts = {}) ⇒ Array<(RiskRatingList, Integer, Hash)>
List customer risk ratings Get list of customer risk ratings.
-
#get_customer(customer_id, opts = {}) ⇒ CustomerInBody
Get Customer Get Customer based on ID.
-
#get_customer_risk_rating(customer_id, risk_rating_id, opts = {}) ⇒ RiskRating
Get customer risk rating Get a customer risk rating.
-
#get_customer_risk_rating_with_http_info(customer_id, risk_rating_id, opts = {}) ⇒ Array<(RiskRating, Integer, Hash)>
Get customer risk rating Get a customer risk rating.
-
#get_customer_with_http_info(customer_id, opts = {}) ⇒ Array<(CustomerInBody, Integer, Hash)>
Get Customer Get Customer based on ID.
-
#get_party_employment(customer_id, employment_id, opts = {}) ⇒ Employment
Get customer employment record Get a single record of customer employment.
-
#get_party_employment_with_http_info(customer_id, employment_id, opts = {}) ⇒ Array<(Employment, Integer, Hash)>
Get customer employment record Get a single record of customer employment.
-
#initialize(api_client = ApiClient.default) ⇒ CustomersApi
constructor
A new instance of CustomersApi.
-
#list_customers(opts = {}) ⇒ CustomerList
List Customers Retrieves paginated list of Customers associated with the authorized requester.
-
#list_customers_with_http_info(opts = {}) ⇒ Array<(CustomerList, Integer, Hash)>
List Customers Retrieves paginated list of Customers associated with the authorized requester.
-
#patch_customer(customer_id, patch_customer, opts = {}) ⇒ CustomerInBody
Patch Customer Patch fields of customer based on ID Note that if: * legal address is provided in the request, AND * shipping_address is not provided in the request, AND * the customer resource does not have shipping_address then shipping_address will be set to a copy of the legal_address.
-
#patch_customer_with_http_info(customer_id, patch_customer, opts = {}) ⇒ Array<(CustomerInBody, Integer, Hash)>
Patch Customer Patch fields of customer based on ID Note that if: * legal address is provided in the request, AND * shipping_address is not provided in the request, AND * the customer resource does not have shipping_address then shipping_address will be set to a copy of the legal_address.
-
#update_customer(customer_id, customer_in_body, opts = {}) ⇒ CustomerInBody
Update Customer Update customer based on ID Note that if no shipping_address attribute is provided in the request, the shipping_address will be set to a copy of the legal_address.
-
#update_customer_with_http_info(customer_id, customer_in_body, opts = {}) ⇒ Array<(CustomerInBody, Integer, Hash)>
Update Customer Update customer based on ID Note that if no shipping_address attribute is provided in the request, the shipping_address will be set to a copy of the legal_address.
-
#update_party_employment(customer_id, employment_id, employment, opts = {}) ⇒ Employment
Update customer employment record Update a single record of customer employment.
-
#update_party_employment_with_http_info(customer_id, employment_id, employment, opts = {}) ⇒ Array<(Employment, Integer, Hash)>
Update customer employment record Update a single record of customer employment.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CustomersApi
Returns a new instance of CustomersApi.
19 20 21 |
# File 'lib/synctera_ruby_sdk/api/customers_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/synctera_ruby_sdk/api/customers_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_customer(customer_in_body, opts = {}) ⇒ CustomerInBody
Create a Customer The customer object represents your customer’s identity. You can then verify the identity of this customer and associate them with other people and accounts. Note that if no shipping_address attribute is provided in the request, the shipping_address will be set to a copy of the legal_address.
28 29 30 31 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 28 def create_customer(customer_in_body, opts = {}) data, _status_code, _headers = create_customer_with_http_info(customer_in_body, opts) data end |
#create_customer_employment(customer_id, employment, opts = {}) ⇒ Employment
Create employment record Create a customer employment record.
100 101 102 103 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 100 def create_customer_employment(customer_id, employment, opts = {}) data, _status_code, _headers = create_customer_employment_with_http_info(customer_id, employment, opts) data end |
#create_customer_employment_with_http_info(customer_id, employment, opts = {}) ⇒ Array<(Employment, Integer, Hash)>
Create employment record Create a customer employment record.
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 112 def create_customer_employment_with_http_info(customer_id, employment, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.create_customer_employment ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.create_customer_employment" end # verify the required parameter 'employment' is set if @api_client.config.client_side_validation && employment.nil? fail ArgumentError, "Missing the required parameter 'employment' when calling CustomersApi.create_customer_employment" end # resource path local_var_path = '/customers/{customer_id}/employment'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(employment) # return_type return_type = opts[:debug_return_type] || 'Employment' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.create_customer_employment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#create_customer_employment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_customer_risk_rating(customer_id, opts = {}) ⇒ RiskRating
Create customer risk rating Create customer risk rating
177 178 179 180 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 177 def (customer_id, opts = {}) data, _status_code, _headers = (customer_id, opts) data end |
#create_customer_risk_rating_with_http_info(customer_id, opts = {}) ⇒ Array<(RiskRating, Integer, Hash)>
Create customer risk rating Create customer risk rating
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 189 def (customer_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.create_customer_risk_rating ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.create_customer_risk_rating" end # resource path local_var_path = '/customers/{customer_id}/risk_ratings'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'risk_rating']) # return_type return_type = opts[:debug_return_type] || 'RiskRating' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.create_customer_risk_rating", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#create_customer_risk_rating\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_customer_with_http_info(customer_in_body, opts = {}) ⇒ Array<(CustomerInBody, Integer, Hash)>
Create a Customer The customer object represents your customer's identity. You can then verify the identity of this customer and associate them with other people and accounts. Note that if no shipping_address attribute is provided in the request, the shipping_address will be set to a copy of the legal_address.
39 40 41 42 43 44 45 46 47 48 49 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 89 90 91 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 39 def create_customer_with_http_info(customer_in_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.create_customer ...' end # verify the required parameter 'customer_in_body' is set if @api_client.config.client_side_validation && customer_in_body.nil? fail ArgumentError, "Missing the required parameter 'customer_in_body' when calling CustomersApi.create_customer" end # resource path local_var_path = '/customers' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(customer_in_body) # return_type return_type = opts[:debug_return_type] || 'CustomerInBody' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.create_customer", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_customer_employment(customer_id, opts = {}) ⇒ EmploymentList
List customer employment records Get a list of customer’s current employment records. To see historic employment pass the ‘include_history` flag.
249 250 251 252 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 249 def get_all_customer_employment(customer_id, opts = {}) data, _status_code, _headers = get_all_customer_employment_with_http_info(customer_id, opts) data end |
#get_all_customer_employment_with_http_info(customer_id, opts = {}) ⇒ Array<(EmploymentList, Integer, Hash)>
List customer employment records Get a list of customer's current employment records. To see historic employment pass the `include_history` flag.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 260 def get_all_customer_employment_with_http_info(customer_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.get_all_customer_employment ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_all_customer_employment" end # resource path local_var_path = '/customers/{customer_id}/employment'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EmploymentList' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.get_all_customer_employment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#get_all_customer_employment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_customer_risk_ratings(customer_id, opts = {}) ⇒ RiskRatingList
List customer risk ratings Get list of customer risk ratings
315 316 317 318 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 315 def (customer_id, opts = {}) data, _status_code, _headers = (customer_id, opts) data end |
#get_all_customer_risk_ratings_with_http_info(customer_id, opts = {}) ⇒ Array<(RiskRatingList, Integer, Hash)>
List customer risk ratings Get list of customer risk ratings
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 326 def (customer_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.get_all_customer_risk_ratings ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_all_customer_risk_ratings" end # resource path local_var_path = '/customers/{customer_id}/risk_ratings'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RiskRatingList' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.get_all_customer_risk_ratings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#get_all_customer_risk_ratings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_customer(customer_id, opts = {}) ⇒ CustomerInBody
Get Customer Get Customer based on ID
380 381 382 383 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 380 def get_customer(customer_id, opts = {}) data, _status_code, _headers = get_customer_with_http_info(customer_id, opts) data end |
#get_customer_risk_rating(customer_id, risk_rating_id, opts = {}) ⇒ RiskRating
Get customer risk rating Get a customer risk rating
444 445 446 447 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 444 def (customer_id, , opts = {}) data, _status_code, _headers = (customer_id, , opts) data end |
#get_customer_risk_rating_with_http_info(customer_id, risk_rating_id, opts = {}) ⇒ Array<(RiskRating, Integer, Hash)>
Get customer risk rating Get a customer risk rating
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 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 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 455 def (customer_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.get_customer_risk_rating ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_customer_risk_rating" end # verify the required parameter 'risk_rating_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'risk_rating_id' when calling CustomersApi.get_customer_risk_rating" end # resource path local_var_path = '/customers/{customer_id}/risk_ratings/{risk_rating_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)).sub('{' + 'risk_rating_id' + '}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RiskRating' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.get_customer_risk_rating", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#get_customer_risk_rating\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_customer_with_http_info(customer_id, opts = {}) ⇒ Array<(CustomerInBody, Integer, Hash)>
Get Customer Get Customer based on ID
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 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 390 def get_customer_with_http_info(customer_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.get_customer ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_customer" end # resource path local_var_path = '/customers/{customer_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CustomerInBody' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.get_customer", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#get_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_party_employment(customer_id, employment_id, opts = {}) ⇒ Employment
Get customer employment record Get a single record of customer employment
513 514 515 516 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 513 def get_party_employment(customer_id, employment_id, opts = {}) data, _status_code, _headers = get_party_employment_with_http_info(customer_id, employment_id, opts) data end |
#get_party_employment_with_http_info(customer_id, employment_id, opts = {}) ⇒ Array<(Employment, Integer, Hash)>
Get customer employment record Get a single record of customer employment
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 524 def get_party_employment_with_http_info(customer_id, employment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.get_party_employment ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_party_employment" end # verify the required parameter 'employment_id' is set if @api_client.config.client_side_validation && employment_id.nil? fail ArgumentError, "Missing the required parameter 'employment_id' when calling CustomersApi.get_party_employment" end # resource path local_var_path = '/customers/{customer_id}/employment/{employment_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)).sub('{' + 'employment_id' + '}', CGI.escape(employment_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Employment' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.get_party_employment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#get_party_employment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_customers(opts = {}) ⇒ CustomerList
List Customers Retrieves paginated list of Customers associated with the authorized requester
591 592 593 594 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 591 def list_customers(opts = {}) data, _status_code, _headers = list_customers_with_http_info(opts) data end |
#list_customers_with_http_info(opts = {}) ⇒ Array<(CustomerList, Integer, Hash)>
List Customers Retrieves paginated list of Customers associated with the authorized requester
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 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 683 684 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 611 def list_customers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.list_customers ...' end if @api_client.config.client_side_validation && !opts[:'ssn_last_4'].nil? && opts[:'ssn_last_4'].to_s.length > 4 fail ArgumentError, 'invalid value for "opts[:"ssn_last_4"]" when calling CustomersApi.list_customers, the character length must be smaller than or equal to 4.' end if @api_client.config.client_side_validation && !opts[:'ssn_last_4'].nil? && opts[:'ssn_last_4'].to_s.length < 4 fail ArgumentError, 'invalid value for "opts[:"ssn_last_4"]" when calling CustomersApi.list_customers, the character length must be great than or equal to 4.' end allowable_values = ["ACTIVE", "DECEASED", "DENIED", "DORMANT", "ESCHEAT", "FROZEN", "INACTIVE", "PROSPECT", "SANCTION"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CustomersApi.list_customers, must be greater than or equal to 1.' end allowable_values = ["creation_time:asc", "creation_time:desc", "last_updated_time:asc", "last_updated_time:desc", "first_name:asc", "first_name:desc", "last_name:asc", "last_name:desc"] if @api_client.config.client_side_validation && opts[:'sort_by'] && !opts[:'sort_by'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"sort_by\", must include one of #{allowable_values}" end # resource path local_var_path = '/customers' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :csv) if !opts[:'id'].nil? query_params[:'first_name'] = opts[:'first_name'] if !opts[:'first_name'].nil? query_params[:'last_name'] = opts[:'last_name'] if !opts[:'last_name'].nil? query_params[:'phone_number'] = opts[:'phone_number'] if !opts[:'phone_number'].nil? query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'ssn_last_4'] = opts[:'ssn_last_4'] if !opts[:'ssn_last_4'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? query_params[:'sort_by'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil? query_params[:'has_accounts'] = opts[:'has_accounts'] if !opts[:'has_accounts'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CustomerList' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.list_customers", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#list_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_customer(customer_id, patch_customer, opts = {}) ⇒ CustomerInBody
Patch Customer Patch fields of customer based on ID Note that if: * legal address is provided in the request, AND * shipping_address is not provided in the request, AND * the customer resource does not have shipping_address then shipping_address will be set to a copy of the legal_address.
693 694 695 696 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 693 def patch_customer(customer_id, patch_customer, opts = {}) data, _status_code, _headers = patch_customer_with_http_info(customer_id, patch_customer, opts) data end |
#patch_customer_with_http_info(customer_id, patch_customer, opts = {}) ⇒ Array<(CustomerInBody, Integer, Hash)>
Patch Customer Patch fields of customer based on ID Note that if: * legal address is provided in the request, AND * shipping_address is not provided in the request, AND * the customer resource does not have shipping_address then shipping_address will be set to a copy of the legal_address.
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 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 705 def patch_customer_with_http_info(customer_id, patch_customer, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.patch_customer ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.patch_customer" end # verify the required parameter 'patch_customer' is set if @api_client.config.client_side_validation && patch_customer.nil? fail ArgumentError, "Missing the required parameter 'patch_customer' when calling CustomersApi.patch_customer" end # resource path local_var_path = '/customers/{customer_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_customer) # return_type return_type = opts[:debug_return_type] || 'CustomerInBody' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.patch_customer", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#patch_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_customer(customer_id, customer_in_body, opts = {}) ⇒ CustomerInBody
Update Customer Update customer based on ID Note that if no shipping_address attribute is provided in the request, the shipping_address will be set to a copy of the legal_address.
769 770 771 772 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 769 def update_customer(customer_id, customer_in_body, opts = {}) data, _status_code, _headers = update_customer_with_http_info(customer_id, customer_in_body, opts) data end |
#update_customer_with_http_info(customer_id, customer_in_body, opts = {}) ⇒ Array<(CustomerInBody, Integer, Hash)>
Update Customer Update customer based on ID Note that if no shipping_address attribute is provided in the request, the shipping_address will be set to a copy of the legal_address.
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 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 780 def update_customer_with_http_info(customer_id, customer_in_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.update_customer ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.update_customer" end # verify the required parameter 'customer_in_body' is set if @api_client.config.client_side_validation && customer_in_body.nil? fail ArgumentError, "Missing the required parameter 'customer_in_body' when calling CustomersApi.update_customer" end # resource path local_var_path = '/customers/{customer_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(customer_in_body) # return_type return_type = opts[:debug_return_type] || 'CustomerInBody' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.update_customer", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#update_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_party_employment(customer_id, employment_id, employment, opts = {}) ⇒ Employment
Update customer employment record Update a single record of customer employment.
844 845 846 847 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 844 def update_party_employment(customer_id, employment_id, employment, opts = {}) data, _status_code, _headers = update_party_employment_with_http_info(customer_id, employment_id, employment, opts) data end |
#update_party_employment_with_http_info(customer_id, employment_id, employment, opts = {}) ⇒ Array<(Employment, Integer, Hash)>
Update customer employment record Update a single record of customer employment.
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 |
# File 'lib/synctera_ruby_sdk/api/customers_api.rb', line 856 def update_party_employment_with_http_info(customer_id, employment_id, employment, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomersApi.update_party_employment ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.update_party_employment" end # verify the required parameter 'employment_id' is set if @api_client.config.client_side_validation && employment_id.nil? fail ArgumentError, "Missing the required parameter 'employment_id' when calling CustomersApi.update_party_employment" end # verify the required parameter 'employment' is set if @api_client.config.client_side_validation && employment.nil? fail ArgumentError, "Missing the required parameter 'employment' when calling CustomersApi.update_party_employment" end # resource path local_var_path = '/customers/{customer_id}/employment/{employment_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)).sub('{' + 'employment_id' + '}', CGI.escape(employment_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(employment) # return_type return_type = opts[:debug_return_type] || 'Employment' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CustomersApi.update_party_employment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomersApi#update_party_employment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |