connectwise-ruby-sdk 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -18
- data/connectwise-ruby-sdk.gemspec +2 -1
- data/lib/connectwise-ruby-sdk/api/documents_api.rb +8 -8
- data/lib/connectwise-ruby-sdk/api_client.rb +1 -1
- data/lib/connectwise-ruby-sdk/models/activity.rb +27 -15
- data/lib/connectwise-ruby-sdk/models/activity_status.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/activity_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/addition.rb +16 -12
- data/lib/connectwise-ruby-sdk/models/adjustment.rb +8 -6
- data/lib/connectwise-ruby-sdk/models/agreement.rb +43 -27
- data/lib/connectwise-ruby-sdk/models/agreement_type.rb +27 -15
- data/lib/connectwise-ruby-sdk/models/audit_trail_entry_insert_request.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/batch.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/board.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/callback_entry.rb +8 -6
- data/lib/connectwise-ruby-sdk/models/campaign.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/campaign_audit.rb +46 -20
- data/lib/connectwise-ruby-sdk/models/campaign_status.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/campaign_sub_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/campaign_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/catalog_item.rb +57 -27
- data/lib/connectwise-ruby-sdk/models/category.rb +27 -15
- data/lib/connectwise-ruby-sdk/models/code.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/company.rb +185 -123
- data/lib/connectwise-ruby-sdk/models/company_management_summary.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/company_site.rb +67 -45
- data/lib/connectwise-ruby-sdk/models/company_status.rb +19 -9
- data/lib/connectwise-ruby-sdk/models/company_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/configuration.rb +131 -93
- data/lib/connectwise-ruby-sdk/models/configuration_status.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/configuration_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/configuration_type_question.rb +24 -10
- data/lib/connectwise-ruby-sdk/models/connect_wise_hosted_setup.rb +30 -12
- data/lib/connectwise-ruby-sdk/models/contact.rb +128 -88
- data/lib/connectwise-ruby-sdk/models/contact_communication.rb +19 -9
- data/lib/connectwise-ruby-sdk/models/contact_communication_item.rb +19 -9
- data/lib/connectwise-ruby-sdk/models/contact_department.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/contact_relationship.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/contact_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/currency.rb +35 -21
- data/lib/connectwise-ruby-sdk/models/expense_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/forecast.rb +8 -6
- data/lib/connectwise-ruby-sdk/models/form_submitted.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/group.rb +8 -6
- data/lib/connectwise-ruby-sdk/models/integrator_login.rb +118 -78
- data/lib/connectwise-ruby-sdk/models/invoice.rb +32 -24
- data/lib/connectwise-ruby-sdk/models/item.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/link.rb +19 -9
- data/lib/connectwise-ruby-sdk/models/link_clicked.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/location.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/manufacturer.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/marketing_contact.rb +8 -6
- data/lib/connectwise-ruby-sdk/models/member.rb +129 -81
- data/lib/connectwise-ruby-sdk/models/menu_entry.rb +30 -12
- data/lib/connectwise-ruby-sdk/models/opportunity.rb +27 -15
- data/lib/connectwise-ruby-sdk/models/opportunity_rating.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/opportunity_status.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/opportunity_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/order.rb +8 -6
- data/lib/connectwise-ruby-sdk/models/order_status.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/pricing_schedule.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/priority.rb +22 -6
- data/lib/connectwise-ruby-sdk/models/product_item.rb +40 -30
- data/lib/connectwise-ruby-sdk/models/product_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/project.rb +27 -15
- data/lib/connectwise-ruby-sdk/models/project_phase.rb +19 -9
- data/lib/connectwise-ruby-sdk/models/purchase_order.rb +32 -24
- data/lib/connectwise-ruby-sdk/models/purchase_order_line_item.rb +59 -39
- data/lib/connectwise-ruby-sdk/models/schedule_entry.rb +8 -6
- data/lib/connectwise-ruby-sdk/models/schedule_status.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/schedule_type.rb +22 -6
- data/lib/connectwise-ruby-sdk/models/shipment_method.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/source.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/status.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/sub_category.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/sub_type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/survey.rb +35 -21
- data/lib/connectwise-ruby-sdk/models/survey_question.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/survey_question_option.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/task.rb +13 -7
- data/lib/connectwise-ruby-sdk/models/team.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/ticket.rb +115 -81
- data/lib/connectwise-ruby-sdk/models/type.rb +11 -3
- data/lib/connectwise-ruby-sdk/models/unit_of_measure.rb +19 -9
- data/lib/connectwise-ruby-sdk/models/user_defined_field.rb +52 -22
- data/lib/connectwise-ruby-sdk/models/user_defined_field_option.rb +11 -3
- data/lib/connectwise-ruby-sdk/version.rb +1 -1
- data/spec/api_client_spec.rb +3 -2
- data/spec/configuration_spec.rb +1 -0
- data/spec/spec_helper.rb +1 -0
- metadata +2 -3
- data/git_push.sh +0 -67
|
@@ -115,6 +115,14 @@ module Connectwise
|
|
|
115
115
|
# @return Array for valid properies with the reasons
|
|
116
116
|
def list_invalid_properties
|
|
117
117
|
invalid_properties = Array.new
|
|
118
|
+
if @name.nil?
|
|
119
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @name.to_s.length > 50
|
|
123
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 50.")
|
|
124
|
+
end
|
|
125
|
+
|
|
118
126
|
return invalid_properties
|
|
119
127
|
end
|
|
120
128
|
|
|
@@ -122,7 +130,7 @@ module Connectwise
|
|
|
122
130
|
# @return true if the model is valid
|
|
123
131
|
def valid?
|
|
124
132
|
return false if @name.nil?
|
|
125
|
-
return false if @name.to_s.length
|
|
133
|
+
return false if @name.to_s.length > 50
|
|
126
134
|
type_xref_validator = EnumAttributeValidator.new('String', ["InventoryPart", "NonInventoryPart", "OtherCharge", "Service"])
|
|
127
135
|
return false unless type_xref_validator.valid?(@type_xref)
|
|
128
136
|
return true
|
|
@@ -135,8 +143,8 @@ module Connectwise
|
|
|
135
143
|
fail ArgumentError, "name cannot be nil"
|
|
136
144
|
end
|
|
137
145
|
|
|
138
|
-
if name.to_s.length
|
|
139
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
146
|
+
if name.to_s.length > 50
|
|
147
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 50."
|
|
140
148
|
end
|
|
141
149
|
|
|
142
150
|
@name = name
|
|
@@ -507,6 +507,24 @@ module Connectwise
|
|
|
507
507
|
# @return Array for valid properies with the reasons
|
|
508
508
|
def list_invalid_properties
|
|
509
509
|
invalid_properties = Array.new
|
|
510
|
+
|
|
511
|
+
if !@billing_attention.nil? && @billing_attention.to_s.length > 50
|
|
512
|
+
invalid_properties.push("invalid value for 'billing_attention', the character length must be smaller than or equal to 50.")
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
if !@customer_po.nil? && @customer_po.to_s.length > 50
|
|
517
|
+
invalid_properties.push("invalid value for 'customer_po', the character length must be smaller than or equal to 50.")
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
if @name.nil?
|
|
521
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
if @name.to_s.length > 100
|
|
525
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 100.")
|
|
526
|
+
end
|
|
527
|
+
|
|
510
528
|
return invalid_properties
|
|
511
529
|
end
|
|
512
530
|
|
|
@@ -515,7 +533,7 @@ module Connectwise
|
|
|
515
533
|
def valid?
|
|
516
534
|
bill_expenses_validator = EnumAttributeValidator.new('String', ["Billable", "DoNotBill", "NoCharge", "NoDefault"])
|
|
517
535
|
return false unless bill_expenses_validator.valid?(@bill_expenses)
|
|
518
|
-
return false if @billing_attention.to_s.length
|
|
536
|
+
return false if !@billing_attention.nil? && @billing_attention.to_s.length > 50
|
|
519
537
|
return false if @billing_method.nil?
|
|
520
538
|
billing_method_validator = EnumAttributeValidator.new('String', ["ActualRates", "FixedFee", "NotToExceed", "OverrideRate"])
|
|
521
539
|
return false unless billing_method_validator.valid?(@billing_method)
|
|
@@ -529,11 +547,11 @@ module Connectwise
|
|
|
529
547
|
budget_analysis_validator = EnumAttributeValidator.new('String', ["ActualHours", "BillableHours"])
|
|
530
548
|
return false unless budget_analysis_validator.valid?(@budget_analysis)
|
|
531
549
|
return false if @company.nil?
|
|
532
|
-
return false if @customer_po.to_s.length
|
|
550
|
+
return false if !@customer_po.nil? && @customer_po.to_s.length > 50
|
|
533
551
|
return false if @estimated_end.nil?
|
|
534
552
|
return false if @estimated_start.nil?
|
|
535
553
|
return false if @name.nil?
|
|
536
|
-
return false if @name.to_s.length
|
|
554
|
+
return false if @name.to_s.length > 100
|
|
537
555
|
return true
|
|
538
556
|
end
|
|
539
557
|
|
|
@@ -550,12 +568,9 @@ module Connectwise
|
|
|
550
568
|
# Custom attribute writer method with validation
|
|
551
569
|
# @param [Object] billing_attention Value to be assigned
|
|
552
570
|
def billing_attention=(billing_attention)
|
|
553
|
-
if billing_attention.nil?
|
|
554
|
-
fail ArgumentError, "billing_attention cannot be nil"
|
|
555
|
-
end
|
|
556
571
|
|
|
557
|
-
if billing_attention.to_s.length
|
|
558
|
-
fail ArgumentError, "invalid value for 'billing_attention', the character length must be
|
|
572
|
+
if !billing_attention.nil? && billing_attention.to_s.length > 50
|
|
573
|
+
fail ArgumentError, "invalid value for 'billing_attention', the character length must be smaller than or equal to 50."
|
|
559
574
|
end
|
|
560
575
|
|
|
561
576
|
@billing_attention = billing_attention
|
|
@@ -614,12 +629,9 @@ module Connectwise
|
|
|
614
629
|
# Custom attribute writer method with validation
|
|
615
630
|
# @param [Object] customer_po Value to be assigned
|
|
616
631
|
def customer_po=(customer_po)
|
|
617
|
-
if customer_po.nil?
|
|
618
|
-
fail ArgumentError, "customer_po cannot be nil"
|
|
619
|
-
end
|
|
620
632
|
|
|
621
|
-
if customer_po.to_s.length
|
|
622
|
-
fail ArgumentError, "invalid value for 'customer_po', the character length must be
|
|
633
|
+
if !customer_po.nil? && customer_po.to_s.length > 50
|
|
634
|
+
fail ArgumentError, "invalid value for 'customer_po', the character length must be smaller than or equal to 50."
|
|
623
635
|
end
|
|
624
636
|
|
|
625
637
|
@customer_po = customer_po
|
|
@@ -632,8 +644,8 @@ module Connectwise
|
|
|
632
644
|
fail ArgumentError, "name cannot be nil"
|
|
633
645
|
end
|
|
634
646
|
|
|
635
|
-
if name.to_s.length
|
|
636
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
647
|
+
if name.to_s.length > 100
|
|
648
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 100."
|
|
637
649
|
end
|
|
638
650
|
|
|
639
651
|
@name = name
|
|
@@ -291,6 +291,19 @@ module Connectwise
|
|
|
291
291
|
# @return Array for valid properies with the reasons
|
|
292
292
|
def list_invalid_properties
|
|
293
293
|
invalid_properties = Array.new
|
|
294
|
+
if @description.nil?
|
|
295
|
+
invalid_properties.push("invalid value for 'description', description cannot be nil.")
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
if @description.to_s.length > 100
|
|
299
|
+
invalid_properties.push("invalid value for 'description', the character length must be smaller than or equal to 100.")
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
if !@wbs_code.nil? && @wbs_code.to_s.length > 50
|
|
304
|
+
invalid_properties.push("invalid value for 'wbs_code', the character length must be smaller than or equal to 50.")
|
|
305
|
+
end
|
|
306
|
+
|
|
294
307
|
return invalid_properties
|
|
295
308
|
end
|
|
296
309
|
|
|
@@ -298,8 +311,8 @@ module Connectwise
|
|
|
298
311
|
# @return true if the model is valid
|
|
299
312
|
def valid?
|
|
300
313
|
return false if @description.nil?
|
|
301
|
-
return false if @description.to_s.length
|
|
302
|
-
return false if @wbs_code.to_s.length
|
|
314
|
+
return false if @description.to_s.length > 100
|
|
315
|
+
return false if !@wbs_code.nil? && @wbs_code.to_s.length > 50
|
|
303
316
|
bill_time_validator = EnumAttributeValidator.new('String', ["Billable", "DoNotBill", "NoCharge", "NoDefault"])
|
|
304
317
|
return false unless bill_time_validator.valid?(@bill_time)
|
|
305
318
|
bill_expenses_validator = EnumAttributeValidator.new('String', ["Billable", "DoNotBill", "NoCharge", "NoDefault"])
|
|
@@ -318,8 +331,8 @@ module Connectwise
|
|
|
318
331
|
fail ArgumentError, "description cannot be nil"
|
|
319
332
|
end
|
|
320
333
|
|
|
321
|
-
if description.to_s.length
|
|
322
|
-
fail ArgumentError, "invalid value for 'description', the character length must be
|
|
334
|
+
if description.to_s.length > 100
|
|
335
|
+
fail ArgumentError, "invalid value for 'description', the character length must be smaller than or equal to 100."
|
|
323
336
|
end
|
|
324
337
|
|
|
325
338
|
@description = description
|
|
@@ -328,12 +341,9 @@ module Connectwise
|
|
|
328
341
|
# Custom attribute writer method with validation
|
|
329
342
|
# @param [Object] wbs_code Value to be assigned
|
|
330
343
|
def wbs_code=(wbs_code)
|
|
331
|
-
if wbs_code.nil?
|
|
332
|
-
fail ArgumentError, "wbs_code cannot be nil"
|
|
333
|
-
end
|
|
334
344
|
|
|
335
|
-
if wbs_code.to_s.length
|
|
336
|
-
fail ArgumentError, "invalid value for 'wbs_code', the character length must be
|
|
345
|
+
if !wbs_code.nil? && wbs_code.to_s.length > 50
|
|
346
|
+
fail ArgumentError, "invalid value for 'wbs_code', the character length must be smaller than or equal to 50."
|
|
337
347
|
end
|
|
338
348
|
|
|
339
349
|
@wbs_code = wbs_code
|
|
@@ -448,6 +448,26 @@ module Connectwise
|
|
|
448
448
|
# @return Array for valid properies with the reasons
|
|
449
449
|
def list_invalid_properties
|
|
450
450
|
invalid_properties = Array.new
|
|
451
|
+
|
|
452
|
+
if !@po_number.nil? && @po_number.to_s.length > 50
|
|
453
|
+
invalid_properties.push("invalid value for 'po_number', the character length must be smaller than or equal to 50.")
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
if !@tracking_number.nil? && @tracking_number.to_s.length > 50
|
|
458
|
+
invalid_properties.push("invalid value for 'tracking_number', the character length must be smaller than or equal to 50.")
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
if !@vendor_invoice_number.nil? && @vendor_invoice_number.to_s.length > 50
|
|
463
|
+
invalid_properties.push("invalid value for 'vendor_invoice_number', the character length must be smaller than or equal to 50.")
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
if !@vendor_order_number.nil? && @vendor_order_number.to_s.length > 50
|
|
468
|
+
invalid_properties.push("invalid value for 'vendor_order_number', the character length must be smaller than or equal to 50.")
|
|
469
|
+
end
|
|
470
|
+
|
|
451
471
|
return invalid_properties
|
|
452
472
|
end
|
|
453
473
|
|
|
@@ -455,25 +475,22 @@ module Connectwise
|
|
|
455
475
|
# @return true if the model is valid
|
|
456
476
|
def valid?
|
|
457
477
|
return false if @location_id.nil?
|
|
458
|
-
return false if @po_number.to_s.length
|
|
478
|
+
return false if !@po_number.nil? && @po_number.to_s.length > 50
|
|
459
479
|
return false if @status.nil?
|
|
460
480
|
return false if @terms.nil?
|
|
461
|
-
return false if @tracking_number.to_s.length
|
|
481
|
+
return false if !@tracking_number.nil? && @tracking_number.to_s.length > 50
|
|
462
482
|
return false if @vendor_company.nil?
|
|
463
|
-
return false if @vendor_invoice_number.to_s.length
|
|
464
|
-
return false if @vendor_order_number.to_s.length
|
|
483
|
+
return false if !@vendor_invoice_number.nil? && @vendor_invoice_number.to_s.length > 50
|
|
484
|
+
return false if !@vendor_order_number.nil? && @vendor_order_number.to_s.length > 50
|
|
465
485
|
return true
|
|
466
486
|
end
|
|
467
487
|
|
|
468
488
|
# Custom attribute writer method with validation
|
|
469
489
|
# @param [Object] po_number Value to be assigned
|
|
470
490
|
def po_number=(po_number)
|
|
471
|
-
if po_number.nil?
|
|
472
|
-
fail ArgumentError, "po_number cannot be nil"
|
|
473
|
-
end
|
|
474
491
|
|
|
475
|
-
if po_number.to_s.length
|
|
476
|
-
fail ArgumentError, "invalid value for 'po_number', the character length must be
|
|
492
|
+
if !po_number.nil? && po_number.to_s.length > 50
|
|
493
|
+
fail ArgumentError, "invalid value for 'po_number', the character length must be smaller than or equal to 50."
|
|
477
494
|
end
|
|
478
495
|
|
|
479
496
|
@po_number = po_number
|
|
@@ -482,12 +499,9 @@ module Connectwise
|
|
|
482
499
|
# Custom attribute writer method with validation
|
|
483
500
|
# @param [Object] tracking_number Value to be assigned
|
|
484
501
|
def tracking_number=(tracking_number)
|
|
485
|
-
if tracking_number.nil?
|
|
486
|
-
fail ArgumentError, "tracking_number cannot be nil"
|
|
487
|
-
end
|
|
488
502
|
|
|
489
|
-
if tracking_number.to_s.length
|
|
490
|
-
fail ArgumentError, "invalid value for 'tracking_number', the character length must be
|
|
503
|
+
if !tracking_number.nil? && tracking_number.to_s.length > 50
|
|
504
|
+
fail ArgumentError, "invalid value for 'tracking_number', the character length must be smaller than or equal to 50."
|
|
491
505
|
end
|
|
492
506
|
|
|
493
507
|
@tracking_number = tracking_number
|
|
@@ -496,12 +510,9 @@ module Connectwise
|
|
|
496
510
|
# Custom attribute writer method with validation
|
|
497
511
|
# @param [Object] vendor_invoice_number Value to be assigned
|
|
498
512
|
def vendor_invoice_number=(vendor_invoice_number)
|
|
499
|
-
if vendor_invoice_number.nil?
|
|
500
|
-
fail ArgumentError, "vendor_invoice_number cannot be nil"
|
|
501
|
-
end
|
|
502
513
|
|
|
503
|
-
if vendor_invoice_number.to_s.length
|
|
504
|
-
fail ArgumentError, "invalid value for 'vendor_invoice_number', the character length must be
|
|
514
|
+
if !vendor_invoice_number.nil? && vendor_invoice_number.to_s.length > 50
|
|
515
|
+
fail ArgumentError, "invalid value for 'vendor_invoice_number', the character length must be smaller than or equal to 50."
|
|
505
516
|
end
|
|
506
517
|
|
|
507
518
|
@vendor_invoice_number = vendor_invoice_number
|
|
@@ -510,12 +521,9 @@ module Connectwise
|
|
|
510
521
|
# Custom attribute writer method with validation
|
|
511
522
|
# @param [Object] vendor_order_number Value to be assigned
|
|
512
523
|
def vendor_order_number=(vendor_order_number)
|
|
513
|
-
if vendor_order_number.nil?
|
|
514
|
-
fail ArgumentError, "vendor_order_number cannot be nil"
|
|
515
|
-
end
|
|
516
524
|
|
|
517
|
-
if vendor_order_number.to_s.length
|
|
518
|
-
fail ArgumentError, "invalid value for 'vendor_order_number', the character length must be
|
|
525
|
+
if !vendor_order_number.nil? && vendor_order_number.to_s.length > 50
|
|
526
|
+
fail ArgumentError, "invalid value for 'vendor_order_number', the character length must be smaller than or equal to 50."
|
|
519
527
|
end
|
|
520
528
|
|
|
521
529
|
@vendor_order_number = vendor_order_number
|
|
@@ -278,36 +278,71 @@ module Connectwise
|
|
|
278
278
|
# @return Array for valid properies with the reasons
|
|
279
279
|
def list_invalid_properties
|
|
280
280
|
invalid_properties = Array.new
|
|
281
|
+
|
|
282
|
+
if !@canceled_reason.nil? && @canceled_reason.to_s.length > 100
|
|
283
|
+
invalid_properties.push("invalid value for 'canceled_reason', the character length must be smaller than or equal to 100.")
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if @description.nil?
|
|
287
|
+
invalid_properties.push("invalid value for 'description', description cannot be nil.")
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if @description.to_s.length > 6000
|
|
291
|
+
invalid_properties.push("invalid value for 'description', the character length must be smaller than or equal to 6000.")
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
if !@internal_notes.nil? && @internal_notes.to_s.length > 1000
|
|
296
|
+
invalid_properties.push("invalid value for 'internal_notes', the character length must be smaller than or equal to 1000.")
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
if !@packing_slip.nil? && @packing_slip.to_s.length > 30
|
|
301
|
+
invalid_properties.push("invalid value for 'packing_slip', the character length must be smaller than or equal to 30.")
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
if !@serial_numbers.nil? && @serial_numbers.to_s.length > 50
|
|
306
|
+
invalid_properties.push("invalid value for 'serial_numbers', the character length must be smaller than or equal to 50.")
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
if !@tracking_number.nil? && @tracking_number.to_s.length > 50
|
|
311
|
+
invalid_properties.push("invalid value for 'tracking_number', the character length must be smaller than or equal to 50.")
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
if !@vendor_order_number.nil? && @vendor_order_number.to_s.length > 50
|
|
316
|
+
invalid_properties.push("invalid value for 'vendor_order_number', the character length must be smaller than or equal to 50.")
|
|
317
|
+
end
|
|
318
|
+
|
|
281
319
|
return invalid_properties
|
|
282
320
|
end
|
|
283
321
|
|
|
284
322
|
# Check to see if the all the properties in the model are valid
|
|
285
323
|
# @return true if the model is valid
|
|
286
324
|
def valid?
|
|
287
|
-
return false if @canceled_reason.to_s.length
|
|
325
|
+
return false if !@canceled_reason.nil? && @canceled_reason.to_s.length > 100
|
|
288
326
|
return false if @description.nil?
|
|
289
|
-
return false if @description.to_s.length
|
|
290
|
-
return false if @internal_notes.to_s.length
|
|
327
|
+
return false if @description.to_s.length > 6000
|
|
328
|
+
return false if !@internal_notes.nil? && @internal_notes.to_s.length > 1000
|
|
291
329
|
return false if @line_number.nil?
|
|
292
|
-
return false if @packing_slip.to_s.length
|
|
330
|
+
return false if !@packing_slip.nil? && @packing_slip.to_s.length > 30
|
|
293
331
|
return false if @product.nil?
|
|
294
332
|
return false if @quantity.nil?
|
|
295
|
-
return false if @serial_numbers.to_s.length
|
|
296
|
-
return false if @tracking_number.to_s.length
|
|
333
|
+
return false if !@serial_numbers.nil? && @serial_numbers.to_s.length > 50
|
|
334
|
+
return false if !@tracking_number.nil? && @tracking_number.to_s.length > 50
|
|
297
335
|
return false if @unit_of_measure.nil?
|
|
298
|
-
return false if @vendor_order_number.to_s.length
|
|
336
|
+
return false if !@vendor_order_number.nil? && @vendor_order_number.to_s.length > 50
|
|
299
337
|
return true
|
|
300
338
|
end
|
|
301
339
|
|
|
302
340
|
# Custom attribute writer method with validation
|
|
303
341
|
# @param [Object] canceled_reason Value to be assigned
|
|
304
342
|
def canceled_reason=(canceled_reason)
|
|
305
|
-
if canceled_reason.nil?
|
|
306
|
-
fail ArgumentError, "canceled_reason cannot be nil"
|
|
307
|
-
end
|
|
308
343
|
|
|
309
|
-
if canceled_reason.to_s.length
|
|
310
|
-
fail ArgumentError, "invalid value for 'canceled_reason', the character length must be
|
|
344
|
+
if !canceled_reason.nil? && canceled_reason.to_s.length > 100
|
|
345
|
+
fail ArgumentError, "invalid value for 'canceled_reason', the character length must be smaller than or equal to 100."
|
|
311
346
|
end
|
|
312
347
|
|
|
313
348
|
@canceled_reason = canceled_reason
|
|
@@ -320,8 +355,8 @@ module Connectwise
|
|
|
320
355
|
fail ArgumentError, "description cannot be nil"
|
|
321
356
|
end
|
|
322
357
|
|
|
323
|
-
if description.to_s.length
|
|
324
|
-
fail ArgumentError, "invalid value for 'description', the character length must be
|
|
358
|
+
if description.to_s.length > 6000
|
|
359
|
+
fail ArgumentError, "invalid value for 'description', the character length must be smaller than or equal to 6000."
|
|
325
360
|
end
|
|
326
361
|
|
|
327
362
|
@description = description
|
|
@@ -330,12 +365,9 @@ module Connectwise
|
|
|
330
365
|
# Custom attribute writer method with validation
|
|
331
366
|
# @param [Object] internal_notes Value to be assigned
|
|
332
367
|
def internal_notes=(internal_notes)
|
|
333
|
-
if internal_notes.nil?
|
|
334
|
-
fail ArgumentError, "internal_notes cannot be nil"
|
|
335
|
-
end
|
|
336
368
|
|
|
337
|
-
if internal_notes.to_s.length
|
|
338
|
-
fail ArgumentError, "invalid value for 'internal_notes', the character length must be
|
|
369
|
+
if !internal_notes.nil? && internal_notes.to_s.length > 1000
|
|
370
|
+
fail ArgumentError, "invalid value for 'internal_notes', the character length must be smaller than or equal to 1000."
|
|
339
371
|
end
|
|
340
372
|
|
|
341
373
|
@internal_notes = internal_notes
|
|
@@ -344,12 +376,9 @@ module Connectwise
|
|
|
344
376
|
# Custom attribute writer method with validation
|
|
345
377
|
# @param [Object] packing_slip Value to be assigned
|
|
346
378
|
def packing_slip=(packing_slip)
|
|
347
|
-
if packing_slip.nil?
|
|
348
|
-
fail ArgumentError, "packing_slip cannot be nil"
|
|
349
|
-
end
|
|
350
379
|
|
|
351
|
-
if packing_slip.to_s.length
|
|
352
|
-
fail ArgumentError, "invalid value for 'packing_slip', the character length must be
|
|
380
|
+
if !packing_slip.nil? && packing_slip.to_s.length > 30
|
|
381
|
+
fail ArgumentError, "invalid value for 'packing_slip', the character length must be smaller than or equal to 30."
|
|
353
382
|
end
|
|
354
383
|
|
|
355
384
|
@packing_slip = packing_slip
|
|
@@ -358,12 +387,9 @@ module Connectwise
|
|
|
358
387
|
# Custom attribute writer method with validation
|
|
359
388
|
# @param [Object] serial_numbers Value to be assigned
|
|
360
389
|
def serial_numbers=(serial_numbers)
|
|
361
|
-
if serial_numbers.nil?
|
|
362
|
-
fail ArgumentError, "serial_numbers cannot be nil"
|
|
363
|
-
end
|
|
364
390
|
|
|
365
|
-
if serial_numbers.to_s.length
|
|
366
|
-
fail ArgumentError, "invalid value for 'serial_numbers', the character length must be
|
|
391
|
+
if !serial_numbers.nil? && serial_numbers.to_s.length > 50
|
|
392
|
+
fail ArgumentError, "invalid value for 'serial_numbers', the character length must be smaller than or equal to 50."
|
|
367
393
|
end
|
|
368
394
|
|
|
369
395
|
@serial_numbers = serial_numbers
|
|
@@ -372,12 +398,9 @@ module Connectwise
|
|
|
372
398
|
# Custom attribute writer method with validation
|
|
373
399
|
# @param [Object] tracking_number Value to be assigned
|
|
374
400
|
def tracking_number=(tracking_number)
|
|
375
|
-
if tracking_number.nil?
|
|
376
|
-
fail ArgumentError, "tracking_number cannot be nil"
|
|
377
|
-
end
|
|
378
401
|
|
|
379
|
-
if tracking_number.to_s.length
|
|
380
|
-
fail ArgumentError, "invalid value for 'tracking_number', the character length must be
|
|
402
|
+
if !tracking_number.nil? && tracking_number.to_s.length > 50
|
|
403
|
+
fail ArgumentError, "invalid value for 'tracking_number', the character length must be smaller than or equal to 50."
|
|
381
404
|
end
|
|
382
405
|
|
|
383
406
|
@tracking_number = tracking_number
|
|
@@ -386,12 +409,9 @@ module Connectwise
|
|
|
386
409
|
# Custom attribute writer method with validation
|
|
387
410
|
# @param [Object] vendor_order_number Value to be assigned
|
|
388
411
|
def vendor_order_number=(vendor_order_number)
|
|
389
|
-
if vendor_order_number.nil?
|
|
390
|
-
fail ArgumentError, "vendor_order_number cannot be nil"
|
|
391
|
-
end
|
|
392
412
|
|
|
393
|
-
if vendor_order_number.to_s.length
|
|
394
|
-
fail ArgumentError, "invalid value for 'vendor_order_number', the character length must be
|
|
413
|
+
if !vendor_order_number.nil? && vendor_order_number.to_s.length > 50
|
|
414
|
+
fail ArgumentError, "invalid value for 'vendor_order_number', the character length must be smaller than or equal to 50."
|
|
395
415
|
end
|
|
396
416
|
|
|
397
417
|
@vendor_order_number = vendor_order_number
|
|
@@ -214,13 +214,18 @@ module Connectwise
|
|
|
214
214
|
# @return Array for valid properies with the reasons
|
|
215
215
|
def list_invalid_properties
|
|
216
216
|
invalid_properties = Array.new
|
|
217
|
+
|
|
218
|
+
if !@name.nil? && @name.to_s.length > 250
|
|
219
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 250.")
|
|
220
|
+
end
|
|
221
|
+
|
|
217
222
|
return invalid_properties
|
|
218
223
|
end
|
|
219
224
|
|
|
220
225
|
# Check to see if the all the properties in the model are valid
|
|
221
226
|
# @return true if the model is valid
|
|
222
227
|
def valid?
|
|
223
|
-
return false if @name.to_s.length
|
|
228
|
+
return false if !@name.nil? && @name.to_s.length > 250
|
|
224
229
|
return false if @type.nil?
|
|
225
230
|
return true
|
|
226
231
|
end
|
|
@@ -228,12 +233,9 @@ module Connectwise
|
|
|
228
233
|
# Custom attribute writer method with validation
|
|
229
234
|
# @param [Object] name Value to be assigned
|
|
230
235
|
def name=(name)
|
|
231
|
-
if name.nil?
|
|
232
|
-
fail ArgumentError, "name cannot be nil"
|
|
233
|
-
end
|
|
234
236
|
|
|
235
|
-
if name.to_s.length
|
|
236
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
237
|
+
if !name.nil? && name.to_s.length > 250
|
|
238
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 250."
|
|
237
239
|
end
|
|
238
240
|
|
|
239
241
|
@name = name
|