class Ingenico::Direct::SDK::Domain::GetIINDetailsResponse
@attr [Array<Ingenico::Direct::SDK::Domain::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
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/get_iin_details_response.rb, line 31 def from_hash(hash) super if hash.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::Direct::SDK::Domain::IINDetail.new_from_hash(e) end end @country_code = hash['countryCode'] if hash.key? 'countryCode' @is_allowed_in_context = hash['isAllowedInContext'] if hash.key? 'isAllowedInContext' @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId' end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/get_iin_details_response.rb, line 22 def to_h hash = super hash['coBrands'] = @co_brands.collect(&:to_h) if @co_brands 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