Class: Worldline::Connect::SDK::V1::Domain::GetCustomerDetailsRequest

Inherits:
Domain::DataObject
  • Object
show all
Defined in:
lib/worldline/connect/sdk/v1/domain/get_customer_details_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#country_codeString

Returns the current value of country_code.

Returns:

  • (String)

    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

#valuesArray<Worldline::Connect::SDK::V1::Domain::KeyValuePair>

Returns the current value of values.

Returns:



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_hHash

Returns:

  • (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