Class: VisaAcceptanceMergedSpec::BillTo57
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::BillTo57
- Defined in:
- lib/visa_acceptance_merged_spec/models/bill_to57.rb
Overview
BillTo57 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.
-
#building_number ⇒ String
Building number in the street address.
-
#company ⇒ Company5
Postal code for the billing address.
-
#country ⇒ String
Payment card billing country.
-
#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.
-
#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.
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(address1: SKIP, address2: SKIP, address3: SKIP, address4: SKIP, administrative_area: SKIP, building_number: SKIP, country: SKIP, district: SKIP, locality: SKIP, postal_code: SKIP, company: SKIP, email: SKIP, first_name: SKIP, last_name: SKIP, middle_name: SKIP, name_suffix: SKIP, title: SKIP, phone_number: SKIP, phone_type: SKIP, additional_properties: nil) ⇒ BillTo57
constructor
A new instance of BillTo57.
-
#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(address1: SKIP, address2: SKIP, address3: SKIP, address4: SKIP, administrative_area: SKIP, building_number: SKIP, country: SKIP, district: SKIP, locality: SKIP, postal_code: SKIP, company: SKIP, email: SKIP, first_name: SKIP, last_name: SKIP, middle_name: SKIP, name_suffix: SKIP, title: SKIP, phone_number: SKIP, phone_type: SKIP, additional_properties: nil) ⇒ BillTo57
Returns a new instance of BillTo57.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 158 def initialize(address1: SKIP, address2: SKIP, address3: SKIP, address4: SKIP, administrative_area: SKIP, building_number: SKIP, country: SKIP, district: SKIP, locality: SKIP, postal_code: SKIP, company: SKIP, email: SKIP, first_name: SKIP, last_name: SKIP, middle_name: SKIP, name_suffix: SKIP, title: SKIP, phone_number: SKIP, phone_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @address1 = address1 unless address1 == SKIP @address2 = address2 unless address2 == SKIP @address3 = address3 unless address3 == SKIP @address4 = address4 unless address4 == SKIP @administrative_area = administrative_area unless administrative_area == SKIP @building_number = building_number unless building_number == SKIP @country = country unless country == SKIP @district = district unless district == SKIP @locality = locality unless locality == SKIP @postal_code = postal_code unless postal_code == SKIP @company = company unless company == SKIP @email = email unless email == SKIP @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 @phone_number = phone_number unless phone_number == SKIP @phone_type = phone_type unless phone_type == 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.
15 16 17 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 15 def address1 @address1 end |
#address2 ⇒ String
Used for additional address information. For example: Attention: Accounts Payable Optional field.
21 22 23 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 21 def address2 @address2 end |
#address3 ⇒ String
Additional address information (third line of the billing address)
25 26 27 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 25 def address3 @address3 end |
#address4 ⇒ String
Additional address information (fourth line of the billing address)
29 30 31 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 29 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](
34 35 36 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 34 def administrative_area @administrative_area end |
#building_number ⇒ String
Building number in the street address.
38 39 40 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 38 def building_number @building_number end |
#company ⇒ Company5
Postal code for the billing address. The postal code must consist of 5 to 9 digits.
62 63 64 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 62 def company @company end |
#country ⇒ String
Payment card billing country. Use the two-character [ISO Standard Country Codes](
43 44 45 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 43 def country @country end |
#district ⇒ String
Customer’s neighborhood, community, or region (a barrio in Brazil) within the city or municipality
48 49 50 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 48 def district @district end |
#email ⇒ String
Customer's email address, including the full domain name.
66 67 68 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 66 def email @email end |
#first_name ⇒ String
Customer’s first name. This name must be the same as the name on the card
70 71 72 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 70 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.
74 75 76 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 74 def last_name @last_name end |
#locality ⇒ String
Payment card billing city.
52 53 54 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 52 def locality @locality end |
#middle_name ⇒ String
Customer’s middle name.
78 79 80 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 78 def middle_name @middle_name end |
#name_suffix ⇒ String
Customer’s name suffix.
82 83 84 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 82 def name_suffix @name_suffix end |
#phone_number ⇒ String
Customer’s phone number.
90 91 92 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 90 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
101 102 103 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 101 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.
57 58 59 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 57 def postal_code @postal_code end |
#title ⇒ String
Title.
86 87 88 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 86 def title @title end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
192 193 194 195 196 197 198 199 200 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 240 241 242 243 244 245 246 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 192 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. 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 administrative_area = hash.key?('administrativeArea') ? hash['administrativeArea'] : SKIP building_number = hash.key?('buildingNumber') ? hash['buildingNumber'] : SKIP country = hash.key?('country') ? hash['country'] : SKIP district = hash.key?('district') ? hash['district'] : SKIP locality = hash.key?('locality') ? hash['locality'] : SKIP postal_code = hash.key?('postalCode') ? hash['postalCode'] : SKIP company = Company5.from_hash(hash['company']) if hash['company'] email = hash.key?('email') ? hash['email'] : SKIP 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 phone_number = hash.key?('phoneNumber') ? hash['phoneNumber'] : SKIP phone_type = hash.key?('phoneType') ? hash['phoneType'] : 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. BillTo57.new(address1: address1, address2: address2, address3: address3, address4: address4, administrative_area: administrative_area, building_number: building_number, country: country, district: district, locality: locality, postal_code: postal_code, company: company, email: email, first_name: first_name, last_name: last_name, middle_name: middle_name, name_suffix: name_suffix, title: title, phone_number: phone_number, phone_type: phone_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 104 def self.names @_hash = {} if @_hash.nil? @_hash['address1'] = 'address1' @_hash['address2'] = 'address2' @_hash['address3'] = 'address3' @_hash['address4'] = 'address4' @_hash['administrative_area'] = 'administrativeArea' @_hash['building_number'] = 'buildingNumber' @_hash['country'] = 'country' @_hash['district'] = 'district' @_hash['locality'] = 'locality' @_hash['postal_code'] = 'postalCode' @_hash['company'] = 'company' @_hash['email'] = 'email' @_hash['first_name'] = 'firstName' @_hash['last_name'] = 'lastName' @_hash['middle_name'] = 'middleName' @_hash['name_suffix'] = 'nameSuffix' @_hash['title'] = 'title' @_hash['phone_number'] = 'phoneNumber' @_hash['phone_type'] = 'phoneType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
154 155 156 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 154 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 129 def self.optionals %w[ address1 address2 address3 address4 administrative_area building_number country district locality postal_code company email first_name last_name middle_name name_suffix title phone_number phone_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 261 def inspect class_name = self.class.name.split('::').last "<#{class_name} address1: #{@address1.inspect}, address2: #{@address2.inspect}, address3:"\ " #{@address3.inspect}, address4: #{@address4.inspect}, administrative_area:"\ " #{@administrative_area.inspect}, building_number: #{@building_number.inspect}, country:"\ " #{@country.inspect}, district: #{@district.inspect}, locality: #{@locality.inspect},"\ " postal_code: #{@postal_code.inspect}, company: #{@company.inspect}, email:"\ " #{@email.inspect}, first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\ " middle_name: #{@middle_name.inspect}, name_suffix: #{@name_suffix.inspect}, title:"\ " #{@title.inspect}, phone_number: #{@phone_number.inspect}, phone_type:"\ " #{@phone_type.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
249 250 251 252 253 254 255 256 257 258 |
# File 'lib/visa_acceptance_merged_spec/models/bill_to57.rb', line 249 def to_s class_name = self.class.name.split('::').last "<#{class_name} address1: #{@address1}, address2: #{@address2}, address3: #{@address3},"\ " address4: #{@address4}, administrative_area: #{@administrative_area}, building_number:"\ " #{@building_number}, country: #{@country}, district: #{@district}, locality: #{@locality},"\ " postal_code: #{@postal_code}, company: #{@company}, email: #{@email}, first_name:"\ " #{@first_name}, last_name: #{@last_name}, middle_name: #{@middle_name}, name_suffix:"\ " #{@name_suffix}, title: #{@title}, phone_number: #{@phone_number}, phone_type:"\ " #{@phone_type}, additional_properties: #{@additional_properties}>" end |