Class: Ingenico::Connect::SDK::Domain::Mandates::MandateAddress
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Mandates::MandateAddress
- Defined in:
- lib/ingenico/connect/sdk/domain/mandates/mandate_address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
String.
-
#country_code ⇒ Object
String.
-
#house_number ⇒ Object
String.
-
#street ⇒ Object
String.
-
#zip ⇒ Object
String.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#city ⇒ Object
String
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_address.rb', line 14 def city @city end |
#country_code ⇒ Object
String
17 18 19 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_address.rb', line 17 def country_code @country_code end |
#house_number ⇒ Object
String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_address.rb', line 20 def house_number @house_number end |
#street ⇒ Object
String
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_address.rb', line 23 def street @street end |
#zip ⇒ Object
String
26 27 28 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_address.rb', line 26 def zip @zip end |
Instance Method Details
#from_hash(hash) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_address.rb', line 38 def from_hash(hash) super if hash.has_key?('city') @city = hash['city'] end if hash.has_key?('countryCode') @country_code = hash['countryCode'] end if hash.has_key?('houseNumber') @house_number = hash['houseNumber'] end if hash.has_key?('street') @street = hash['street'] end if hash.has_key?('zip') @zip = hash['zip'] end end |
#to_h ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_address.rb', line 28 def to_h hash = super add_to_hash(hash, 'city', @city) add_to_hash(hash, 'countryCode', @country_code) add_to_hash(hash, 'houseNumber', @house_number) add_to_hash(hash, 'street', @street) add_to_hash(hash, 'zip', @zip) hash end |