Class: OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#allowed_number_of_payment_attemptsInteger

Returns the current value of allowed_number_of_payment_attempts.

Returns:

  • (Integer)

    the current value of allowed_number_of_payment_attempts



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def allowed_number_of_payment_attempts
  @allowed_number_of_payment_attempts
end

#card_payment_method_specific_inputOnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout

Returns the current value of card_payment_method_specific_input.

Returns:



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def card_payment_method_specific_input
  @card_payment_method_specific_input
end

#is_new_unscheduled_card_on_file_seriestrue/false

Returns the current value of is_new_unscheduled_card_on_file_series.

Returns:

  • (true/false)

    the current value of is_new_unscheduled_card_on_file_series



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def is_new_unscheduled_card_on_file_series
  @is_new_unscheduled_card_on_file_series
end

#is_recurringtrue/false

Returns the current value of is_recurring.

Returns:

  • (true/false)

    the current value of is_recurring



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def is_recurring
  @is_recurring
end

#localeString

Returns the current value of locale.

Returns:

  • (String)

    the current value of locale



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def locale
  @locale
end

#payment_product_filtersOnlinePayments::SDK::Domain::PaymentProductFiltersHostedCheckout

Returns the current value of payment_product_filters.

Returns:



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def payment_product_filters
  @payment_product_filters
end

#return_urlString

Returns the current value of return_url.

Returns:

  • (String)

    the current value of return_url



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def return_url
  @return_url
end

#session_timeoutInteger

Returns the current value of session_timeout.

Returns:

  • (Integer)

    the current value of session_timeout



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def session_timeout
  @session_timeout
end

#show_result_pagetrue/false

Returns the current value of show_result_page.

Returns:

  • (true/false)

    the current value of show_result_page



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def show_result_page
  @show_result_page
end

#split_payment_product_filtersOnlinePayments::SDK::Domain::SplitPaymentProductFiltersHostedCheckout

Returns the current value of split_payment_product_filters.

Returns:



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def split_payment_product_filters
  @split_payment_product_filters
end

#tokensString

Returns the current value of tokens.

Returns:

  • (String)

    the current value of tokens



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def tokens
  @tokens
end

#variantString

Returns the current value of variant.

Returns:

  • (String)

    the current value of variant



24
25
26
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 24

def variant
  @variant
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
104
105
106
107
108
109
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 68

def from_hash(hash)
  super
  if hash.has_key? 'allowedNumberOfPaymentAttempts'
    @allowed_number_of_payment_attempts = hash['allowedNumberOfPaymentAttempts']
  end
  if hash.has_key? 'cardPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash
    @card_payment_method_specific_input = OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout.new_from_hash(hash['cardPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'isNewUnscheduledCardOnFileSeries'
    @is_new_unscheduled_card_on_file_series = hash['isNewUnscheduledCardOnFileSeries']
  end
  if hash.has_key? 'isRecurring'
    @is_recurring = hash['isRecurring']
  end
  if hash.has_key? 'locale'
    @locale = hash['locale']
  end
  if hash.has_key? 'paymentProductFilters'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']] unless hash['paymentProductFilters'].is_a? Hash
    @payment_product_filters = OnlinePayments::SDK::Domain::PaymentProductFiltersHostedCheckout.new_from_hash(hash['paymentProductFilters'])
  end
  if hash.has_key? 'returnUrl'
    @return_url = hash['returnUrl']
  end
  if hash.has_key? 'sessionTimeout'
    @session_timeout = hash['sessionTimeout']
  end
  if hash.has_key? 'showResultPage'
    @show_result_page = hash['showResultPage']
  end
  if hash.has_key? 'splitPaymentProductFilters'
    raise TypeError, "value '%s' is not a Hash" % [hash['splitPaymentProductFilters']] unless hash['splitPaymentProductFilters'].is_a? Hash
    @split_payment_product_filters = OnlinePayments::SDK::Domain::SplitPaymentProductFiltersHostedCheckout.new_from_hash(hash['splitPaymentProductFilters'])
  end
  if hash.has_key? 'tokens'
    @tokens = hash['tokens']
  end
  if hash.has_key? 'variant'
    @variant = hash['variant']
  end
end

#to_hHash

Returns:

  • (Hash)


51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb', line 51

def to_h
  hash = super
  hash['allowedNumberOfPaymentAttempts'] = @allowed_number_of_payment_attempts unless @allowed_number_of_payment_attempts.nil?
  hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h unless @card_payment_method_specific_input.nil?
  hash['isNewUnscheduledCardOnFileSeries'] = @is_new_unscheduled_card_on_file_series unless @is_new_unscheduled_card_on_file_series.nil?
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
  hash['locale'] = @locale unless @locale.nil?
  hash['paymentProductFilters'] = @payment_product_filters.to_h unless @payment_product_filters.nil?
  hash['returnUrl'] = @return_url unless @return_url.nil?
  hash['sessionTimeout'] = @session_timeout unless @session_timeout.nil?
  hash['showResultPage'] = @show_result_page unless @show_result_page.nil?
  hash['splitPaymentProductFilters'] = @split_payment_product_filters.to_h unless @split_payment_product_filters.nil?
  hash['tokens'] = @tokens unless @tokens.nil?
  hash['variant'] = @variant unless @variant.nil?
  hash
end