Class: OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#payment_optionString

Returns the current value of payment_option.

Returns:

  • (String)

    the current value of payment_option



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def payment_option
  @payment_option
end

#payment_product3203_specific_inputOnlinePayments::SDK::Domain::RedirectPaymentProduct3203SpecificInput

Returns the current value of payment_product3203_specific_input.

Returns:



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def payment_product3203_specific_input
  @payment_product3203_specific_input
end

#payment_product3306_specific_inputOnlinePayments::SDK::Domain::RedirectPaymentProduct3306SpecificInput

Returns the current value of payment_product3306_specific_input.

Returns:



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def payment_product3306_specific_input
  @payment_product3306_specific_input
end

#payment_product5001_specific_inputOnlinePayments::SDK::Domain::RedirectPaymentProduct5001SpecificInput

Returns the current value of payment_product5001_specific_input.

Returns:



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def payment_product5001_specific_input
  @payment_product5001_specific_input
end

#payment_product5406_specific_inputOnlinePayments::SDK::Domain::RedirectPaymentProduct5406SpecificInput

Returns the current value of payment_product5406_specific_input.

Returns:



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def payment_product5406_specific_input
  @payment_product5406_specific_input
end

#payment_product5408_specific_inputOnlinePayments::SDK::Domain::RedirectPaymentProduct5408SpecificInput

Returns the current value of payment_product5408_specific_input.

Returns:



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def payment_product5408_specific_input
  @payment_product5408_specific_input
end

#payment_product809_specific_inputOnlinePayments::SDK::Domain::RedirectPaymentProduct809SpecificInput

Returns the current value of payment_product809_specific_input.

Returns:



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def payment_product809_specific_input
  @payment_product809_specific_input
end

#payment_product840_specific_inputOnlinePayments::SDK::Domain::RedirectPaymentProduct840SpecificInput

Returns the current value of payment_product840_specific_input.

Returns:



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def payment_product840_specific_input
  @payment_product840_specific_input
end

#payment_product_idInteger

Returns the current value of payment_product_id.

Returns:

  • (Integer)

    the current value of payment_product_id



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def payment_product_id
  @payment_product_id
end

#redirection_dataOnlinePayments::SDK::Domain::RedirectionData

Returns the current value of redirection_data.

Returns:



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def redirection_data
  @redirection_data
end

#requires_approvaltrue/false

Returns the current value of requires_approval.

Returns:

  • (true/false)

    the current value of requires_approval



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def requires_approval
  @requires_approval
end

#tokenString

Returns the current value of token.

Returns:

  • (String)

    the current value of token



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def token
  @token
end

#tokenizetrue/false

Returns the current value of tokenize.

Returns:

  • (true/false)

    the current value of tokenize



30
31
32
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 30

def tokenize
  @tokenize
end

Instance Method Details

#from_hash(hash) ⇒ Object



64
65
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
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb', line 64

def from_hash(hash)
  super
  @payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
  if hash.key? 'paymentProduct3203SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3203SpecificInput']] unless hash['paymentProduct3203SpecificInput'].is_a? Hash
    @payment_product3203_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3203SpecificInput.new_from_hash(hash['paymentProduct3203SpecificInput'])
  end
  if hash.key? 'paymentProduct3306SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3306SpecificInput']] unless hash['paymentProduct3306SpecificInput'].is_a? Hash
    @payment_product3306_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3306SpecificInput.new_from_hash(hash['paymentProduct3306SpecificInput'])
  end
  if hash.key? 'paymentProduct5001SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5001SpecificInput']] unless hash['paymentProduct5001SpecificInput'].is_a? Hash
    @payment_product5001_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct5001SpecificInput.new_from_hash(hash['paymentProduct5001SpecificInput'])
  end
  if hash.key? 'paymentProduct5406SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5406SpecificInput']] unless hash['paymentProduct5406SpecificInput'].is_a? Hash
    @payment_product5406_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct5406SpecificInput.new_from_hash(hash['paymentProduct5406SpecificInput'])
  end
  if hash.key? 'paymentProduct5408SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5408SpecificInput']] unless hash['paymentProduct5408SpecificInput'].is_a? Hash
    @payment_product5408_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct5408SpecificInput.new_from_hash(hash['paymentProduct5408SpecificInput'])
  end
  if hash.key? 'paymentProduct809SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct809SpecificInput']] unless hash['paymentProduct809SpecificInput'].is_a? Hash
    @payment_product809_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct809SpecificInput.new_from_hash(hash['paymentProduct809SpecificInput'])
  end
  if hash.key? 'paymentProduct840SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct840SpecificInput']] unless hash['paymentProduct840SpecificInput'].is_a? Hash
    @payment_product840_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct840SpecificInput.new_from_hash(hash['paymentProduct840SpecificInput'])
  end
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
  if hash.key? 'redirectionData'
    raise TypeError, "value '%s' is not a Hash" % [hash['redirectionData']] unless hash['redirectionData'].is_a? Hash
    @redirection_data = OnlinePayments::SDK::Domain::RedirectionData.new_from_hash(hash['redirectionData'])
  end
  @requires_approval = hash['requiresApproval'] if hash.key? 'requiresApproval'
  @token = hash['token'] if hash.key? 'token'
  @tokenize = hash['tokenize'] if hash.key? 'tokenize'
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
  hash['paymentProduct3203SpecificInput'] = @payment_product3203_specific_input.to_h if @payment_product3203_specific_input
  hash['paymentProduct3306SpecificInput'] = @payment_product3306_specific_input.to_h if @payment_product3306_specific_input
  hash['paymentProduct5001SpecificInput'] = @payment_product5001_specific_input.to_h if @payment_product5001_specific_input
  hash['paymentProduct5406SpecificInput'] = @payment_product5406_specific_input.to_h if @payment_product5406_specific_input
  hash['paymentProduct5408SpecificInput'] = @payment_product5408_specific_input.to_h if @payment_product5408_specific_input
  hash['paymentProduct809SpecificInput'] = @payment_product809_specific_input.to_h if @payment_product809_specific_input
  hash['paymentProduct840SpecificInput'] = @payment_product840_specific_input.to_h if @payment_product840_specific_input
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash['redirectionData'] = @redirection_data.to_h if @redirection_data
  hash['requiresApproval'] = @requires_approval unless @requires_approval.nil?
  hash['token'] = @token unless @token.nil?
  hash['tokenize'] = @tokenize unless @tokenize.nil?
  hash
end