class Ingenico::Direct::SDK::Domain::CardPaymentMethodSpecificInput

@attr [String] authorization_mode @attr [Ingenico::Direct::SDK::Domain::Card] card @attr [String] initial_scheme_transaction_id @attr [true/false] is_recurring @attr [Ingenico::Direct::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input @attr [Integer] payment_product_id @attr [Ingenico::Direct::SDK::Domain::CardRecurrenceDetails] recurring @attr [String] return_url @attr [true/false] skip_authentication @attr [Ingenico::Direct::SDK::Domain::ThreeDSecure] three_d_secure @attr [String] token @attr [true/false] tokenize @attr [String] transaction_channel @attr [String] unscheduled_card_on_file_requestor @attr [String] unscheduled_card_on_file_sequence_indicator

Attributes

authorization_mode[RW]
card[RW]
initial_scheme_transaction_id[RW]
is_recurring[RW]
payment_product130_specific_input[RW]
payment_product_id[RW]
recurring[RW]
return_url[RW]
skip_authentication[RW]
three_d_secure[RW]
token[RW]
tokenize[RW]
transaction_channel[RW]
unscheduled_card_on_file_requestor[RW]
unscheduled_card_on_file_sequence_indicator[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb, line 67
def from_hash(hash)
  super
  @authorization_mode = hash['authorizationMode'] if hash.key? 'authorizationMode'
  if hash.key? 'card'
    raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
    @card = Ingenico::Direct::SDK::Domain::Card.new_from_hash(hash['card'])
  end
  @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
  @is_recurring = hash['isRecurring'] if hash.key? 'isRecurring'
  if hash.key? 'paymentProduct130SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
    @payment_product130_specific_input = Ingenico::Direct::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
  end
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
  if hash.key? 'recurring'
    raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
    @recurring = Ingenico::Direct::SDK::Domain::CardRecurrenceDetails.new_from_hash(hash['recurring'])
  end
  @return_url = hash['returnUrl'] if hash.key? 'returnUrl'
  @skip_authentication = hash['skipAuthentication'] if hash.key? 'skipAuthentication'
  if hash.key? 'threeDSecure'
    raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
    @three_d_secure = Ingenico::Direct::SDK::Domain::ThreeDSecure.new_from_hash(hash['threeDSecure'])
  end
  @token = hash['token'] if hash.key? 'token'
  @tokenize = hash['tokenize'] if hash.key? 'tokenize'
  @transaction_channel = hash['transactionChannel'] if hash.key? 'transactionChannel'
  @unscheduled_card_on_file_requestor = hash['unscheduledCardOnFileRequestor'] if hash.key? 'unscheduledCardOnFileRequestor'
  @unscheduled_card_on_file_sequence_indicator = hash['unscheduledCardOnFileSequenceIndicator'] if hash.key? 'unscheduledCardOnFileSequenceIndicator'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb, line 47
def to_h
  hash = super
  hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
  hash['card'] = @card.to_h if @card
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
  hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash['recurring'] = @recurring.to_h if @recurring
  hash['returnUrl'] = @return_url unless @return_url.nil?
  hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
  hash['threeDSecure'] = @three_d_secure.to_h if @three_d_secure
  hash['token'] = @token unless @token.nil?
  hash['tokenize'] = @tokenize unless @tokenize.nil?
  hash['transactionChannel'] = @transaction_channel unless @transaction_channel.nil?
  hash['unscheduledCardOnFileRequestor'] = @unscheduled_card_on_file_requestor unless @unscheduled_card_on_file_requestor.nil?
  hash['unscheduledCardOnFileSequenceIndicator'] = @unscheduled_card_on_file_sequence_indicator unless @unscheduled_card_on_file_sequence_indicator.nil?
  hash
end