Class: Ingenico::Connect::SDK::Domain::Hostedcheckout::HostedCheckoutSpecificInput

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#is_recurringObject

true/false



16
17
18
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 16

def is_recurring
  @is_recurring
end

#localeObject

String



19
20
21
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 19

def locale
  @locale
end

#payment_product_filtersObject



22
23
24
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 22

def payment_product_filters
  @payment_product_filters
end

#return_urlObject

String



25
26
27
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 25

def return_url
  @return_url
end

#show_result_pageObject

true/false



28
29
30
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 28

def show_result_page
  @show_result_page
end

#tokensObject

String



31
32
33
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 31

def tokens
  @tokens
end

#variantObject

String



34
35
36
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 34

def variant
  @variant
end

Instance Method Details

#from_hash(hash) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 48

def from_hash(hash)
  super
  if hash.has_key?('isRecurring')
    @is_recurring = hash['isRecurring']
  end
  if hash.has_key?('locale')
    @locale = hash['locale']
  end
  if hash.has_key?('paymentProductFilters')
    if !(hash['paymentProductFilters'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']]
    end
    @payment_product_filters = Ingenico::Connect::SDK::Domain::Hostedcheckout::PaymentProductFiltersHostedCheckout.new_from_hash(hash['paymentProductFilters'])
  end
  if hash.has_key?('returnUrl')
    @return_url = hash['returnUrl']
  end
  if hash.has_key?('showResultPage')
    @show_result_page = hash['showResultPage']
  end
  if hash.has_key?('tokens')
    @tokens = hash['tokens']
  end
  if hash.has_key?('variant')
    @variant = hash['variant']
  end
end

#to_hObject



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 36

def to_h
  hash = super
  add_to_hash(hash, 'isRecurring', @is_recurring)
  add_to_hash(hash, 'locale', @locale)
  add_to_hash(hash, 'paymentProductFilters', @payment_product_filters)
  add_to_hash(hash, 'returnUrl', @return_url)
  add_to_hash(hash, 'showResultPage', @show_result_page)
  add_to_hash(hash, 'tokens', @tokens)
  add_to_hash(hash, 'variant', @variant)
  hash
end