Class: OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#click_to_paytrue/false

Returns the current value of click_to_pay.

Returns:

  • (true/false)

    the current value of click_to_pay



13
14
15
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 13

def click_to_pay
  @click_to_pay
end

#group_cardstrue/false

Returns the current value of group_cards.

Returns:

  • (true/false)

    the current value of group_cards



13
14
15
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 13

def group_cards
  @group_cards
end

#payment_product_preferred_orderArray<Integer>

Returns the current value of payment_product_preferred_order.

Returns:

  • (Array<Integer>)

    the current value of payment_product_preferred_order



13
14
15
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 13

def payment_product_preferred_order
  @payment_product_preferred_order
end

#tokenization_modeString

Returns the current value of tokenization_mode.

Returns:

  • (String)

    the current value of tokenization_mode



13
14
15
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 13

def tokenization_mode
  @tokenization_mode
end

Instance Method Details

#from_hash(hash) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 33

def from_hash(hash)
  super
  if hash.has_key? 'clickToPay'
    @click_to_pay = hash['clickToPay']
  end
  if hash.has_key? 'groupCards'
    @group_cards = hash['groupCards']
  end
  if hash.has_key? 'paymentProductPreferredOrder'
    raise TypeError, "value '%s' is not an Array" % [hash['paymentProductPreferredOrder']] unless hash['paymentProductPreferredOrder'].is_a? Array
    @payment_product_preferred_order = []
    hash['paymentProductPreferredOrder'].each do |e|
      @payment_product_preferred_order << e
    end
  end
  if hash.has_key? 'tokenizationMode'
    @tokenization_mode = hash['tokenizationMode']
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['clickToPay'] = @click_to_pay unless @click_to_pay.nil?
  hash['groupCards'] = @group_cards unless @group_cards.nil?
  hash['paymentProductPreferredOrder'] = @payment_product_preferred_order unless @payment_product_preferred_order.nil?
  hash['tokenizationMode'] = @tokenization_mode unless @tokenization_mode.nil?
  hash
end