Class: CyberSource::Ptsv1pullfundstransferRecipientInformation
- Inherits:
-
Object
- Object
- CyberSource::Ptsv1pullfundstransferRecipientInformation
- Defined in:
- lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Identifier for the recipient’s account.
-
#account_type ⇒ Object
Identifies the recipient’s account type.
-
#address1 ⇒ Object
Street address of recipient.
-
#address2 ⇒ Object
Second line of the recipient’s address.
-
#administrative_area ⇒ Object
Recipient’s state.
-
#alias_name ⇒ Object
Account owner alias name.
-
#building_number ⇒ Object
This field contains the house or the building number of the recipient address.
-
#country ⇒ Object
Recipient’s country code.
-
#country_of_birth ⇒ Object
Account Owner Country of Birth.
-
#date_of_birth ⇒ Object
Recipient’s date of birth.
-
#descriptor ⇒ Object
Recipient first name, this will be concatenated with the 4-digit originator abbreviation.
-
#email ⇒ Object
Account Owner email address.
-
#first_name ⇒ Object
Recipient’s first name.
-
#identification_number ⇒ Object
Government-issued identification number.
-
#last_name ⇒ Object
Recipient’s last name.
-
#locality ⇒ Object
Recipient city.
-
#middle_initial ⇒ Object
Middle Initial of recipient.
-
#middle_name ⇒ Object
Recipient’s middle name.
-
#nationality ⇒ Object
Account Owner Nationality.
-
#occupation ⇒ Object
Account Owner Occupation.
-
#personal_identification ⇒ Object
Returns the value of attribute personal_identification.
-
#postal_code ⇒ Object
Recipient’s postal code.
-
#street_name ⇒ Object
This field contains the street name of the recipient’s address.
-
#type ⇒ Object
‘B` for Business or `I` for individual.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Ptsv1pullfundstransferRecipientInformation
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Ptsv1pullfundstransferRecipientInformation
Initializes the object
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 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 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 272 273 274 275 276 277 278 279 280 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 179 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'administrativeArea') self.administrative_area = attributes[:'administrativeArea'] end if attributes.has_key?(:'postalCode') self.postal_code = attributes[:'postalCode'] end if attributes.has_key?(:'country') self.country = attributes[:'country'] end if attributes.has_key?(:'personalIdentification') self.personal_identification = attributes[:'personalIdentification'] end if attributes.has_key?(:'firstName') self.first_name = attributes[:'firstName'] end if attributes.has_key?(:'middleInitial') self.middle_initial = attributes[:'middleInitial'] end if attributes.has_key?(:'middleName') self.middle_name = attributes[:'middleName'] end if attributes.has_key?(:'lastName') self.last_name = attributes[:'lastName'] end if attributes.has_key?(:'address1') self.address1 = attributes[:'address1'] end if attributes.has_key?(:'address2') self.address2 = attributes[:'address2'] end if attributes.has_key?(:'buildingNumber') self.building_number = attributes[:'buildingNumber'] end if attributes.has_key?(:'locality') self.locality = attributes[:'locality'] end if attributes.has_key?(:'identificationNumber') self.identification_number = attributes[:'identificationNumber'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'descriptor') self.descriptor = attributes[:'descriptor'] end if attributes.has_key?(:'accountId') self.account_id = attributes[:'accountId'] end if attributes.has_key?(:'accountType') self.account_type = attributes[:'accountType'] end if attributes.has_key?(:'aliasName') self.alias_name = attributes[:'aliasName'] end if attributes.has_key?(:'countryOfBirth') self.country_of_birth = attributes[:'countryOfBirth'] end if attributes.has_key?(:'dateOfBirth') self.date_of_birth = attributes[:'dateOfBirth'] end if attributes.has_key?(:'email') self.email = attributes[:'email'] end if attributes.has_key?(:'nationality') self.nationality = attributes[:'nationality'] end if attributes.has_key?(:'occupation') self.occupation = attributes[:'occupation'] end if attributes.has_key?(:'streetName') self.street_name = attributes[:'streetName'] end end |
Instance Attribute Details
#account_id ⇒ Object
Identifier for the recipient’s account.
61 62 63 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 61 def account_id @account_id end |
#account_type ⇒ Object
Identifies the recipient’s account type. This field is applicable for AFT transactions. Valid values are: - ‘00` Other - `01` Routing transit number (RTN) and bank account - `02` IBAN - `03` Card account - `04` Email - `05` Phone number - `06` Bank account number (BAN) and bank identification code (BIC) - `07` Wallet ID - `08` Social network ID
64 65 66 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 64 def account_type @account_type end |
#address1 ⇒ Object
Street address of recipient. This field is conditional: it is required if using neither a Customer nor Payment Instrument token.
40 41 42 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 40 def address1 @address1 end |
#address2 ⇒ Object
Second line of the recipient’s address.
43 44 45 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 43 def address2 @address2 end |
#administrative_area ⇒ Object
Recipient’s state. Use the State, Province, and Territory Codes for the United States and Canada. Value must be an ISO Standard State Code: developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf
17 18 19 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 17 def administrative_area @administrative_area end |
#alias_name ⇒ Object
Account owner alias name.
67 68 69 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 67 def alias_name @alias_name end |
#building_number ⇒ Object
This field contains the house or the building number of the recipient address.
46 47 48 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 46 def building_number @building_number end |
#country ⇒ Object
Recipient’s country code. Check that this field contains 2-character alpha ISO 3166-1 standard values.
23 24 25 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 23 def country @country end |
#country_of_birth ⇒ Object
Account Owner Country of Birth
70 71 72 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 70 def country_of_birth @country_of_birth end |
#date_of_birth ⇒ Object
Recipient’s date of birth. Format: YYYYMMDD.
73 74 75 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 73 def date_of_birth @date_of_birth end |
#descriptor ⇒ Object
Recipient first name, this will be concatenated with the 4-digit originator abbreviation.
58 59 60 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 58 def descriptor @descriptor end |
#email ⇒ Object
Account Owner email address
76 77 78 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 76 def email @email end |
#first_name ⇒ Object
Recipient’s first name.
28 29 30 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 28 def first_name @first_name end |
#identification_number ⇒ Object
Government-issued identification number. Conditional: This field is mandatory if the ‘processingInformation.businessApplicationId` is any of the following: - `AA` - `PP` - `TU` - `BI` - `WT` - `FT` - and country code = `BR`, `AR`, `CO`, `PE`, in `recipientInformation.countryCode` (Argentina, Brazil, Colombia, and Peru)
52 53 54 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 52 def identification_number @identification_number end |
#last_name ⇒ Object
Recipient’s last name. Conditional field. If ‘recipientInformation.sameAsSender` = `false`, this field is mandatory.
37 38 39 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 37 def last_name @last_name end |
#locality ⇒ Object
Recipient city.
49 50 51 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 49 def locality @locality end |
#middle_initial ⇒ Object
Middle Initial of recipient. This field is supported by FDC Compass.
31 32 33 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 31 def middle_initial @middle_initial end |
#middle_name ⇒ Object
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.
34 35 36 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 34 def middle_name @middle_name end |
#nationality ⇒ Object
Account Owner Nationality
79 80 81 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 79 def nationality @nationality end |
#occupation ⇒ Object
Account Owner Occupation
82 83 84 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 82 def occupation @occupation end |
#personal_identification ⇒ Object
Returns the value of attribute personal_identification.
25 26 27 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 25 def personal_identification @personal_identification end |
#postal_code ⇒ Object
Recipient’s postal code.
20 21 22 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 20 def postal_code @postal_code end |
#street_name ⇒ Object
This field contains the street name of the recipient’s address.
85 86 87 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 85 def street_name @street_name end |
#type ⇒ Object
‘B` for Business or `I` for individual. Conditional: If `recipientInformation.identificationNumber` is present, then this field is mandatory.
55 56 57 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 55 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 88 def self.attribute_map { :'administrative_area' => :'administrativeArea', :'postal_code' => :'postalCode', :'country' => :'country', :'personal_identification' => :'personalIdentification', :'first_name' => :'firstName', :'middle_initial' => :'middleInitial', :'middle_name' => :'middleName', :'last_name' => :'lastName', :'address1' => :'address1', :'address2' => :'address2', :'building_number' => :'buildingNumber', :'locality' => :'locality', :'identification_number' => :'identificationNumber', :'type' => :'type', :'descriptor' => :'descriptor', :'account_id' => :'accountId', :'account_type' => :'accountType', :'alias_name' => :'aliasName', :'country_of_birth' => :'countryOfBirth', :'date_of_birth' => :'dateOfBirth', :'email' => :'email', :'nationality' => :'nationality', :'occupation' => :'occupation', :'street_name' => :'streetName' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 118 def self.json_map { :'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' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 175 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 148 def self.swagger_types { :'administrative_area' => :'String', :'postal_code' => :'String', :'country' => :'String', :'personal_identification' => :'Ptsv1pullfundstransferRecipientInformationPersonalIdentification', :'first_name' => :'String', :'middle_initial' => :'String', :'middle_name' => :'String', :'last_name' => :'String', :'address1' => :'String', :'address2' => :'String', :'building_number' => :'String', :'locality' => :'String', :'identification_number' => :'String', :'type' => :'String', :'descriptor' => :'String', :'account_id' => :'String', :'account_type' => :'String', :'alias_name' => :'String', :'country_of_birth' => :'String', :'date_of_birth' => :'String', :'email' => :'String', :'nationality' => :'String', :'occupation' => :'String', :'street_name' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 487 488 489 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 462 def ==(o) return true if self.equal?(o) self.class == o.class && administrative_area == o.administrative_area && postal_code == o.postal_code && country == o.country && personal_identification == o.personal_identification && first_name == o.first_name && middle_initial == o.middle_initial && middle_name == o.middle_name && last_name == o.last_name && address1 == o.address1 && address2 == o.address2 && building_number == o.building_number && locality == o.locality && identification_number == o.identification_number && type == o.type && descriptor == o.descriptor && account_id == o.account_id && account_type == o.account_type && alias_name == o.alias_name && country_of_birth == o.country_of_birth && date_of_birth == o.date_of_birth && email == o.email && nationality == o.nationality && occupation == o.occupation && street_name == o.street_name end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 527 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = CyberSource.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
593 594 595 596 597 598 599 600 601 602 603 604 605 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 593 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 506 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
493 494 495 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 493 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
499 500 501 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 499 def hash [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].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 284 def list_invalid_properties invalid_properties = Array.new #if !@country.nil? && @country !~ Regexp.new(/^(\\s{0,2}|.{2})$/) #invalid_properties.push('invalid value for "country", must conform to the pattern /^(\\s{0,2}|.{2})$/.') #end #if !@country_of_birth.nil? && @country_of_birth !~ Regexp.new(/^(\\s{0,2}|.{2})$/) #invalid_properties.push('invalid value for "country_of_birth", must conform to the pattern /^(\\s{0,2}|.{2})$/.') #end #if !@nationality.nil? && @nationality !~ Regexp.new(/^(\\s{0,2}|.{2})$/) #invalid_properties.push('invalid value for "nationality", must conform to the pattern /^(\\s{0,2}|.{2})$/.') #end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
573 574 575 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 573 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
579 580 581 582 583 584 585 586 587 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 579 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
567 568 569 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 567 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
303 304 305 306 307 308 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb', line 303 def valid? #return false if !@country.nil? && @country !~ Regexp.new(/^(\\s{0,2}|.{2})$/) #return false if !@country_of_birth.nil? && @country_of_birth !~ Regexp.new(/^(\\s{0,2}|.{2})$/) #return false if !@nationality.nil? && @nationality !~ Regexp.new(/^(\\s{0,2}|.{2})$/) true end |