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

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



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

def is_recurring
  @is_recurring
end

#localeObject

String



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

def locale
  @locale
end

#payment_product_filtersObject



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

def payment_product_filters
  @payment_product_filters
end

#return_cancel_stateObject

true/false



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

def return_cancel_state
  @return_cancel_state
end

#return_urlObject

String



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

def return_url
  @return_url
end

#show_result_pageObject

true/false



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

def show_result_page
  @show_result_page
end

#tokensObject

String



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

def tokens
  @tokens
end

#validate_shopping_cartObject

true/false



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

def validate_shopping_cart
  @validate_shopping_cart
end

#variantObject

String



39
40
41
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 39

def variant
  @variant
end

Instance Method Details

#from_hash(hash) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 55

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?('returnCancelState')
    @return_cancel_state = hash['returnCancelState']
  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?('validateShoppingCart')
    @validate_shopping_cart = hash['validateShoppingCart']
  end
  if hash.has_key?('variant')
    @variant = hash['variant']
  end
end

#to_hObject



41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb', line 41

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, 'returnCancelState', @return_cancel_state)
  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, 'validateShoppingCart', @validate_shopping_cart)
  add_to_hash(hash, 'variant', @variant)
  hash
end