Class: Ingenico::Direct::SDK::Domain::GetIINDetailsRequest

Inherits:
Ingenico::Direct::SDK::DataObject show all
Defined in:
lib/ingenico/direct/sdk/domain/get_iin_details_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Direct::SDK::DataObject

new_from_hash

Instance Attribute Details

#binString

Returns the current value of bin.

Returns:

  • (String)

    the current value of bin



13
14
15
# File 'lib/ingenico/direct/sdk/domain/get_iin_details_request.rb', line 13

def bin
  @bin
end

#payment_contextIngenico::Direct::SDK::Domain::PaymentContext

Returns the current value of payment_context.

Returns:



13
14
15
# File 'lib/ingenico/direct/sdk/domain/get_iin_details_request.rb', line 13

def payment_context
  @payment_context
end

Instance Method Details

#from_hash(hash) ⇒ Object



25
26
27
28
29
30
31
32
# File 'lib/ingenico/direct/sdk/domain/get_iin_details_request.rb', line 25

def from_hash(hash)
  super
  @bin = hash['bin'] if hash.key? 'bin'
  if hash.key? 'paymentContext'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentContext']] unless hash['paymentContext'].is_a? Hash
    @payment_context = Ingenico::Direct::SDK::Domain::PaymentContext.new_from_hash(hash['paymentContext'])
  end
end

#to_hHash

Returns:

  • (Hash)


18
19
20
21
22
23
# File 'lib/ingenico/direct/sdk/domain/get_iin_details_request.rb', line 18

def to_h
  hash = super
  hash['bin'] = @bin unless @bin.nil?
  hash['paymentContext'] = @payment_context.to_h if @payment_context
  hash
end