Class: CyberSourceMergedSpec::RecipientInformation5
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::RecipientInformation5
- Defined in:
- lib/cyber_source_merged_spec/models/recipient_information5.rb
Overview
RecipientInformation5 Model.
Instance Attribute Summary collapse
-
#account_id ⇒ String
Identifier for the recipient’s account.
-
#account_type ⇒ String
Identifies the recipient’s account type.
-
#address1 ⇒ String
Street address of recipient.
-
#address2 ⇒ String
Second line of the recipient's address.
-
#administrative_area ⇒ String
Recipient's state.
-
#alias_name ⇒ String
Account owner alias name.
-
#building_number ⇒ String
This field contains the house or the building number of the recipient address.
-
#country ⇒ String
Recipient's country code.
-
#country_of_birth ⇒ String
Account Owner Country of Birth.
-
#date_of_birth ⇒ String
Recipient’s date of birth.
-
#descriptor ⇒ String
Recipient first name, this will be concatenated with the 4-digit originator abbreviation.
-
#email ⇒ String
Account Owner email address.
-
#first_name ⇒ String
Recipient's first name.
-
#identification_number ⇒ String
Government-issued identification number.
-
#last_name ⇒ String
Recipient's last name.
-
#locality ⇒ String
Recipient city.
-
#middle_initial ⇒ String
Middle Initial of recipient.
-
#middle_name ⇒ String
Recipient’s middle name.
-
#nationality ⇒ String
Account Owner Nationality.
-
#occupation ⇒ String
Account Owner Occupation.
-
#personal_identification ⇒ PersonalIdentification31
Recipient's country code.
-
#postal_code ⇒ String
Recipient's postal code.
-
#street_name ⇒ String
This field contains the street name of the recipient's address.
-
#type ⇒ String
Bfor Business orIfor individual.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.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(administrative_area: SKIP, postal_code: SKIP, country: SKIP, personal_identification: SKIP, first_name: SKIP, middle_initial: SKIP, middle_name: SKIP, last_name: SKIP, address1: SKIP, address2: SKIP, building_number: SKIP, locality: SKIP, identification_number: SKIP, type: SKIP, descriptor: SKIP, account_id: SKIP, account_type: SKIP, alias_name: SKIP, country_of_birth: SKIP, date_of_birth: SKIP, email: SKIP, nationality: SKIP, occupation: SKIP, street_name: SKIP, additional_properties: nil) ⇒ RecipientInformation5
constructor
A new instance of RecipientInformation5.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ 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(administrative_area: SKIP, postal_code: SKIP, country: SKIP, personal_identification: SKIP, first_name: SKIP, middle_initial: SKIP, middle_name: SKIP, last_name: SKIP, address1: SKIP, address2: SKIP, building_number: SKIP, locality: SKIP, identification_number: SKIP, type: SKIP, descriptor: SKIP, account_id: SKIP, account_type: SKIP, alias_name: SKIP, country_of_birth: SKIP, date_of_birth: SKIP, email: SKIP, nationality: SKIP, occupation: SKIP, street_name: SKIP, additional_properties: nil) ⇒ RecipientInformation5
Returns a new instance of RecipientInformation5.
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 247 248 249 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 211 def initialize(administrative_area: SKIP, postal_code: SKIP, country: SKIP, personal_identification: SKIP, first_name: SKIP, middle_initial: SKIP, middle_name: SKIP, last_name: SKIP, address1: SKIP, address2: SKIP, building_number: SKIP, locality: SKIP, identification_number: SKIP, type: SKIP, descriptor: SKIP, account_id: SKIP, account_type: SKIP, alias_name: SKIP, country_of_birth: SKIP, date_of_birth: SKIP, email: SKIP, nationality: SKIP, occupation: SKIP, street_name: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @administrative_area = administrative_area unless administrative_area == SKIP @postal_code = postal_code unless postal_code == SKIP @country = country unless country == SKIP @personal_identification = personal_identification unless personal_identification == SKIP @first_name = first_name unless first_name == SKIP @middle_initial = middle_initial unless middle_initial == SKIP @middle_name = middle_name unless middle_name == SKIP @last_name = last_name unless last_name == SKIP @address1 = address1 unless address1 == SKIP @address2 = address2 unless address2 == SKIP @building_number = building_number unless building_number == SKIP @locality = locality unless locality == SKIP @identification_number = identification_number unless identification_number == SKIP @type = type unless type == SKIP @descriptor = descriptor unless descriptor == SKIP @account_id = account_id unless account_id == SKIP @account_type = account_type unless account_type == SKIP @alias_name = alias_name unless alias_name == SKIP @country_of_birth = country_of_birth unless country_of_birth == SKIP @date_of_birth = date_of_birth unless date_of_birth == SKIP @email = email unless email == SKIP @nationality = nationality unless nationality == SKIP @occupation = occupation unless occupation == SKIP @street_name = street_name unless street_name == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
Identifier for the recipient’s account.
101 102 103 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 101 def account_id @account_id end |
#account_type ⇒ String
Identifies the recipient’s account type. This field is applicable for AFT transactions. Valid values are:
00Other01Routing transit number (RTN) and bank account02IBAN03Card account04Email05Phone number06Bank account number (BAN) and bank identification code (BIC)07Wallet ID08Social network ID
116 117 118 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 116 def account_type @account_type end |
#address1 ⇒ String
Street address of recipient. This field is conditional: it is required if using neither a Customer nor Payment Instrument token.
59 60 61 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 59 def address1 @address1 end |
#address2 ⇒ String
Second line of the recipient's address.
63 64 65 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 63 def address2 @address2 end |
#administrative_area ⇒ String
Recipient's state. Use the State, Province, and Territory Codes for the United States and Canada. Value must be an ISO Standard State Code: https://developer.cybersource.com/library/documentation/sbc/quickref/state s_and_provinces.pdf
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 18 def administrative_area @administrative_area end |
#alias_name ⇒ String
Account owner alias name.
120 121 122 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 120 def alias_name @alias_name end |
#building_number ⇒ String
This field contains the house or the building number of the recipient address.
68 69 70 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 68 def building_number @building_number end |
#country ⇒ String
Recipient's country code. Check that this field contains 2-character alpha ISO 3166-1 standard values.
27 28 29 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 27 def country @country end |
#country_of_birth ⇒ String
Account Owner Country of Birth
124 125 126 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 124 def country_of_birth @country_of_birth end |
#date_of_birth ⇒ String
Recipient’s date of birth. Format: YYYYMMDD.
128 129 130 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 128 def date_of_birth @date_of_birth end |
#descriptor ⇒ String
Recipient first name, this will be concatenated with the 4-digit originator abbreviation.
97 98 99 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 97 def descriptor @descriptor end |
#email ⇒ String
Account Owner email address
132 133 134 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 132 def email @email end |
#first_name ⇒ String
Recipient's first name.
36 37 38 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 36 def first_name @first_name end |
#identification_number ⇒ String
Government-issued identification number.
Conditional: This field is mandatory if the
processingInformation.businessApplicationId is any of the following:
AAPPTUBIWTFT- and country code =
BR,AR,CO,PE, inrecipientInformation.countryCode(Argentina, Brazil, Colombia, and Peru)
86 87 88 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 86 def identification_number @identification_number end |
#last_name ⇒ String
Recipient's last name. Conditional field. If
recipientInformation.sameAsSender = false, this field is mandatory.
54 55 56 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 54 def last_name @last_name end |
#locality ⇒ String
Recipient city.
72 73 74 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 72 def locality @locality end |
#middle_initial ⇒ String
Middle Initial of recipient. This field is supported by FDC Compass.
41 42 43 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 41 def middle_initial @middle_initial end |
#middle_name ⇒ String
Recipient’s middle name. This field is a pass through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor.
49 50 51 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 49 def middle_name @middle_name end |
#nationality ⇒ String
Account Owner Nationality
136 137 138 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 136 def nationality @nationality end |
#occupation ⇒ String
Account Owner Occupation
140 141 142 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 140 def occupation @occupation end |
#personal_identification ⇒ PersonalIdentification31
Recipient's country code. Check that this field contains 2-character alpha ISO 3166-1 standard values.
32 33 34 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 32 def personal_identification @personal_identification end |
#postal_code ⇒ String
Recipient's postal code.
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 22 def postal_code @postal_code end |
#street_name ⇒ String
This field contains the street name of the recipient's address.
144 145 146 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 144 def street_name @street_name end |
#type ⇒ String
B for Business or I for individual.
Conditional: If recipientInformation.identificationNumber is present,
then this field is mandatory.
92 93 94 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 92 def type @type end |
Class Method Details
.from_element(root) ⇒ Object
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 322 def self.from_element(root) administrative_area = XmlUtilities.from_element(root, 'administrativeArea', String) postal_code = XmlUtilities.from_element(root, 'postalCode', String) country = XmlUtilities.from_element(root, 'country', String) personal_identification = XmlUtilities.from_element( root, 'PersonalIdentification31', PersonalIdentification31 ) first_name = XmlUtilities.from_element(root, 'firstName', String) middle_initial = XmlUtilities.from_element(root, 'middleInitial', String) middle_name = XmlUtilities.from_element(root, 'middleName', String) last_name = XmlUtilities.from_element(root, 'lastName', String) address1 = XmlUtilities.from_element(root, 'address1', String) address2 = XmlUtilities.from_element(root, 'address2', String) building_number = XmlUtilities.from_element(root, 'buildingNumber', String) locality = XmlUtilities.from_element(root, 'locality', String) identification_number = XmlUtilities.from_element(root, 'identificationNumber', String) type = XmlUtilities.from_element(root, 'type', String) descriptor = XmlUtilities.from_element(root, 'descriptor', String) account_id = XmlUtilities.from_element(root, 'accountId', String) account_type = XmlUtilities.from_element(root, 'accountType', String) alias_name = XmlUtilities.from_element(root, 'aliasName', String) country_of_birth = XmlUtilities.from_element(root, 'countryOfBirth', String) date_of_birth = XmlUtilities.from_element(root, 'dateOfBirth', String) email = XmlUtilities.from_element(root, 'email', String) nationality = XmlUtilities.from_element(root, 'nationality', String) occupation = XmlUtilities.from_element(root, 'occupation', String) street_name = XmlUtilities.from_element(root, 'streetName', String) new(administrative_area: administrative_area, postal_code: postal_code, country: country, personal_identification: personal_identification, first_name: first_name, middle_initial: middle_initial, middle_name: middle_name, last_name: last_name, address1: address1, address2: address2, building_number: building_number, locality: locality, identification_number: identification_number, type: type, descriptor: descriptor, account_id: account_id, account_type: account_type, alias_name: alias_name, country_of_birth: country_of_birth, date_of_birth: date_of_birth, email: email, nationality: nationality, occupation: occupation, street_name: street_name, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 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 319 320 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 252 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. administrative_area = hash.key?('administrativeArea') ? hash['administrativeArea'] : SKIP postal_code = hash.key?('postalCode') ? hash['postalCode'] : SKIP country = hash.key?('country') ? hash['country'] : SKIP if hash['personalIdentification'] personal_identification = PersonalIdentification31.from_hash(hash['personalIdentification']) end first_name = hash.key?('firstName') ? hash['firstName'] : SKIP middle_initial = hash.key?('middleInitial') ? hash['middleInitial'] : SKIP middle_name = hash.key?('middleName') ? hash['middleName'] : SKIP last_name = hash.key?('lastName') ? hash['lastName'] : SKIP address1 = hash.key?('address1') ? hash['address1'] : SKIP address2 = hash.key?('address2') ? hash['address2'] : SKIP building_number = hash.key?('buildingNumber') ? hash['buildingNumber'] : SKIP locality = hash.key?('locality') ? hash['locality'] : SKIP identification_number = hash.key?('identificationNumber') ? hash['identificationNumber'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP descriptor = hash.key?('descriptor') ? hash['descriptor'] : SKIP account_id = hash.key?('accountId') ? hash['accountId'] : SKIP account_type = hash.key?('accountType') ? hash['accountType'] : SKIP alias_name = hash.key?('aliasName') ? hash['aliasName'] : SKIP country_of_birth = hash.key?('countryOfBirth') ? hash['countryOfBirth'] : SKIP date_of_birth = hash.key?('dateOfBirth') ? hash['dateOfBirth'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP nationality = hash.key?('nationality') ? hash['nationality'] : SKIP occupation = hash.key?('occupation') ? hash['occupation'] : SKIP street_name = hash.key?('streetName') ? hash['streetName'] : 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. RecipientInformation5.new(administrative_area: administrative_area, postal_code: postal_code, country: country, personal_identification: personal_identification, first_name: first_name, middle_initial: middle_initial, middle_name: middle_name, last_name: last_name, address1: address1, address2: address2, building_number: building_number, locality: locality, identification_number: identification_number, type: type, descriptor: descriptor, account_id: account_id, account_type: account_type, alias_name: alias_name, country_of_birth: country_of_birth, date_of_birth: date_of_birth, email: email, nationality: nationality, occupation: occupation, street_name: street_name, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 147 def self.names @_hash = {} if @_hash.nil? @_hash['administrative_area'] = 'administrativeArea' @_hash['postal_code'] = 'postalCode' @_hash['country'] = 'country' @_hash['personal_identification'] = 'personalIdentification' @_hash['first_name'] = 'firstName' @_hash['middle_initial'] = 'middleInitial' @_hash['middle_name'] = 'middleName' @_hash['last_name'] = 'lastName' @_hash['address1'] = 'address1' @_hash['address2'] = 'address2' @_hash['building_number'] = 'buildingNumber' @_hash['locality'] = 'locality' @_hash['identification_number'] = 'identificationNumber' @_hash['type'] = 'type' @_hash['descriptor'] = 'descriptor' @_hash['account_id'] = 'accountId' @_hash['account_type'] = 'accountType' @_hash['alias_name'] = 'aliasName' @_hash['country_of_birth'] = 'countryOfBirth' @_hash['date_of_birth'] = 'dateOfBirth' @_hash['email'] = 'email' @_hash['nationality'] = 'nationality' @_hash['occupation'] = 'occupation' @_hash['street_name'] = 'streetName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
207 208 209 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 207 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 177 def self.optionals %w[ administrative_area postal_code country personal_identification first_name middle_initial middle_name last_name address1 address2 building_number locality identification_number type descriptor account_id account_type alias_name country_of_birth date_of_birth email nationality occupation street_name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 437 def inspect class_name = self.class.name.split('::').last "<#{class_name} administrative_area: #{@administrative_area.inspect}, postal_code:"\ " #{@postal_code.inspect}, country: #{@country.inspect}, personal_identification:"\ " #{@personal_identification.inspect}, first_name: #{@first_name.inspect}, middle_initial:"\ " #{@middle_initial.inspect}, middle_name: #{@middle_name.inspect}, last_name:"\ " #{@last_name.inspect}, address1: #{@address1.inspect}, address2: #{@address2.inspect},"\ " building_number: #{@building_number.inspect}, locality: #{@locality.inspect},"\ " identification_number: #{@identification_number.inspect}, type: #{@type.inspect},"\ " descriptor: #{@descriptor.inspect}, account_id: #{@account_id.inspect}, account_type:"\ " #{@account_type.inspect}, alias_name: #{@alias_name.inspect}, country_of_birth:"\ " #{@country_of_birth.inspect}, date_of_birth: #{@date_of_birth.inspect}, email:"\ " #{@email.inspect}, nationality: #{@nationality.inspect}, occupation:"\ " #{@occupation.inspect}, street_name: #{@street_name.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 422 def to_s class_name = self.class.name.split('::').last "<#{class_name} administrative_area: #{@administrative_area}, postal_code: #{@postal_code},"\ " country: #{@country}, personal_identification: #{@personal_identification}, first_name:"\ " #{@first_name}, middle_initial: #{@middle_initial}, middle_name: #{@middle_name},"\ " last_name: #{@last_name}, address1: #{@address1}, address2: #{@address2}, building_number:"\ " #{@building_number}, locality: #{@locality}, identification_number:"\ " #{@identification_number}, type: #{@type}, descriptor: #{@descriptor}, account_id:"\ " #{@account_id}, account_type: #{@account_type}, alias_name: #{@alias_name},"\ " country_of_birth: #{@country_of_birth}, date_of_birth: #{@date_of_birth}, email:"\ " #{@email}, nationality: #{@nationality}, occupation: #{@occupation}, street_name:"\ " #{@street_name}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/cyber_source_merged_spec/models/recipient_information5.rb', line 383 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'administrativeArea', administrative_area) XmlUtilities.add_as_subelement(doc, root, 'postalCode', postal_code) XmlUtilities.add_as_subelement(doc, root, 'country', country) XmlUtilities.add_as_subelement(doc, root, 'PersonalIdentification31', personal_identification) XmlUtilities.add_as_subelement(doc, root, 'firstName', first_name) XmlUtilities.add_as_subelement(doc, root, 'middleInitial', middle_initial) XmlUtilities.add_as_subelement(doc, root, 'middleName', middle_name) XmlUtilities.add_as_subelement(doc, root, 'lastName', last_name) XmlUtilities.add_as_subelement(doc, root, 'address1', address1) XmlUtilities.add_as_subelement(doc, root, 'address2', address2) XmlUtilities.add_as_subelement(doc, root, 'buildingNumber', building_number) XmlUtilities.add_as_subelement(doc, root, 'locality', locality) XmlUtilities.add_as_subelement(doc, root, 'identificationNumber', identification_number) XmlUtilities.add_as_subelement(doc, root, 'type', type) XmlUtilities.add_as_subelement(doc, root, 'descriptor', descriptor) XmlUtilities.add_as_subelement(doc, root, 'accountId', account_id) XmlUtilities.add_as_subelement(doc, root, 'accountType', account_type) XmlUtilities.add_as_subelement(doc, root, 'aliasName', alias_name) XmlUtilities.add_as_subelement(doc, root, 'countryOfBirth', country_of_birth) XmlUtilities.add_as_subelement(doc, root, 'dateOfBirth', date_of_birth) XmlUtilities.add_as_subelement(doc, root, 'email', email) XmlUtilities.add_as_subelement(doc, root, 'nationality', nationality) XmlUtilities.add_as_subelement(doc, root, 'occupation', occupation) XmlUtilities.add_as_subelement(doc, root, 'streetName', street_name) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |