Class: CyberSource::Acpv1instructionsinstructionIdconfirmationsProcessorInformation

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb

Overview

Payment/Transaction Confirmation Data provided by the payment processor/acquirer

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Acpv1instructionsinstructionIdconfirmationsProcessorInformation

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



107
108
109
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
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 107

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?(:'dynamicDataId')
    self.dynamic_data_id = attributes[:'dynamicDataId']
  end

  if attributes.has_key?(:'transactionType')
    self.transaction_type = attributes[:'transactionType']
  end

  if attributes.has_key?(:'transactionStatus')
    self.transaction_status = attributes[:'transactionStatus']
  end

  if attributes.has_key?(:'responseCode')
    self.response_code = attributes[:'responseCode']
  end

  if attributes.has_key?(:'transactionTimestamp')
    self.transaction_timestamp = attributes[:'transactionTimestamp']
  end

  if attributes.has_key?(:'approvalCode')
    self.approval_code = attributes[:'approvalCode']
  end

  if attributes.has_key?(:'retrievalReferenceNumber')
    self.retrieval_reference_number = attributes[:'retrievalReferenceNumber']
  end

  if attributes.has_key?(:'systemTraceAuditNumber')
    self.system_trace_audit_number = attributes[:'systemTraceAuditNumber']
  end

  if attributes.has_key?(:'acquirerReferenceNumber')
    self.acquirer_reference_number = attributes[:'acquirerReferenceNumber']
  end

  if attributes.has_key?(:'amountDetail')
    self.amount_detail = attributes[:'amountDetail']
  end

  if attributes.has_key?(:'entryMode')
    self.entry_mode = attributes[:'entryMode']
  end

  if attributes.has_key?(:'paymentInstrument')
    self.payment_instrument = attributes[:'paymentInstrument']
  end
end

Instance Attribute Details

#acquirer_reference_numberObject

Acquirer Reference Number. Reference number assigned by the acquirer



42
43
44
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 42

def acquirer_reference_number
  @acquirer_reference_number
end

#amount_detailObject

Returns the value of attribute amount_detail.



44
45
46
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 44

def amount_detail
  @amount_detail
end

#approval_codeObject

Authorization code. Returned when the processor returns this value



33
34
35
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 33

def approval_code
  @approval_code
end

#dynamic_data_idObject

A unique reference ID that represents the dynamic data associated with a transaction



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

def dynamic_data_id
  @dynamic_data_id
end

#entry_modeObject

Method of entering payment card information Possible values: - ‘EMV’ - ‘CONTACTLESS’ - ‘MANUAL’ - ‘ECOMMERCE’ - ‘WALLET’



47
48
49
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 47

def entry_mode
  @entry_mode
end

#payment_instrumentObject

Returns the value of attribute payment_instrument.



49
50
51
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 49

def payment_instrument
  @payment_instrument
end

#response_codeObject

2 Digit Response code sent directly from the payment processor



27
28
29
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 27

def response_code
  @response_code
end

#retrieval_reference_numberObject

Unique number to identify the transaction. It is used with other data elements to identify and track all messages related to a transaction



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

def retrieval_reference_number
  @retrieval_reference_number
end

#system_trace_audit_numberObject

System Trace Audit Number. Audit number assigned by the payment network



39
40
41
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 39

def system_trace_audit_number
  @system_trace_audit_number
end

#transaction_statusObject

Status of payment transaction Possible values: - ‘APPROVED’ - ‘DECLINED’ - ‘PENDING’ - ‘ERROR’ - ‘CANCELLED’



24
25
26
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 24

def transaction_status
  @transaction_status
end

#transaction_timestampObject

Date and time of the transaction (UTC time in Epoch format)



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

def transaction_timestamp
  @transaction_timestamp
end

#transaction_typeObject

Type of payment transaction Possible values: - ‘PURCHASE’ - ‘AUTHORIZATION’ - ‘CAPTURE’ - ‘REFUND’ - ‘REVERSAL’ - ‘VERIFICATION’ - ‘CHARGEBACK’ - ‘FRAUD’



21
22
23
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 21

def transaction_type
  @transaction_type
end

Class Method Details

.attribute_mapObject

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
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 52

def self.attribute_map
  {
    :'dynamic_data_id' => :'dynamicDataId',
    :'transaction_type' => :'transactionType',
    :'transaction_status' => :'transactionStatus',
    :'response_code' => :'responseCode',
    :'transaction_timestamp' => :'transactionTimestamp',
    :'approval_code' => :'approvalCode',
    :'retrieval_reference_number' => :'retrievalReferenceNumber',
    :'system_trace_audit_number' => :'systemTraceAuditNumber',
    :'acquirer_reference_number' => :'acquirerReferenceNumber',
    :'amount_detail' => :'amountDetail',
    :'entry_mode' => :'entryMode',
    :'payment_instrument' => :'paymentInstrument'
  }
