Class: OnlinePayments::SDK::Domain::MandateAddress
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::MandateAddress
- Defined in:
- lib/onlinepayments/sdk/domain/mandate_address.rb
Instance Attribute Summary collapse
-
#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.
-
#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
#city ⇒ String
Returns the current value of city.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/mandate_address.rb', line 14 def city @city end |
#country_code ⇒ String
Returns the current value of country_code.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/mandate_address.rb', line 14 def country_code @country_code end |
#house_number ⇒ String
Returns the current value of house_number.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/mandate_address.rb', line 14 def house_number @house_number end |
#street ⇒ String
Returns the current value of street.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/mandate_address.rb', line 14 def street @street end |
#zip ⇒ String
Returns the current value of zip.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/mandate_address.rb', line 14 def zip @zip end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/onlinepayments/sdk/domain/mandate_address.rb', line 32 def from_hash(hash) super @city = hash['city'] if hash.key? 'city' @country_code = hash['countryCode'] if hash.key? 'countryCode' @house_number = hash['houseNumber'] if hash.key? 'houseNumber' @street = hash['street'] if hash.key? 'street' @zip = hash['zip'] if hash.key? 'zip' end |
#to_h ⇒ Hash
22 23 24 25 26 27 28 29 30 |
# File 'lib/onlinepayments/sdk/domain/mandate_address.rb', line 22 def to_h hash = super hash['city'] = @city unless @city.nil? hash['countryCode'] = @country_code unless @country_code.nil? hash['houseNumber'] = @house_number unless @house_number.nil? hash['street'] = @street unless @street.nil? hash['zip'] = @zip unless @zip.nil? hash end |