Class: Ingenico::Connect::SDK::Domain::Product::GetCustomerDetailsRequest
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Product::GetCustomerDetailsRequest
- Defined in:
- lib/ingenico/connect/sdk/domain/product/get_customer_details_request.rb
Instance Attribute Summary collapse
-
#country_code ⇒ Object
String.
-
#values ⇒ Object
Array of Definitions::KeyValuePair.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#country_code ⇒ Object
String
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/product/get_customer_details_request.rb', line 15 def country_code @country_code end |
#values ⇒ Object
Array of Definitions::KeyValuePair
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/product/get_customer_details_request.rb', line 18 def values @values end |
Instance Method Details
#from_hash(hash) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/get_customer_details_request.rb', line 27 def from_hash(hash) super if hash.has_key?('countryCode') @country_code = hash['countryCode'] end if hash.has_key?('values') if !(hash['values'].is_a? Array) raise TypeError, "value '%s' is not an Array" % [hash['values']] end @values = [] hash['values'].each do |e| @values << Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair.new_from_hash(e) end end end |
#to_h ⇒ Object
20 21 22 23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/product/get_customer_details_request.rb', line 20 def to_h hash = super add_to_hash(hash, 'countryCode', @country_code) add_to_hash(hash, 'values', @values) hash end |