class Ingenico::Direct::SDK::Domain::RedirectPaymentMethodSpecificOutput

@attr [Ingenico::Direct::SDK::Domain::FraudResults] fraud_results @attr [String] payment_option @attr [Ingenico::Direct::SDK::Domain::PaymentProduct5402SpecificOutput] payment_product5402_specific_output @attr [Ingenico::Direct::SDK::Domain::PaymentProduct5500SpecificOutput] payment_product5500_specific_output @attr [Ingenico::Direct::SDK::Domain::PaymentProduct840SpecificOutput] payment_product840_specific_output @attr [Integer] payment_product_id @attr [String] token

Attributes

fraud_results[RW]
payment_option[RW]
payment_product5402_specific_output[RW]
payment_product5500_specific_output[RW]
payment_product840_specific_output[RW]
payment_product_id[RW]
token[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/redirect_payment_method_specific_output.rb, line 43
def from_hash(hash)
  super
  if hash.key? 'fraudResults'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
    @fraud_results = Ingenico::Direct::SDK::Domain::FraudResults.new_from_hash(hash['fraudResults'])
  end
  @payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
  if hash.key? 'paymentProduct5402SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5402SpecificOutput']] unless hash['paymentProduct5402SpecificOutput'].is_a? Hash
    @payment_product5402_specific_output = Ingenico::Direct::SDK::Domain::PaymentProduct5402SpecificOutput.new_from_hash(hash['paymentProduct5402SpecificOutput'])
  end
  if hash.key? 'paymentProduct5500SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5500SpecificOutput']] unless hash['paymentProduct5500SpecificOutput'].is_a? Hash
    @payment_product5500_specific_output = Ingenico::Direct::SDK::Domain::PaymentProduct5500SpecificOutput.new_from_hash(hash['paymentProduct5500SpecificOutput'])
  end
  if hash.key? 'paymentProduct840SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct840SpecificOutput']] unless hash['paymentProduct840SpecificOutput'].is_a? Hash
    @payment_product840_specific_output = Ingenico::Direct::SDK::Domain::PaymentProduct840SpecificOutput.new_from_hash(hash['paymentProduct840SpecificOutput'])
  end
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
  @token = hash['token'] if hash.key? 'token'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/redirect_payment_method_specific_output.rb, line 31
def to_h
  hash = super
  hash['fraudResults'] = @fraud_results.to_h if @fraud_results
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
  hash['paymentProduct5402SpecificOutput'] = @payment_product5402_specific_output.to_h if @payment_product5402_specific_output
  hash['paymentProduct5500SpecificOutput'] = @payment_product5500_specific_output.to_h if @payment_product5500_specific_output
  hash['paymentProduct840SpecificOutput'] = @payment_product840_specific_output.to_h if @payment_product840_specific_output
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash['token'] = @token unless @token.nil?
  hash
end