Class: VisaAcceptanceMergedSpec::BillTo
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::BillTo
- Defined in:
- lib/visa_acceptance_merged_spec/models/bill_to.rb
Overview
BillTo Model.
Instance Attribute Summary collapse
-
#address1 ⇒ String
Payment card billing street address as it appears on the credit card issuer’s records.
-
#address2 ⇒ String
Used for additional address information.
-
#address3 ⇒ String
Additional address information (third line of the billing address).
-
#address4 ⇒ String
Additional address information (fourth line of the billing address).
-
#administrative_area ⇒ String
State or province of the billing address.
-
#alternate_email ⇒ String
Visa Platform Connect contains customer’s alternate email address.
-
#alternate_phone_number ⇒ String
Visa Platform Connect contains customer’s alternate phone number.
-
#building_number ⇒ String
Building number in the street address.
-
#company ⇒ Company
Title.
-
#country ⇒ String
Payment card billing country.
-
#county ⇒ String
U.S.
-
#district ⇒ String
Customer’s neighborhood, community, or region (a barrio in Brazil) within the city or municipality.
-
#email ⇒ String
Customer's email address, including the full domain name.
-
#email_domain ⇒ String
Email domain of the customer.
-
#first_name ⇒ String
Customer’s first name.
-
#last_name ⇒ String
Customer’s last name.
-
#locality ⇒ String
Payment card billing city.
-
#middle_name ⇒ String
Customer’s middle name.
-
#name_suffix ⇒ String
Customer’s name suffix.
-
#phone_number ⇒ String
Customer’s phone number.
-
#phone_type ⇒ String
Customer's phone number type.
-
#postal_code ⇒ String
Postal code for the billing address.
-
#title ⇒ String
Title.
-
#verification_status ⇒ String
Whether buyer has verified their identity.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(first_name: SKIP, last_name: SKIP, middle_name: SKIP, name_suffix: SKIP, title: SKIP, company: SKIP, address1: SKIP, address2: SKIP, address3: SKIP, address4: SKIP, locality: SKIP, administrative_area: SKIP, postal_code: SKIP, county: SKIP, country: SKIP, district: SKIP, building_number: SKIP, email: SKIP, email_domain: SKIP, phone_number: SKIP, phone_type: SKIP, verification_status: SKIP, alternate_phone_number: SKIP, alternate_email: SKIP, additional_properties: nil) ⇒ BillTo
constructor
A new instance of BillTo.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
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, middle_name: SKIP, name_suffix: SKIP, title: SKIP, company: SKIP, address1: SKIP, address2: SKIP, address3: SKIP, address4: SKIP, locality: SKIP, administrative_area: SKIP, postal_code: SKIP, county: SKIP, country: SKIP, district: SKIP, building_number: SKIP, email: SKIP, email_domain: SKIP, phone_number: SKIP, phone_type: SKIP, verification_status: SKIP, alternate_phone_number: SKIP, alternate_email: SKIP, additional_properties: nil) ⇒ BillTo
Returns a new instance of BillTo.
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 551 def initialize(first_name: SKIP, last_name: SKIP, middle_name: SKIP, name_suffix: SKIP, title: SKIP, company: SKIP, address1: SKIP, address2: SKIP, address3: SKIP, address4: SKIP, locality: SKIP, administrative_area: SKIP, postal_code: SKIP, county: SKIP, country: SKIP, district: SKIP, building_number: SKIP, email: SKIP, email_domain: SKIP, phone_number: SKIP, phone_type: SKIP, verification_status: SKIP, alternate_phone_number: SKIP, alternate_email: 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 @middle_name = middle_name unless middle_name == SKIP @name_suffix = name_suffix unless name_suffix == SKIP @title = title unless title == SKIP @company = company unless company == SKIP @address1 = address1 unless address1 == SKIP @address2 = address2 unless address2 == SKIP @address3 = address3 unless address3 == SKIP @address4 = address4 unless address4 == SKIP @locality = locality unless locality == SKIP @administrative_area = administrative_area unless administrative_area == SKIP @postal_code = postal_code unless postal_code == SKIP @county = county unless county == SKIP @country = country unless country == SKIP @district = district unless district == SKIP @building_number = building_number unless building_number == SKIP @email = email unless email == SKIP @email_domain = email_domain unless email_domain == SKIP @phone_number = phone_number unless phone_number == SKIP @phone_type = phone_type unless phone_type == SKIP @verification_status = verification_status unless verification_status == SKIP @alternate_phone_number = alternate_phone_number unless alternate_phone_number == SKIP @alternate_email = alternate_email unless alternate_email == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#address1 ⇒ String
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.
169 170 171 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 169 def address1 @address1 end |
#address2 ⇒ String
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)
204 205 206 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 204 def address2 @address2 end |
#address3 ⇒ String
Additional address information (third line of the billing address)
208 209 210 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 208 def address3 @address3 end |
#address4 ⇒ String
Additional address information (fourth line of the billing address)
212 213 214 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 212 def address4 @address4 end |
#administrative_area ⇒ String
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.
279 280 281 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 279 def administrative_area @administrative_area end |
#alternate_email ⇒ String
Visa Platform Connect
contains customer’s alternate email address.
484 485 486 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 484 def alternate_email @alternate_email end |
#alternate_phone_number ⇒ String
Visa Platform Connect
contains customer’s alternate phone number.
479 480 481 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 479 def alternate_phone_number @alternate_phone_number end |
#building_number ⇒ String
Building number in the street address. For example, if the street address is: Rua da Quitanda 187 then the building number is 187. This field is supported only for:
- Cielo transactions.
- Redecard customer validation with Visa Acceptance Latin American Processing.
383 384 385 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 383 def building_number @building_number end |
#company ⇒ Company
Title.
126 127 128 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 126 def company @company end |
#country ⇒ String
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.
366 367 368 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 366 def country @country end |
#county ⇒ String
U.S. county if available.
332 333 334 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 332 def county @county end |
#district ⇒ String
Customer’s neighborhood, community, or region (a barrio in Brazil) within the city or municipality. This field is available only on Cielo.
372 373 374 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 372 def district @district end |
#email ⇒ String
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.
417 418 419 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 417 def email @email end |
#email_domain ⇒ String
Email domain of the customer. The domain of the email address comprises all characters that follow the @ symbol, such as mail.example.com. For the Risk Update service, if the email address and the domain are sent in the request, the domain supersedes the email address.
424 425 426 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 424 def email_domain @email_domain end |
#first_name ⇒ String
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.
59 60 61 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 59 def first_name @first_name end |
#last_name ⇒ String
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.
110 111 112 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 110 def last_name @last_name end |
#locality ⇒ String
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.
246 247 248 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 246 def locality @locality end |
#middle_name ⇒ String
Customer’s middle name.
114 115 116 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 114 def middle_name @middle_name end |
#name_suffix ⇒ String
Customer’s name suffix.
118 119 120 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 118 def name_suffix @name_suffix end |
#phone_number ⇒ String
Customer’s phone number. It is recommended that you include the country code when the order is from outside the U.S.
Chase Paymentech Solutions
Optional field.
Credit Mutuel-CIC
Optional field.
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.
SIX
Optional field.
TSYS Acquiring Solutions
Optional field.
Worldpay VAP
Optional field.
All other processors
Not used.
455 456 457 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 455 def phone_number @phone_number end |
#phone_type ⇒ String
Customer's phone number type.
For Payouts:
This field may be sent only for FDC Compass. Possible Values:
- day
- home
- night
- work
466 467 468 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 466 def phone_type @phone_type end |
#postal_code ⇒ String
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.
328 329 330 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 328 def postal_code @postal_code end |
#title ⇒ String
Title.
122 123 124 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 122 def title @title end |
#verification_status ⇒ String
Whether buyer has verified their identity. Used in case of PayPal transactions. Possible Values:
- VERIFIED
- UNVERIFIED
474 475 476 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 474 def verification_status @verification_status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 591 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 middle_name = hash.key?('middleName') ? hash['middleName'] : SKIP name_suffix = hash.key?('nameSuffix') ? hash['nameSuffix'] : SKIP title = hash.key?('title') ? hash['title'] : SKIP company = Company.from_hash(hash['company']) if hash['company'] address1 = hash.key?('address1') ? hash['address1'] : SKIP address2 = hash.key?('address2') ? hash['address2'] : SKIP address3 = hash.key?('address3') ? hash['address3'] : SKIP address4 = hash.key?('address4') ? hash['address4'] : SKIP locality = hash.key?('locality') ? hash['locality'] : SKIP administrative_area = hash.key?('administrativeArea') ? hash['administrativeArea'] : SKIP postal_code = hash.key?('postalCode') ? hash['postalCode'] : SKIP county = hash.key?('county') ? hash['county'] : SKIP country = hash.key?('country') ? hash['country'] : SKIP district = hash.key?('district') ? hash['district'] : SKIP building_number = hash.key?('buildingNumber') ? hash['buildingNumber'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP email_domain = hash.key?('emailDomain') ? hash['emailDomain'] : SKIP phone_number = hash.key?('phoneNumber') ? hash['phoneNumber'] : SKIP phone_type = hash.key?('phoneType') ? hash['phoneType'] : SKIP verification_status = hash.key?('verificationStatus') ? hash['verificationStatus'] : SKIP alternate_phone_number = hash.key?('alternatePhoneNumber') ? hash['alternatePhoneNumber'] : SKIP alternate_email = hash.key?('alternateEmail') ? hash['alternateEmail'] : 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. BillTo.new(first_name: first_name, last_name: last_name, middle_name: middle_name, name_suffix: name_suffix, title: title, company: company, address1: address1, address2: address2, address3: address3, address4: address4, locality: locality, administrative_area: administrative_area, postal_code: postal_code, county: county, country: country, district: district, building_number: building_number, email: email, email_domain: email_domain, phone_number: phone_number, phone_type: phone_type, verification_status: verification_status, alternate_phone_number: alternate_phone_number, alternate_email: alternate_email, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 487 def self.names @_hash = {} if @_hash.nil? @_hash['first_name'] = 'firstName' @_hash['last_name'] = 'lastName' @_hash['middle_name'] = 'middleName' @_hash['name_suffix'] = 'nameSuffix' @_hash['title'] = 'title' @_hash['company'] = 'company' @_hash['address1'] = 'address1' @_hash['address2'] = 'address2' @_hash['address3'] = 'address3' @_hash['address4'] = 'address4' @_hash['locality'] = 'locality' @_hash['administrative_area'] = 'administrativeArea' @_hash['postal_code'] = 'postalCode' @_hash['county'] = 'county' @_hash['country'] = 'country' @_hash['district'] = 'district' @_hash['building_number'] = 'buildingNumber' @_hash['email'] = 'email' @_hash['email_domain'] = 'emailDomain' @_hash['phone_number'] = 'phoneNumber' @_hash['phone_type'] = 'phoneType' @_hash['verification_status'] = 'verificationStatus' @_hash['alternate_phone_number'] = 'alternatePhoneNumber' @_hash['alternate_email'] = 'alternateEmail' @_hash end |
.nullables ⇒ Object
An array for nullable fields
547 548 549 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 547 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 517 def self.optionals %w[ first_name last_name middle_name name_suffix title company address1 address2 address3 address4 locality administrative_area postal_code county country district building_number email email_domain phone_number phone_type verification_status alternate_phone_number alternate_email ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 676 def inspect class_name = self.class.name.split('::').last "<#{class_name} first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\ " middle_name: #{@middle_name.inspect}, name_suffix: #{@name_suffix.inspect}, title:"\ " #{@title.inspect}, company: #{@company.inspect}, address1: #{@address1.inspect}, address2:"\ " #{@address2.inspect}, address3: #{@address3.inspect}, address4: #{@address4.inspect},"\ " locality: #{@locality.inspect}, administrative_area: #{@administrative_area.inspect},"\ " postal_code: #{@postal_code.inspect}, county: #{@county.inspect}, country:"\ " #{@country.inspect}, district: #{@district.inspect}, building_number:"\ " #{@building_number.inspect}, email: #{@email.inspect}, email_domain:"\ " #{@email_domain.inspect}, phone_number: #{@phone_number.inspect}, phone_type:"\ " #{@phone_type.inspect}, verification_status: #{@verification_status.inspect},"\ " alternate_phone_number: #{@alternate_phone_number.inspect}, alternate_email:"\ " #{@alternate_email.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
661 662 663 664 665 666 667 668 669 670 671 672 673 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to.rb', line 661 def to_s class_name = self.class.name.split('::').last "<#{class_name} first_name: #{@first_name}, last_name: #{@last_name}, middle_name:"\ " #{@middle_name}, name_suffix: #{@name_suffix}, title: #{@title}, company: #{@company},"\ " address1: #{@address1}, address2: #{@address2}, address3: #{@address3}, address4:"\ " #{@address4}, locality: #{@locality}, administrative_area: #{@administrative_area},"\ " postal_code: #{@postal_code}, county: #{@county}, country: #{@country}, district:"\ " #{@district}, building_number: #{@building_number}, email: #{@email}, email_domain:"\ " #{@email_domain}, phone_number: #{@phone_number}, phone_type: #{@phone_type},"\ " verification_status: #{@verification_status}, alternate_phone_number:"\ " #{@alternate_phone_number}, alternate_email: #{@alternate_email}, additional_properties:"\ " #{@additional_properties}>" end |