Class: VisaAcceptanceMergedSpec::ProcessorInformation7

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/visa_acceptance_merged_spec/models/processor_information7.rb

Overview

ProcessorInformation7 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(approval_code: SKIP, transaction_id: SKIP, forwarded_acquirer_code: SKIP, merchant_number: SKIP, response_code: SKIP, ach_verification: SKIP, network_transaction_id: SKIP, settlement_date: SKIP, update_time_utc: SKIP, additional_properties: nil) ⇒ ProcessorInformation7

Returns a new instance of ProcessorInformation7.



180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 180

def initialize(approval_code: SKIP, transaction_id: SKIP,
               forwarded_acquirer_code: SKIP, merchant_number: SKIP,
               response_code: SKIP, ach_verification: SKIP,
               network_transaction_id: SKIP, settlement_date: SKIP,
               update_time_utc: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @approval_code = approval_code unless approval_code == SKIP
  @transaction_id = transaction_id unless transaction_id == SKIP
  @forwarded_acquirer_code = forwarded_acquirer_code unless forwarded_acquirer_code == SKIP
  @merchant_number = merchant_number unless merchant_number == SKIP
  @response_code = response_code unless response_code == SKIP
  @ach_verification = ach_verification unless ach_verification == SKIP
  @network_transaction_id = network_transaction_id unless network_transaction_id == SKIP
  @settlement_date = settlement_date unless settlement_date == SKIP
  @update_time_utc = update_time_utc unless update_time_utc == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#ach_verificationAchVerification

For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization.

PIN debit

Response value that is returned by the processor or bank. Important Do not use this field to evaluate the results of the transaction request. Returned by PIN debit credit, PIN debit purchase, and PIN debit reversal.

AIBMS

If this value is 08, you can accept the transaction if the customer provides you with identification.

Atos

This value is the response code sent from Atos and it might also include the response code from the bank. Format: aa,bb with the two values separated by a comma and where:

  • aa is the two-digit error message from Atos.
  • bb is the optional two-digit error message from the bank.

Comercio Latino

This value is the status code and the error or response code received from the processor separated by a colon. Format: [status code]:E[error code] or [status code]:R[response code] Example 2:R06

JCN Gateway

Processor-defined detail error code. The associated response category code is in the processorInformation.responseCategoryCode field. String (3)

paypalgateway

Processor generated ID for the itemized detail.

Returns:



129
130
131
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 129

def ach_verification
  @ach_verification
end

#approval_codeString

Authorization code. Returned only when the processor returns this value. The length of this value depends on your processor. Returned by authorization service.

PIN debit

Authorization code that is returned by the processor. Returned by PIN debit credit.

Elavon Encrypted Account Number Program

The returned value is OFFLINE.

TSYS Acquiring Solutions

The returned value for a successful zero amount authorization is 000000.

Returns:

  • (String)


23
24
25
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 23

def approval_code
  @approval_code
end

#forwarded_acquirer_codeString

Name of the Japanese acquirer that processed the transaction. Returned only for JCN Gateway. Please contact the Visa Acceptance Japan Support Group for more information.

Returns:

  • (String)


48
49
50
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 48

def forwarded_acquirer_code
  @forwarded_acquirer_code
end

#merchant_numberString

Identifier that was assigned to you by your acquirer. This value must be printed on the receipt.

Returned by

Authorizations and Credits. This reply field is only supported by merchants who have installed client software on their POS terminals and use these processors:

  • American Express Direct
  • Credit Mutuel-CIC
  • FDC Nashville Global
  • OmniPay Direct
  • SIX

Returns:

  • (String)


63
64
65
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 63

def merchant_number
  @merchant_number
end

#network_transaction_idString

Same value as processorInformation.transactionId

Returns:

  • (String)


133
134
135
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 133

def network_transaction_id
  @network_transaction_id
end

#response_codeString

For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization.

PIN debit

Response value that is returned by the processor or bank. Important Do not use this field to evaluate the results of the transaction request. Returned by PIN debit credit, PIN debit purchase, and PIN debit reversal.

AIBMS

If this value is 08, you can accept the transaction if the customer provides you with identification.

Atos

This value is the response code sent from Atos and it might also include the response code from the bank. Format: aa,bb with the two values separated by a comma and where:

  • aa is the two-digit error message from Atos.
  • bb is the optional two-digit error message from the bank.

Comercio Latino

This value is the status code and the error or response code received from the processor separated by a colon. Format: [status code]:E[error code] or [status code]:R[response code] Example 2:R06

JCN Gateway

Processor-defined detail error code. The associated response category code is in the processorInformation.responseCategoryCode field. String (3)

paypalgateway

Processor generated ID for the itemized detail.

Returns:

  • (String)


96
97
98
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 96

def response_code
  @response_code
end

#settlement_dateString

Field contains a settlement date. The date is in mmdd format, where: mm = month and dd = day.

Returns:

  • (String)


138
139
140
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 138

def settlement_date
  @settlement_date
end

#transaction_idString

Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information:

  • Terminal used to process the transaction
  • Shift during which the transaction took place
  • Batch number
  • Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003:
  • Terminal ID = 66012345
  • Shift number = 001
  • Batch number = 069
  • Transaction number = 003

Returns:

  • (String)


41
42
43
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 41

def transaction_id
  @transaction_id
end

#update_time_utcString

The date and time when the transaction was last updated, in Internet date and time format.

Returns:

  • (String)


143
144
145
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 143

def update_time_utc
  @update_time_utc
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 201

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  approval_code = hash.key?('approvalCode') ? hash['approvalCode'] : SKIP
  transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP
  forwarded_acquirer_code =
    hash.key?('forwardedAcquirerCode') ? hash['forwardedAcquirerCode'] : SKIP
  merchant_number =
    hash.key?('merchantNumber') ? hash['merchantNumber'] : SKIP
  response_code = hash.key?('responseCode') ? hash['responseCode'] : SKIP
  ach_verification = AchVerification.from_hash(hash['achVerification']) if
    hash['achVerification']
  network_transaction_id =
    hash.key?('networkTransactionId') ? hash['networkTransactionId'] : SKIP
  settlement_date =
    hash.key?('settlementDate') ? hash['settlementDate'] : SKIP
  update_time_utc =
    hash.key?('updateTimeUtc') ? hash['updateTimeUtc'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  ProcessorInformation7.new(approval_code: approval_code,
                            transaction_id: transaction_id,
                            forwarded_acquirer_code: forwarded_acquirer_code,
                            merchant_number: merchant_number,
                            response_code: response_code,
                            ach_verification: ach_verification,
                            network_transaction_id: network_transaction_id,
                            settlement_date: settlement_date,
                            update_time_utc: update_time_utc,
                            additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 146

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['approval_code'] = 'approvalCode'
  @_hash['transaction_id'] = 'transactionId'
  @_hash['forwarded_acquirer_code'] = 'forwardedAcquirerCode'
  @_hash['merchant_number'] = 'merchantNumber'
  @_hash['response_code'] = 'responseCode'
  @_hash['ach_verification'] = 'achVerification'
  @_hash['network_transaction_id'] = 'networkTransactionId'
  @_hash['settlement_date'] = 'settlementDate'
  @_hash['update_time_utc'] = 'updateTimeUtc'
  @_hash
end

.nullablesObject

An array for nullable fields



176
177
178
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 176

def self.nullables
  []
end

.optionalsObject

An array for optional fields



161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 161

def self.optionals
  %w[
    approval_code
    transaction_id
    forwarded_acquirer_code
    merchant_number
    response_code
    ach_verification
    network_transaction_id
    settlement_date
    update_time_utc
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



253
254
255
256
257
258
259
260
261
262
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 253

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} approval_code: #{@approval_code.inspect}, transaction_id:"\
  " #{@transaction_id.inspect}, forwarded_acquirer_code: #{@forwarded_acquirer_code.inspect},"\
  " merchant_number: #{@merchant_number.inspect}, response_code: #{@response_code.inspect},"\
  " ach_verification: #{@ach_verification.inspect}, network_transaction_id:"\
  " #{@network_transaction_id.inspect}, settlement_date: #{@settlement_date.inspect},"\
  " update_time_utc: #{@update_time_utc.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



242
243
244
245
246
247
248
249
250
# File 'lib/visa_acceptance_merged_spec/models/processor_information7.rb', line 242

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} approval_code: #{@approval_code}, transaction_id: #{@transaction_id},"\
  " forwarded_acquirer_code: #{@forwarded_acquirer_code}, merchant_number:"\
  " #{@merchant_number}, response_code: #{@response_code}, ach_verification:"\
  " #{@ach_verification}, network_transaction_id: #{@network_transaction_id}, settlement_date:"\
  " #{@settlement_date}, update_time_utc: #{@update_time_utc}, additional_properties:"\
  " #{@additional_properties}>"
end