Class: UnivapayClientSdk::TokenResponsePaidyDataShippingAddress
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::TokenResponsePaidyDataShippingAddress
- Defined in:
- lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb
Overview
Shipping address returned for a Paidy token.
Instance Attribute Summary collapse
-
#city ⇒ String
City or locality.
-
#line1 ⇒ String
Primary street address line.
-
#line2 ⇒ String
Secondary street address line.
-
#state ⇒ String
State or prefecture.
-
#zip ⇒ String
Japanese postal code.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(zip: SKIP, line1: SKIP, line2: SKIP, city: SKIP, state: SKIP, additional_properties: nil) ⇒ TokenResponsePaidyDataShippingAddress
constructor
A new instance of TokenResponsePaidyDataShippingAddress.
-
#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(zip: SKIP, line1: SKIP, line2: SKIP, city: SKIP, state: SKIP, additional_properties: nil) ⇒ TokenResponsePaidyDataShippingAddress
Returns a new instance of TokenResponsePaidyDataShippingAddress.
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 65 def initialize(zip: SKIP, line1: SKIP, line2: SKIP, city: SKIP, state: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @zip = zip unless zip == SKIP @line1 = line1 unless line1 == SKIP @line2 = line2 unless line2 == SKIP @city = city unless city == SKIP @state = state unless state == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#city ⇒ String
City or locality.
26 27 28 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 26 def city @city end |
#line1 ⇒ String
Primary street address line.
18 19 20 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 18 def line1 @line1 end |
#line2 ⇒ String
Secondary street address line.
22 23 24 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 22 def line2 @line2 end |
#state ⇒ String
State or prefecture.
30 31 32 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 30 def state @state end |
#zip ⇒ String
Japanese postal code.
14 15 16 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 14 def zip @zip end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. zip = hash.key?('zip') ? hash['zip'] : SKIP line1 = hash.key?('line1') ? hash['line1'] : SKIP line2 = hash.key?('line2') ? hash['line2'] : SKIP city = hash.key?('city') ? hash['city'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. TokenResponsePaidyDataShippingAddress.new(zip: zip, line1: line1, line2: line2, city: city, state: state, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['zip'] = 'zip' @_hash['line1'] = 'line1' @_hash['line2'] = 'line2' @_hash['city'] = 'city' @_hash['state'] = 'state' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 58 59 60 61 62 63 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 55 def self.nullables %w[ zip line1 line2 city state ] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 44 def self.optionals %w[ zip line1 line2 city state ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
107 108 109 110 111 112 113 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 107 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
123 124 125 126 127 128 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 123 def inspect class_name = self.class.name.split('::').last "<#{class_name} zip: #{@zip.inspect}, line1: #{@line1.inspect}, line2: #{@line2.inspect},"\ " city: #{@city.inspect}, state: #{@state.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
116 117 118 119 120 |
# File 'lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb', line 116 def to_s class_name = self.class.name.split('::').last "<#{class_name} zip: #{@zip}, line1: #{@line1}, line2: #{@line2}, city: #{@city}, state:"\ " #{@state}, additional_properties: #{@additional_properties}>" end |