Class: OpenapiClient::ConnectCarrierRequestBody

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_client/models/connect_carrier_request_body.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ConnectCarrierRequestBody

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 312

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#access_keyObject

Seko Account Access Key



141
142
143
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 141

def access_key
  @access_key
end

#accountObject

Account



66
67
68
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 66

def 
  @account
end

#account_country_codeObject

Account country code



147
148
149
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 147

def 
  @account_country_code
end

#account_numberObject

Account number



34
35
36
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 34

def 
  @account_number
end

#account_postal_codeObject

Account postal code



150
151
152
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 150

def 
  @account_postal_code
end

#activation_keyObject

Activation key



120
121
122
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 120

def activation_key
  @activation_key
end

#address1Object

Address Line 1



72
73
74
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 72

def address1
  @address1
end

#address2Object

Address Line 2



75
76
77
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 75

def address2
  @address2
end

#agree_to_eulaObject

Boolean signaling agreement to the Fedex End User License Agreement



102
103
104
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 102

def agree_to_eula
  @agree_to_eula
end

#agree_to_technology_agreementObject

The Agreement to the [UPS Technology Agreement](www.ups.com/assets/resources/media/UTA_with_EUR.pdf)



159
160
161
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 159

def agree_to_technology_agreement
  @agree_to_technology_agreement
end

#ancillary_endorsementObject

Returns the value of attribute ancillary_endorsement.



60
61
62
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 60

def ancillary_endorsement
  @ancillary_endorsement
end

#api_keyObject

API key



43
44
45
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 43

def api_key
  @api_key
end

#api_secretObject

The DHL E-Commerce API secret. This field is optional, but if not set you will not be able to get rates for this account.



46
47
48
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 46

def api_secret
  @api_secret
end

#cityObject

City



78
79
80
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 78

def city
  @city
end

#client_idObject

The client id



52
53
54
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 52

def client_id
  @client_id
end

#companyObject

Company



81
82
83
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 81

def company
  @company
end

#company_nameObject

Company name



129
130
131
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 129

def company_name
  @company_name
end

#contact_nameObject

Contact name



126
127
128
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 126

def contact_name
  @contact_name
end

#contract_idObject

Canada Post Account Contract ID



49
50
51
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 49

def contract_id
  @contract_id
end

#country_codeObject

Country code



84
85
86
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 84

def country_code
  @country_code
end

#distribution_centerObject

The distribution center



58
59
60
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 58

def distribution_center
  @distribution_center
end

#emailObject

The email address



31
32
33
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 31

def email
  @email
end

#first_nameObject

First name



87
88
89
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 87

def first_name
  @first_name
end

#ftp_passwordObject

FTP password



40
41
42
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 40

def ftp_password
  @ftp_password
end

#ftp_usernameObject

FTP username



37
38
39
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 37

def ftp_username
  @ftp_username
end

#induction_siteObject

Induction site



117
118
119
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 117

def induction_site
  @induction_site
end

#invoiceObject

The UPS invoice



156
157
158
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 156

def invoice
  @invoice
end

#last_nameObject

Last name



90
91
92
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 90

def last_name
  @last_name
end

#mailer_idObject

Mailer id



108
109
110
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 108

def mailer_id
  @mailer_id
end

#merchant_idObject

Merchant id



114
115
116
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 114

def merchant_id
  @merchant_id
end

#merchant_seller_idObject

Returns the value of attribute merchant_seller_id.



26
27
28
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 26

def merchant_seller_id
  @merchant_seller_id
end

#meter_numberObject

Meter number



105
106
107
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 105

def meter_number
  @meter_number
end

#mws_auth_tokenObject

Returns the value of attribute mws_auth_token.



28
29
30
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 28

def mws_auth_token
  @mws_auth_token
end

#nicknameObject

Nickname



18
19
20
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 18

def nickname
  @nickname
end

#oba_emailObject

The oba email address



123
124
125
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 123

def oba_email
  @oba_email
end

#passphraseObject

Passphrase



69
70
71
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 69

def passphrase
  @passphrase
end

#passwordObject

Password



24
25
26
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 24

def password
  @password
end

#phoneObject

Phone



93
94
95
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 93

def phone
  @phone
end

#pickup_numberObject

The pickup number



55
56
57
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 55

