class Ingenico::Connect::SDK::Domain::Services::GetIINDetailsResponse

@attr [Array<Ingenico::Connect::SDK::Domain::Services::IINDetail>] co_brands @attr [String] country_code @attr [true/false] is_allowed_in_context @attr [Integer] payment_product_id

Attributes

co_brands[RW]
country_code[RW]
is_allowed_in_context[RW]
payment_product_id[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb, line 36
def from_hash(hash)
  super
  if hash.has_key? 'coBrands'
    raise TypeError, "value '%s' is not an Array" % [hash['coBrands']] unless hash['coBrands'].is_a? Array
    @co_brands = []
    hash['coBrands'].each do |e|
      @co_brands << Ingenico::Connect::SDK::Domain::Services::IINDetail.new_from_hash(e)
    end
  end
  if hash.has_key? 'countryCode'
    @country_code = hash['countryCode']
  end
  if hash.has_key? 'isAllowedInContext'
    @is_allowed_in_context = hash['isAllowedInContext']
  end
  if hash.has_key? 'paymentProductId'
    @payment_product_id = hash['paymentProductId']
  end
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb, line 27
def to_h
  hash = super
  hash['coBrands'] = @co_brands.collect{|val| val.to_h} unless @co_brands.nil?
  hash['countryCode'] = @country_code unless @country_code.nil?
  hash['isAllowedInContext'] = @is_allowed_in_context unless @is_allowed_in_context.nil?
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash
end