Class: OnlinePayments::SDK::Domain::Address
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::Address
- Defined in:
- lib/onlinepayments/sdk/domain/address.rb
Instance Attribute Summary collapse
-
#additional_info ⇒ String
The current value of additional_info.
-
#city ⇒ String
The current value of city.
-
#country_code ⇒ String
The current value of country_code.
-
#house_number ⇒ String
The current value of house_number.
-
#state ⇒ String
The current value of state.
-
#street ⇒ String
The current value of street.
-
#zip ⇒ String
The current value of zip.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#additional_info ⇒ String
Returns the current value of additional_info.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/address.rb', line 16 def additional_info @additional_info end |
#city ⇒ String
Returns the current value of city.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/address.rb', line 16 def city @city end |
#country_code ⇒ String
Returns the current value of country_code.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/address.rb', line 16 def country_code @country_code end |
#house_number ⇒ String
Returns the current value of house_number.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/address.rb', line 16 def house_number @house_number end |
#state ⇒ String
Returns the current value of state.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/address.rb', line 16 def state @state end |
#street ⇒ String
Returns the current value of street.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/address.rb', line 16 def street @street end |
#zip ⇒ String
Returns the current value of zip.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/address.rb', line 16 def zip @zip end |
Instance Method Details
#from_hash(hash) ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/onlinepayments/sdk/domain/address.rb', line 38 def from_hash(hash) super @additional_info = hash['additionalInfo'] if hash.key? 'additionalInfo' @city = hash['city'] if hash.key? 'city' @country_code = hash['countryCode'] if hash.key? 'countryCode' @house_number = hash['houseNumber'] if hash.key? 'houseNumber' @state = hash['state'] if hash.key? 'state' @street = hash['street'] if hash.key? 'street' @zip = hash['zip'] if hash.key? 'zip' end |
#to_h ⇒ Hash
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/onlinepayments/sdk/domain/address.rb', line 26 def to_h hash = super hash['additionalInfo'] = @additional_info unless @additional_info.nil? hash['city'] = @city unless @city.nil? hash['countryCode'] = @country_code unless @country_code.nil? hash['houseNumber'] = @house_number unless @house_number.nil? hash['state'] = @state unless @state.nil? hash['street'] = @street unless @street.nil? hash['zip'] = @zip unless @zip.nil? hash end |