Class: VeloPayments::CreatePayeesCSVRequest2

Inherits:
Object
  • Object
show all
Defined in:
lib/velopayments/models/create_payees_csv_request2.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreatePayeesCSVRequest2

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 176

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `VeloPayments::CreatePayeesCSVRequest2` 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::CreatePayeesCSVRequest2`. 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_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?(:'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?(:'company_name')
    self.company_name = attributes[:'company_name']
  end

  if attributes.key?(:'company_ein')
    self.company_ein = attributes[:'company_ein']
  end

  if attributes.key?(:'company_operating_name')
    self.company_operating_name = attributes[:'company_operating_name']
  end

  if attributes.key?(:'payment_channel_account_number')
    self. = attributes[:'payment_channel_account_number']
  end

  if attributes.key?(:'payment_channel_routing_number')
    self.payment_channel_routing_number = attributes[:'payment_channel_routing_number']
  end

  if attributes.key?(:'payment_channel_account_name')
    self. = attributes[:'payment_channel_account_name']
  end

  if attributes.key?(:'payment_channel_iban')
    self.payment_channel_iban = attributes[:'payment_channel_iban']
  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?(:'challenge_description')
    self.challenge_description = attributes[:'challenge_description']
  end

  if attributes.key?(:'challenge_value')
    self.challenge_value = attributes[:'challenge_value']
  end

  if attributes.key?(:'payee_language')
    self.payee_language = attributes[:'payee_language']
  end
end

Instance Attribute Details

#address_cityObject

Returns the value of attribute address_city.



31
32
33
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 31

def address_city
  @address_city
end

#address_countryObject

Must be a 2 character country code - per ISO 3166-1



38
39
40
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 38

def address_country
  @address_country
end

#address_county_or_provinceObject

Returns the value of attribute address_county_or_province.



33
34
35
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 33

def address_county_or_province
  @address_county_or_province
end

#address_line1Object

Returns the value of attribute address_line1.



23
24
25
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 23

def address_line1
  @address_line1
end

#address_line2Object

Returns the value of attribute address_line2.



25
26
27
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 25

def address_line2
  @address_line2
end

#address_line3Object

Returns the value of attribute address_line3.



27
28
29
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 27

def address_line3
  @address_line3
end

#address_line4Object

Returns the value of attribute address_line4.



29
30
31
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 29

def address_line4
  @address_line4
end

#address_zip_or_postcodeObject

Returns the value of attribute address_zip_or_postcode.



35
36
37
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 35

def address_zip_or_postcode
  @address_zip_or_postcode
end

#challenge_descriptionObject

Returns the value of attribute challenge_description.



76
77
78
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 76

def challenge_description
  @challenge_description
end

#challenge_valueObject

Returns the value of attribute challenge_value.



78
79
80
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 78

def challenge_value
  @challenge_value
end

#company_einObject

Company Tax Id (EIN) must be 9 numeric characters. Must match the regular expression “‘[\d]9“`.



56
57
58
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 56

def company_ein
  @company_ein
end

#company_nameObject

Returns the value of attribute company_name.



53
54
55
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 53

def company_name
  @company_name
end

#company_operating_nameObject

Returns the value of attribute company_operating_name.



58
59
60
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 58

def company_operating_name
  @company_operating_name
end

#emailObject

Returns the value of attribute email.



21
22
23
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 21

def email
  @email
end

#individual_date_of_birthObject

Must not be date in future. Example - 1970-05-20



43
44
45
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 43

def individual_date_of_birth
  @individual_date_of_birth
end

#individual_first_nameObject

Returns the value of attribute individual_first_name.



47
48
49
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 47

def individual_first_name
  @individual_first_name
end

#individual_last_nameObject

Returns the value of attribute individual_last_name.



51
52
53
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 51

def individual_last_name
  @individual_last_name
end

#individual_national_identificationObject

Returns the value of attribute individual_national_identification.



40
41
42
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 40

def individual_national_identification
  @individual_national_identification
end

#individual_other_namesObject

Returns the value of attribute individual_other_names.



49
50
51
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 49

def individual_other_names
  @individual_other_names
end

#individual_titleObject

Returns the value of attribute individual_title.



45
46
47
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 45

def individual_title
  @individual_title
end

#payee_languageObject

Returns the value of attribute payee_language.



80
81
82
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 80

def payee_language
  @payee_language
end

#payment_channel_account_nameObject

Returns the value of attribute payment_channel_account_name.



66
67
68
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 66

def 
  @payment_channel_account_name
end

#payment_channel_account_numberObject

Either routing number and account number or only iban must be set



61
62
63
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 61

def 
  @payment_channel_account_number
end

#payment_channel_country_codeObject

Must be a 2 character country code - per ISO 3166-1



72
73
74
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 72

def payment_channel_country_code
  @payment_channel_country_code
end

#payment_channel_currencyObject

Returns the value of attribute payment_channel_currency.



74
75
76
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 74

def payment_channel_currency
  @payment_channel_currency
