Class: Ingenico::Connect::SDK::Domain::Product::PaymentProduct
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Product::PaymentProduct
- Defined in:
- lib/ingenico/connect/sdk/domain/product/payment_product.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#accounts_on_file ⇒ Object
Array of AccountOnFile.
-
#allows_recurring ⇒ Object
true/false.
-
#allows_tokenization ⇒ Object
true/false.
- #authentication_indicator ⇒ Object
-
#auto_tokenized ⇒ Object
true/false.
-
#can_be_iframed ⇒ Object
true/false.
-
#device_fingerprint_enabled ⇒ Object
true/false.
- #display_hints ⇒ Object
-
#fields ⇒ Object
Array of PaymentProductField.
-
#fields_warning ⇒ Object
String.
-
#id ⇒ Object
Integer.
-
#max_amount ⇒ Object
Integer.
-
#min_amount ⇒ Object
Integer.
-
#mobile_integration_level ⇒ Object
String.
-
#payment_method ⇒ Object
String.
-
#payment_product_group ⇒ Object
String.
-
#uses_redirection_to3rd_party ⇒ Object
true/false.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#accounts_on_file ⇒ Object
Array of AccountOnFile
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 18 def accounts_on_file @accounts_on_file end |
#allows_recurring ⇒ Object
true/false
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 21 def allows_recurring @allows_recurring end |
#allows_tokenization ⇒ Object
true/false
24 25 26 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 24 def allows_tokenization @allows_tokenization end |
#authentication_indicator ⇒ Object
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 27 def authentication_indicator @authentication_indicator end |
#auto_tokenized ⇒ Object
true/false
30 31 32 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 30 def auto_tokenized @auto_tokenized end |
#can_be_iframed ⇒ Object
true/false
33 34 35 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 33 def can_be_iframed @can_be_iframed end |
#device_fingerprint_enabled ⇒ Object
true/false
36 37 38 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 36 def device_fingerprint_enabled @device_fingerprint_enabled end |
#display_hints ⇒ Object
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def display_hints @display_hints end |
#fields ⇒ Object
42 43 44 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 42 def fields @fields end |
#fields_warning ⇒ Object
String
45 46 47 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 45 def fields_warning @fields_warning end |
#id ⇒ Object
Integer
48 49 50 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 48 def id @id end |
#max_amount ⇒ Object
Integer
51 52 53 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 51 def max_amount @max_amount end |
#min_amount ⇒ Object
Integer
54 55 56 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 54 def min_amount @min_amount end |
#mobile_integration_level ⇒ Object
String
57 58 59 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 57 def mobile_integration_level @mobile_integration_level end |
#payment_method ⇒ Object
String
60 61 62 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 60 def payment_method @payment_method end |
#payment_product_group ⇒ Object
String
63 64 65 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 63 def payment_product_group @payment_product_group end |
#uses_redirection_to3rd_party ⇒ Object
true/false
66 67 68 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 66 def uses_redirection_to3rd_party @uses_redirection_to3rd_party end |
Instance Method Details
#from_hash(hash) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 90 def from_hash(hash) super if hash.has_key?('accountsOnFile') if !(hash['accountsOnFile'].is_a? Array) raise TypeError, "value '%s' is not an Array" % [hash['accountsOnFile']] end @accounts_on_file = [] hash['accountsOnFile'].each do |e| @accounts_on_file << Ingenico::Connect::SDK::Domain::Product::AccountOnFile.new_from_hash(e) end end if hash.has_key?('allowsRecurring') @allows_recurring = hash['allowsRecurring'] end if hash.has_key?('allowsTokenization') @allows_tokenization = hash['allowsTokenization'] end if hash.has_key?('authenticationIndicator') if !(hash['authenticationIndicator'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['authenticationIndicator']] end @authentication_indicator = Ingenico::Connect::SDK::Domain::Product::AuthenticationIndicator.new_from_hash(hash['authenticationIndicator']) end if hash.has_key?('autoTokenized') @auto_tokenized = hash['autoTokenized'] end if hash.has_key?('canBeIframed') @can_be_iframed = hash['canBeIframed'] end if hash.has_key?('deviceFingerprintEnabled') @device_fingerprint_enabled = hash['deviceFingerprintEnabled'] end if hash.has_key?('displayHints') if !(hash['displayHints'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] end @display_hints = Ingenico::Connect::SDK::Domain::Product::PaymentProductDisplayHints.new_from_hash(hash['displayHints']) end if hash.has_key?('fields') if !(hash['fields'].is_a? Array) raise TypeError, "value '%s' is not an Array" % [hash['fields']] end @fields = [] hash['fields'].each do |e| @fields << Ingenico::Connect::SDK::Domain::Product::PaymentProductField.new_from_hash(e) end end if hash.has_key?('fieldsWarning') @fields_warning = hash['fieldsWarning'] end if hash.has_key?('id') @id = hash['id'] end if hash.has_key?('maxAmount') @max_amount = hash['maxAmount'] end if hash.has_key?('minAmount') @min_amount = hash['minAmount'] end if hash.has_key?('mobileIntegrationLevel') @mobile_integration_level = hash['mobileIntegrationLevel'] end if hash.has_key?('paymentMethod') @payment_method = hash['paymentMethod'] end if hash.has_key?('paymentProductGroup') @payment_product_group = hash['paymentProductGroup'] end if hash.has_key?('usesRedirectionTo3rdParty') @uses_redirection_to3rd_party = hash['usesRedirectionTo3rdParty'] end end |
#to_h ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 68 def to_h hash = super add_to_hash(hash, 'accountsOnFile', @accounts_on_file) add_to_hash(hash, 'allowsRecurring', @allows_recurring) add_to_hash(hash, 'allowsTokenization', @allows_tokenization) add_to_hash(hash, 'authenticationIndicator', @authentication_indicator) add_to_hash(hash, 'autoTokenized', @auto_tokenized) add_to_hash(hash, 'canBeIframed', @can_be_iframed) add_to_hash(hash, 'deviceFingerprintEnabled', @device_fingerprint_enabled) add_to_hash(hash, 'displayHints', @display_hints) add_to_hash(hash, 'fields', @fields) add_to_hash(hash, 'fieldsWarning', @fields_warning) add_to_hash(hash, 'id', @id) add_to_hash(hash, 'maxAmount', @max_amount) add_to_hash(hash, 'minAmount', @min_amount) add_to_hash(hash, 'mobileIntegrationLevel', @mobile_integration_level) add_to_hash(hash, 'paymentMethod', @payment_method) add_to_hash(hash, 'paymentProductGroup', @payment_product_group) add_to_hash(hash, 'usesRedirectionTo3rdParty', @uses_redirection_to3rd_party) hash end |