Class: CyberSource::UnifiedriskPayment

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

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. = 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.execution_timestamp = 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

#approvalsObject

Returns the value of attribute approvals.



36
37
38
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 36

def approvals
  @approvals
end

#bankObject

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_accountObject

Returns the value of attribute bank_account.



32
33
34
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 32

def 
  
end

#batchObject

Returns the value of attribute batch.



43
44
45
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 43

def batch
  @batch
end

#cardObject

Returns the value of attribute card.



26
27
28
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 26

def card
  @card
end

#checkObject

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_speedObject

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

#counterpartyObject

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_idObject

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_legacyObject

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_timestampObject

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 execution_timestamp
  @execution_timestamp
end

#group_idObject

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_idObject

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

#methodObject

Payment method: CARD, BANK_ACCOUNT, WALLET



18
19
20
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 18

def method
  @method
end

#purposeObject

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

#sdkObject

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_methodObject

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

#tokenObject

Returns the value of attribute token.



41
42
43
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 41

def token
  @token
end

#typeObject

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

#verificationObject

Returns the value of attribute verification.



28
29
30
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 28

def verification
  @verification
end

#walletObject

Returns the value of attribute wallet.



30
31
32
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 30

def wallet
  @wallet
end

#wireObject

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_mapObject

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_mapObject

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_typesObject

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 &&
       == o. &&
      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 &&
      execution_timestamp == o.execution_timestamp &&
      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

See Also:

  • `==` method


309
310
311
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment.rb', line 309

def eql?(o)
  self == o
end

#hashFixnum

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, , counterparty, approvals, bank, token, batch, sub_method, purpose, clearing_speed, execution_timestamp, group_id, check, wire, type, sdk, location_id].hash
end

#list_invalid_propertiesObject

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_bodyHash

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_hashHash

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_sString

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