Class: Ingenico::Direct::SDK::Domain::CardPaymentMethodSpecificInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#authorization_modeString

Returns the current value of authorization_mode.

Returns:

  • (String)

    the current value of authorization_mode



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def authorization_mode
  @authorization_mode
end

#cardIngenico::Direct::SDK::Domain::Card

Returns the current value of card.

Returns:



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def card
  @card
end

#initial_scheme_transaction_idString

Returns the current value of initial_scheme_transaction_id.

Returns:

  • (String)

    the current value of initial_scheme_transaction_id



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def initial_scheme_transaction_id
  @initial_scheme_transaction_id
end

#is_recurringtrue/false

Returns the current value of is_recurring.

Returns:

  • (true/false)

    the current value of is_recurring



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def is_recurring
  @is_recurring
end

#payment_product_idInteger

Returns the current value of payment_product_id.

Returns:

  • (Integer)

    the current value of payment_product_id



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def payment_product_id
  @payment_product_id
end

#recurringIngenico::Direct::SDK::Domain::CardRecurrenceDetails

Returns the current value of recurring.

Returns:



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def recurring
  @recurring
end

#return_urlString

Returns the current value of return_url.

Returns:

  • (String)

    the current value of return_url



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def return_url
  @return_url
end

#skip_authenticationtrue/false

Returns the current value of skip_authentication.

Returns:

  • (true/false)

    the current value of skip_authentication



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def skip_authentication
  @skip_authentication
end

#skip_soft_declinetrue/false

Returns the current value of skip_soft_decline.

Returns:

  • (true/false)

    the current value of skip_soft_decline



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def skip_soft_decline
  @skip_soft_decline
end

#three_d_secureIngenico::Direct::SDK::Domain::ThreeDSecure

Returns the current value of three_d_secure.

Returns:



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def three_d_secure
  @three_d_secure
end

#tokenString

Returns the current value of token.

Returns:

  • (String)

    the current value of token



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def token
  @token
end

#tokenizetrue/false

Returns the current value of tokenize.

Returns:

  • (true/false)

    the current value of tokenize



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def tokenize
  @tokenize
end

#transaction_channelString

Returns the current value of transaction_channel.

Returns:

  • (String)

    the current value of transaction_channel



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def transaction_channel
  @transaction_channel
end

#unscheduled_card_on_file_requestorString

Returns the current value of unscheduled_card_on_file_requestor.

Returns:

  • (String)

    the current value of unscheduled_card_on_file_requestor



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def unscheduled_card_on_file_requestor
  @unscheduled_card_on_file_requestor
end

#unscheduled_card_on_file_sequence_indicatorString

Returns the current value of unscheduled_card_on_file_sequence_indicator.

Returns:

  • (String)

    the current value of unscheduled_card_on_file_sequence_indicator



28
29
30
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 28

def unscheduled_card_on_file_sequence_indicator
  @unscheduled_card_on_file_sequence_indicator
end

Instance Method Details

#from_hash(hash) ⇒ Object



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 66

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'
  @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'
  @skip_soft_decline = hash['skipSoftDecline'] if hash.key? 'skipSoftDecline'
  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_hHash

Returns:

  • (Hash)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb', line 46

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['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['skipSoftDecline'] = @skip_soft_decline unless @skip_soft_decline.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