Class: VisaAcceptanceMergedSpec::BillTo6

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

Overview

BillTo6 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(first_name: SKIP, last_name: SKIP, name_suffix: SKIP, address1: SKIP, address2: SKIP, locality: SKIP, administrative_area: SKIP, postal_code: SKIP, country: SKIP, email: SKIP, verification_status: SKIP, additional_properties: nil) ⇒ BillTo6

Returns a new instance of BillTo6.



425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 425

def initialize(first_name: SKIP, last_name: SKIP, name_suffix: SKIP,
               address1: SKIP, address2: SKIP, locality: SKIP,
               administrative_area: SKIP, postal_code: SKIP, country: SKIP,
               email: SKIP, verification_status: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @first_name = first_name unless first_name == SKIP
  @last_name = last_name unless last_name == SKIP
  @name_suffix = name_suffix unless name_suffix == SKIP
  @address1 = address1 unless address1 == SKIP
  @address2 = address2 unless address2 == SKIP
  @locality = locality unless locality == SKIP
  @administrative_area = administrative_area unless administrative_area == SKIP
  @postal_code = postal_code unless postal_code == SKIP
  @country = country unless country == SKIP
  @email = email unless email == SKIP
  @verification_status = verification_status unless verification_status == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#address1String

Payment card billing street address as it appears on the credit card issuer’s records.

SEPA

Required for Create Mandate and Import Mandate

Atos

This field must not contain colons (:).

Visa Acceptance through VisaNet

Important When you populate orderInformation.billTo.address1 and orderInformation.billTo.address2, Visa Acceptance through VisaNet concatenates the two values. If the concatenated value exceeds 40 characters, Visa Acceptance through VisaNet truncates the value at 40 characters before sending it to Visa and the issuing bank. Truncating this value affects AVS results and therefore might also affect risk decisions and chargebacks. Credit card networks cannot process transactions that contain non-ASCII characters. Visa Acceptance through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent Visa Acceptance through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

FDMS Nashville

When the street name is numeric, it must be sent in numeric format. For example, if the address is One First Street, it must be sent as 1 1st Street. Required if keyed; not used if swiped. String (20)

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

All other processors:

Optional. String (60)

For Payouts

This field may be sent only for FDC Compass. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

Returns:

  • (String)


157
158
159
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 157

def address1
  @address1
end

#address2String

Used for additional address information. For example: Attention: Accounts Payable Optional field. For Payouts: This field may be sent only for FDC Compass.

Atos

This field must not contain colons (:).

Visa Acceptance through VisaNet

Important When you populate orderInformation.billTo.address1 and orderInformation.billTo.address2, Visa Acceptance through VisaNet concatenates the two values. If the concatenated value exceeds 40 characters, Visa Acceptance through VisaNet truncates the value at 40 characters before sending it to Visa and the issuing bank. Truncating this value affects AVS results and therefore might also affect risk decisions and chargebacks. Credit card networks cannot process transactions that contain non-ASCII characters. Visa Acceptance through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent Visa Acceptance through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

Chase Paymentech Solutions, FDC Compass, and TSYS Acquiring Solutions

This value is used for AVS.

FDMS Nashville

orderInformation.billTo.address1 and orderInformation.billTo.address2 together cannot exceed 20 characters. String (20)

All Other Processors

String (60)

Returns:

  • (String)


192
193
194
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 192

def address2
  @address2
end

#administrative_areaString

State or province of the billing address. Use the [State, Province, and Territory Codes for the United States and Canada]( For Payouts: This field may be sent only for FDC Compass.

Visa Acceptance through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. Visa Acceptance through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent Visa Acceptance through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

OmniPay Direct

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


259
260
261
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 259

def administrative_area
  @administrative_area
end

#countryString

Payment card billing country. Use the two-character [ISO Standard Country Codes](

SEPA/BACS

Required for Create Mandate and Import Mandate

Visa Acceptance through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. Visa Acceptance through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent Visa Acceptance through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

OmniPay Direct

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


342
343
344
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 342

def country
  @country
end

#emailString

Customer's email address, including the full domain name.

Visa Acceptance through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. Visa Acceptance through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent Visa Acceptance through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

Invoicing

Email address for the customer for sending the invoice. If the invoice is in SENT status and email is updated, the old email customer payment link won't work and you must resend the invoice with the new payment link.

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

OmniPay Direct

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


376
377
378
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 376

def email
  @email
end

#first_nameString

Customer’s first name. This name must be the same as the name on the card. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

SEPA

Required for Create Mandate and Import Mandate

BACS

Required for Import Mandate

Visa Acceptance Latin American Processing

Important For an authorization request, Visa Acceptance Latin American Processing concatenates orderInformation.billTo.firstName and orderInformation.billTo.lastName. If the concatenated value exceeds 30 characters, Visa Acceptance Latin American Processing declines the authorization request.
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 field description 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.

Visa Acceptance through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. Visa Acceptance through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent Visa Acceptance through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

For Payouts:

This field may be sent only for FDC Compass.

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

OmniPay Direct

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


59
60
61
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 59

def first_name
  @first_name
end

#last_nameString

Customer’s last name. This name must be the same as the name on the card. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

SEPA

Required for Create Mandate and Import Mandate

BACS

Required for Import Mandate

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

Visa Acceptance Latin American Processing

Important For an authorization request, Visa Acceptance Latin American Processing concatenates orderInformation.billTo.firstName and orderInformation.billTo.lastName. If the concatenated value exceeds 30 characters, Visa Acceptance Latin American Processing declines the authorization request.
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 field description 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.

Visa Acceptance through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. Visa Acceptance through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent Visa Acceptance through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

For Payouts:

This field may be sent only for FDC Compass.

OmniPay Direct

Optional field.

RBS WorldPay Atlanta

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


110
111
112
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 110

def last_name
  @last_name
end

#localityString

Payment card billing city.

SEPA

Required for Create Mandate and Import Mandate

Atos

This field must not contain colons (:).

Visa Acceptance through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. Visa Acceptance through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent Visa Acceptance through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

For Payouts:

This field may be sent only for FDC Compass.

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

OmniPay Direct

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


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

def locality
  @locality
end

#name_suffixString

Customer’s name suffix.

Returns:

  • (String)


114
115
116
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 114

def name_suffix
  @name_suffix
end

#postal_codeString

Postal code for the billing address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example 12345-6789 When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] Example A1B 2C3 Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

SEPA

Required for Create Mandate and Import Mandate

For Payouts:

This field may be sent only for FDC Compass.

American Express Direct

Before sending the postal code to the processor, Visa Acceptance removes all nonalphanumeric characters and, if the remaining value is longer than nine characters, truncates the value starting from the right side.

Atos

This field must not contain colons (:).

Visa Acceptance through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. Visa Acceptance through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent Visa Acceptance through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

FDMS Nashville

Required if pointOfSaleInformation.entryMode=keyed and the address is in the U.S. or Canada. Optional if pointOfSaleInformation.entryMode=keyed and the address is not in the U.S. or Canada. Not used if swiped.

RBS WorldPay Atlanta:

For best card-present keyed rates, send the postal code if pointOfSaleInformation.entryMode=keyed.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

All other processors:

Optional field.

Returns:

  • (String)


308
309
310
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 308

def postal_code
  @postal_code
end

#verification_statusString

Whether buyer has verified their identity. Used in case of PayPal transactions. Possible Values:

  • VERIFIED
  • UNVERIFIED

Returns:

  • (String)


384
385
386
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 384

def verification_status
  @verification_status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 448

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  first_name = hash.key?('firstName') ? hash['firstName'] : SKIP
  last_name = hash.key?('lastName') ? hash['lastName'] : SKIP
  name_suffix = hash.key?('nameSuffix') ? hash['nameSuffix'] : SKIP
  address1 = hash.key?('address1') ? hash['address1'] : SKIP
  address2 = hash.key?('address2') ? hash['address2'] : SKIP
  locality = hash.key?('locality') ? hash['locality'] : SKIP
  administrative_area =
    hash.key?('administrativeArea') ? hash['administrativeArea'] : SKIP
  postal_code = hash.key?('postalCode') ? hash['postalCode'] : SKIP
  country = hash.key?('country') ? hash['country'] : SKIP
  email = hash.key?('email') ? hash['email'] : SKIP
  verification_status =
    hash.key?('verificationStatus') ? hash['verificationStatus'] : 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.
  BillTo6.new(first_name: first_name,
              last_name: last_name,
              name_suffix: name_suffix,
              address1: address1,
              address2: address2,
              locality: locality,
              administrative_area: administrative_area,
              postal_code: postal_code,
              country: country,
              email: email,
              verification_status: verification_status,
              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 387

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['first_name'] = 'firstName'
  @_hash['last_name'] = 'lastName'
  @_hash['name_suffix'] = 'nameSuffix'
  @_hash['address1'] = 'address1'
  @_hash['address2'] = 'address2'
  @_hash['locality'] = 'locality'
  @_hash['administrative_area'] = 'administrativeArea'
  @_hash['postal_code'] = 'postalCode'
  @_hash['country'] = 'country'
  @_hash['email'] = 'email'
  @_hash['verification_status'] = 'verificationStatus'
  @_hash
end

.nullablesObject

An array for nullable fields



421
422
423
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 421

def self.nullables
  []
end

.optionalsObject

An array for optional fields



404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 404

def self.optionals
  %w[
    first_name
    last_name
    name_suffix
    address1
    address2
    locality
    administrative_area
    postal_code
    country
    email
    verification_status
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



499
500
501
502
503
504
505
506
507
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 499

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\
  " name_suffix: #{@name_suffix.inspect}, address1: #{@address1.inspect}, address2:"\
  " #{@address2.inspect}, locality: #{@locality.inspect}, administrative_area:"\
  " #{@administrative_area.inspect}, postal_code: #{@postal_code.inspect}, country:"\
  " #{@country.inspect}, email: #{@email.inspect}, verification_status:"\
  " #{@verification_status.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



489
490
491
492
493
494
495
496
# File 'lib/visa_acceptance_merged_spec/models/bill_to6.rb', line 489

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} first_name: #{@first_name}, last_name: #{@last_name}, name_suffix:"\
  " #{@name_suffix}, address1: #{@address1}, address2: #{@address2}, locality: #{@locality},"\
  " administrative_area: #{@administrative_area}, postal_code: #{@postal_code}, country:"\
  " #{@country}, email: #{@email}, verification_status: #{@verification_status},"\
  " additional_properties: #{@additional_properties}>"
end