Class: CyberSource::UnifiedriskPayment
- Inherits:
-
Object
- Object
- CyberSource::UnifiedriskPayment
- Defined in:
- lib/cybersource_rest_client/models/unifiedrisk_payment.rb
Overview
Payment instrument details including card/bank account information, tokens, wallet, and comprehensive verification results
Instance Attribute Summary collapse
-
#approvals ⇒ Object
Returns the value of attribute approvals.
-
#bank ⇒ Object
Container for additional bank-specific information related to the payment, including routing codes, clearing house details, and bank-specific metadata.
-
#bank_account ⇒ Object
Returns the value of attribute bank_account.
-
#batch ⇒ Object
Returns the value of attribute batch.
-
#card ⇒ Object
Returns the value of attribute card.
-
#check ⇒ Object
Returns the value of attribute check.
-
#clearing_speed ⇒ Object
Indicates the speed at which the payment will be cleared and settled (e.g., REAL_TIME, SAME_DAY, NEXT_DAY, STANDARD).
-
#counterparty ⇒ Object
Returns the value of attribute counterparty.
-
#customer_id ⇒ Object
Payment customer token ID.
-
#customer_id_legacy ⇒ Object
Legacy customer ID for payment tokenization.
-
#execution_timestamp ⇒ Object
The date and time when the payment execution was initiated or scheduled by the payer or payment system, in ISO 8601 format.
-
#group_id ⇒ Object
An identifier linking multiple related payments into a logical group (e.g., bulk payroll run ID, campaign payment group).
-
#location_id ⇒ Object
Physical location (branch or ATM) in which the activity took place (if that's a physical branch).
-
#method ⇒ Object
Payment method: CARD, BANK_ACCOUNT, WALLET.
-
#purpose ⇒ Object
The business or regulatory purpose code for the payment (e.g., SUPP for supplier payment, SALA for salary, CHAR for charity).
-
#sdk ⇒ Object
Returns the value of attribute sdk.
-
#sub_method ⇒ Object
The specific sub-type of the payment method used (e.g., SEPA_CREDIT_TRANSFER, FASTER_PAYMENTS, ACH_NEXT_DAY).
-
#token ⇒ Object
Returns the value of attribute token.
-
#type ⇒ Object
Specifies the underlying payment instrument type for this transaction (e.g., CARD, BANK_TRANSFER, CHECK, WIRE, ACH).
-
#verification ⇒ Object
Returns the value of attribute verification.
-
#wallet ⇒ Object
Returns the value of attribute wallet.
-
#wire ⇒ Object
Returns the value of attribute wire.
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 = {}) ⇒ UnifiedriskPayment
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 = {}) ⇒ UnifiedriskPayment
Initializes the object
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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 158 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?(:'method') self.method = attributes[:'method'] end if attributes.has_key?(:'customerId') self.customer_id = attributes[:'customerId'] end if attributes.has_key?(:'customerIdLegacy') self.customer_id_legacy = attributes[:'customerIdLegacy'] end if attributes.has_key?(:'card') self.card = attributes[:'card'] end if attributes.has_key?(:'verification') self.verification = attributes[:'verification'] end if attributes.has_key?(:'wallet') self.wallet = attributes[:'wallet'] end if attributes.has_key?(:'bankAccount') self.bank_account = attributes[:'bankAccount'] end if attributes.has_key?(:'counterparty') self.counterparty = attributes[:'counterparty'] end if attributes.has_key?(:'approvals') self.approvals = attributes[:'approvals'] end if attributes.has_key?(:'bank') self.bank = attributes[:'bank'] end if attributes.has_key?(:'token') self.token = attributes[:'token'] end if attributes.has_key?(:'batch') self.batch = attributes[:'batch'] end if attributes.has_key?(:'subMethod') self.sub_method = attributes[:'subMethod'] end if attributes.has_key?(:'purpose') self.purpose = attributes[:'purpose'] end if attributes.has_key?(:'clearingSpeed') self.clearing_speed = attributes[:'clearingSpeed'] end if attributes.has_key?(:'executionTimestamp') self. = attributes[:'executionTimestamp'] end if attributes.has_key?(:'groupId') self.group_id = attributes[:'groupId'] end if attributes.has_key?(:'check') self.check = attributes[:'check'] end if attributes.has_key?(:'wire') self.wire = attributes[:'wire'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'sdk') self.sdk = attributes[:'sdk'] end if attributes.has_key?(:'locationId') self.location_id = attributes[:'locationId'] end end |
Instance Attribute Details
#approvals ⇒ Object
Returns the value of attribute approvals.
36 37 38 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 36 def approvals @approvals end |
#bank ⇒ Object
Container for additional bank-specific information related to the payment, including routing codes, clearing house details, and bank-specific metadata
39 40 41 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 39 def bank @bank end |
#bank_account ⇒ Object
Returns the value of attribute bank_account.
32 33 34 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 32 def bank_account @bank_account end |
#batch ⇒ Object
Returns the value of attribute batch.
43 44 45 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 43 def batch @batch end |
#card ⇒ Object
Returns the value of attribute card.
26 27 28 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 26 def card @card end |
#check ⇒ Object
Returns the value of attribute check.
60 61 62 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 60 def check @check end |
#clearing_speed ⇒ Object
Indicates the speed at which the payment will be cleared and settled (e.g., REAL_TIME, SAME_DAY, NEXT_DAY, STANDARD). Faster clearing speeds on large amounts may indicate fraud
52 53 54 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 52 def clearing_speed @clearing_speed end |
#counterparty ⇒ Object
Returns the value of attribute counterparty.
34 35 36 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 34 def counterparty @counterparty end |
#customer_id ⇒ Object
Payment customer token ID
21 22 23 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 21 def customer_id @customer_id end |
#customer_id_legacy ⇒ Object
Legacy customer ID for payment tokenization
24 25 26 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 24 def customer_id_legacy @customer_id_legacy end |
#execution_timestamp ⇒ Object
The date and time when the payment execution was initiated or scheduled by the payer or payment system, in ISO 8601 format
55 56 57 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 55 def end |
#group_id ⇒ Object
An identifier linking multiple related payments into a logical group (e.g., bulk payroll run ID, campaign payment group). Used for aggregated risk monitoring
58 59 60 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 58 def group_id @group_id end |
#location_id ⇒ Object
Physical location (branch or ATM) in which the activity took place (if that's a physical branch). Identifier for staff location, site, or service centre.
70 71 72 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 70 def location_id @location_id end |
#method ⇒ Object
Payment method: CARD, BANK_ACCOUNT, WALLET
18 19 20 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 18 def method @method end |
#purpose ⇒ Object
The business or regulatory purpose code for the payment (e.g., SUPP for supplier payment, SALA for salary, CHAR for charity). Used for AML monitoring and regulatory reporting
49 50 51 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 49 def purpose @purpose end |
#sdk ⇒ Object
Returns the value of attribute sdk.
67 68 69 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 67 def sdk @sdk end |
#sub_method ⇒ Object
The specific sub-type of the payment method used (e.g., SEPA_CREDIT_TRANSFER, FASTER_PAYMENTS, ACH_NEXT_DAY). Provides granular detail within the broader payment method
46 47 48 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 46 def sub_method @sub_method end |
#token ⇒ Object
Returns the value of attribute token.
41 42 43 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 41 def token @token end |
#type ⇒ Object
Specifies the underlying payment instrument type for this transaction (e.g., CARD, BANK_TRANSFER, CHECK, WIRE, ACH). Used for routing to the appropriate risk model and clearing network
65 66 67 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 65 def type @type end |
#verification ⇒ Object
Returns the value of attribute verification.
28 29 30 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 28 def verification @verification end |
#wallet ⇒ Object
Returns the value of attribute wallet.
30 31 32 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 30 def wallet @wallet end |
#wire ⇒ Object
Returns the value of attribute wire.
62 63 64 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 62 def wire @wire end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 73 def self.attribute_map { :'method' => :'method', :'customer_id' => :'customerId', :'customer_id_legacy' => :'customerIdLegacy', :'card' => :'card', :'verification' => :'verification', :'wallet' => :'wallet', :'bank_account' => :'bankAccount', :'counterparty' => :'counterparty', :'approvals' => :'approvals', :'bank' => :'bank', :'token' => :'token', :'batch' => :'batch', :'sub_method' => :'subMethod', :'purpose' => :'purpose', :'clearing_speed' => :'clearingSpeed', :'execution_timestamp' => :'executionTimestamp', :'group_id' => :'groupId', :'check' => :'check', :'wire' => :'wire', :'type' => :'type', :'sdk' => :'sdk', :'location_id' => :'locationId' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
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 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 101 def self.json_map { :'method' => :'method', :'customer_id' => :'customer_id', :'customer_id_legacy' => :'customer_id_legacy', :'card' => :'card', :'verification' => :'verification', :'wallet' => :'wallet', :'bank_account' => :'bank_account', :'counterparty' => :'counterparty', :'approvals' => :'approvals', :'bank' => :'bank', :'token' => :'token', :'batch' => :'batch', :'sub_method' => :'sub_method', :'purpose' => :'purpose', :'clearing_speed' => :'clearing_speed', :'execution_timestamp' => :'execution_timestamp', :'group_id' => :'group_id', :'check' => :'check', :'wire' => :'wire', :'type' => :'type', :'sdk' => :'sdk', :'location_id' => :'location_id' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 129 def self.swagger_types { :'method' => :'String', :'customer_id' => :'String', :'customer_id_legacy' => :'String', :'card' => :'UnifiedriskPaymentCard', :'verification' => :'UnifiedriskPaymentVerification', :'wallet' => :'UnifiedriskPaymentWallet', :'bank_account' => :'UnifiedriskPaymentBankAccount', :'counterparty' => :'UnifiedriskPaymentCounterparty', :'approvals' => :'UnifiedriskPaymentApprovals', :'bank' => :'Object', :'token' => :'UnifiedriskPaymentToken', :'batch' => :'UnifiedriskPaymentBatch', :'sub_method' => :'String', :'purpose' => :'String', :'clearing_speed' => :'String', :'execution_timestamp' => :'String', :'group_id' => :'String', :'check' => :'UnifiedriskPaymentCheck', :'wire' => :'UnifiedriskPaymentWire', :'type' => :'String', :'sdk' => :'UnifiedriskPaymentSdk', :'location_id' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 280 def ==(o) return true if self.equal?(o) self.class == o.class && method == o.method && customer_id == o.customer_id && customer_id_legacy == o.customer_id_legacy && card == o.card && verification == o.verification && wallet == o.wallet && bank_account == o.bank_account && counterparty == o.counterparty && approvals == o.approvals && bank == o.bank && token == o.token && batch == o.batch && sub_method == o.sub_method && purpose == o.purpose && clearing_speed == o.clearing_speed && == o. && group_id == o.group_id && check == o.check && wire == o.wire && type == o.type && sdk == o.sdk && location_id == o.location_id end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 343 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
409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 409 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
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 322 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
309 310 311 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 309 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
315 316 317 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 315 def hash [method, customer_id, customer_id_legacy, card, verification, wallet, bank_account, counterparty, approvals, bank, token, batch, sub_method, purpose, clearing_speed, , group_id, check, wire, type, sdk, location_id].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
255 256 257 258 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 255 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
389 390 391 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 389 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
395 396 397 398 399 400 401 402 403 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 395 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
383 384 385 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 383 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
262 263 264 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 262 def valid? true end |