Class: CyberSource::Ptsv1pullfundstransferSenderInformation
- Inherits:
-
Object
- Object
- CyberSource::Ptsv1pullfundstransferSenderInformation
- Defined in:
- lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
Returns the value of attribute account.
-
#address1 ⇒ Object
Street address of sender.
-
#address2 ⇒ Object
Second line of the sender’s address.
-
#administrative_area ⇒ Object
Sender’s state.
-
#alias_name ⇒ Object
Sender’s alias name.
-
#consumer_authentication ⇒ Object
Returns the value of attribute consumer_authentication.
-
#country ⇒ Object
Country of sender.
-
#country_of_birth ⇒ Object
Account Owner Country of Birth.
-
#date_of_birth ⇒ Object
Sender’s date of birth.
-
#email ⇒ Object
Account Owner email address.
-
#first_name ⇒ Object
First name of sender.
-
#last_name ⇒ Object
Last name of sender.
-
#locality ⇒ Object
City of sender.
-
#middle_initial ⇒ Object
Middle Initial of sender.
-
#middle_name ⇒ Object
This field contains the middle name of the entity funding the transaction.
-
#name ⇒ Object
Name of sender.
-
#nationality ⇒ Object
Account Owner Nationality.
-
#occupation ⇒ Object
Account Owner Occupation.
-
#payment_information ⇒ Object
Returns the value of attribute payment_information.
-
#personal_identification ⇒ Object
Returns the value of attribute personal_identification.
-
#phone_number ⇒ Object
Sender’s phone number.
-
#postal_code ⇒ Object
Sender’s postal code.
-
#reference_number ⇒ Object
Visa Direct(16 characters) If the transaction is a money transfer, pre-paid load, or credit card bill pay, and if the sender intends to fund the transaction with a non-financial instrument (for example, cash), a reference number unique to the sender is required.
-
#type ⇒ Object
This field identifies if the sender is a business or an 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 = {}) ⇒ Ptsv1pullfundstransferSenderInformation
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 = {}) ⇒ Ptsv1pullfundstransferSenderInformation
Initializes the object
176 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 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 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 176 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?(:'postalCode') self.postal_code = attributes[:'postalCode'] 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?(:'locality') self.locality = attributes[:'locality'] end if attributes.has_key?(:'administrativeArea') self.administrative_area = attributes[:'administrativeArea'] end if attributes.has_key?(:'country') self.country = attributes[:'country'] end if attributes.has_key?(:'paymentInformation') self.payment_information = attributes[:'paymentInformation'] end if attributes.has_key?(:'consumerAuthentication') self.consumer_authentication = attributes[:'consumerAuthentication'] end if attributes.has_key?(:'personalIdentification') self.personal_identification = attributes[:'personalIdentification'] end if attributes.has_key?(:'referenceNumber') self.reference_number = attributes[:'referenceNumber'] end if attributes.has_key?(:'account') self.account = attributes[:'account'] 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?(:'name') self.name = attributes[:'name'] 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?(:'phoneNumber') self.phone_number = attributes[:'phoneNumber'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end end |
Instance Attribute Details
#account ⇒ Object
Returns the value of attribute account.
55 56 57 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 55 def account @account end |
#address1 ⇒ Object
Street address of sender. This field is conditional: it is required if using neither a Customer nor Payment Instrument token.
32 33 34 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 32 def address1 @address1 end |
#address2 ⇒ Object
Second line of the sender’s address.
35 36 37 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 35 def address2 @address2 end |
#administrative_area ⇒ Object
Sender’s state. Use the **State, Province, and Territory Codes for the United States and Canada**. This field is conditional: it is required if in the United States or Canada, and transaction is using neither a Customer nor Payment Instrument token. Value must be an ISO Standard State Code: [developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf](https://developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf)
41 42 43 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 41 def administrative_area @administrative_area end |
#alias_name ⇒ Object
Sender’s alias name.
58 59 60 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 58 def alias_name @alias_name end |
#consumer_authentication ⇒ Object
Returns the value of attribute consumer_authentication.
48 49 50 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 48 def consumer_authentication @consumer_authentication end |
#country ⇒ Object
Country of sender. Check that this field contains 2 character alpha ISO 3166-1 standard values. This field is conditional: it is required if using neither a Customer nor Payment Instrument token.
44 45 46 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 44 def country @country end |
#country_of_birth ⇒ Object
Account Owner Country of Birth.
61 62 63 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 61 def country_of_birth @country_of_birth end |
#date_of_birth ⇒ Object
Sender’s date of birth. Format: YYYYMMDD.
64 65 66 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 64 def date_of_birth @date_of_birth end |
#email ⇒ Object
Account Owner email address
67 68 69 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 67 def email @email end |
#first_name ⇒ Object
First name of sender. This field is conditional: it is required if using neither a Customer nor Payment Instrument token.
20 21 22 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 20 def first_name @first_name end |
#last_name ⇒ Object
Last name of sender. This field is conditional: it is required if using neither a Customer nor Payment Instrument token.
29 30 31 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 29 def last_name @last_name end |
#locality ⇒ Object
City of sender. This field is conditional: it is required if using neither a Customer nor Payment Instrument token.
38 39 40 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 38 def locality @locality end |
#middle_initial ⇒ Object
Middle Initial of sender
23 24 25 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 23 def middle_initial @middle_initial end |
#middle_name ⇒ Object
This field contains the middle name of the entity funding the transaction.
26 27 28 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 26 def middle_name @middle_name end |
#name ⇒ Object
Name of sender. Use this field if the sender is a business.
70 71 72 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 70 def name @name end |
#nationality ⇒ Object
Account Owner Nationality
73 74 75 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 73 def nationality @nationality end |
#occupation ⇒ Object
Account Owner Occupation.
76 77 78 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 76 def occupation @occupation end |
#payment_information ⇒ Object
Returns the value of attribute payment_information.
46 47 48 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 46 def payment_information @payment_information end |
#personal_identification ⇒ Object
Returns the value of attribute personal_identification.
50 51 52 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 50 def personal_identification @personal_identification end |
#phone_number ⇒ Object
Sender’s phone number.
79 80 81 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 79 def phone_number @phone_number end |
#postal_code ⇒ Object
Sender’s postal code. This field is conditional: it is required if using neither a Customer nor Payment Instrument token.
17 18 19 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 17 def postal_code @postal_code end |
#reference_number ⇒ Object
Visa Direct(16 characters) If the transaction is a money transfer, pre-paid load, or credit card bill pay, and if the sender intends to fund the transaction with a non-financial instrument (for example, cash), a reference number unique to the sender is required. If the transaction is a funds disbursement, the field is required.
53 54 55 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 53 def reference_number @reference_number end |
#type ⇒ Object
This field identifies if the sender is a business or an individual. The valid values are: • ‘B` (Business) • `I` (Individual)
82 83 84 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 82 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 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 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 85 def self.attribute_map { :'postal_code' => :'postalCode', :'first_name' => :'firstName', :'middle_initial' => :'middleInitial', :'middle_name' => :'middleName', :'last_name' => :'lastName', :'address1' => :'address1', :'address2' => :'address2', :'locality' => :'locality', :'administrative_area' => :'administrativeArea', :'country' => :'country', :'payment_information' => :'paymentInformation', :'consumer_authentication' => :'consumerAuthentication', :'personal_identification' => :'personalIdentification', :'reference_number' => :'referenceNumber', :'account' => :'account', :'alias_name' => :'aliasName', :'country_of_birth' => :'countryOfBirth', :'date_of_birth' => :'dateOfBirth', :'email' => :'email', :'name' => :'name', :'nationality' => :'nationality', :'occupation' => :'occupation', :'phone_number' => :'phoneNumber', :'type' => :'type' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
115 116 117 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 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 115 def self.json_map { :'postal_code' => :'postal_code', :'first_name' => :'first_name', :'middle_initial' => :'middle_initial', :'middle_name' => :'middle_name', :'last_name' => :'last_name', :'address1' => :'address1', :'address2' => :'address2', :'locality' => :'locality', :'administrative_area' => :'administrative_area', :'country' => :'country', :'payment_information' => :'payment_information', :'consumer_authentication' => :'consumer_authentication', :'personal_identification' => :'personal_identification', :'reference_number' => :'reference_number', :'account' => :'account', :'alias_name' => :'alias_name', :'country_of_birth' => :'country_of_birth', :'date_of_birth' => :'date_of_birth', :'email' => :'email', :'name' => :'name', :'nationality' => :'nationality', :'occupation' => :'occupation', :'phone_number' => :'phone_number', :'type' => :'type' } end |
.swagger_types ⇒ Object
Attribute type mapping.
145 146 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 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 145 def self.swagger_types { :'postal_code' => :'String', :'first_name' => :'String', :'middle_initial' => :'String', :'middle_name' => :'String', :'last_name' => :'String', :'address1' => :'String', :'address2' => :'String', :'locality' => :'String', :'administrative_area' => :'String', :'country' => :'String', :'payment_information' => :'Ptsv1pullfundstransferSenderInformationPaymentInformation', :'consumer_authentication' => :'Ptsv1pullfundstransferSenderInformationConsumerAuthentication', :'personal_identification' => :'Ptsv1pullfundstransferSenderInformationPersonalIdentification', :'reference_number' => :'String', :'account' => :'Ptsv1pullfundstransferSenderInformationAccount', :'alias_name' => :'String', :'country_of_birth' => :'String', :'date_of_birth' => :'String', :'email' => :'String', :'name' => :'String', :'nationality' => :'String', :'occupation' => :'String', :'phone_number' => :'String', :'type' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 450 def ==(o) return true if self.equal?(o) self.class == o.class && postal_code == o.postal_code && 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 && locality == o.locality && administrative_area == o.administrative_area && country == o.country && payment_information == o.payment_information && consumer_authentication == o.consumer_authentication && personal_identification == o.personal_identification && reference_number == o.reference_number && account == o.account && alias_name == o.alias_name && country_of_birth == o.country_of_birth && date_of_birth == o.date_of_birth && email == o.email && name == o.name && nationality == o.nationality && occupation == o.occupation && phone_number == o.phone_number && type == o.type end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
515 516 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 545 546 547 548 549 550 551 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 515 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
581 582 583 584 585 586 587 588 589 590 591 592 593 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 581 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
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 494 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
481 482 483 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 481 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
487 488 489 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 487 def hash [postal_code, first_name, middle_initial, middle_name, last_name, address1, address2, locality, administrative_area, country, payment_information, consumer_authentication, personal_identification, reference_number, account, alias_name, country_of_birth, date_of_birth, email, name, nationality, occupation, phone_number, type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 281 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 #if !@type.nil? && @type !~ Regexp.new(/^(\\s{0,1}|.{1})$/) #invalid_properties.push('invalid value for "type", must conform to the pattern /^(\\s{0,1}|.{1})$/.') #end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
561 562 563 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 561 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
567 568 569 570 571 572 573 574 575 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 567 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
555 556 557 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 555 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
304 305 306 307 308 309 310 |
# File 'lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb', line 304 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})$/) #return false if !@type.nil? && @type !~ Regexp.new(/^(\\s{0,1}|.{1})$/) true end |