Class: CyberSource::UnifiedriskTransaction
- Inherits:
-
Object
- Object
- CyberSource::UnifiedriskTransaction
- Defined in:
- lib/cybersource_rest_client/models/unifiedrisk_transaction.rb
Overview
Financial transaction metadata including amounts, status, type, channel, and recurring payment details
Instance Attribute Summary collapse
-
#additional_fees ⇒ Object
Returns the value of attribute additional_fees.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#attribute ⇒ Object
Transaction attribute: AGGREGATION, CARDLESS_ATM, etc.
-
#batch_details ⇒ Object
Returns the value of attribute batch_details.
-
#channel ⇒ Object
Channel used: ONLINE, MOBILE, ATM, BRANCH, etc.
-
#check_details ⇒ Object
Returns the value of attribute check_details.
-
#cutoff_date_time ⇒ Object
Cutoff date/time for event or journey.
-
#decline_phase ⇒ Object
Phase where transaction was declined.
-
#destination_country ⇒ Object
Destination country for funds.
-
#direction ⇒ Object
Direction of the transaction flow relative to the customer's account (e.g., CREDIT for incoming funds, DEBIT for outgoing funds).
-
#fraud_liability ⇒ Object
Indicates which party bears fraud liability for this transaction (e.g., ISSUER, MERCHANT, ACQUIRER).
-
#initiator ⇒ Object
Who initiated transaction: MERCHANT, CUSTOMER.
-
#is_chargeback ⇒ Object
Indicates whether this transaction represents a chargeback or dispute reversal.
-
#is_recurring ⇒ Object
Indicates if this is a recurring transaction.
-
#message_type ⇒ Object
Message type: AUTHORIZATION, INQUIRY, ADVICE, REVERSAL.
-
#number_of_transactions ⇒ Object
Total count of transactions associated with this batch, order, or session.
-
#on_us_flag ⇒ Object
Indicates whether the transaction is an on-us transaction where the issuing and acquiring institutions are the same entity.
-
#pre_order ⇒ Object
Indicates if this is a pre-order.
-
#pre_order_date ⇒ Object
Expected availability date for pre-order.
-
#purpose ⇒ Object
Business purpose or reason code for this transaction (e.g., PURCH for purchase, SALA for salary, REFND for refund).
-
#recurring_details ⇒ Object
Returns the value of attribute recurring_details.
-
#reordered ⇒ Object
Indicates if customer is reordering.
-
#status ⇒ Object
Transaction status: NEW, APPROVED, DECLINED, REVERSED, FRAUD.
-
#status_reason ⇒ Object
Reason code for the transaction status.
-
#timestamp ⇒ Object
Local transaction timestamp without timezone.
-
#transaction_id ⇒ Object
Unique identifier for the transaction being assessed.
-
#trusted_merchant ⇒ Object
Indicates if merchant is on trusted list.
-
#type ⇒ Object
The type of transaction being processed.
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 = {}) ⇒ UnifiedriskTransaction
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 = {}) ⇒ UnifiedriskTransaction
Initializes the object
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 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 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 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 200 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?(:'transactionId') self.transaction_id = attributes[:'transactionId'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'statusReason') self.status_reason = attributes[:'statusReason'] end if attributes.has_key?(:'messageType') self. = attributes[:'messageType'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'attribute') self.attribute = attributes[:'attribute'] end if attributes.has_key?(:'initiator') self.initiator = attributes[:'initiator'] end if attributes.has_key?(:'channel') self.channel = attributes[:'channel'] end if attributes.has_key?(:'timestamp') self. = attributes[:'timestamp'] end if attributes.has_key?(:'cutoffDateTime') self.cutoff_date_time = attributes[:'cutoffDateTime'] end if attributes.has_key?(:'isRecurring') self.is_recurring = attributes[:'isRecurring'] end if attributes.has_key?(:'preOrder') self.pre_order = attributes[:'preOrder'] end if attributes.has_key?(:'preOrderDate') self.pre_order_date = attributes[:'preOrderDate'] end if attributes.has_key?(:'reordered') self.reordered = attributes[:'reordered'] end if attributes.has_key?(:'destinationCountry') self.destination_country = attributes[:'destinationCountry'] end if attributes.has_key?(:'declinePhase') self.decline_phase = attributes[:'declinePhase'] end if attributes.has_key?(:'trustedMerchant') self.trusted_merchant = attributes[:'trustedMerchant'] end if attributes.has_key?(:'additionalFees') self.additional_fees = attributes[:'additionalFees'] end if attributes.has_key?(:'amount') self.amount = attributes[:'amount'] end if attributes.has_key?(:'recurringDetails') self.recurring_details = attributes[:'recurringDetails'] end if attributes.has_key?(:'direction') self.direction = attributes[:'direction'] end if attributes.has_key?(:'isChargeback') self.is_chargeback = attributes[:'isChargeback'] end if attributes.has_key?(:'fraudLiability') self.fraud_liability = attributes[:'fraudLiability'] end if attributes.has_key?(:'onUsFlag') self.on_us_flag = attributes[:'onUsFlag'] end if attributes.has_key?(:'numberOfTransactions') self.number_of_transactions = attributes[:'numberOfTransactions'] end if attributes.has_key?(:'batchDetails') self.batch_details = attributes[:'batchDetails'] end if attributes.has_key?(:'checkDetails') self.check_details = attributes[:'checkDetails'] end if attributes.has_key?(:'purpose') self.purpose = attributes[:'purpose'] end end |
Instance Attribute Details
#additional_fees ⇒ Object
Returns the value of attribute additional_fees.
68 69 70 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 68 def additional_fees @additional_fees end |
#amount ⇒ Object
Returns the value of attribute amount.
70 71 72 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 70 def amount @amount end |
#attribute ⇒ Object
Transaction attribute: AGGREGATION, CARDLESS_ATM, etc
33 34 35 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 33 def attribute @attribute end |
#batch_details ⇒ Object
Returns the value of attribute batch_details.
89 90 91 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 89 def batch_details @batch_details end |
#channel ⇒ Object
Channel used: ONLINE, MOBILE, ATM, BRANCH, etc
39 40 41 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 39 def channel @channel end |
#check_details ⇒ Object
Returns the value of attribute check_details.
91 92 93 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 91 def check_details @check_details end |
#cutoff_date_time ⇒ Object
Cutoff date/time for event or journey
45 46 47 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 45 def cutoff_date_time @cutoff_date_time end |
#decline_phase ⇒ Object
Phase where transaction was declined
63 64 65 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 63 def decline_phase @decline_phase end |
#destination_country ⇒ Object
Destination country for funds
60 61 62 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 60 def destination_country @destination_country end |
#direction ⇒ Object
Direction of the transaction flow relative to the customer's account (e.g., CREDIT for incoming funds, DEBIT for outgoing funds). Determines risk model orientation and velocity tracking
75 76 77 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 75 def direction @direction end |
#fraud_liability ⇒ Object
Indicates which party bears fraud liability for this transaction (e.g., ISSUER, MERCHANT, ACQUIRER). Liability shifts apply in 3DS-authenticated or EMV chip transactions
81 82 83 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 81 def fraud_liability @fraud_liability end |
#initiator ⇒ Object
Who initiated transaction: MERCHANT, CUSTOMER
36 37 38 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 36 def initiator @initiator end |
#is_chargeback ⇒ Object
Indicates whether this transaction represents a chargeback or dispute reversal. True signals a disputed transaction requiring fraud investigation and issuer liability assessment
78 79 80 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 78 def is_chargeback @is_chargeback end |
#is_recurring ⇒ Object
Indicates if this is a recurring transaction
48 49 50 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 48 def is_recurring @is_recurring end |
#message_type ⇒ Object
Message type: AUTHORIZATION, INQUIRY, ADVICE, REVERSAL
27 28 29 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 27 def end |
#number_of_transactions ⇒ Object
Total count of transactions associated with this batch, order, or session. Used for velocity-based risk rules and aggregated fraud monitoring
87 88 89 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 87 def number_of_transactions @number_of_transactions end |
#on_us_flag ⇒ Object
Indicates whether the transaction is an on-us transaction where the issuing and acquiring institutions are the same entity. On-us transactions may follow different risk rules and processing paths
84 85 86 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 84 def on_us_flag @on_us_flag end |
#pre_order ⇒ Object
Indicates if this is a pre-order
51 52 53 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 51 def pre_order @pre_order end |
#pre_order_date ⇒ Object
Expected availability date for pre-order
54 55 56 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 54 def pre_order_date @pre_order_date end |
#purpose ⇒ Object
Business purpose or reason code for this transaction (e.g., PURCH for purchase, SALA for salary, REFND for refund). Used for transaction classification and AML monitoring
94 95 96 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 94 def purpose @purpose end |
#recurring_details ⇒ Object
Returns the value of attribute recurring_details.
72 73 74 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 72 def recurring_details @recurring_details end |
#reordered ⇒ Object
Indicates if customer is reordering
57 58 59 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 57 def reordered @reordered end |
#status ⇒ Object
Transaction status: NEW, APPROVED, DECLINED, REVERSED, FRAUD
21 22 23 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 21 def status @status end |
#status_reason ⇒ Object
Reason code for the transaction status
24 25 26 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 24 def status_reason @status_reason end |
#timestamp ⇒ Object
Local transaction timestamp without timezone
42 43 44 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 42 def end |
#transaction_id ⇒ Object
Unique identifier for the transaction being assessed
18 19 20 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 18 def transaction_id @transaction_id end |
#trusted_merchant ⇒ Object
Indicates if merchant is on trusted list
66 67 68 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 66 def trusted_merchant @trusted_merchant end |
#type ⇒ Object
The type of transaction being processed
30 31 32 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 30 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 97 def self.attribute_map { :'transaction_id' => :'transactionId', :'status' => :'status', :'status_reason' => :'statusReason', :'message_type' => :'messageType', :'type' => :'type', :'attribute' => :'attribute', :'initiator' => :'initiator', :'channel' => :'channel', :'timestamp' => :'timestamp', :'cutoff_date_time' => :'cutoffDateTime', :'is_recurring' => :'isRecurring', :'pre_order' => :'preOrder', :'pre_order_date' => :'preOrderDate', :'reordered' => :'reordered', :'destination_country' => :'destinationCountry', :'decline_phase' => :'declinePhase', :'trusted_merchant' => :'trustedMerchant', :'additional_fees' => :'additionalFees', :'amount' => :'amount', :'recurring_details' => :'recurringDetails', :'direction' => :'direction', :'is_chargeback' => :'isChargeback', :'fraud_liability' => :'fraudLiability', :'on_us_flag' => :'onUsFlag', :'number_of_transactions' => :'numberOfTransactions', :'batch_details' => :'batchDetails', :'check_details' => :'checkDetails', :'purpose' => :'purpose' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
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 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 131 def self.json_map { :'transaction_id' => :'transaction_id', :'status' => :'status', :'status_reason' => :'status_reason', :'message_type' => :'message_type', :'type' => :'type', :'attribute' => :'attribute', :'initiator' => :'initiator', :'channel' => :'channel', :'timestamp' => :'timestamp', :'cutoff_date_time' => :'cutoff_date_time', :'is_recurring' => :'is_recurring', :'pre_order' => :'pre_order', :'pre_order_date' => :'pre_order_date', :'reordered' => :'reordered', :'destination_country' => :'destination_country', :'decline_phase' => :'decline_phase', :'trusted_merchant' => :'trusted_merchant', :'additional_fees' => :'additional_fees', :'amount' => :'amount', :'recurring_details' => :'recurring_details', :'direction' => :'direction', :'is_chargeback' => :'is_chargeback', :'fraud_liability' => :'fraud_liability', :'on_us_flag' => :'on_us_flag', :'number_of_transactions' => :'number_of_transactions', :'batch_details' => :'batch_details', :'check_details' => :'check_details', :'purpose' => :'purpose' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 165 def self.swagger_types { :'transaction_id' => :'String', :'status' => :'String', :'status_reason' => :'String', :'message_type' => :'String', :'type' => :'String', :'attribute' => :'String', :'initiator' => :'String', :'channel' => :'String', :'timestamp' => :'DateTime', :'cutoff_date_time' => :'DateTime', :'is_recurring' => :'BOOLEAN', :'pre_order' => :'BOOLEAN', :'pre_order_date' => :'Date', :'reordered' => :'BOOLEAN', :'destination_country' => :'String', :'decline_phase' => :'String', :'trusted_merchant' => :'BOOLEAN', :'additional_fees' => :'UnifiedriskTransactionAdditionalFees', :'amount' => :'UnifiedriskTransactionAmount', :'recurring_details' => :'UnifiedriskTransactionRecurringDetails', :'direction' => :'String', :'is_chargeback' => :'BOOLEAN', :'fraud_liability' => :'String', :'on_us_flag' => :'BOOLEAN', :'number_of_transactions' => :'Integer', :'batch_details' => :'UnifiedriskTransactionBatchDetails', :'check_details' => :'UnifiedriskTransactionCheckDetails', :'purpose' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
340 341 342 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 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 340 def ==(o) return true if self.equal?(o) self.class == o.class && transaction_id == o.transaction_id && status == o.status && status_reason == o.status_reason && == o. && type == o.type && attribute == o.attribute && initiator == o.initiator && channel == o.channel && == o. && cutoff_date_time == o.cutoff_date_time && is_recurring == o.is_recurring && pre_order == o.pre_order && pre_order_date == o.pre_order_date && reordered == o.reordered && destination_country == o.destination_country && decline_phase == o.decline_phase && trusted_merchant == o.trusted_merchant && additional_fees == o.additional_fees && amount == o.amount && recurring_details == o.recurring_details && direction == o.direction && is_chargeback == o.is_chargeback && fraud_liability == o.fraud_liability && on_us_flag == o.on_us_flag && number_of_transactions == o.number_of_transactions && batch_details == o.batch_details && check_details == o.check_details && purpose == o.purpose end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 409 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
475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 475 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
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 388 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
375 376 377 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 375 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
381 382 383 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 381 def hash [transaction_id, status, status_reason, , type, attribute, initiator, channel, , cutoff_date_time, is_recurring, pre_order, pre_order_date, reordered, destination_country, decline_phase, trusted_merchant, additional_fees, amount, recurring_details, direction, is_chargeback, fraud_liability, on_us_flag, number_of_transactions, batch_details, check_details, purpose].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
321 322 323 324 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 321 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
455 456 457 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 455 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
461 462 463 464 465 466 467 468 469 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 461 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
449 450 451 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 449 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
328 329 330 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_transaction.rb', line 328 def valid? true end |