Class: Worldline::Acquiring::SDK::V1::Domain::ServiceLocationAddress
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::ServiceLocationAddress
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb
Instance Attribute Summary collapse
-
#city ⇒ String
The current value of city.
-
#country_code ⇒ String
The current value of country_code.
-
#country_subdivision_code ⇒ String
The current value of country_subdivision_code.
-
#postal_code ⇒ String
The current value of postal_code.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#city ⇒ String
Returns the current value of city.
15 16 17 |
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 15 def city @city end |
#country_code ⇒ String
Returns the current value of country_code.
15 16 17 |
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 15 def country_code @country_code end |
#country_subdivision_code ⇒ String
Returns the current value of country_subdivision_code.
15 16 17 |
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 15 def country_subdivision_code @country_subdivision_code end |
#postal_code ⇒ String
Returns the current value of postal_code.
15 16 17 |
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 15 def postal_code @postal_code end |
Instance Method Details
#from_hash(hash) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 35 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? 'countrySubdivisionCode' @country_subdivision_code = hash['countrySubdivisionCode'] end if hash.has_key? 'postalCode' @postal_code = hash['postalCode'] end end |
#to_h ⇒ Hash
26 27 28 29 30 31 32 33 |
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 26 def to_h hash = super hash['city'] = @city unless @city.nil? hash['countryCode'] = @country_code unless @country_code.nil? hash['countrySubdivisionCode'] = @country_subdivision_code unless @country_subdivision_code.nil? hash['postalCode'] = @postal_code unless @postal_code.nil? hash end |