Class: VisaAcceptanceMergedSpec::BillTo11
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::BillTo11
- Defined in:
- lib/visa_acceptance_merged_spec/models/bill_to11.rb
Overview
BillTo11 Model.
Instance Attribute Summary collapse
-
#address1 ⇒ String
First line of the billing street address.
-
#address2 ⇒ String
Second line of the billing street address.
-
#administrative_area ⇒ String
State or province of the billing address.
-
#country ⇒ String
Country of the billing address.
-
#email ⇒ String
Customer's email address.
-
#first_name ⇒ String
Customer’s first name.
-
#last_name ⇒ String
Customer’s last name.
-
#locality ⇒ String
City of the billing address.
-
#middle_name ⇒ String
Customer’s middle name.
-
#name_suffix ⇒ String
Customer’s name suffix.
-
#phone_number ⇒ String
Customer’s phone number.
-
#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(title: SKIP, first_name: SKIP, middle_name: SKIP, last_name: SKIP, name_suffix: SKIP, address1: SKIP, address2: SKIP, locality: SKIP, postal_code: SKIP, administrative_area: SKIP, country: SKIP, email: SKIP, phone_number: SKIP, verification_status: SKIP, additional_properties: nil) ⇒ BillTo11
constructor
A new instance of BillTo11.
-
#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(title: SKIP, first_name: SKIP, middle_name: SKIP, last_name: SKIP, name_suffix: SKIP, address1: SKIP, address2: SKIP, locality: SKIP, postal_code: SKIP, administrative_area: SKIP, country: SKIP, email: SKIP, phone_number: SKIP, verification_status: SKIP, additional_properties: nil) ⇒ BillTo11
Returns a new instance of BillTo11.
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 247 def initialize(title: SKIP, first_name: SKIP, middle_name: SKIP, last_name: SKIP, name_suffix: SKIP, address1: SKIP, address2: SKIP, locality: SKIP, postal_code: SKIP, administrative_area: SKIP, country: SKIP, email: SKIP, phone_number: SKIP, verification_status: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @title = title unless title == SKIP @first_name = first_name unless first_name == SKIP @middle_name = middle_name unless middle_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 @postal_code = postal_code unless postal_code == SKIP @administrative_area = administrative_area unless administrative_area == SKIP @country = country unless country == SKIP @email = email unless email == SKIP @phone_number = phone_number unless phone_number == SKIP @verification_status = verification_status unless verification_status == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#address1 ⇒ String
First line of the billing street address.
126 127 128 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 126 def address1 @address1 end |
#address2 ⇒ String
Second line of the billing street address.
130 131 132 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 130 def address2 @address2 end |
#administrative_area ⇒ String
State or province of the billing address. Use the State, Province, and Territory Codes for the United States and Canada.
152 153 154 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 152 def administrative_area @administrative_area end |
#country ⇒ String
Country of the billing address. Use the two-character ISO Standard Country Codes.
157 158 159 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 157 def country @country end |
#email ⇒ String
Customer's email address.
161 162 163 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 161 def email @email 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.
63 64 65 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 63 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.
118 119 120 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 118 def last_name @last_name end |
#locality ⇒ String
City of the billing address.
134 135 136 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 134 def locality @locality end |
#middle_name ⇒ String
Customer’s middle name.
67 68 69 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 67 def middle_name @middle_name end |
#name_suffix ⇒ String
Customer’s name suffix.
122 123 124 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 122 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.
192 193 194 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 192 def phone_number @phone_number 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
147 148 149 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 147 def postal_code @postal_code end |
#title ⇒ String
Title.
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 14 def title @title end |
#verification_status ⇒ String
Whether buyer has verified their identity. Used in case of PayPal transactions. Possible Values:
- VERIFIED
- UNVERIFIED
200 201 202 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 200 def verification_status @verification_status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 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 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 274 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. title = hash.key?('title') ? hash['title'] : SKIP first_name = hash.key?('firstName') ? hash['firstName'] : SKIP middle_name = hash.key?('middleName') ? hash['middleName'] : 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 postal_code = hash.key?('postalCode') ? hash['postalCode'] : SKIP administrative_area = hash.key?('administrativeArea') ? hash['administrativeArea'] : SKIP country = hash.key?('country') ? hash['country'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP phone_number = hash.key?('phoneNumber') ? hash['phoneNumber'] : 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. BillTo11.new(title: title, first_name: first_name, middle_name: middle_name, last_name: last_name, name_suffix: name_suffix, address1: address1, address2: address2, locality: locality, postal_code: postal_code, administrative_area: administrative_area, country: country, email: email, phone_number: phone_number, verification_status: verification_status, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 203 def self.names @_hash = {} if @_hash.nil? @_hash['title'] = 'title' @_hash['first_name'] = 'firstName' @_hash['middle_name'] = 'middleName' @_hash['last_name'] = 'lastName' @_hash['name_suffix'] = 'nameSuffix' @_hash['address1'] = 'address1' @_hash['address2'] = 'address2' @_hash['locality'] = 'locality' @_hash['postal_code'] = 'postalCode' @_hash['administrative_area'] = 'administrativeArea' @_hash['country'] = 'country' @_hash['email'] = 'email' @_hash['phone_number'] = 'phoneNumber' @_hash['verification_status'] = 'verificationStatus' @_hash end |
.nullables ⇒ Object
An array for nullable fields
243 244 245 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 243 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 223 def self.optionals %w[ title first_name middle_name last_name name_suffix address1 address2 locality postal_code administrative_area country email phone_number verification_status ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
332 333 334 335 336 337 338 339 340 341 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 332 def inspect class_name = self.class.name.split('::').last "<#{class_name} title: #{@title.inspect}, first_name: #{@first_name.inspect}, middle_name:"\ " #{@middle_name.inspect}, last_name: #{@last_name.inspect}, name_suffix:"\ " #{@name_suffix.inspect}, address1: #{@address1.inspect}, address2: #{@address2.inspect},"\ " locality: #{@locality.inspect}, postal_code: #{@postal_code.inspect}, administrative_area:"\ " #{@administrative_area.inspect}, country: #{@country.inspect}, email: #{@email.inspect},"\ " phone_number: #{@phone_number.inspect}, verification_status:"\ " #{@verification_status.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
321 322 323 324 325 326 327 328 329 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to11.rb', line 321 def to_s class_name = self.class.name.split('::').last "<#{class_name} title: #{@title}, first_name: #{@first_name}, middle_name: #{@middle_name},"\ " last_name: #{@last_name}, name_suffix: #{@name_suffix}, address1: #{@address1}, address2:"\ " #{@address2}, locality: #{@locality}, postal_code: #{@postal_code}, administrative_area:"\ " #{@administrative_area}, country: #{@country}, email: #{@email}, phone_number:"\ " #{@phone_number}, verification_status: #{@verification_status}, additional_properties:"\ " #{@additional_properties}>" end |