Class: NewStoreApi::CustomV0AvalaraConfigCreateDto
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::CustomV0AvalaraConfigCreateDto
- Defined in:
- lib/new_store_api/models/custom_v0_avalara_config_create_dto.rb
Overview
CustomV0AvalaraConfigCreateDto 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 = nil, company_code = nil, license_key = nil, url = nil) ⇒ CustomV0AvalaraConfigCreateDto
constructor
A new instance of CustomV0AvalaraConfigCreateDto.
-
#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 = nil, company_code = nil, license_key = nil, url = nil) ⇒ CustomV0AvalaraConfigCreateDto
Returns a new instance of CustomV0AvalaraConfigCreateDto.
51 52 53 54 55 56 57 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_create_dto.rb', line 51 def initialize(account_number = nil, company_code = nil, license_key = nil, url = nil) @account_number = account_number @company_code = company_code @license_key = license_key @url = url 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_create_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_create_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_create_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_create_dto.rb', line 29 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_create_dto.rb', line 60 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_number = hash.key?('account_number') ? hash['account_number'] : nil company_code = hash.key?('company_code') ? hash['company_code'] : nil license_key = hash.key?('license_key') ? hash['license_key'] : nil url = hash.key?('url') ? hash['url'] : nil # Create object from extracted values. CustomV0AvalaraConfigCreateDto.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_create_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
47 48 49 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_create_dto.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
42 43 44 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_create_dto.rb', line 42 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
85 86 87 88 89 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_create_dto.rb', line 85 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.
78 79 80 81 82 |
# File 'lib/new_store_api/models/custom_v0_avalara_config_create_dto.rb', line 78 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 |