Class: Worldline::Connect::SDK::V1::Domain::GetCustomerDetailsRequest
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::GetCustomerDetailsRequest
- Defined in:
- lib/worldline/connect/sdk/v1/domain/get_customer_details_request.rb
Instance Attribute Summary collapse
-
#country_code ⇒ String
The current value of country_code.
-
#values ⇒ Array<Worldline::Connect::SDK::V1::Domain::KeyValuePair>
The current value of values.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#country_code ⇒ String
Returns the current value of country_code.
15 16 17 |
# File 'lib/worldline/connect/sdk/v1/domain/get_customer_details_request.rb', line 15 def country_code @country_code end |
#values ⇒ Array<Worldline::Connect::SDK::V1::Domain::KeyValuePair>
Returns the current value of values.
15 16 17 |
# File 'lib/worldline/connect/sdk/v1/domain/get_customer_details_request.rb', line 15 def values @values end |
Instance Method Details
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/worldline/connect/sdk/v1/domain/get_customer_details_request.rb', line 29 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 << Worldline::Connect::SDK::V1::Domain::KeyValuePair.new_from_hash(e) end end end |
#to_h ⇒ Hash
22 23 24 25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/get_customer_details_request.rb', line 22 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 |