Class: OnlinePayments::SDK::Domain::GetIINDetailsRequest

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/get_iin_details_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#binString

Returns the current value of bin.

Returns:

  • (String)

    the current value of bin



12
13
14
# File 'lib/onlinepayments/sdk/domain/get_iin_details_request.rb', line 12

def bin
  @bin
end

#payment_contextOnlinePayments::SDK::Domain::PaymentContext

Returns the current value of payment_context.

Returns:



12
13
14
# File 'lib/onlinepayments/sdk/domain/get_iin_details_request.rb', line 12

def payment_context
  @payment_context
end

Instance Method Details

#from_hash(hash) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/onlinepayments/sdk/domain/get_iin_details_request.rb', line 24

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 = OnlinePayments::SDK::Domain::PaymentContext.new_from_hash(hash['paymentContext'])
  end
end

#to_hHash

Returns:

  • (Hash)


17
18
19
20
21
22
# File 'lib/onlinepayments/sdk/domain/get_iin_details_request.rb', line 17

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