Class: VeloPayments::CreatePayeesCSVRequest
- Inherits:
-
Object
- Object
- VeloPayments::CreatePayeesCSVRequest
- Defined in:
- lib/velopayments/models/create_payees_csv_request.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#address_city ⇒ Object
Returns the value of attribute address_city.
-
#address_country ⇒ Object
Returns the value of attribute address_country.
-
#address_county_or_province ⇒ Object
Returns the value of attribute address_county_or_province.
-
#address_line1 ⇒ Object
Returns the value of attribute address_line1.
-
#address_line2 ⇒ Object
Returns the value of attribute address_line2.
-
#address_line3 ⇒ Object
Returns the value of attribute address_line3.
-
#address_line4 ⇒ Object
Returns the value of attribute address_line4.
-
#address_zip_or_postcode ⇒ Object
Returns the value of attribute address_zip_or_postcode.
-
#challenge_description ⇒ Object
Returns the value of attribute challenge_description.
-
#challenge_value ⇒ Object
Returns the value of attribute challenge_value.
-
#company_name ⇒ Object
Returns the value of attribute company_name.
-
#company_tax_id ⇒ Object
Company Tax Id (EIN) must be 9 numeric characters.
-
#email ⇒ Object
Returns the value of attribute email.
-
#individual_date_of_birth ⇒ Object
example - 1970-05-20.
-
#individual_first_name ⇒ Object
Returns the value of attribute individual_first_name.
-
#individual_last_name ⇒ Object
Returns the value of attribute individual_last_name.
-
#individual_national_identification ⇒ Object
Returns the value of attribute individual_national_identification.
-
#individual_other_names ⇒ Object
Returns the value of attribute individual_other_names.
-
#individual_title ⇒ Object
Returns the value of attribute individual_title.
-
#payee_language ⇒ Object
Returns the value of attribute payee_language.
-
#payment_channel_account_name ⇒ Object
Returns the value of attribute payment_channel_account_name.
-
#payment_channel_account_number ⇒ Object
Returns the value of attribute payment_channel_account_number.
-
#payment_channel_country_code ⇒ Object
Must be a 3 character currency code.
-
#payment_channel_currency ⇒ Object
Returns the value of attribute payment_channel_currency.
-
#payment_channel_iban ⇒ Object
Must match the regular expression “‘^[A-Za-z0-9]+$“`.
-
#payment_channel_routing_no ⇒ Object
Returns the value of attribute payment_channel_routing_no.
-
#remote_id ⇒ Object
Returns the value of attribute remote_id.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_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 ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CreatePayeesCSVRequest
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 = {}) ⇒ CreatePayeesCSVRequest
Initializes the object
169 170 171 172 173 174 175 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 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 169 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `VeloPayments::CreatePayeesCSVRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `VeloPayments::CreatePayeesCSVRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'remote_id') self.remote_id = attributes[:'remote_id'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'address_line1') self.address_line1 = attributes[:'address_line1'] end if attributes.key?(:'address_line2') self.address_line2 = attributes[:'address_line2'] end if attributes.key?(:'address_line3') self.address_line3 = attributes[:'address_line3'] end if attributes.key?(:'address_line4') self.address_line4 = attributes[:'address_line4'] end if attributes.key?(:'address_city') self.address_city = attributes[:'address_city'] end if attributes.key?(:'address_county_or_province') self.address_county_or_province = attributes[:'address_county_or_province'] end if attributes.key?(:'address_zip_or_postcode') self.address_zip_or_postcode = attributes[:'address_zip_or_postcode'] end if attributes.key?(:'address_country') self.address_country = attributes[:'address_country'] end if attributes.key?(:'individual_title') self.individual_title = attributes[:'individual_title'] end if attributes.key?(:'individual_first_name') self.individual_first_name = attributes[:'individual_first_name'] end if attributes.key?(:'individual_other_names') self.individual_other_names = attributes[:'individual_other_names'] end if attributes.key?(:'individual_last_name') self.individual_last_name = attributes[:'individual_last_name'] end if attributes.key?(:'individual_national_identification') self.individual_national_identification = attributes[:'individual_national_identification'] end if attributes.key?(:'individual_date_of_birth') self.individual_date_of_birth = attributes[:'individual_date_of_birth'] end if attributes.key?(:'company_name') self.company_name = attributes[:'company_name'] end if attributes.key?(:'company_tax_id') self.company_tax_id = attributes[:'company_tax_id'] end if attributes.key?(:'payment_channel_iban') self.payment_channel_iban = attributes[:'payment_channel_iban'] end if attributes.key?(:'payment_channel_account_number') self.payment_channel_account_number = attributes[:'payment_channel_account_number'] end if attributes.key?(:'payment_channel_routing_no') self.payment_channel_routing_no = attributes[:'payment_channel_routing_no'] end if attributes.key?(:'payment_channel_country_code') self.payment_channel_country_code = attributes[:'payment_channel_country_code'] end if attributes.key?(:'payment_channel_currency') self.payment_channel_currency = attributes[:'payment_channel_currency'] end if attributes.key?(:'payment_channel_account_name') self.payment_channel_account_name = attributes[:'payment_channel_account_name'] end if attributes.key?(:'challenge_value') self.challenge_value = attributes[:'challenge_value'] end if attributes.key?(:'challenge_description') self.challenge_description = attributes[:'challenge_description'] end if attributes.key?(:'payee_language') self.payee_language = attributes[:'payee_language'] end end |
Instance Attribute Details
#address_city ⇒ Object
Returns the value of attribute address_city.
31 32 33 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 31 def address_city @address_city end |
#address_country ⇒ Object
Returns the value of attribute address_country.
37 38 39 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 37 def address_country @address_country end |
#address_county_or_province ⇒ Object
Returns the value of attribute address_county_or_province.
33 34 35 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 33 def address_county_or_province @address_county_or_province end |
#address_line1 ⇒ Object
Returns the value of attribute address_line1.
23 24 25 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 23 def address_line1 @address_line1 end |
#address_line2 ⇒ Object
Returns the value of attribute address_line2.
25 26 27 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 25 def address_line2 @address_line2 end |
#address_line3 ⇒ Object
Returns the value of attribute address_line3.
27 28 29 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 27 def address_line3 @address_line3 end |
#address_line4 ⇒ Object
Returns the value of attribute address_line4.
29 30 31 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 29 def address_line4 @address_line4 end |
#address_zip_or_postcode ⇒ Object
Returns the value of attribute address_zip_or_postcode.
35 36 37 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 35 def address_zip_or_postcode @address_zip_or_postcode end |
#challenge_description ⇒ Object
Returns the value of attribute challenge_description.
73 74 75 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 73 def challenge_description @challenge_description end |
#challenge_value ⇒ Object
Returns the value of attribute challenge_value.
71 72 73 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 71 def challenge_value @challenge_value end |
#company_name ⇒ Object
Returns the value of attribute company_name.
52 53 54 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 52 def company_name @company_name end |
#company_tax_id ⇒ Object
Company Tax Id (EIN) must be 9 numeric characters. Must match the regular expression “‘[\d]9“`.
55 56 57 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 55 def company_tax_id @company_tax_id end |
#email ⇒ Object
Returns the value of attribute email.
21 22 23 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 21 def email @email end |
#individual_date_of_birth ⇒ Object
example - 1970-05-20
50 51 52 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 50 def individual_date_of_birth @individual_date_of_birth end |
#individual_first_name ⇒ Object
Returns the value of attribute individual_first_name.
41 42 43 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 41 def individual_first_name @individual_first_name end |
#individual_last_name ⇒ Object
Returns the value of attribute individual_last_name.
45 46 47 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 45 def individual_last_name @individual_last_name end |
#individual_national_identification ⇒ Object
Returns the value of attribute individual_national_identification.
47 48 49 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 47 def individual_national_identification @individual_national_identification end |
#individual_other_names ⇒ Object
Returns the value of attribute individual_other_names.
43 44 45 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 43 def individual_other_names @individual_other_names end |
#individual_title ⇒ Object
Returns the value of attribute individual_title.
39 40 41 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 39 def individual_title @individual_title end |
#payee_language ⇒ Object
Returns the value of attribute payee_language.
75 76 77 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 75 def payee_language @payee_language end |
#payment_channel_account_name ⇒ Object
Returns the value of attribute payment_channel_account_name.
69 70 71 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 69 def payment_channel_account_name @payment_channel_account_name end |
#payment_channel_account_number ⇒ Object
Returns the value of attribute payment_channel_account_number.
60 61 62 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 60 def payment_channel_account_number @payment_channel_account_number end |
#payment_channel_country_code ⇒ Object
Must be a 3 character currency code. ISO 4217
65 66 67 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 65 def payment_channel_country_code @payment_channel_country_code end |
#payment_channel_currency ⇒ Object
Returns the value of attribute payment_channel_currency.
67 68 69 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 67 def payment_channel_currency @payment_channel_currency end |
#payment_channel_iban ⇒ Object
Must match the regular expression “‘^[A-Za-z0-9]+$“`.
58 59 60 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 58 def payment_channel_iban @payment_channel_iban end |
#payment_channel_routing_no ⇒ Object
Returns the value of attribute payment_channel_routing_no.
62 63 64 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 62 def payment_channel_routing_no @payment_channel_routing_no end |
#remote_id ⇒ Object
Returns the value of attribute remote_id.
19 20 21 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 19 def remote_id @remote_id end |
#type ⇒ Object
Returns the value of attribute type.
17 18 19 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 17 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 100 def self.attribute_map { :'type' => :'type', :'remote_id' => :'remoteId', :'email' => :'email', :'address_line1' => :'addressLine1', :'address_line2' => :'addressLine2', :'address_line3' => :'addressLine3', :'address_line4' => :'addressLine4', :'address_city' => :'addressCity', :'address_county_or_province' => :'addressCountyOrProvince', :'address_zip_or_postcode' => :'addressZipOrPostcode', :'address_country' => :'addressCountry', :'individual_title' => :'individualTitle', :'individual_first_name' => :'individualFirstName', :'individual_other_names' => :'individualOtherNames', :'individual_last_name' => :'individualLastName', :'individual_national_identification' => :'individualNationalIdentification', :'individual_date_of_birth' => :'individualDateOfBirth', :'company_name' => :'companyName', :'company_tax_id' => :'companyTaxId', :'payment_channel_iban' => :'paymentChannelIban', :'payment_channel_account_number' => :'paymentChannelAccountNumber', :'payment_channel_routing_no' => :'paymentChannelRoutingNo', :'payment_channel_country_code' => :'paymentChannelCountryCode', :'payment_channel_currency' => :'paymentChannelCurrency', :'payment_channel_account_name' => :'paymentChannelAccountName', :'challenge_value' => :'challengeValue', :'challenge_description' => :'challengeDescription', :'payee_language' => :'payeeLanguage' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
945 946 947 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 945 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_types ⇒ Object
Attribute type mapping.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 134 def self.openapi_types { :'type' => :'PayeeType', :'remote_id' => :'String', :'email' => :'String', :'address_line1' => :'String', :'address_line2' => :'String', :'address_line3' => :'String', :'address_line4' => :'String', :'address_city' => :'String', :'address_county_or_province' => :'String', :'address_zip_or_postcode' => :'String', :'address_country' => :'String', :'individual_title' => :'String', :'individual_first_name' => :'String', :'individual_other_names' => :'String', :'individual_last_name' => :'String', :'individual_national_identification' => :'String', :'individual_date_of_birth' => :'Date', :'company_name' => :'String', :'company_tax_id' => :'String', :'payment_channel_iban' => :'String', :'payment_channel_account_number' => :'String', :'payment_channel_routing_no' => :'String', :'payment_channel_country_code' => :'String', :'payment_channel_currency' => :'String', :'payment_channel_account_name' => :'String', :'challenge_value' => :'String', :'challenge_description' => :'String', :'payee_language' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 897 def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type && remote_id == o.remote_id && email == o.email && address_line1 == o.address_line1 && address_line2 == o.address_line2 && address_line3 == o.address_line3 && address_line4 == o.address_line4 && address_city == o.address_city && address_county_or_province == o.address_county_or_province && address_zip_or_postcode == o.address_zip_or_postcode && address_country == o.address_country && individual_title == o.individual_title && individual_first_name == o.individual_first_name && individual_other_names == o.individual_other_names && individual_last_name == o.individual_last_name && individual_national_identification == o.individual_national_identification && individual_date_of_birth == o.individual_date_of_birth && company_name == o.company_name && company_tax_id == o.company_tax_id && payment_channel_iban == o.payment_channel_iban && payment_channel_account_number == o.payment_channel_account_number && payment_channel_routing_no == o.payment_channel_routing_no && payment_channel_country_code == o.payment_channel_country_code && payment_channel_currency == o.payment_channel_currency && payment_channel_account_name == o.payment_channel_account_name && challenge_value == o.challenge_value && challenge_description == o.challenge_description && payee_language == o.payee_language end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 973 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 VeloPayments.const_get(type).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
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 1038 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
952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 952 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{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
932 933 934 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 932 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
938 939 940 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 938 def hash [type, remote_id, email, address_line1, address_line2, address_line3, address_line4, address_city, address_county_or_province, address_zip_or_postcode, address_country, individual_title, individual_first_name, individual_other_names, individual_last_name, individual_national_identification, individual_date_of_birth, company_name, company_tax_id, payment_channel_iban, payment_channel_account_number, payment_channel_routing_no, payment_channel_country_code, payment_channel_currency, payment_channel_account_name, challenge_value, challenge_description, payee_language].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 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 382 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 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 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 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 297 def list_invalid_properties invalid_properties = Array.new if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end if @remote_id.nil? invalid_properties.push('invalid value for "remote_id", remote_id cannot be nil.') end if @remote_id.to_s.length > 100 invalid_properties.push('invalid value for "remote_id", the character length must be smaller than or equal to 100.') end if @remote_id.to_s.length < 1 invalid_properties.push('invalid value for "remote_id", the character length must be great than or equal to 1.') end if @email.nil? invalid_properties.push('invalid value for "email", email cannot be nil.') end if @address_line1.nil? invalid_properties.push('invalid value for "address_line1", address_line1 cannot be nil.') end if @address_line1.to_s.length > 255 invalid_properties.push('invalid value for "address_line1", the character length must be smaller than or equal to 255.') end if @address_line1.to_s.length < 2 invalid_properties.push('invalid value for "address_line1", the character length must be great than or equal to 2.') end if !@address_line2.nil? && @address_line2.to_s.length > 255 invalid_properties.push('invalid value for "address_line2", the character length must be smaller than or equal to 255.') end if !@address_line2.nil? && @address_line2.to_s.length < 0 invalid_properties.push('invalid value for "address_line2", the character length must be great than or equal to 0.') end if !@address_line3.nil? && @address_line3.to_s.length > 255 invalid_properties.push('invalid value for "address_line3", the character length must be smaller than or equal to 255.') end if !@address_line3.nil? && @address_line3.to_s.length < 0 invalid_properties.push('invalid value for "address_line3", the character length must be great than or equal to 0.') end if !@address_line4.nil? && @address_line4.to_s.length > 255 invalid_properties.push('invalid value for "address_line4", the character length must be smaller than or equal to 255.') end if !@address_line4.nil? && @address_line4.to_s.length < 0 invalid_properties.push('invalid value for "address_line4", the character length must be great than or equal to 0.') end if @address_city.nil? invalid_properties.push('invalid value for "address_city", address_city cannot be nil.') end if @address_city.to_s.length > 100 invalid_properties.push('invalid value for "address_city", the character length must be smaller than or equal to 100.') end if @address_city.to_s.length < 2 invalid_properties.push('invalid value for "address_city", the character length must be great than or equal to 2.') end if !@address_county_or_province.nil? && @address_county_or_province.to_s.length > 100 invalid_properties.push('invalid value for "address_county_or_province", the character length must be smaller than or equal to 100.') end if !@address_county_or_province.nil? && @address_county_or_province.to_s.length < 2 invalid_properties.push('invalid value for "address_county_or_province", the character length must be great than or equal to 2.') end if @address_zip_or_postcode.nil? invalid_properties.push('invalid value for "address_zip_or_postcode", address_zip_or_postcode cannot be nil.') end if @address_zip_or_postcode.to_s.length > 30 invalid_properties.push('invalid value for "address_zip_or_postcode", the character length must be smaller than or equal to 30.') end if @address_zip_or_postcode.to_s.length < 2 invalid_properties.push('invalid value for "address_zip_or_postcode", the character length must be great than or equal to 2.') end if @address_country.nil? invalid_properties.push('invalid value for "address_country", address_country cannot be nil.') end if @address_country.to_s.length > 50 invalid_properties.push('invalid value for "address_country", the character length must be smaller than or equal to 50.') end if @address_country.to_s.length < 2 invalid_properties.push('invalid value for "address_country", the character length must be great than or equal to 2.') end if !@individual_title.nil? && @individual_title.to_s.length > 10 invalid_properties.push('invalid value for "individual_title", the character length must be smaller than or equal to 10.') end if !@individual_title.nil? && @individual_title.to_s.length < 1 invalid_properties.push('invalid value for "individual_title", the character length must be great than or equal to 1.') end if !@individual_first_name.nil? && @individual_first_name.to_s.length > 40 invalid_properties.push('invalid value for "individual_first_name", the character length must be smaller than or equal to 40.') end if !@individual_first_name.nil? && @individual_first_name.to_s.length < 1 invalid_properties.push('invalid value for "individual_first_name", the character length must be great than or equal to 1.') end if !@individual_other_names.nil? && @individual_other_names.to_s.length > 40 invalid_properties.push('invalid value for "individual_other_names", the character length must be smaller than or equal to 40.') end if !@individual_other_names.nil? && @individual_other_names.to_s.length < 1 invalid_properties.push('invalid value for "individual_other_names", the character length must be great than or equal to 1.') end if !@individual_last_name.nil? && @individual_last_name.to_s.length > 40 invalid_properties.push('invalid value for "individual_last_name", the character length must be smaller than or equal to 40.') end if !@individual_last_name.nil? && @individual_last_name.to_s.length < 1 invalid_properties.push('invalid value for "individual_last_name", the character length must be great than or equal to 1.') end if !@company_name.nil? && @company_name.to_s.length > 40 invalid_properties.push('invalid value for "company_name", the character length must be smaller than or equal to 40.') end if !@company_name.nil? && @company_name.to_s.length < 1 invalid_properties.push('invalid value for "company_name", the character length must be great than or equal to 1.') end pattern = Regexp.new(/[\\d]{9}/) if !@company_tax_id.nil? && @company_tax_id !~ pattern invalid_properties.push("invalid value for \"company_tax_id\", must conform to the pattern #{pattern}.") end if !@payment_channel_iban.nil? && @payment_channel_iban.to_s.length > 34 invalid_properties.push('invalid value for "payment_channel_iban", the character length must be smaller than or equal to 34.') end if !@payment_channel_iban.nil? && @payment_channel_iban.to_s.length < 15 invalid_properties.push('invalid value for "payment_channel_iban", the character length must be great than or equal to 15.') end pattern = Regexp.new(/^[A-Za-z0-9]+$/) if !@payment_channel_iban.nil? && @payment_channel_iban !~ pattern invalid_properties.push("invalid value for \"payment_channel_iban\", must conform to the pattern #{pattern}.") end if !@payment_channel_account_number.nil? && @payment_channel_account_number.to_s.length > 17 invalid_properties.push('invalid value for "payment_channel_account_number", the character length must be smaller than or equal to 17.') end if !@payment_channel_account_number.nil? && @payment_channel_account_number.to_s.length < 6 invalid_properties.push('invalid value for "payment_channel_account_number", the character length must be great than or equal to 6.') end if !@payment_channel_routing_no.nil? && @payment_channel_routing_no.to_s.length > 9 invalid_properties.push('invalid value for "payment_channel_routing_no", the character length must be smaller than or equal to 9.') end if !@payment_channel_routing_no.nil? && @payment_channel_routing_no.to_s.length < 9 invalid_properties.push('invalid value for "payment_channel_routing_no", the character length must be great than or equal to 9.') end if !@payment_channel_country_code.nil? && @payment_channel_country_code.to_s.length > 9 invalid_properties.push('invalid value for "payment_channel_country_code", the character length must be smaller than or equal to 9.') end if !@payment_channel_country_code.nil? && @payment_channel_country_code.to_s.length < 9 invalid_properties.push('invalid value for "payment_channel_country_code", the character length must be great than or equal to 9.') end if !@challenge_value.nil? && @challenge_value.to_s.length > 20 invalid_properties.push('invalid value for "challenge_value", the character length must be smaller than or equal to 20.') end if !@challenge_value.nil? && @challenge_value.to_s.length < 3 invalid_properties.push('invalid value for "challenge_value", the character length must be great than or equal to 3.') end if !@challenge_description.nil? && @challenge_description.to_s.length > 255 invalid_properties.push('invalid value for "challenge_description", the character length must be smaller than or equal to 255.') end if !@challenge_description.nil? && @challenge_description.to_s.length < 1 invalid_properties.push('invalid value for "challenge_description", the character length must be great than or equal to 1.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
1018 1019 1020 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 1018 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
1024 1025 1026 1027 1028 1029 1030 1031 1032 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 1024 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
1012 1013 1014 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 1012 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
502 503 504 505 506 507 508 509 510 511 512 513 514 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 552 553 554 555 556 557 |
# File 'lib/velopayments/models/create_payees_csv_request.rb', line 502 def valid? return false if @type.nil? return false if @remote_id.nil? return false if @remote_id.to_s.length > 100 return false if @remote_id.to_s.length < 1 return false if @email.nil? return false if @address_line1.nil? return false if @address_line1.to_s.length > 255 return false if @address_line1.to_s.length < 2 return false if !@address_line2.nil? && @address_line2.to_s.length > 255 return false if !@address_line2.nil? && @address_line2.to_s.length < 0 return false if !@address_line3.nil? && @address_line3.to_s.length > 255 return false if !@address_line3.nil? && @address_line3.to_s.length < 0 return false if !@address_line4.nil? && @address_line4.to_s.length > 255 return false if !@address_line4.nil? && @address_line4.to_s.length < 0 return false if @address_city.nil? return false if @address_city.to_s.length > 100 return false if @address_city.to_s.length < 2 return false if !@address_county_or_province.nil? && @address_county_or_province.to_s.length > 100 return false if !@address_county_or_province.nil? && @address_county_or_province.to_s.length < 2 return false if @address_zip_or_postcode.nil? return false if @address_zip_or_postcode.to_s.length > 30 return false if @address_zip_or_postcode.to_s.length < 2 return false if @address_country.nil? return false if @address_country.to_s.length > 50 return false if @address_country.to_s.length < 2 return false if !@individual_title.nil? && @individual_title.to_s.length > 10 return false if !@individual_title.nil? && @individual_title.to_s.length < 1 return false if !@individual_first_name.nil? && @individual_first_name.to_s.length > 40 return false if !@individual_first_name.nil? && @individual_first_name.to_s.length < 1 return false if !@individual_other_names.nil? && @individual_other_names.to_s.length > 40 return false if !@individual_other_names.nil? && @individual_other_names.to_s.length < 1 return false if !@individual_last_name.nil? && @individual_last_name.to_s.length > 40 return false if !@individual_last_name.nil? && @individual_last_name.to_s.length < 1 return false if !@company_name.nil? && @company_name.to_s.length > 40 return false if !@company_name.nil? && @company_name.to_s.length < 1 return false if !@company_tax_id.nil? && @company_tax_id !~ Regexp.new(/[\\d]{9}/) return false if !@payment_channel_iban.nil? && @payment_channel_iban.to_s.length > 34 return false if !@payment_channel_iban.nil? && @payment_channel_iban.to_s.length < 15 return false if !@payment_channel_iban.nil? && @payment_channel_iban !~ Regexp.new(/^[A-Za-z0-9]+$/) return false if !@payment_channel_account_number.nil? && @payment_channel_account_number.to_s.length > 17 return false if !@payment_channel_account_number.nil? && @payment_channel_account_number.to_s.length < 6 return false if !@payment_channel_routing_no.nil? && @payment_channel_routing_no.to_s.length > 9 return false if !@payment_channel_routing_no.nil? && @payment_channel_routing_no.to_s.length < 9 return false if !@payment_channel_country_code.nil? && @payment_channel_country_code.to_s.length > 9 return false if !@payment_channel_country_code.nil? && @payment_channel_country_code.to_s.length < 9 payment_channel_currency_validator = EnumAttributeValidator.new('String', ["USD", "GBP", "EUR"]) return false unless payment_channel_currency_validator.valid?(@payment_channel_currency) return false if !@challenge_value.nil? && @challenge_value.to_s.length > 20 return false if !@challenge_value.nil? && @challenge_value.to_s.length < 3 return false if !@challenge_description.nil? && @challenge_description.to_s.length > 255 return false if !@challenge_description.nil? && @challenge_description.to_s.length < 1 payee_language_validator = EnumAttributeValidator.new('String', ["AR", "EN", "ES", "FR", "HE", "HI", "JA", "PT", "RU", "UR", "ZH"]) return false unless payee_language_validator.valid?(@payee_language) true end |