def pickup_number
  @pickup_number
end

#postal_codeObject

Postal code



96
97
98
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 96

def postal_code
  @postal_code
end

#profile_nameObject

Profile name



111
112
113
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 111

def profile_name
  @profile_name
end

#sendle_idObject

A string that uniquely identifies the sendle



144
145
146
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 144

def sendle_id
  @sendle_id
end

#site_idObject

A string that uniquely identifies the site



63
64
65
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 63

def site_id
  @site_id
end

#stateObject

State



99
100
101
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 99

def state
  @state
end

#street_line1Object

Street line1



132
133
134
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 132

def street_line1
  @street_line1
end

#street_line2Object

Street line2



135
136
137
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 135

def street_line2
  @street_line2
end

#street_line3Object

Street line3



138
139
140
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 138

def street_line3
  @street_line3
end

#titleObject

Title



153
154
155
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 153

def title
  @title
end

#usernameObject

Username



21
22
23
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 21

def username
  @username
end

Class Method Details

.attribute_mapObject

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



162
163
164
165
166
167
168
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
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 162

def self.attribute_map
  {
    :'nickname' => :'nickname',
    :'username' => :'username',
    :'password' => :'password',
    :'merchant_seller_id' => :'merchant_seller_id',
    :'mws_auth_token' => :'mws_auth_token',
    :'email' => :'email',
    :'account_number' => :'account_number',
    :'ftp_username' => :'ftp_username',
    :'ftp_password' => :'ftp_password',
    :'api_key' => :'api_key',
    :'api_secret' => :'api_secret',
    :'contract_id' => :'contract_id',
    :'client_id' => :'client_id',
    :'pickup_number' => :'pickup_number',
    :'distribution_center' => :'distribution_center',
    :'ancillary_endorsement' => :'ancillary_endorsement',
    :'site_id' => :'site_id',
    :'account' => :'account',
    :'passphrase' => :'passphrase',
    :'address1' => :'address1',
    :'address2' => :'address2',
    :'city' => :'city',
    :'company' => :'company',
    :'country_code' => :'country_code',
    :'first_name' => :'first_name',
    :'last_name' => :'last_name',
    :'phone' => :'phone',
    :'postal_code' => :'postal_code',
    :'state' => :'state',
    :'agree_to_eula' => :'agree_to_eula',
    :'meter_number' => :'meter_number',
    :'mailer_id' => :'mailer_id',
    :'profile_name' => :'profile_name',
    :'merchant_id' => :'merchant_id',
    :'induction_site' => :'induction_site',
    :'activation_key' => :'activation_key',
    :'oba_email' => :'oba_email',
    :'contact_name' => :'contact_name',
    :'company_name' => :'company_name',
    :'street_line1' => :'street_line1',
    :'street_line2' => :'street_line2',
    :'street_line3' => :'street_line3',
    :'access_key' => :'access_key',
    :'sendle_id' => :'sendle_id',
    :'account_country_code' => :'account_country_code',
    :'account_postal_code' => :'account_postal_code',
    :'title' => :'title',
    :'invoice' => :'invoice',
    :'agree_to_technology_agreement' => :'agree_to_technology_agreement'
  }
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



1550
1551
1552
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1550

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

.openapi_nullableObject

List of attributes with nullable: true



272
273
274
275
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 272

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_one_ofObject

List of class defined in oneOf (OpenAPI v3)



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 278

def self.openapi_one_of
  [
  :'ConnectAccessWorldwideRequestBody',
  :'ConnectAmazonBuyShippingRequestBody',
  :'ConnectApcRequestBody',
  :'ConnectAsendiaRequestBody',
  :'ConnectAustraliaPostRequestBody',
  :'ConnectCanadaPostRequestBody',
  :'ConnectDhlEcommerceRequestBody',
  :'ConnectDhlExpressAuRequestBody',
  :'ConnectDhlExpressCaRequestBody',
  :'ConnectDhlExpressRequestBody',
  :'ConnectDhlExpressUkRequestBody',
  :'ConnectDpdRequestBody',
  :'ConnectEndiciaRequestBody',
  :'ConnectFedexRequestBody',
  :'ConnectFedexUkRequestBody',
  :'ConnectFirstmileRequestBody',
  :'ConnectGlobegisticsRequestBody',
  :'ConnectImexRequestBody',
  :'ConnectNewgisticsRequestBody',
  :'ConnectOntracRequestBody',
  :'ConnectPurolatorRequestBody',
  :'ConnectRoyalMailRequestBody',
  :'ConnectRrDonnelleyRequestBody',
  :'ConnectSekoRequestBody',
  :'ConnectSendleRequestBody',
  :'ConnectStampsRequestBody',
  :'ConnectUpsRequestBody'
  ]
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 217

