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 ⇒ Array<Ingenico::Connect::SDK::Domain::Product::AccountOnFile>
The current value of accounts_on_file.
-
#acquirer_country ⇒ String
The current value of acquirer_country.
-
#allows_installments ⇒ true/false
The current value of allows_installments.
-
#allows_recurring ⇒ true/false
The current value of allows_recurring.
-
#allows_tokenization ⇒ true/false
The current value of allows_tokenization.
-
#authentication_indicator ⇒ Ingenico::Connect::SDK::Domain::Product::AuthenticationIndicator
The current value of authentication_indicator.
-
#auto_tokenized ⇒ true/false
The current value of auto_tokenized.
-
#can_be_iframed ⇒ true/false
The current value of can_be_iframed.
-
#device_fingerprint_enabled ⇒ true/false
The current value of device_fingerprint_enabled.
-
#display_hints ⇒ Ingenico::Connect::SDK::Domain::Product::PaymentProductDisplayHints
The current value of display_hints.
-
#fields ⇒ Array<Ingenico::Connect::SDK::Domain::Product::PaymentProductField>
The current value of fields.
-
#fields_warning ⇒ String
The current value of fields_warning.
-
#id ⇒ Integer
The current value of id.
-
#is_java_script_required ⇒ true/false
The current value of is_java_script_required.
-
#max_amount ⇒ Integer
The current value of max_amount.
-
#min_amount ⇒ Integer
The current value of min_amount.
-
#mobile_integration_level ⇒ String
The current value of mobile_integration_level.
-
#payment_method ⇒ String
The current value of payment_method.
-
#payment_product302_specific_data ⇒ Ingenico::Connect::SDK::Domain::Product::PaymentProduct302SpecificData
The current value of payment_product302_specific_data.
-
#payment_product320_specific_data ⇒ Ingenico::Connect::SDK::Domain::Product::PaymentProduct320SpecificData
The current value of payment_product320_specific_data.
-
#payment_product863_specific_data ⇒ Ingenico::Connect::SDK::Domain::Product::PaymentProduct863SpecificData
The current value of payment_product863_specific_data.
-
#payment_product_group ⇒ String
The current value of payment_product_group.
-
#uses_redirection_to3rd_party ⇒ true/false
The current value of uses_redirection_to3rd_party.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#accounts_on_file ⇒ Array<Ingenico::Connect::SDK::Domain::Product::AccountOnFile>
Returns the current value of accounts_on_file.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def accounts_on_file @accounts_on_file end |
#acquirer_country ⇒ String
Returns the current value of acquirer_country.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def acquirer_country @acquirer_country end |
#allows_installments ⇒ true/false
Returns the current value of allows_installments.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def allows_installments @allows_installments end |
#allows_recurring ⇒ true/false
Returns the current value of allows_recurring.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def allows_recurring @allows_recurring end |
#allows_tokenization ⇒ true/false
Returns the current value of allows_tokenization.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def allows_tokenization @allows_tokenization end |
#authentication_indicator ⇒ Ingenico::Connect::SDK::Domain::Product::AuthenticationIndicator
Returns the current value of authentication_indicator.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def authentication_indicator @authentication_indicator end |
#auto_tokenized ⇒ true/false
Returns the current value of auto_tokenized.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def auto_tokenized @auto_tokenized end |
#can_be_iframed ⇒ true/false
Returns the current value of can_be_iframed.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def can_be_iframed @can_be_iframed end |
#device_fingerprint_enabled ⇒ true/false
Returns the current value of device_fingerprint_enabled.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def device_fingerprint_enabled @device_fingerprint_enabled end |
#display_hints ⇒ Ingenico::Connect::SDK::Domain::Product::PaymentProductDisplayHints
Returns the current value of display_hints.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def display_hints @display_hints end |
#fields ⇒ Array<Ingenico::Connect::SDK::Domain::Product::PaymentProductField>
Returns the current value of fields.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def fields @fields end |
#fields_warning ⇒ String
Returns the current value of fields_warning.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def fields_warning @fields_warning end |
#id ⇒ Integer
Returns the current value of id.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def id @id end |
#is_java_script_required ⇒ true/false
Returns the current value of is_java_script_required.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def is_java_script_required @is_java_script_required end |
#max_amount ⇒ Integer
Returns the current value of max_amount.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def max_amount @max_amount end |
#min_amount ⇒ Integer
Returns the current value of min_amount.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def min_amount @min_amount end |
#mobile_integration_level ⇒ String
Returns the current value of mobile_integration_level.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def mobile_integration_level @mobile_integration_level end |
#payment_method ⇒ String
Returns the current value of payment_method.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def payment_method @payment_method end |
#payment_product302_specific_data ⇒ Ingenico::Connect::SDK::Domain::Product::PaymentProduct302SpecificData
Returns the current value of payment_product302_specific_data.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def payment_product302_specific_data @payment_product302_specific_data end |
#payment_product320_specific_data ⇒ Ingenico::Connect::SDK::Domain::Product::PaymentProduct320SpecificData
Returns the current value of payment_product320_specific_data.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def payment_product320_specific_data @payment_product320_specific_data end |
#payment_product863_specific_data ⇒ Ingenico::Connect::SDK::Domain::Product::PaymentProduct863SpecificData
Returns the current value of payment_product863_specific_data.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def payment_product863_specific_data @payment_product863_specific_data end |
#payment_product_group ⇒ String
Returns the current value of payment_product_group.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def payment_product_group @payment_product_group end |
#uses_redirection_to3rd_party ⇒ true/false
Returns the current value of uses_redirection_to3rd_party.
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 41 def uses_redirection_to3rd_party @uses_redirection_to3rd_party end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 118 def from_hash(hash) super if hash.has_key? 'accountsOnFile' raise TypeError, "value '%s' is not an Array" % [hash['accountsOnFile']] unless hash['accountsOnFile'].is_a? Array @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? 'acquirerCountry' @acquirer_country = hash['acquirerCountry'] end if hash.has_key? 'allowsInstallments' @allows_installments = hash['allowsInstallments'] 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' raise TypeError, "value '%s' is not a Hash" % [hash['authenticationIndicator']] unless hash['authenticationIndicator'].is_a? Hash @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' raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash @display_hints = Ingenico::Connect::SDK::Domain::Product::PaymentProductDisplayHints.new_from_hash(hash['displayHints']) end if hash.has_key? 'fields' raise TypeError, "value '%s' is not an Array" % [hash['fields']] unless hash['fields'].is_a? Array @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? 'isJavaScriptRequired' @is_java_script_required = hash['isJavaScriptRequired'] 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? 'paymentProduct302SpecificData' raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct302SpecificData']] unless hash['paymentProduct302SpecificData'].is_a? Hash @payment_product302_specific_data = Ingenico::Connect::SDK::Domain::Product::PaymentProduct302SpecificData.new_from_hash(hash['paymentProduct302SpecificData']) end if hash.has_key? 'paymentProduct320SpecificData' raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificData']] unless hash['paymentProduct320SpecificData'].is_a? Hash @payment_product320_specific_data = Ingenico::Connect::SDK::Domain::Product::PaymentProduct320SpecificData.new_from_hash(hash['paymentProduct320SpecificData']) end if hash.has_key? 'paymentProduct863SpecificData' raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct863SpecificData']] unless hash['paymentProduct863SpecificData'].is_a? Hash @payment_product863_specific_data = Ingenico::Connect::SDK::Domain::Product::PaymentProduct863SpecificData.new_from_hash(hash['paymentProduct863SpecificData']) 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 ⇒ Hash
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 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 90 def to_h hash = super hash['accountsOnFile'] = @accounts_on_file.collect{|val| val.to_h} unless @accounts_on_file.nil? hash['acquirerCountry'] = @acquirer_country unless @acquirer_country.nil? hash['allowsInstallments'] = @allows_installments unless @allows_installments.nil? hash['allowsRecurring'] = @allows_recurring unless @allows_recurring.nil? hash['allowsTokenization'] = @allows_tokenization unless @allows_tokenization.nil? hash['authenticationIndicator'] = @authentication_indicator.to_h unless @authentication_indicator.nil? hash['autoTokenized'] = @auto_tokenized unless @auto_tokenized.nil? hash['canBeIframed'] = @can_be_iframed unless @can_be_iframed.nil? hash['deviceFingerprintEnabled'] = @device_fingerprint_enabled unless @device_fingerprint_enabled.nil? hash['displayHints'] = @display_hints.to_h unless @display_hints.nil? hash['fields'] = @fields.collect{|val| val.to_h} unless @fields.nil? hash['fieldsWarning'] = @fields_warning unless @fields_warning.nil? hash['id'] = @id unless @id.nil? hash['isJavaScriptRequired'] = @is_java_script_required unless @is_java_script_required.nil? hash['maxAmount'] = @max_amount unless @max_amount.nil? hash['minAmount'] = @min_amount unless @min_amount.nil? hash['mobileIntegrationLevel'] = @mobile_integration_level unless @mobile_integration_level.nil? hash['paymentMethod'] = @payment_method unless @payment_method.nil? hash['paymentProduct302SpecificData'] = @payment_product302_specific_data.to_h unless @payment_product302_specific_data.nil? hash['paymentProduct320SpecificData'] = @payment_product320_specific_data.to_h unless @payment_product320_specific_data.nil? hash['paymentProduct863SpecificData'] = @payment_product863_specific_data.to_h unless @payment_product863_specific_data.nil? hash['paymentProductGroup'] = @payment_product_group unless @payment_product_group.nil? hash['usesRedirectionTo3rdParty'] = @uses_redirection_to3rd_party unless @uses_redirection_to3rd_party.nil? hash end |