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 ⇒ String
The current value of country_code.
-
#values ⇒ Array<Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair>
The current value of values.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#country_code ⇒ String
Returns the current value of country_code.
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/product/get_customer_details_request.rb', line 14 def country_code @country_code end |
#values ⇒ Array<Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair>
Returns the current value of values.
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/product/get_customer_details_request.rb', line 14 def values @values end |
Instance Method Details
#from_hash(hash) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ingenico/connect/sdk/domain/product/get_customer_details_request.rb', line 28 def from_hash(hash) super if hash.has_key? 'countryCode' @country_code = hash['countryCode'] end if hash.has_key? 'values' raise TypeError, "value '%s' is not an Array" % [hash['values']] unless hash['values'].is_a? Array @values = [] hash['values'].each do |e| @values << Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair.new_from_hash(e) end end end |
#to_h ⇒ Hash
21 22 23 24 25 26 |
# File 'lib/ingenico/connect/sdk/domain/product/get_customer_details_request.rb', line 21 def to_h hash = super hash['countryCode'] = @country_code unless @country_code.nil? hash['values'] = @values.collect{|val| val.to_h} unless @values.nil? hash end |