Class: NewStoreApi::CustomV0AvalaraConfigUpdateDto
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::CustomV0AvalaraConfigUpdateDto
- Defined in:
- lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb
Overview
CustomV0AvalaraConfigUpdateDto Model.
Instance Attribute Summary collapse
-
#account_number ⇒ String
AvaTax account number or account ID.
-
#company_code ⇒ String
Company code that identifies the company in the AvaTax account.
-
#license_key ⇒ String
AvaTax license key.
-
#url ⇒ String
Custom provider RESTful API URL that uses AvaTax v1 schema.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(account_number = SKIP, company_code = SKIP, license_key = SKIP, url = SKIP) ⇒ CustomV0AvalaraConfigUpdateDto
constructor
A new instance of CustomV0AvalaraConfigUpdateDto.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(account_number = SKIP, company_code = SKIP, license_key = SKIP, url = SKIP) ⇒ CustomV0AvalaraConfigUpdateDto
Returns a new instance of CustomV0AvalaraConfigUpdateDto.
56 57 58 59 60 61 62 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 56 def initialize(account_number = SKIP, company_code = SKIP, license_key = SKIP, url = SKIP) @account_number = account_number unless account_number == SKIP @company_code = company_code unless company_code == SKIP @license_key = license_key unless license_key == SKIP @url = url unless url == SKIP end |
Instance Attribute Details
#account_number ⇒ String
AvaTax account number or account ID.
14 15 16 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 14 def account_number @account_number end |
#company_code ⇒ String
Company code that identifies the company in the AvaTax account.
- Value is case-sensitive.
- Declared during the company setup in the AvaTax Admin Console.
20 21 22 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 20 def company_code @company_code end |
#license_key ⇒ String
AvaTax license key.
24 25 26 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 24 def license_key @license_key end |
#url ⇒ String
Custom provider RESTful API URL that uses AvaTax v1 schema. Will be used for tax calculations.
29 30 31 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 29 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_number = hash.key?('account_number') ? hash['account_number'] : SKIP company_code = hash.key?('company_code') ? hash['company_code'] : SKIP license_key = hash.key?('license_key') ? hash['license_key'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP # Create object from extracted values. CustomV0AvalaraConfigUpdateDto.new(account_number, company_code, license_key, url) end |
.names ⇒ Object
A mapping from model property names to API property names.
32 33 34 35 36 37 38 39 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 32 def self.names @_hash = {} if @_hash.nil? @_hash['account_number'] = 'account_number' @_hash['company_code'] = 'company_code' @_hash['license_key'] = 'license_key' @_hash['url'] = 'url' @_hash end |
.nullables ⇒ Object
An array for nullable fields
52 53 54 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 52 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
42 43 44 45 46 47 48 49 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 42 def self.optionals %w[ account_number company_code license_key url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 90 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number.inspect}, company_code:"\ " #{@company_code.inspect}, license_key: #{@license_key.inspect}, url: #{@url.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
83 84 85 86 87 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_update_dto.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number}, company_code: #{@company_code},"\ " license_key: #{@license_key}, url: #{@url}>" end |