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.
-
#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.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def accounts_on_file @accounts_on_file end |
#allows_recurring ⇒ true/false
Returns the current value of allows_recurring.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def allows_recurring @allows_recurring end |
#allows_tokenization ⇒ true/false
Returns the current value of allows_tokenization.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def allows_tokenization @allows_tokenization end |
#authentication_indicator ⇒ Ingenico::Connect::SDK::Domain::Product::AuthenticationIndicator
Returns the current value of authentication_indicator.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def authentication_indicator @authentication_indicator end |
#auto_tokenized ⇒ true/false
Returns the current value of auto_tokenized.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def auto_tokenized @auto_tokenized end |
#can_be_iframed ⇒ true/false
Returns the current value of can_be_iframed.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def can_be_iframed @can_be_iframed end |
#device_fingerprint_enabled ⇒ true/false
Returns the current value of device_fingerprint_enabled.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def device_fingerprint_enabled @device_fingerprint_enabled end |
#display_hints ⇒ Ingenico::Connect::SDK::Domain::Product::PaymentProductDisplayHints
Returns the current value of display_hints.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def display_hints @display_hints end |
#fields ⇒ Array<Ingenico::Connect::SDK::Domain::Product::PaymentProductField>
Returns the current value of fields.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def fields @fields end |
#fields_warning ⇒ String
Returns the current value of fields_warning.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def fields_warning @fields_warning end |
#id ⇒ Integer
Returns the current value of id.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def id @id end |
#is_java_script_required ⇒ true/false
Returns the current value of is_java_script_required.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def is_java_script_required @is_java_script_required end |
#max_amount ⇒ Integer
Returns the current value of max_amount.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def max_amount @max_amount end |
#min_amount ⇒ Integer
Returns the current value of min_amount.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def min_amount @min_amount end |
#mobile_integration_level ⇒ String
Returns the current value of mobile_integration_level.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def mobile_integration_level @mobile_integration_level end |
#payment_method ⇒ String
Returns the current value of payment_method.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 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.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 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.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 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.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def payment_product863_specific_data @payment_product863_specific_data end |
#payment_product_group ⇒ String
Returns the current value of payment_product_group.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def payment_product_group @payment_product_group end |
#uses_redirection_to3rd_party ⇒ true/false
Returns the current value of uses_redirection_to3rd_party.
39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 39 def uses_redirection_to3rd_party @uses_redirection_to3rd_party end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 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 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 110 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? '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
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 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product.rb', line 84 def to_h hash = super hash['accountsOnFile'] = @accounts_on_file.collect{|val| val.to_h} unless @accounts_on_file.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 |