Class: Worldline::Acquiring::SDK::V1::Domain::MerchantData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::MerchantData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb
Instance Attribute Summary collapse
-
#address ⇒ String
The current value of address.
-
#city ⇒ String
The current value of city.
-
#country_code ⇒ String
The current value of country_code.
-
#merchant_category_code ⇒ Integer
The current value of merchant_category_code.
-
#name ⇒ String
The current value of name.
-
#postal_code ⇒ String
The current value of postal_code.
-
#state_code ⇒ String
The current value of state_code.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#address ⇒ String
Returns the current value of address.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18 def address @address end |
#city ⇒ String
Returns the current value of city.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18 def city @city end |
#country_code ⇒ String
Returns the current value of country_code.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18 def country_code @country_code end |
#merchant_category_code ⇒ Integer
Returns the current value of merchant_category_code.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18 def merchant_category_code @merchant_category_code end |
#name ⇒ String
Returns the current value of name.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18 def name @name end |
#postal_code ⇒ String
Returns the current value of postal_code.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18 def postal_code @postal_code end |
#state_code ⇒ String
Returns the current value of state_code.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18 def state_code @state_code end |
Instance Method Details
#from_hash(hash) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 47 def from_hash(hash) super if hash.has_key? 'address' @address = hash['address'] end if hash.has_key? 'city' @city = hash['city'] end if hash.has_key? 'countryCode' @country_code = hash['countryCode'] end if hash.has_key? 'merchantCategoryCode' @merchant_category_code = hash['merchantCategoryCode'] end if hash.has_key? 'name' @name = hash['name'] end if hash.has_key? 'postalCode' @postal_code = hash['postalCode'] end if hash.has_key? 'stateCode' @state_code = hash['stateCode'] end end |
#to_h ⇒ Hash
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 35 def to_h hash = super hash['address'] = @address unless @address.nil? hash['city'] = @city unless @city.nil? hash['countryCode'] = @country_code unless @country_code.nil? hash['merchantCategoryCode'] = @merchant_category_code unless @merchant_category_code.nil? hash['name'] = @name unless @name.nil? hash['postalCode'] = @postal_code unless @postal_code.nil? hash['stateCode'] = @state_code unless @state_code.nil? hash end |