def self.openapi_types
  {
    :'nickname' => :'String',
    :'username' => :'String',
    :'password' => :'String',
    :'merchant_seller_id' => :'String',
    :'mws_auth_token' => :'String',
    :'email' => :'String',
    :'account_number' => :'String',
    :'ftp_username' => :'String',
    :'ftp_password' => :'String',
    :'api_key' => :'String',
    :'api_secret' => :'String',
    :'contract_id' => :'String',
    :'client_id' => :'String',
    :'pickup_number' => :'String',
    :'distribution_center' => :'String',
    :'ancillary_endorsement' => :'AncillaryServiceEndorsement',
    :'site_id' => :'String',
    :'account' => :'String',
    :'passphrase' => :'String',
    :'address1' => :'String',
    :'address2' => :'String',
    :'city' => :'String',
    :'company' => :'String',
    :'country_code' => :'String',
    :'first_name' => :'String',
    :'last_name' => :'String',
    :'phone' => :'String',
    :'postal_code' => :'String',
    :'state' => :'String',
    :'agree_to_eula' => :'Boolean',
    :'meter_number' => :'String',
    :'mailer_id' => :'Integer',
    :'profile_name' => :'String',
    :'merchant_id' => :'Integer',
    :'induction_site' => :'String',
    :'activation_key' => :'String',
    :'oba_email' => :'String',
    :'contact_name' => :'String',
    :'company_name' => :'String',
    :'street_line1' => :'String',
    :'street_line2' => :'String',
    :'street_line3' => :'String',
    :'access_key' => :'String',
    :'sendle_id' => :'String',
    :'account_country_code' => :'String',
    :'account_postal_code' => :'String',
    :'title' => :'String',
    :'invoice' => :'UpsInvoice',
    :'agree_to_technology_agreement' => :'Boolean'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1481

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      nickname == o.nickname &&
      username == o.username &&
      password == o.password &&
      merchant_seller_id == o.merchant_seller_id &&
      mws_auth_token == o.mws_auth_token &&
      email == o.email &&
       == o. &&
      ftp_username == o.ftp_username &&
      ftp_password == o.ftp_password &&
      api_key == o.api_key &&
      api_secret == o.api_secret &&
      contract_id == o.contract_id &&
      client_id == o.client_id &&
      pickup_number == o.pickup_number &&
      distribution_center == o.distribution_center &&
      ancillary_endorsement == o.ancillary_endorsement &&
      site_id == o.site_id &&
       == o. &&
      passphrase == o.passphrase &&
      address1 == o.address1 &&
      address2 == o.address2 &&
      city == o.city &&
      company == o.company &&
      country_code == o.country_code &&
      first_name == o.first_name &&
      last_name == o.last_name &&
      phone == o.phone &&
      postal_code == o.postal_code &&
      state == o.state &&
      agree_to_eula == o.agree_to_eula &&
      meter_number == o.meter_number &&
      mailer_id == o.mailer_id &&
      profile_name == o.profile_name &&
      merchant_id == o.merchant_id &&
      induction_site == o.induction_site &&
      activation_key == o.activation_key &&
      oba_email == o.oba_email &&
      contact_name == o.contact_name &&
      company_name == o.company_name &&
      street_line1 == o.street_line1 &&
      street_line2 == o.street_line2 &&
      street_line3 == o.street_line3 &&
      access_key == o.access_key &&
      sendle_id == o.sendle_id &&
       == o. &&
       == o. &&
      title == o.title &&
      invoice == o.invoice &&
      agree_to_technology_agreement == o.agree_to_technology_agreement
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



1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1578

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
    OpenapiClient.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



1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1647

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



1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1557

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


1537
1538
1539
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1537

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



1543
1544
1545
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1543

def hash
  [nickname, username, password, merchant_seller_id, mws_auth_token, email, , ftp_username, ftp_password, api_key, api_secret, contract_id, client_id, pickup_number, distribution_center, ancillary_endorsement, site_id, , passphrase, address1, address2, city, company, country_code, first_name, last_name, phone, postal_code, state, agree_to_eula, meter_number, mailer_id, profile_name, merchant_id, induction_site, activation_key, oba_email, contact_name, company_name, street_line1, street_line2, street_line3, access_key, sendle_id, , , title, invoice, agree_to_technology_agreement].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
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
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 524

def list_invalid_properties
  invalid_properties = Array.new
  if @nickname.nil?
    invalid_properties.push('invalid value for "nickname", nickname cannot be nil.')
  end

  if @nickname.to_s.length < 1
    invalid_properties.push('invalid value for "nickname", the character length must be great than or equal to 1.')
  end

  if @username.nil?
    invalid_properties.push('invalid value for "username", username cannot be nil.')
  end

  if @username.to_s.length < 1
    invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
  end

  if @password.nil?
    invalid_properties.push('invalid value for "password", password cannot be nil.')
  end

  if @password.to_s.length < 1
    invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
  end

  if @merchant_seller_id.nil?
    invalid_properties.push('invalid value for "merchant_seller_id", merchant_seller_id cannot be nil.')
  end

  if @merchant_seller_id.to_s.length < 1
    invalid_properties.push('invalid value for "merchant_seller_id", the character length must be great than or equal to 1.')
  end

  if @mws_auth_token.nil?
    invalid_properties.push('invalid value for "mws_auth_token", mws_auth_token cannot be nil.')
  end

  if @mws_auth_token.to_s.length < 1
    invalid_properties.push('invalid value for "mws_auth_token", 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 @account_number.nil?
    invalid_properties.push('invalid value for "account_number", account_number cannot be nil.')
  end

  if @account_number.to_s.length < 1
    invalid_properties.push('invalid value for "account_number", the character length must be great than or equal to 1.')
  end

  if @ftp_username.nil?
    invalid_properties.push('invalid value for "ftp_username", ftp_username cannot be nil.')
  end

  if @ftp_username.to_s.length < 1
    invalid_properties.push('invalid value for "ftp_username", the character length must be great than or equal to 1.')
  end

  if @ftp_password.nil?
    invalid_properties.push('invalid value for "ftp_password", ftp_password cannot be nil.')
  end

  if @ftp_password.to_s.length < 1
    invalid_properties.push('invalid value for "ftp_password", the character length must be great than or equal to 1.')
  end

  if @api_key.nil?
    invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
  end

  if @api_key.to_s.length < 1
    invalid_properties.push('invalid value for "api_key", the character length must be great than or equal to 1.')
  end

  if @api_secret.nil?
    invalid_properties.push('invalid value for "api_secret", api_secret cannot be nil.')
  end

  if @api_secret.to_s.length < 1
    invalid_properties.push('invalid value for "api_secret", the character length must be great than or equal to 1.')
  end

  if @contract_id.nil?
    invalid_properties.push('invalid value for "contract_id", contract_id cannot be nil.')
  end

  if @contract_id.to_s.length < 1
    invalid_properties.push('invalid value for "contract_id", the character length must be great than or equal to 1.')
  end

  if @client_id.nil?
    invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
  end

  if @client_id.to_s.length < 1
    invalid_properties.push('invalid value for "client_id", the character length must be great than or equal to 1.')
  end

  if @pickup_number.nil?
    invalid_properties.push('invalid value for "pickup_number", pickup_number cannot be nil.')
  end

  if @pickup_number.to_s.length < 1
    invalid_properties.push('invalid value for "pickup_number", the character length must be great than or equal to 1.')
  end

  if @distribution_center.nil?
    invalid_properties.push('invalid value for "distribution_center", distribution_center cannot be nil.')
  end

  if @distribution_center.to_s.length < 1
    invalid_properties.push('invalid value for "distribution_center", the character length must be great than or equal to 1.')
  end

  if @site_id.nil?
    invalid_properties.push('invalid value for "site_id", site_id cannot be nil.')
  end

  if @account.nil?
    invalid_properties.push('invalid value for "account", account cannot be nil.')
  end

  if @account.to_s.length < 1
    invalid_properties.push('invalid value for "account", the character length must be great than or equal to 1.')
  end

  if @passphrase.nil?
    invalid_properties.push('invalid value for "passphrase", passphrase cannot be nil.')
  end

  if @passphrase.to_s.length < 1
    invalid_properties.push('invalid value for "passphrase", the character length must be great than or equal to 1.')
  end

  if @address1.nil?
    invalid_properties.push('invalid value for "address1", address1 cannot be nil.')
  end

  if @address1.to_s.length < 1
    invalid_properties.push('invalid value for "address1", the character length must be great than or equal to 1.')
  end

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

  if @city.nil?
    invalid_properties.push('invalid value for "city", city cannot be nil.')
  end

  if @city.to_s.length < 1
    invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.')
  end

  if @company.nil?
    invalid_properties.push('invalid value for "company", company cannot be nil.')
  end

  if @company.to_s.length < 1
    invalid_properties.push('invalid value for "company", the character length must be great than or equal to 1.')
  end

  if @country_code.nil?
    invalid_properties.push('invalid value for "country_code", country_code cannot be nil.')
  end

  if @country_code.to_s.length < 1
    invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.')
  end

  if @first_name.nil?
    invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
  end

  if @first_name.to_s.length < 1
    invalid_properties.push('invalid value for "first_name", the character length must be great than or equal to 1.')
  end

  if @last_name.nil?
    invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
  end

  if @last_name.to_s.length < 1
    invalid_properties.push('invalid value for "last_name", the character length must be great than or equal to 1.')
  end

  if @phone.nil?
    invalid_properties.push('invalid value for "phone", phone cannot be nil.')
  end

  if @phone.to_s.length < 1
    invalid_properties.push('invalid value for "phone", the character length must be great than or equal to 1.')
  end

  if @postal_code.nil?
    invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
  end

  if @postal_code.to_s.length < 1
    invalid_properties.push('invalid value for "postal_code", the character length must be great than or equal to 1.')
  end

  if @state.nil?
    invalid_properties.push('invalid value for "state", state cannot be nil.')
  end

  if @state.to_s.length < 1
    invalid_properties.push('invalid value for "state", the character length must be great than or equal to 1.')
  end

  if @agree_to_eula.nil?
    invalid_properties.push('invalid value for "agree_to_eula", agree_to_eula cannot be nil.')
  end

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

  if @mailer_id.nil?
    invalid_properties.push('invalid value for "mailer_id", mailer_id cannot be nil.')
  end

  if @mailer_id < 0
    invalid_properties.push('invalid value for "mailer_id", must be greater than or equal to 0.')
  end

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

  if !@merchant_id.nil? && @merchant_id < 0
    invalid_properties.push('invalid value for "merchant_id", must be greater than or equal to 0.')
  end

  if @induction_site.nil?
    invalid_properties.push('invalid value for "induction_site", induction_site cannot be nil.')
  end

  if @induction_site.to_s.length < 1
    invalid_properties.push('invalid value for "induction_site", the character length must be great than or equal to 1.')
  end

  if @activation_key.nil?
    invalid_properties.push('invalid value for "activation_key", activation_key cannot be nil.')
  end

  if @activation_key.to_s.length < 1
    invalid_properties.push('invalid value for "activation_key", the character length must be great than or equal to 1.')
  end

  if @contact_name.nil?
    invalid_properties.push('invalid value for "contact_name", contact_name cannot be nil.')
  end

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

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

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

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

  if @access_key.nil?
    invalid_properties.push('invalid value for "access_key", access_key cannot be nil.')
  end

  if @access_key.to_s.length < 1
    invalid_properties.push('invalid value for "access_key", the character length must be great than or equal to 1.')
  end

  if @sendle_id.nil?
    invalid_properties.push('invalid value for "sendle_id", sendle_id cannot be nil.')
  end

  if @account_country_code.nil?
    invalid_properties.push('invalid value for "account_country_code", account_country_code cannot be nil.')
  end

  if @account_country_code.to_s.length < 1
    invalid_properties.push('invalid value for "account_country_code", the character length must be great than or equal to 1.')
  end

  if @account_postal_code.nil?
    invalid_properties.push('invalid value for "account_postal_code", account_postal_code cannot be nil.')
  end

  if @account_postal_code.to_s.length < 1
    invalid_properties.push('invalid value for "account_postal_code", the character length must be great than or equal to 1.')
  end

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

  if @agree_to_technology_agreement.nil?
    invalid_properties.push('invalid value for "agree_to_technology_agreement", agree_to_technology_agreement cannot be nil.')
  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



1623
1624
1625
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1623

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



1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1629

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end
    
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



1617
1618
1619
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 1617

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



843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
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
929
930
931
932
933
934
935
936
937
938
939
# File 'lib/openapi_client/models/connect_carrier_request_body.rb', line 843

def valid?
  return false if @nickname.nil?
  return false if @nickname.to_s.length < 1
  return false if @username.nil?
  return false if @username.to_s.length < 1
  return false if @password.nil?
  return false if @password.to_s.length < 1
  return false if @merchant_seller_id.nil?
  return false if @merchant_seller_id.to_s.length < 1
  return false if @mws_auth_token.nil?
  return false if @mws_auth_token.to_s.length < 1
  return false if @email.nil?
  return false if @account_number.nil?
  return false if @account_number.to_s.length < 1
  return false if @ftp_username.nil?
  return false if @ftp_username.to_s.length < 1
  return false if @ftp_password.nil?
  return false if @ftp_password.to_s.length < 1
  return false if @api_key.nil?
  return false if @api_key.to_s.length < 1
  return false if @api_secret.nil?
  return false if @api_secret.to_s.length < 1
  return false if @contract_id.nil?
  return false if @contract_id.to_s.length < 1
  return false if @client_id.nil?
  return false if @client_id.to_s.length < 1
  return false if @pickup_number.nil?
  return false if @pickup_number.to_s.length < 1
  return false if @distribution_center.nil?
  return false if @distribution_center.to_s.length < 1
  return false if @site_id.nil?
  return false if @account.nil?
  return false if @account.to_s.length < 1
  return false if @passphrase.nil?
  return false if @passphrase.to_s.length < 1
  return false if @address1.nil?
  return false if @address1.to_s.length < 1
  return false if !@address2.nil? && @address2.to_s.length < 1
  return false if @city.nil?
  return false if @city.to_s.length < 1
  return false if @company.nil?
  return false if @company.to_s.length < 1
  return false if @country_code.nil?
  return false if @country_code.to_s.length < 1
  return false if @first_name.nil?
  return false if @first_name.to_s.length < 1
  return false if @last_name.nil?
  return false if @last_name.to_s.length < 1
  return false if @phone.nil?
  return false if @phone.to_s.length < 1
  return false if @postal_code.nil?
  return false if @postal_code.to_s.length < 1
  return false if @state.nil?
  return false if @state.to_s.length < 1
  return false if @agree_to_eula.nil?
  return false if !@meter_number.nil? && @meter_number.to_s.length < 1
  return false if @mailer_id.nil?
  return false if @mailer_id < 0
  return false if !@profile_name.nil? && @profile_name.to_s.length < 1
  return false if !@merchant_id.nil? && @merchant_id < 0
  return false if @induction_site.nil?
  return false if @induction_site.to_s.length < 1
  return false if @activation_key.nil?
  return false if @activation_key.to_s.length < 1
  return false if @contact_name.nil?
  return false if @contact_name.to_s.length < 1
  return false if !@company_name.nil? && @company_name.to_s.length < 1
  return false if !@street_line1.nil? && @street_line1.to_s.length < 1
  return false if !@street_line2.nil? && @street_line2.to_s.length < 1
  return false if !@street_line3.nil? && @street_line3.to_s.length < 1
  return false if @access_key.nil?
  return false if @access_key.to_s.length < 1
  return false if @sendle_id.nil?
  return false if @account_country_code.nil?
  return false if @account_country_code.to_s.length < 1
  return false if @account_postal_code.nil?
  return false if @account_postal_code.to_s.length < 1
  return false if !@title.nil? && @title.to_s.length < 1
  return false if @agree_to_technology_agreement.nil?
  _one_of_found = false
  self.class.openapi_one_of.each do |_class|
    _one_of = OpenapiClient.const_get(_class).build_from_hash(self.to_hash)
    if _one_of.valid?
      if _one_of_found
        return false
      else
        _one_of_found = true
      end
    end
  end

  if !_one_of_found
    return false
  end

  true
end