Class: VisaAcceptanceMergedSpec::BankTransferOptions

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

Overview

BankTransferOptions 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(decline_avs_flags: SKIP, sec_code: SKIP, terminal_city: SKIP, terminal_state: SKIP, effective_date: SKIP, partial_payment_id: SKIP, customer_memo: SKIP, payment_category_code: SKIP, settlement_method: SKIP, fraud_screening_level: SKIP, customer_present: SKIP, additional_properties: nil) ⇒ BankTransferOptions

Returns a new instance of BankTransferOptions.



267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 267

def initialize(decline_avs_flags: SKIP, sec_code: SKIP, terminal_city: SKIP,
               terminal_state: SKIP, effective_date: SKIP,
               partial_payment_id: SKIP, customer_memo: SKIP,
               payment_category_code: SKIP, settlement_method: SKIP,
               fraud_screening_level: SKIP, customer_present: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @decline_avs_flags = decline_avs_flags unless decline_avs_flags == SKIP
  @sec_code = sec_code unless sec_code == SKIP
  @terminal_city = terminal_city unless terminal_city == SKIP
  @terminal_state = terminal_state unless terminal_state == SKIP
  @effective_date = effective_date unless effective_date == SKIP
  @partial_payment_id = partial_payment_id unless partial_payment_id == SKIP
  @customer_memo = customer_memo unless customer_memo == SKIP
  @payment_category_code = payment_category_code unless payment_category_code == SKIP
  @settlement_method = settlement_method unless settlement_method == SKIP
  @fraud_screening_level = fraud_screening_level unless fraud_screening_level == SKIP
  @customer_present = customer_present unless customer_present == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#customer_memoString

Payment related information. This information is included on the customer’s statement.

Returns:

  • (String)


180
181
182
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 180

def customer_memo
  @customer_memo
end

#customer_presentString

Indicates whether a customer is physically present and whether the customer is enrolling in Visa Acceptance Recurring Billing. Possible values:

  • 1: Customer is present and not enrolling.
  • 2: Customer is not present and not enrolling.
  • 3: Customer is present and enrolling.
  • 4: Customer is not present and enrolling.

Returns:

  • (String)


226
227
228
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 226

def customer_present
  @customer_present
end

#decline_avs_flagsString

Space-separated list of AVS flags that cause the request to be declined for AVS reasons. Important To receive declines for the AVS code N, you must include the value N in the space-separated list.

AVS Codes for Cielo 3.0 and Visa Acceptance Latin American Processing

Note Visa Acceptance Latin American Processing is the name of a specific processing connection that Visa Acceptance supports. In the Visa Acceptance API documentation, Visa Acceptance Latin American Processing does not refer to the general topic of processing in Latin America. The information in this section is for the specific processing connection called Visa Acceptance Latin American Processing. It is not for any other Latin American processors that Visa Acceptance supports.

AVS Code Description
D Partial match: postal code and address match.
E Not supported: AVS is not supported for this card type. or Invalid:
the acquirer returned an unrecognized value for the AVS response.
F Partial match: postal code matches, but CPF and address do not match.*
G Not supported: AVS not supported or not verified.
I No match: AVS information is not available.
K Partial match: CPF matches, but postal code and address do not match.*
L Partial match: postal code and CPF match, but address does not match.*
N No match: postal code, CPF, and address do not match.*
O Partial match: CPF and address match, but postal code does not match.*
R Not supported: your implementation does not support AVS or System
unavailable.
T Partial match: address matches, but postal code and CPF do not match.*
V Match: postal code, CPF, and address match.*
* CPF (Cadastro de Pessoas Fisicas) is required only for Redecard in
Brazil.

AVS Codes for All Other Processors

Note The list of AVS codes for all other processors follows these descriptions of the processor-specific information for these codes.

American Express Cards

For American Express cards only, you can receive Visa and Visa Acceptance AVS codes in addition to the American Express AVS codes. Note For Visa Acceptance through VisaNet, the American Express AVS codes are converted to Visa AVS codes before they are returned to you. As a result, you will not receive American Express AVS codes for the American Express card type. American Express Card codes: F, H, K, L, O, T, V

Domestic and International Visa Cards

The international and domestic alphabetic AVS codes are the Visa standard AVS codes. Visa Acceptance maps the standard AVS return codes for other types of payment cards, including American Express cards, to the Visa standard AVS codes. AVS is considered either domestic or international, depending on the location of the bank that issued the customer’s payment card:

  • When the bank is in the U.S., the AVS is domestic.
  • When the bank is outside the U.S., the AVS is international. You should be prepared to handle both domestic and international AVS result codes:
  • For international cards, you can receive domestic AVS codes in addition to the international AVS codes.
  • For domestic cards, you can receive international AVS codes in addition to the domestic AVS codes. International Visa Codes: B, C, D, G, I, M, P Domestic Visa Codes: A, E,N, R, S, U, W, X, Y, Z

Visa Acceptance Codes

The numeric AVS codes are created by Visa Acceptance and are not standard Visa codes. These AVS codes can be returned for any card type. Visa Acceptance Codes: 1, 2, 3, 4

Table of AVS Codes for All Other Processors

AVS Code Description
A Partial match: street address matches, but 5-digit and 9-digit postal
codes do not match.
B Partial match: street address matches, but postal code is not verified.
Returned only for Visa cards not issued in the U.S.
C No match: street address and postal code do not match. Returned only
for Visa cards not issued in the U.S.
D & M Match: street address and postal code match. Returned only for Visa
cards not issued in the U.S.
E Invalid: AVS data is invalid or AVS is not allowed for this card type.
F Partial match: card member’s name does not match, but billing postal
code matches.
G Not supported: issuing bank outside the U.S. does not support AVS.
H Partial match: card member’s name does not match, but street address
and postal code match. Returned only for the American Express card type.
I No match: address not verified. Returned only for Visa cards not issued
in the U.S.
K Partial match: card member’s name matches, but billing address and

billing postal code do not match. Returned only for the American Express card type.| |L|Partial match: card member’s name and billing postal code match, but billing address does not match. Returned only for the American Express card type.| |M|See the entry for D & M.| |N|No match: one of the following: street address and postal code do not match or (American Express card type only) card member’s name, street address, and postal code do not match.| |O|Partial match: card member’s name and billing address match, but billing postal code does not match. Returned only for the American Express card type.| |P|Partial match: postal code matches, but street address not verified. Returned only for Visa cards not issued in the U.S.| |R|System unavailable.| |S|Not supported: issuing bank in the U.S. does not support AVS.| |T|Partial match: card member’s name does not match, but street address matches. Returned only for the American Express card type.| |U|System unavailable: address information unavailable for one of these reasons: The U.S. bank does not support AVS outside the U.S. or The AVS in a U.S. bank is not functioning properly.| |V|Match: card member’s name, billing address, and billing postal code match. Returned only for the American Express card type.| |W|Partial match: street address does not match, but 9-digit postal code matches.| |X|Match: street address and 9-digit postal code match.| |Y|Match: street address and 5-digit postal code match.| |Z|Partial match: street address does not match, but 5-digit postal code matches.| |1|Not supported: one of the following: AVS is not supported for this processor or card type or AVS is disabled for your Visa Acceptance account. To enable AVS, contact Visa Acceptance Customer Support.| |2|Unrecognized: the processor returned an unrecognized value for the AVS response.| |3|Match: address is confirmed. Returned only for PayPal Express Checkout.| |4|No match: address is not confirmed. Returned only for PayPal Express Checkout.| |5|No match: no AVS code was returned by the processor.|

Returns:

  • (String)


134
135
136
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 134

def decline_avs_flags
  @decline_avs_flags
end

#effective_dateString

Effective date for the transaction. The effective date must be within 45 days of the current day. If you do not include this value, Visa Acceptance sets the effective date to the next business day. Format: MMDDYYYY Supported only for the Visa Acceptance ACH Service.

Returns:

  • (String)


169
170
171
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 169

def effective_date
  @effective_date
end

#fraud_screening_levelString

Level of fraud screening. Possible values:

  • 1: Validation — default if the field has not already been configured for your merchant ID
  • 2: Verification

Returns:

  • (String)


216
217
218
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 216

def fraud_screening_level
  @fraud_screening_level
end

#partial_payment_idString

Identifier for a partial payment or partial credit. The value for each debit request or credit request must be unique within the scope of the order.

Returns:

  • (String)


175
176
177
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 175

def partial_payment_id
  @partial_payment_id
end

#payment_category_codeString

Flag that indicates whether to process the payment. Use with deferred payments. Possible values:

  • 0: Standard debit with immediate payment (default).
  • 1: For deferred payments, indicates that this is a deferred payment and that you will send a debit request with paymentCategoryCode = 2 in the future.
  • 2: For deferred payments, indicates notification to initiate payment.

Chase Paymentech Solutions and TeleCheck

Use for deferred and partial payments.

Visa Acceptance ACH Service

Not used.

RBS WorldPay Atlanta

Not used.

Returns:

  • (String)


197
198
199
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 197

def payment_category_code
  @payment_category_code
end

#sec_codeString

Specifies the authorization method for the transaction.

TeleCheck

Accepts only the following values:

  • ARC: account receivable conversion
  • CCD: corporate cash disbursement
  • POP: point of purchase conversion
  • PPD: prearranged payment and deposit entry
  • TEL: telephone-initiated entry
  • WEB: internet-initiated entry

Returns:

  • (String)


146
147
148
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 146

def sec_code
  @sec_code
end

#settlement_methodString

Method used for settlement. Possible values:

  • A: Automated Clearing House (default for credits and for transactions using Canadian dollars)
  • F: Facsimile draft (U.S. dollars only)
  • B: Best possible (U.S. dollars only) (default if the field has not already been configured for your merchant ID)

Returns:

  • (String)


208
209
210
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 208

def settlement_method
  @settlement_method
end

#terminal_cityString

City in which the terminal is located. If more than four alphanumeric characters are submitted, the transaction will be declined. You cannot include any special characters.

Returns:

  • (String)


153
154
155
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 153

def terminal_city
  @terminal_city
end

#terminal_stateString

State in which the terminal is located. If more than two alphanumeric characters are submitted, the transaction will be declined. You cannot include any special characters.

Returns:

  • (String)


160
161
162
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 160

def terminal_state
  @terminal_state
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 291

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  decline_avs_flags =
    hash.key?('declineAvsFlags') ? hash['declineAvsFlags'] : SKIP
  sec_code = hash.key?('secCode') ? hash['secCode'] : SKIP
  terminal_city = hash.key?('terminalCity') ? hash['terminalCity'] : SKIP
  terminal_state = hash.key?('terminalState') ? hash['terminalState'] : SKIP
  effective_date = hash.key?('effectiveDate') ? hash['effectiveDate'] : SKIP
  partial_payment_id =
    hash.key?('partialPaymentId') ? hash['partialPaymentId'] : SKIP
  customer_memo = hash.key?('customerMemo') ? hash['customerMemo'] : SKIP
  payment_category_code =
    hash.key?('paymentCategoryCode') ? hash['paymentCategoryCode'] : SKIP
  settlement_method =
    hash.key?('settlementMethod') ? hash['settlementMethod'] : SKIP
  fraud_screening_level =
    hash.key?('fraudScreeningLevel') ? hash['fraudScreeningLevel'] : SKIP
  customer_present =
    hash.key?('customerPresent') ? hash['customerPresent'] : 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.
  BankTransferOptions.new(decline_avs_flags: decline_avs_flags,
                          sec_code: sec_code,
                          terminal_city: terminal_city,
                          terminal_state: terminal_state,
                          effective_date: effective_date,
                          partial_payment_id: partial_payment_id,
                          customer_memo: customer_memo,
                          payment_category_code: payment_category_code,
                          settlement_method: settlement_method,
                          fraud_screening_level: fraud_screening_level,
                          customer_present: customer_present,
                          additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 229

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['decline_avs_flags'] = 'declineAvsFlags'
  @_hash['sec_code'] = 'secCode'
  @_hash['terminal_city'] = 'terminalCity'
  @_hash['terminal_state'] = 'terminalState'
  @_hash['effective_date'] = 'effectiveDate'
  @_hash['partial_payment_id'] = 'partialPaymentId'
  @_hash['customer_memo'] = 'customerMemo'
  @_hash['payment_category_code'] = 'paymentCategoryCode'
  @_hash['settlement_method'] = 'settlementMethod'
  @_hash['fraud_screening_level'] = 'fraudScreeningLevel'
  @_hash['customer_present'] = 'customerPresent'
  @_hash
end

.nullablesObject

An array for nullable fields



263
264
265
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 263

def self.nullables
  []
end

.optionalsObject

An array for optional fields



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 246

def self.optionals
  %w[
    decline_avs_flags
    sec_code
    terminal_city
    terminal_state
    effective_date
    partial_payment_id
    customer_memo
    payment_category_code
    settlement_method
    fraud_screening_level
    customer_present
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



347
348
349
350
351
352
353
354
355
356
357
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 347

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} decline_avs_flags: #{@decline_avs_flags.inspect}, sec_code:"\
  " #{@sec_code.inspect}, terminal_city: #{@terminal_city.inspect}, terminal_state:"\
  " #{@terminal_state.inspect}, effective_date: #{@effective_date.inspect},"\
  " partial_payment_id: #{@partial_payment_id.inspect}, customer_memo:"\
  " #{@customer_memo.inspect}, payment_category_code: #{@payment_category_code.inspect},"\
  " settlement_method: #{@settlement_method.inspect}, fraud_screening_level:"\
  " #{@fraud_screening_level.inspect}, customer_present: #{@customer_present.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



336
337
338
339
340
341
342
343
344
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options.rb', line 336

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} decline_avs_flags: #{@decline_avs_flags}, sec_code: #{@sec_code},"\
  " terminal_city: #{@terminal_city}, terminal_state: #{@terminal_state}, effective_date:"\
  " #{@effective_date}, partial_payment_id: #{@partial_payment_id}, customer_memo:"\
  " #{@customer_memo}, payment_category_code: #{@payment_category_code}, settlement_method:"\
  " #{@settlement_method}, fraud_screening_level: #{@fraud_screening_level}, customer_present:"\
  " #{@customer_present}, additional_properties: #{@additional_properties}>"
end