end

.json_mapObject

Attribute mapping from JSON key to ruby-style variable name.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 70

def self.json_map
  {
    :'dynamic_data_id' => :'dynamic_data_id',
    :'transaction_type' => :'transaction_type',
    :'transaction_status' => :'transaction_status',
    :'response_code' => :'response_code',
    :'transaction_timestamp' => :'transaction_timestamp',
    :'approval_code' => :'approval_code',
    :'retrieval_reference_number' => :'retrieval_reference_number',
    :'system_trace_audit_number' => :'system_trace_audit_number',
    :'acquirer_reference_number' => :'acquirer_reference_number',
    :'amount_detail' => :'amount_detail',
    :'entry_mode' => :'entry_mode',
    :'payment_instrument' => :'payment_instrument'
  }
end

.swagger_typesObject

Attribute type mapping.



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 88

def self.swagger_types
  {
    :'dynamic_data_id' => :'String',
    :'transaction_type' => :'String',
    :'transaction_status' => :'String',
    :'response_code' => :'String',
    :'transaction_timestamp' => :'String',
    :'approval_code' => :'String',
    :'retrieval_reference_number' => :'String',
    :'system_trace_audit_number' => :'String',
    :'acquirer_reference_number' => :'String',
    :'amount_detail' => :'Acpv1instructionsinstructionIdcredentialsOrderInformationAmountDetail',
    :'entry_mode' => :'String',
    :'payment_instrument' => :'Acpv1instructionsinstructionIdconfirmationsProcessorInformationPaymentInstrument'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 292

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      dynamic_data_id == o.dynamic_data_id &&
      transaction_type == o.transaction_type &&
      transaction_status == o.transaction_status &&
      response_code == o.response_code &&
      transaction_timestamp == o.transaction_timestamp &&
      approval_code == o.approval_code &&
      retrieval_reference_number == o.retrieval_reference_number &&
      system_trace_audit_number == o.system_trace_audit_number &&
      acquirer_reference_number == o.acquirer_reference_number &&
      amount_detail == o.amount_detail &&
      entry_mode == o.entry_mode &&
      payment_instrument == o.payment_instrument
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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
380
381
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 345

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 411

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 324

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


311
312
313
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 311

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



317
318
319
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 317

def hash
  [dynamic_data_id, transaction_type, transaction_status, response_code, transaction_timestamp, approval_code, retrieval_reference_number, system_trace_audit_number, acquirer_reference_number, amount_detail, entry_mode, payment_instrument].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 164

def list_invalid_properties
  invalid_properties = Array.new
  #if !@dynamic_data_id.nil? && @dynamic_data_id !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
    #invalid_properties.push('invalid value for "dynamic_data_id", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
  #end

  if @transaction_type.nil?
    invalid_properties.push('invalid value for "transaction_type", transaction_type cannot be nil.')
  end

  if @transaction_status.nil?
    invalid_properties.push('invalid value for "transaction_status", transaction_status cannot be nil.')
  end

  #if !@response_code.nil? && @response_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
    #invalid_properties.push('invalid value for "response_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
  #end

  #if !@transaction_timestamp.nil? && @transaction_timestamp !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
    #invalid_properties.push('invalid value for "transaction_timestamp", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
  #end

  #if !@approval_code.nil? && @approval_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
    #invalid_properties.push('invalid value for "approval_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
  #end

  #if !@retrieval_reference_number.nil? && @retrieval_reference_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
    #invalid_properties.push('invalid value for "retrieval_reference_number", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
  #end

  #if !@system_trace_audit_number.nil? && @system_trace_audit_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
    #invalid_properties.push('invalid value for "system_trace_audit_number", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
  #end

  #if !@acquirer_reference_number.nil? && @acquirer_reference_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
    #invalid_properties.push('invalid value for "acquirer_reference_number", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
  #end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



391
392
393
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 391

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



397
398
399
400
401
402
403
404
405
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 397

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

Returns:

  • (String)

    String presentation of the object



385
386
387
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 385

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb', line 207

def valid?
  #return false if !@dynamic_data_id.nil? && @dynamic_data_id !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
  return false if @transaction_type.nil?
  return false if @transaction_status.nil?
  #return false if !@response_code.nil? && @response_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
  #return false if !@transaction_timestamp.nil? && @transaction_timestamp !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
  #return false if !@approval_code.nil? && @approval_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
  #return false if !@retrieval_reference_number.nil? && @retrieval_reference_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
  #return false if !@system_trace_audit_number.nil? && @system_trace_audit_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
  #return false if !@acquirer_reference_number.nil? && @acquirer_reference_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
  true
end