Class: CyberSource::PaymentsProducts
- Inherits:
-
Object
- Object
- CyberSource::PaymentsProducts
- Defined in:
- lib/cybersource_rest_client/models/payments_products.rb
Instance Attribute Summary collapse
-
#card_present_connect ⇒ Object
Returns the value of attribute card_present_connect.
-
#card_processing ⇒ Object
Returns the value of attribute card_processing.
-
#currency_conversion ⇒ Object
Returns the value of attribute currency_conversion.
-
#customer_invoicing ⇒ Object
Returns the value of attribute customer_invoicing.
-
#cybs_ready_terminal ⇒ Object
Returns the value of attribute cybs_ready_terminal.
-
#differential_fee ⇒ Object
Returns the value of attribute differential_fee.
-
#digital_payments ⇒ Object
Returns the value of attribute digital_payments.
-
#e_check ⇒ Object
Returns the value of attribute e_check.
-
#pay_by_link ⇒ Object
Returns the value of attribute pay_by_link.
-
#payer_authentication ⇒ Object
Returns the value of attribute payer_authentication.
-
#payment_orchestration ⇒ Object
Returns the value of attribute payment_orchestration.
-
#payouts ⇒ Object
Returns the value of attribute payouts.
-
#recurring_billing ⇒ Object
Returns the value of attribute recurring_billing.
-
#secure_acceptance ⇒ Object
Returns the value of attribute secure_acceptance.
-
#tax ⇒ Object
Returns the value of attribute tax.
-
#unified_checkout ⇒ Object
Returns the value of attribute unified_checkout.
-
#virtual_terminal ⇒ Object
Returns the value of attribute virtual_terminal.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PaymentsProducts
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ PaymentsProducts
Initializes the object
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 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 122 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'cardProcessing') self.card_processing = attributes[:'cardProcessing'] end if attributes.has_key?(:'cardPresentConnect') self.card_present_connect = attributes[:'cardPresentConnect'] end if attributes.has_key?(:'cybsReadyTerminal') self.cybs_ready_terminal = attributes[:'cybsReadyTerminal'] end if attributes.has_key?(:'eCheck') self.e_check = attributes[:'eCheck'] end if attributes.has_key?(:'payerAuthentication') self.payer_authentication = attributes[:'payerAuthentication'] end if attributes.has_key?(:'digitalPayments') self.digital_payments = attributes[:'digitalPayments'] end if attributes.has_key?(:'secureAcceptance') self.secure_acceptance = attributes[:'secureAcceptance'] end if attributes.has_key?(:'virtualTerminal') self.virtual_terminal = attributes[:'virtualTerminal'] end if attributes.has_key?(:'currencyConversion') self.currency_conversion = attributes[:'currencyConversion'] end if attributes.has_key?(:'tax') self.tax = attributes[:'tax'] end if attributes.has_key?(:'customerInvoicing') self.customer_invoicing = attributes[:'customerInvoicing'] end if attributes.has_key?(:'recurringBilling') self.recurring_billing = attributes[:'recurringBilling'] end if attributes.has_key?(:'paymentOrchestration') self.payment_orchestration = attributes[:'paymentOrchestration'] end if attributes.has_key?(:'payouts') self.payouts = attributes[:'payouts'] end if attributes.has_key?(:'differentialFee') self.differential_fee = attributes[:'differentialFee'] end if attributes.has_key?(:'payByLink') self.pay_by_link = attributes[:'payByLink'] end if attributes.has_key?(:'unifiedCheckout') self.unified_checkout = attributes[:'unifiedCheckout'] end end |
Instance Attribute Details
#card_present_connect ⇒ Object
Returns the value of attribute card_present_connect.
19 20 21 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 19 def card_present_connect @card_present_connect end |
#card_processing ⇒ Object
Returns the value of attribute card_processing.
17 18 19 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 17 def card_processing @card_processing end |
#currency_conversion ⇒ Object
Returns the value of attribute currency_conversion.
33 34 35 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 33 def currency_conversion @currency_conversion end |
#customer_invoicing ⇒ Object
Returns the value of attribute customer_invoicing.
37 38 39 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 37 def customer_invoicing @customer_invoicing end |
#cybs_ready_terminal ⇒ Object
Returns the value of attribute cybs_ready_terminal.
21 22 23 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 21 def cybs_ready_terminal @cybs_ready_terminal end |
#differential_fee ⇒ Object
Returns the value of attribute differential_fee.
45 46 47 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 45 def differential_fee @differential_fee end |
#digital_payments ⇒ Object
Returns the value of attribute digital_payments.
27 28 29 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 27 def digital_payments @digital_payments end |
#e_check ⇒ Object
Returns the value of attribute e_check.
23 24 25 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 23 def e_check @e_check end |
#pay_by_link ⇒ Object
Returns the value of attribute pay_by_link.
47 48 49 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 47 def pay_by_link @pay_by_link end |
#payer_authentication ⇒ Object
Returns the value of attribute payer_authentication.
25 26 27 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 25 def payer_authentication @payer_authentication end |
#payment_orchestration ⇒ Object
Returns the value of attribute payment_orchestration.
41 42 43 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 41 def payment_orchestration @payment_orchestration end |
#payouts ⇒ Object
Returns the value of attribute payouts.
43 44 45 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 43 def payouts @payouts end |
#recurring_billing ⇒ Object
Returns the value of attribute recurring_billing.
39 40 41 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 39 def recurring_billing @recurring_billing end |
#secure_acceptance ⇒ Object
Returns the value of attribute secure_acceptance.
29 30 31 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 29 def secure_acceptance @secure_acceptance end |
#tax ⇒ Object
Returns the value of attribute tax.
35 36 37 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 35 def tax @tax end |
#unified_checkout ⇒ Object
Returns the value of attribute unified_checkout.
49 50 51 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 49 def unified_checkout @unified_checkout end |
#virtual_terminal ⇒ Object
Returns the value of attribute virtual_terminal.
31 32 33 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 31 def virtual_terminal @virtual_terminal end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 52 def self.attribute_map { :'card_processing' => :'cardProcessing', :'card_present_connect' => :'cardPresentConnect', :'cybs_ready_terminal' => :'cybsReadyTerminal', :'e_check' => :'eCheck', :'payer_authentication' => :'payerAuthentication', :'digital_payments' => :'digitalPayments', :'secure_acceptance' => :'secureAcceptance', :'virtual_terminal' => :'virtualTerminal', :'currency_conversion' => :'currencyConversion', :'tax' => :'tax', :'customer_invoicing' => :'customerInvoicing', :'recurring_billing' => :'recurringBilling', :'payment_orchestration' => :'paymentOrchestration', :'payouts' => :'payouts', :'differential_fee' => :'differentialFee', :'pay_by_link' => :'payByLink', :'unified_checkout' => :'unifiedCheckout' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 75 def self.json_map { :'card_processing' => :'card_processing', :'card_present_connect' => :'card_present_connect', :'cybs_ready_terminal' => :'cybs_ready_terminal', :'e_check' => :'e_check', :'payer_authentication' => :'payer_authentication', :'digital_payments' => :'digital_payments', :'secure_acceptance' => :'secure_acceptance', :'virtual_terminal' => :'virtual_terminal', :'currency_conversion' => :'currency_conversion', :'tax' => :'tax', :'customer_invoicing' => :'customer_invoicing', :'recurring_billing' => :'recurring_billing', :'payment_orchestration' => :'payment_orchestration', :'payouts' => :'payouts', :'differential_fee' => :'differential_fee', :'pay_by_link' => :'pay_by_link', :'unified_checkout' => :'unified_checkout' } end |
.swagger_types ⇒ Object
Attribute type mapping.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 98 def self.swagger_types { :'card_processing' => :'PaymentsProductsCardProcessing', :'card_present_connect' => :'PaymentsProductsCardPresentConnect', :'cybs_ready_terminal' => :'PaymentsProductsCybsReadyTerminal', :'e_check' => :'PaymentsProductsECheck', :'payer_authentication' => :'PaymentsProductsPayerAuthentication', :'digital_payments' => :'PaymentsProductsDigitalPayments', :'secure_acceptance' => :'PaymentsProductsSecureAcceptance', :'virtual_terminal' => :'PaymentsProductsVirtualTerminal', :'currency_conversion' => :'PaymentsProductsCurrencyConversion', :'tax' => :'PaymentsProductsTax', :'customer_invoicing' => :'PaymentsProductsTax', :'recurring_billing' => :'PaymentsProductsTax', :'payment_orchestration' => :'PaymentsProductsTax', :'payouts' => :'PaymentsProductsPayouts', :'differential_fee' => :'PaymentsProductsDifferentialFee', :'pay_by_link' => :'PaymentsProductsTax', :'unified_checkout' => :'PaymentsProductsTax' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 212 def ==(o) return true if self.equal?(o) self.class == o.class && card_processing == o.card_processing && card_present_connect == o.card_present_connect && cybs_ready_terminal == o.cybs_ready_terminal && e_check == o.e_check && payer_authentication == o.payer_authentication && digital_payments == o.digital_payments && secure_acceptance == o.secure_acceptance && virtual_terminal == o.virtual_terminal && currency_conversion == o.currency_conversion && tax == o.tax && customer_invoicing == o.customer_invoicing && recurring_billing == o.recurring_billing && payment_orchestration == o.payment_orchestration && payouts == o.payouts && differential_fee == o.differential_fee && pay_by_link == o.pay_by_link && unified_checkout == o.unified_checkout end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 270 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = CyberSource.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 336 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 249 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
236 237 238 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 236 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
242 243 244 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 242 def hash [card_processing, card_present_connect, cybs_ready_terminal, e_check, payer_authentication, digital_payments, secure_acceptance, virtual_terminal, currency_conversion, tax, customer_invoicing, recurring_billing, payment_orchestration, payouts, differential_fee, pay_by_link, unified_checkout].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
199 200 201 202 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 199 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
316 317 318 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 316 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
322 323 324 325 326 327 328 329 330 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 322 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
310 311 312 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 310 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
206 207 208 |
# File 'lib/cybersource_rest_client/models/payments_products.rb', line 206 def valid? true end |