end

#payment_channel_ibanObject

Must match the regular expression “‘^[A-Za-z0-9]+$“`.



69
70
71
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 69

def payment_channel_iban
  @payment_channel_iban
end

#payment_channel_routing_numberObject

Either routing number and account number or only iban must be set



64
65
66
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 64

def payment_channel_routing_number
  @payment_channel_routing_number
end

#remote_idObject

Returns the value of attribute remote_id.



19
20
21
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 19

def remote_id
  @remote_id
end

#typeObject

Returns the value of attribute type.



17
18
19
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 17

def type
  @type
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
132
133
134
135
136
137
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 105

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_national_identification' => :'individualNationalIdentification',
    :'individual_date_of_birth' => :'individualDateOfBirth',
    :'individual_title' => :'individualTitle',
    :'individual_first_name' => :'individualFirstName',
    :'individual_other_names' => :'individualOtherNames',
    :'individual_last_name' => :'individualLastName',
    :'company_name' => :'companyName',
    :'company_ein' => :'companyEIN',
    :'company_operating_name' => :'companyOperatingName',
    :'payment_channel_account_number' => :'paymentChannelAccountNumber',
    :'payment_channel_routing_number' => :'paymentChannelRoutingNumber',
    :'payment_channel_account_name' => :'paymentChannelAccountName',
    :'payment_channel_iban' => :'paymentChannelIban',
    :'payment_channel_country_code' => :'paymentChannelCountryCode',
    :'payment_channel_currency' => :'paymentChannelCurrency',
    :'challenge_description' => :'challengeDescription',
    :'challenge_value' => :'challengeValue',
    :'payee_language' => :'payeeLanguage'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



1025
1026
1027
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 1025

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_typesObject

Attribute type mapping.



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
166
167
168
169
170
171
172
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 140

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_national_identification' => :'String',
    :'individual_date_of_birth' => :'Date',
    :'individual_title' => :'String',
    :'individual_first_name' => :'String',
    :'individual_other_names' => :'String',
    :'individual_last_name' => :'String',
    :'company_name' => :'String',
    :'company_ein' => :'String',
    :'company_operating_name' => :'String',
    :'payment_channel_account_number' => :'String',
    :'payment_channel_routing_number' => :'String',
    :'payment_channel_account_name' => :'String',
    :'payment_channel_iban' => :'String',
    :'payment_channel_country_code' => :'String',
    :'payment_channel_currency' => :'String',
    :'challenge_description' => :'String',
    :'challenge_value' => :'String',
    :'payee_language' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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_request2.rb', line 976

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_national_identification == o.individual_national_identification &&
      individual_date_of_birth == o.individual_date_of_birth &&
      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 &&
      company_name == o.company_name &&
      company_ein == o.company_ein &&
      company_operating_name == o.company_operating_name &&
       == o. &&
      payment_channel_routing_number == o.payment_channel_routing_number &&
       == o. &&
      payment_channel_iban == o.payment_channel_iban &&
      payment_channel_country_code == o.payment_channel_country_code &&
      payment_channel_currency == o.payment_channel_currency &&
      challenge_description == o.challenge_description &&
      challenge_value == o.challenge_value &&
      payee_language == o.payee_language
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 1053

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 1118

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 1032

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


1012
1013
1014
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 1012

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



1018
1019
1020
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 1018

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_national_identification, individual_date_of_birth, individual_title, individual_first_name, individual_other_names, individual_last_name, company_name, company_ein, company_operating_name, , payment_channel_routing_number, , payment_channel_iban, payment_channel_country_code, payment_channel_currency, challenge_description, challenge_value, payee_language].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
499
500
501
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
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 308

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 @email.to_s.length > 255
    invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 255.')
  end

  if @email.to_s.length < 3
    invalid_properties.push('invalid value for "email", the character length must be great than or equal to 3.')
  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 > 100
    invalid_properties.push('invalid value for "address_line1", the character length must be smaller than or equal to 100.')
  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 > 100
    invalid_properties.push('invalid value for "address_line2", the character length must be smaller than or equal to 100.')
  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 > 100
    invalid_properties.push('invalid value for "address_line3", the character length must be smaller than or equal to 100.')
  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 > 100
    invalid_properties.push('invalid value for "address_line4", the character length must be smaller than or equal to 100.')
  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 > 50
    invalid_properties.push('invalid value for "address_city", the character length must be smaller than or equal to 50.')
  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 > 50
    invalid_properties.push('invalid value for "address_county_or_province", the character length must be smaller than or equal to 50.')
  end

  if !@address_county_or_province.nil? && @address_county_or_province.to_s.length < 1
    invalid_properties.push('invalid value for "address_county_or_province", the character length must be great than or equal to 1.')
  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 > 60
    invalid_properties.push('invalid value for "address_zip_or_postcode", the character length must be smaller than or equal to 60.')
  end

  if @address_zip_or_postcode.to_s.length < 1
    invalid_properties.push('invalid value for "address_zip_or_postcode", the character length must be great than or equal to 1.')
  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 > 2
    invalid_properties.push('invalid value for "address_country", the character length must be smaller than or equal to 2.')
  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_national_identification.nil? && @individual_national_identification.to_s.length > 30
    invalid_properties.push('invalid value for "individual_national_identification", the character length must be smaller than or equal to 30.')
  end

  if !@individual_national_identification.nil? && @individual_national_identification.to_s.length < 6
    invalid_properties.push('invalid value for "individual_national_identification", the character length must be great than or equal to 6.')
  end

  if !@individual_title.nil? && @individual_title.to_s.length > 40
    invalid_properties.push('invalid value for "individual_title", the character length must be smaller than or equal to 40.')
  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_ein.nil? && @company_ein !~ pattern
    invalid_properties.push("invalid value for \"company_ein\", must conform to the pattern #{pattern}.")
  end

  if !@company_operating_name.nil? && @company_operating_name.to_s.length > 100
    invalid_properties.push('invalid value for "company_operating_name", the character length must be smaller than or equal to 100.')
  end

  if !@company_operating_name.nil? && @company_operating_name.to_s.length < 1
    invalid_properties.push('invalid value for "company_operating_name", the character length must be great than or equal to 1.')
  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_number.nil? && @payment_channel_routing_number.to_s.length > 9
    invalid_properties.push('invalid value for "payment_channel_routing_number", the character length must be smaller than or equal to 9.')
  end

  if !@payment_channel_routing_number.nil? && @payment_channel_routing_number.to_s.length < 9
    invalid_properties.push('invalid value for "payment_channel_routing_number", the character length must be great than or equal to 9.')
  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_country_code.nil? && @payment_channel_country_code.to_s.length > 2
    invalid_properties.push('invalid value for "payment_channel_country_code", the character length must be smaller than or equal to 2.')
  end

  if !@payment_channel_country_code.nil? && @payment_channel_country_code.to_s.length < 2
    invalid_properties.push('invalid value for "payment_channel_country_code", the character length must be great than or equal to 2.')
  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

  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

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



1098
1099
1100
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 1098

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



1104
1105
1106
1107
1108
1109
1110
1111
1112
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 1104

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



1092
1093
1094
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 1092

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



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
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
# File 'lib/velopayments/models/create_payees_csv_request2.rb', line 537

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 @email.to_s.length > 255
  return false if @email.to_s.length < 3
  return false if @address_line1.nil?
  return false if @address_line1.to_s.length > 100
  return false if @address_line1.to_s.length < 2
  return false if !@address_line2.nil? && @address_line2.to_s.length > 100
  return false if !@address_line2.nil? && @address_line2.to_s.length < 0
  return false if !@address_line3.nil? && @address_line3.to_s.length > 100
  return false if !@address_line3.nil? && @address_line3.to_s.length < 0
  return false if !@address_line4.nil? && @address_line4.to_s.length > 100
  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 > 50
  return false if @address_city.to_s.length < 2
  return false if !@address_county_or_province.nil? && @address_county_or_province.to_s.length > 50
  return false if !@address_county_or_province.nil? && @address_county_or_province.to_s.length < 1
  return false if @address_zip_or_postcode.nil?
  return false if @address_zip_or_postcode.to_s.length > 60
  return false if @address_zip_or_postcode.to_s.length < 1
  return false if @address_country.nil?
  address_country_validator = EnumAttributeValidator.new('String', ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "false", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"])
  return false unless address_country_validator.valid?(@address_country)
  return false if @address_country.to_s.length > 2
  return false if @address_country.to_s.length < 2
  return false if !@individual_national_identification.nil? && @individual_national_identification.to_s.length > 30
  return false if !@individual_national_identification.nil? && @individual_national_identification.to_s.length < 6
  return false if !@individual_title.nil? && @individual_title.to_s.length > 40
  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_ein.nil? && @company_ein !~ Regexp.new(/[\\d]{9}/)
  return false if !@company_operating_name.nil? && @company_operating_name.to_s.length > 100
  return false if !@company_operating_name.nil? && @company_operating_name.to_s.length < 1
  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_number.nil? && @payment_channel_routing_number.to_s.length > 9
  return false if !@payment_channel_routing_number.nil? && @payment_channel_routing_number.to_s.length < 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]+$/)
  payment_channel_country_code_validator = EnumAttributeValidator.new('String', ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "false", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"])
  return false unless payment_channel_country_code_validator.valid?(@payment_channel_country_code)
  return false if !@payment_channel_country_code.nil? && @payment_channel_country_code.to_s.length > 2
  return false if !@payment_channel_country_code.nil? && @payment_channel_country_code.to_s.length < 2
  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_description.nil? && @challenge_description.to_s.length > 255
  return false if !@challenge_description.nil? && @challenge_description.to_s.length < 1
  return false if !@challenge_value.nil? && @challenge_value.to_s.length > 20
  return false if !@challenge_value.nil? && @challenge_value.to_s.length < 3
  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