Class: NewStoreApi::VertexAdministrativeOriginUpdateDto
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::VertexAdministrativeOriginUpdateDto
- Defined in:
- lib/new_store_api/models/vertex_administrative_origin_update_dto.rb
Overview
VertexAdministrativeOriginUpdateDto Model.
Instance Attribute Summary collapse
-
#city ⇒ String
The proper name of the city used to determine the Tax Area ID.
-
#country ⇒ String
The proper name of the city used to determine the Tax Area ID.
-
#currency_code ⇒ Currency3Enum
The proper name of the city used to determine the Tax Area ID.
-
#currency_value ⇒ Float
The rate (multiplier) used for converting the transaction currency amount to the filing currency amount.
-
#main_division ⇒ String
The proper name or the postal abbreviation of the state, province, or territory used to determine the Tax Area ID.
-
#postal_code ⇒ String
The postal code used to determine the Tax Area ID.
-
#street_address_1 ⇒ String
The first line of the street address.
-
#street_address_2 ⇒ String
The second line of the street address.
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(city = SKIP, country = SKIP, currency_code = SKIP, currency_value = SKIP, main_division = SKIP, postal_code = SKIP, street_address_1 = SKIP, street_address_2 = SKIP) ⇒ VertexAdministrativeOriginUpdateDto
constructor
A new instance of VertexAdministrativeOriginUpdateDto.
-
#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(city = SKIP, country = SKIP, currency_code = SKIP, currency_value = SKIP, main_division = SKIP, postal_code = SKIP, street_address_1 = SKIP, street_address_2 = SKIP) ⇒ VertexAdministrativeOriginUpdateDto
Returns a new instance of VertexAdministrativeOriginUpdateDto.
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 79 def initialize(city = SKIP, country = SKIP, currency_code = SKIP, currency_value = SKIP, main_division = SKIP, postal_code = SKIP, street_address_1 = SKIP, street_address_2 = SKIP) @city = city unless city == SKIP @country = country unless country == SKIP @currency_code = currency_code unless currency_code == SKIP @currency_value = currency_value unless currency_value == SKIP @main_division = main_division unless main_division == SKIP @postal_code = postal_code unless postal_code == SKIP @street_address_1 = street_address_1 unless street_address_1 == SKIP @street_address_2 = street_address_2 unless street_address_2 == SKIP end |
Instance Attribute Details
#city ⇒ String
The proper name of the city used to determine the Tax Area ID.
14 15 16 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 14 def city @city end |
#country ⇒ String
The proper name of the city used to determine the Tax Area ID.
18 19 20 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 18 def country @country end |
#currency_code ⇒ Currency3Enum
The proper name of the city used to determine the Tax Area ID.
22 23 24 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 22 def currency_code @currency_code end |
#currency_value ⇒ Float
The rate (multiplier) used for converting the transaction currency amount to the filing currency amount.
27 28 29 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 27 def currency_value @currency_value end |
#main_division ⇒ String
The proper name or the postal abbreviation of the state, province, or territory used to determine the Tax Area ID.
32 33 34 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 32 def main_division @main_division end |
#postal_code ⇒ String
The postal code used to determine the Tax Area ID
36 37 38 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 36 def postal_code @postal_code end |
#street_address_1 ⇒ String
The first line of the street address.
40 41 42 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 40 def street_address_1 @street_address_1 end |
#street_address_2 ⇒ String
The second line of the street address.
44 45 46 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 44 def street_address_2 @street_address_2 end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 94 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. city = hash.key?('city') ? hash['city'] : SKIP country = hash.key?('country') ? hash['country'] : SKIP currency_code = hash.key?('currency_code') ? hash['currency_code'] : SKIP currency_value = hash.key?('currency_value') ? hash['currency_value'] : SKIP main_division = hash.key?('main_division') ? hash['main_division'] : SKIP postal_code = hash.key?('postal_code') ? hash['postal_code'] : SKIP street_address_1 = hash.key?('street_address_1') ? hash['street_address_1'] : SKIP street_address_2 = hash.key?('street_address_2') ? hash['street_address_2'] : SKIP # Create object from extracted values. VertexAdministrativeOriginUpdateDto.new(city, country, currency_code, currency_value, main_division, postal_code, street_address_1, street_address_2) end |
.names ⇒ Object
A mapping from model property names to API property names.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 47 def self.names @_hash = {} if @_hash.nil? @_hash['city'] = 'city' @_hash['country'] = 'country' @_hash['currency_code'] = 'currency_code' @_hash['currency_value'] = 'currency_value' @_hash['main_division'] = 'main_division' @_hash['postal_code'] = 'postal_code' @_hash['street_address_1'] = 'street_address_1' @_hash['street_address_2'] = 'street_address_2' @_hash end |
.nullables ⇒ Object
An array for nullable fields
75 76 77 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 75 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 61 def self.optionals %w[ city country currency_code currency_value main_division postal_code street_address_1 street_address_2 ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
131 132 133 134 135 136 137 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 131 def inspect class_name = self.class.name.split('::').last "<#{class_name} city: #{@city.inspect}, country: #{@country.inspect}, currency_code:"\ " #{@currency_code.inspect}, currency_value: #{@currency_value.inspect}, main_division:"\ " #{@main_division.inspect}, postal_code: #{@postal_code.inspect}, street_address_1:"\ " #{@street_address_1.inspect}, street_address_2: #{@street_address_2.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
122 123 124 125 126 127 128 |
# File 'lib/new_store_api/models/vertex_administrative_origin_update_dto.rb', line 122 def to_s class_name = self.class.name.split('::').last "<#{class_name} city: #{@city}, country: #{@country}, currency_code: #{@currency_code},"\ " currency_value: #{@currency_value}, main_division: #{@main_division}, postal_code:"\ " #{@postal_code}, street_address_1: #{@street_address_1}, street_address_2:"\ " #{@street_address_2}>" end |