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
|
@@ -136,6 +136,27 @@ module Connectwise
|
|
|
136
136
|
# @return Array for valid properies with the reasons
|
|
137
137
|
def list_invalid_properties
|
|
138
138
|
invalid_properties = Array.new
|
|
139
|
+
if @caption.nil?
|
|
140
|
+
invalid_properties.push("invalid value for 'caption', caption cannot be nil.")
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if @caption.to_s.length > 50
|
|
144
|
+
invalid_properties.push("invalid value for 'caption', the character length must be smaller than or equal to 50.")
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @link.nil?
|
|
148
|
+
invalid_properties.push("invalid value for 'link', link cannot be nil.")
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if @link.to_s.length > 2000
|
|
152
|
+
invalid_properties.push("invalid value for 'link', the character length must be smaller than or equal to 2000.")
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
if !@origin.nil? && @origin.to_s.length > 2000
|
|
157
|
+
invalid_properties.push("invalid value for 'origin', the character length must be smaller than or equal to 2000.")
|
|
158
|
+
end
|
|
159
|
+
|
|
139
160
|
return invalid_properties
|
|
140
161
|
end
|
|
141
162
|
|
|
@@ -144,11 +165,11 @@ module Connectwise
|
|
|
144
165
|
def valid?
|
|
145
166
|
return false if @menu_location.nil?
|
|
146
167
|
return false if @caption.nil?
|
|
147
|
-
return false if @caption.to_s.length
|
|
168
|
+
return false if @caption.to_s.length > 50
|
|
148
169
|
return false if @link.nil?
|
|
149
|
-
return false if @link.to_s.length
|
|
170
|
+
return false if @link.to_s.length > 2000
|
|
150
171
|
return false if @new_window_flag.nil?
|
|
151
|
-
return false if @origin.to_s.length
|
|
172
|
+
return false if !@origin.nil? && @origin.to_s.length > 2000
|
|
152
173
|
return true
|
|
153
174
|
end
|
|
154
175
|
|
|
@@ -159,8 +180,8 @@ module Connectwise
|
|
|
159
180
|
fail ArgumentError, "caption cannot be nil"
|
|
160
181
|
end
|
|
161
182
|
|
|
162
|
-
if caption.to_s.length
|
|
163
|
-
fail ArgumentError, "invalid value for 'caption', the character length must be
|
|
183
|
+
if caption.to_s.length > 50
|
|
184
|
+
fail ArgumentError, "invalid value for 'caption', the character length must be smaller than or equal to 50."
|
|
164
185
|
end
|
|
165
186
|
|
|
166
187
|
@caption = caption
|
|
@@ -173,8 +194,8 @@ module Connectwise
|
|
|
173
194
|
fail ArgumentError, "link cannot be nil"
|
|
174
195
|
end
|
|
175
196
|
|
|
176
|
-
if link.to_s.length
|
|
177
|
-
fail ArgumentError, "invalid value for 'link', the character length must be
|
|
197
|
+
if link.to_s.length > 2000
|
|
198
|
+
fail ArgumentError, "invalid value for 'link', the character length must be smaller than or equal to 2000."
|
|
178
199
|
end
|
|
179
200
|
|
|
180
201
|
@link = link
|
|
@@ -183,12 +204,9 @@ module Connectwise
|
|
|
183
204
|
# Custom attribute writer method with validation
|
|
184
205
|
# @param [Object] origin Value to be assigned
|
|
185
206
|
def origin=(origin)
|
|
186
|
-
if origin.nil?
|
|
187
|
-
fail ArgumentError, "origin cannot be nil"
|
|
188
|
-
end
|
|
189
207
|
|
|
190
|
-
if origin.to_s.length
|
|
191
|
-
fail ArgumentError, "invalid value for 'origin', the character length must be
|
|
208
|
+
if !origin.nil? && origin.to_s.length > 2000
|
|
209
|
+
fail ArgumentError, "invalid value for 'origin', the character length must be smaller than or equal to 2000."
|
|
192
210
|
end
|
|
193
211
|
|
|
194
212
|
@origin = origin
|
|
@@ -320,6 +320,24 @@ module Connectwise
|
|
|
320
320
|
# @return Array for valid properies with the reasons
|
|
321
321
|
def list_invalid_properties
|
|
322
322
|
invalid_properties = Array.new
|
|
323
|
+
if @name.nil?
|
|
324
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
if @name.to_s.length > 100
|
|
328
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 100.")
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
if !@source.nil? && @source.to_s.length > 50
|
|
333
|
+
invalid_properties.push("invalid value for 'source', the character length must be smaller than or equal to 50.")
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
if !@customer_po.nil? && @customer_po.to_s.length > 25
|
|
338
|
+
invalid_properties.push("invalid value for 'customer_po', the character length must be smaller than or equal to 25.")
|
|
339
|
+
end
|
|
340
|
+
|
|
323
341
|
return invalid_properties
|
|
324
342
|
end
|
|
325
343
|
|
|
@@ -327,13 +345,13 @@ module Connectwise
|
|
|
327
345
|
# @return true if the model is valid
|
|
328
346
|
def valid?
|
|
329
347
|
return false if @name.nil?
|
|
330
|
-
return false if @name.to_s.length
|
|
331
|
-
return false if @source.to_s.length
|
|
348
|
+
return false if @name.to_s.length > 100
|
|
349
|
+
return false if !@source.nil? && @source.to_s.length > 50
|
|
332
350
|
return false if @primary_sales_rep.nil?
|
|
333
351
|
return false if @company.nil?
|
|
334
352
|
return false if @contact.nil?
|
|
335
353
|
return false if @site.nil?
|
|
336
|
-
return false if @customer_po.to_s.length
|
|
354
|
+
return false if !@customer_po.nil? && @customer_po.to_s.length > 25
|
|
337
355
|
return true
|
|
338
356
|
end
|
|
339
357
|
|
|
@@ -344,8 +362,8 @@ module Connectwise
|
|
|
344
362
|
fail ArgumentError, "name cannot be nil"
|
|
345
363
|
end
|
|
346
364
|
|
|
347
|
-
if name.to_s.length
|
|
348
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
365
|
+
if name.to_s.length > 100
|
|
366
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 100."
|
|
349
367
|
end
|
|
350
368
|
|
|
351
369
|
@name = name
|
|
@@ -354,12 +372,9 @@ module Connectwise
|
|
|
354
372
|
# Custom attribute writer method with validation
|
|
355
373
|
# @param [Object] source Value to be assigned
|
|
356
374
|
def source=(source)
|
|
357
|
-
if source.nil?
|
|
358
|
-
fail ArgumentError, "source cannot be nil"
|
|
359
|
-
end
|
|
360
375
|
|
|
361
|
-
if source.to_s.length
|
|
362
|
-
fail ArgumentError, "invalid value for 'source', the character length must be
|
|
376
|
+
if !source.nil? && source.to_s.length > 50
|
|
377
|
+
fail ArgumentError, "invalid value for 'source', the character length must be smaller than or equal to 50."
|
|
363
378
|
end
|
|
364
379
|
|
|
365
380
|
@source = source
|
|
@@ -368,12 +383,9 @@ module Connectwise
|
|
|
368
383
|
# Custom attribute writer method with validation
|
|
369
384
|
# @param [Object] customer_po Value to be assigned
|
|
370
385
|
def customer_po=(customer_po)
|
|
371
|
-
if customer_po.nil?
|
|
372
|
-
fail ArgumentError, "customer_po cannot be nil"
|
|
373
|
-
end
|
|
374
386
|
|
|
375
|
-
if customer_po.to_s.length
|
|
376
|
-
fail ArgumentError, "invalid value for 'customer_po', the character length must be
|
|
387
|
+
if !customer_po.nil? && customer_po.to_s.length > 25
|
|
388
|
+
fail ArgumentError, "invalid value for 'customer_po', the character length must be smaller than or equal to 25."
|
|
377
389
|
end
|
|
378
390
|
|
|
379
391
|
@customer_po = customer_po
|
|
@@ -86,6 +86,14 @@ module Connectwise
|
|
|
86
86
|
# @return Array for valid properies with the reasons
|
|
87
87
|
def list_invalid_properties
|
|
88
88
|
invalid_properties = Array.new
|
|
89
|
+
if @name.nil?
|
|
90
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if @name.to_s.length > 50
|
|
94
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 50.")
|
|
95
|
+
end
|
|
96
|
+
|
|
89
97
|
return invalid_properties
|
|
90
98
|
end
|
|
91
99
|
|
|
@@ -93,7 +101,7 @@ module Connectwise
|
|
|
93
101
|
# @return true if the model is valid
|
|
94
102
|
def valid?
|
|
95
103
|
return false if @name.nil?
|
|
96
|
-
return false if @name.to_s.length
|
|
104
|
+
return false if @name.to_s.length > 50
|
|
97
105
|
return true
|
|
98
106
|
end
|
|
99
107
|
|
|
@@ -104,8 +112,8 @@ module Connectwise
|
|
|
104
112
|
fail ArgumentError, "name cannot be nil"
|
|
105
113
|
end
|
|
106
114
|
|
|
107
|
-
if name.to_s.length
|
|
108
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
115
|
+
if name.to_s.length > 50
|
|
116
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 50."
|
|
109
117
|
end
|
|
110
118
|
|
|
111
119
|
@name = name
|
|
@@ -134,6 +134,14 @@ module Connectwise
|
|
|
134
134
|
# @return Array for valid properies with the reasons
|
|
135
135
|
def list_invalid_properties
|
|
136
136
|
invalid_properties = Array.new
|
|
137
|
+
if @name.nil?
|
|
138
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if @name.to_s.length > 30
|
|
142
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 30.")
|
|
143
|
+
end
|
|
144
|
+
|
|
137
145
|
return invalid_properties
|
|
138
146
|
end
|
|
139
147
|
|
|
@@ -141,7 +149,7 @@ module Connectwise
|
|
|
141
149
|
# @return true if the model is valid
|
|
142
150
|
def valid?
|
|
143
151
|
return false if @name.nil?
|
|
144
|
-
return false if @name.to_s.length
|
|
152
|
+
return false if @name.to_s.length > 30
|
|
145
153
|
return true
|
|
146
154
|
end
|
|
147
155
|
|
|
@@ -152,8 +160,8 @@ module Connectwise
|
|
|
152
160
|
fail ArgumentError, "name cannot be nil"
|
|
153
161
|
end
|
|
154
162
|
|
|
155
|
-
if name.to_s.length
|
|
156
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
163
|
+
if name.to_s.length > 30
|
|
164
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 30."
|
|
157
165
|
end
|
|
158
166
|
|
|
159
167
|
@name = name
|
|
@@ -86,6 +86,14 @@ module Connectwise
|
|
|
86
86
|
# @return Array for valid properies with the reasons
|
|
87
87
|
def list_invalid_properties
|
|
88
88
|
invalid_properties = Array.new
|
|
89
|
+
if @description.nil?
|
|
90
|
+
invalid_properties.push("invalid value for 'description', description cannot be nil.")
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if @description.to_s.length > 50
|
|
94
|
+
invalid_properties.push("invalid value for 'description', the character length must be smaller than or equal to 50.")
|
|
95
|
+
end
|
|
96
|
+
|
|
89
97
|
return invalid_properties
|
|
90
98
|
end
|
|
91
99
|
|
|
@@ -93,7 +101,7 @@ module Connectwise
|
|
|
93
101
|
# @return true if the model is valid
|
|
94
102
|
def valid?
|
|
95
103
|
return false if @description.nil?
|
|
96
|
-
return false if @description.to_s.length
|
|
104
|
+
return false if @description.to_s.length > 50
|
|
97
105
|
return true
|
|
98
106
|
end
|
|
99
107
|
|
|
@@ -104,8 +112,8 @@ module Connectwise
|
|
|
104
112
|
fail ArgumentError, "description cannot be nil"
|
|
105
113
|
end
|
|
106
114
|
|
|
107
|
-
if description.to_s.length
|
|
108
|
-
fail ArgumentError, "invalid value for 'description', the character length must be
|
|
115
|
+
if description.to_s.length > 50
|
|
116
|
+
fail ArgumentError, "invalid value for 'description', the character length must be smaller than or equal to 50."
|
|
109
117
|
end
|
|
110
118
|
|
|
111
119
|
@description = description
|
|
@@ -358,6 +358,11 @@ module Connectwise
|
|
|
358
358
|
# @return Array for valid properies with the reasons
|
|
359
359
|
def list_invalid_properties
|
|
360
360
|
invalid_properties = Array.new
|
|
361
|
+
|
|
362
|
+
if !@po_number.nil? && @po_number.to_s.length > 50
|
|
363
|
+
invalid_properties.push("invalid value for 'po_number', the character length must be smaller than or equal to 50.")
|
|
364
|
+
end
|
|
365
|
+
|
|
361
366
|
return invalid_properties
|
|
362
367
|
end
|
|
363
368
|
|
|
@@ -366,7 +371,7 @@ module Connectwise
|
|
|
366
371
|
def valid?
|
|
367
372
|
return false if @company.nil?
|
|
368
373
|
return false if @status.nil?
|
|
369
|
-
return false if @po_number.to_s.length
|
|
374
|
+
return false if !@po_number.nil? && @po_number.to_s.length > 50
|
|
370
375
|
return false if @sales_rep.nil?
|
|
371
376
|
return true
|
|
372
377
|
end
|
|
@@ -374,12 +379,9 @@ module Connectwise
|
|
|
374
379
|
# Custom attribute writer method with validation
|
|
375
380
|
# @param [Object] po_number Value to be assigned
|
|
376
381
|
def po_number=(po_number)
|
|
377
|
-
if po_number.nil?
|
|
378
|
-
fail ArgumentError, "po_number cannot be nil"
|
|
379
|
-
end
|
|
380
382
|
|
|
381
|
-
if po_number.to_s.length
|
|
382
|
-
fail ArgumentError, "invalid value for 'po_number', the character length must be
|
|
383
|
+
if !po_number.nil? && po_number.to_s.length > 50
|
|
384
|
+
fail ArgumentError, "invalid value for 'po_number', the character length must be smaller than or equal to 50."
|
|
383
385
|
end
|
|
384
386
|
|
|
385
387
|
@po_number = po_number
|
|
@@ -110,6 +110,14 @@ module Connectwise
|
|
|
110
110
|
# @return Array for valid properies with the reasons
|
|
111
111
|
def list_invalid_properties
|
|
112
112
|
invalid_properties = Array.new
|
|
113
|
+
if @name.nil?
|
|
114
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if @name.to_s.length > 50
|
|
118
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 50.")
|
|
119
|
+
end
|
|
120
|
+
|
|
113
121
|
return invalid_properties
|
|
114
122
|
end
|
|
115
123
|
|
|
@@ -117,7 +125,7 @@ module Connectwise
|
|
|
117
125
|
# @return true if the model is valid
|
|
118
126
|
def valid?
|
|
119
127
|
return false if @name.nil?
|
|
120
|
-
return false if @name.to_s.length
|
|
128
|
+
return false if @name.to_s.length > 50
|
|
121
129
|
return true
|
|
122
130
|
end
|
|
123
131
|
|
|
@@ -128,8 +136,8 @@ module Connectwise
|
|
|
128
136
|
fail ArgumentError, "name cannot be nil"
|
|
129
137
|
end
|
|
130
138
|
|
|
131
|
-
if name.to_s.length
|
|
132
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
139
|
+
if name.to_s.length > 50
|
|
140
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 50."
|
|
133
141
|
end
|
|
134
142
|
|
|
135
143
|
@name = name
|
|
@@ -120,6 +120,14 @@ module Connectwise
|
|
|
120
120
|
# @return Array for valid properies with the reasons
|
|
121
121
|
def list_invalid_properties
|
|
122
122
|
invalid_properties = Array.new
|
|
123
|
+
if @name.nil?
|
|
124
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @name.to_s.length > 30
|
|
128
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 30.")
|
|
129
|
+
end
|
|
130
|
+
|
|
123
131
|
return invalid_properties
|
|
124
132
|
end
|
|
125
133
|
|
|
@@ -127,7 +135,7 @@ module Connectwise
|
|
|
127
135
|
# @return true if the model is valid
|
|
128
136
|
def valid?
|
|
129
137
|
return false if @name.nil?
|
|
130
|
-
return false if @name.to_s.length
|
|
138
|
+
return false if @name.to_s.length > 30
|
|
131
139
|
return true
|
|
132
140
|
end
|
|
133
141
|
|
|
@@ -138,8 +146,8 @@ module Connectwise
|
|
|
138
146
|
fail ArgumentError, "name cannot be nil"
|
|
139
147
|
end
|
|
140
148
|
|
|
141
|
-
if name.to_s.length
|
|
142
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
149
|
+
if name.to_s.length > 30
|
|
150
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 30."
|
|
143
151
|
end
|
|
144
152
|
|
|
145
153
|
@name = name
|
|
@@ -110,6 +110,22 @@ module Connectwise
|
|
|
110
110
|
# @return Array for valid properies with the reasons
|
|
111
111
|
def list_invalid_properties
|
|
112
112
|
invalid_properties = Array.new
|
|
113
|
+
if @name.nil?
|
|
114
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if @name.to_s.length > 50
|
|
118
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 50.")
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @color.nil?
|
|
122
|
+
invalid_properties.push("invalid value for 'color', color cannot be nil.")
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if @color.to_s.length > 50
|
|
126
|
+
invalid_properties.push("invalid value for 'color', the character length must be smaller than or equal to 50.")
|
|
127
|
+
end
|
|
128
|
+
|
|
113
129
|
return invalid_properties
|
|
114
130
|
end
|
|
115
131
|
|
|
@@ -117,9 +133,9 @@ module Connectwise
|
|
|
117
133
|
# @return true if the model is valid
|
|
118
134
|
def valid?
|
|
119
135
|
return false if @name.nil?
|
|
120
|
-
return false if @name.to_s.length
|
|
136
|
+
return false if @name.to_s.length > 50
|
|
121
137
|
return false if @color.nil?
|
|
122
|
-
return false if @color.to_s.length
|
|
138
|
+
return false if @color.to_s.length > 50
|
|
123
139
|
return true
|
|
124
140
|
end
|
|
125
141
|
|
|
@@ -130,8 +146,8 @@ module Connectwise
|
|
|
130
146
|
fail ArgumentError, "name cannot be nil"
|
|
131
147
|
end
|
|
132
148
|
|
|
133
|
-
if name.to_s.length
|
|
134
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
149
|
+
if name.to_s.length > 50
|
|
150
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 50."
|
|
135
151
|
end
|
|
136
152
|
|
|
137
153
|
@name = name
|
|
@@ -144,8 +160,8 @@ module Connectwise
|
|
|
144
160
|
fail ArgumentError, "color cannot be nil"
|
|
145
161
|
end
|
|
146
162
|
|
|
147
|
-
if color.to_s.length
|
|
148
|
-
fail ArgumentError, "invalid value for 'color', the character length must be
|
|
163
|
+
if color.to_s.length > 50
|
|
164
|
+
fail ArgumentError, "invalid value for 'color', the character length must be smaller than or equal to 50."
|
|
149
165
|
end
|
|
150
166
|
|
|
151
167
|
@color = color
|
|
@@ -429,6 +429,31 @@ module Connectwise
|
|
|
429
429
|
# @return Array for valid properies with the reasons
|
|
430
430
|
def list_invalid_properties
|
|
431
431
|
invalid_properties = Array.new
|
|
432
|
+
|
|
433
|
+
if !@description.nil? && @description.to_s.length > 2000
|
|
434
|
+
invalid_properties.push("invalid value for 'description', the character length must be smaller than or equal to 2000.")
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
if !@vendor_sku.nil? && @vendor_sku.to_s.length > 50
|
|
439
|
+
invalid_properties.push("invalid value for 'vendor_sku', the character length must be smaller than or equal to 50.")
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
if !@cancelled_reason.nil? && @cancelled_reason.to_s.length > 100
|
|
444
|
+
invalid_properties.push("invalid value for 'cancelled_reason', the character length must be smaller than or equal to 100.")
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
if !@customer_description.nil? && @customer_description.to_s.length > 6000
|
|
449
|
+
invalid_properties.push("invalid value for 'customer_description', the character length must be smaller than or equal to 6000.")
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
if !@internal_notes.nil? && @internal_notes.to_s.length > 1000
|
|
454
|
+
invalid_properties.push("invalid value for 'internal_notes', the character length must be smaller than or equal to 1000.")
|
|
455
|
+
end
|
|
456
|
+
|
|
432
457
|
return invalid_properties
|
|
433
458
|
end
|
|
434
459
|
|
|
@@ -440,16 +465,16 @@ module Connectwise
|
|
|
440
465
|
return false if @charge_to_type.nil?
|
|
441
466
|
charge_to_type_validator = EnumAttributeValidator.new('String', ["Ticket", "Project", "Invoice", "Opportunity", "SalesOrder"])
|
|
442
467
|
return false unless charge_to_type_validator.valid?(@charge_to_type)
|
|
443
|
-
return false if @description.to_s.length
|
|
468
|
+
return false if !@description.nil? && @description.to_s.length > 2000
|
|
444
469
|
price_method_validator = EnumAttributeValidator.new('String', ["FlatRateForRange", "PercentMarkupFromCost", "PercentMarkdownFromPrice", "PricePerUnit"])
|
|
445
470
|
return false unless price_method_validator.valid?(@price_method)
|
|
446
471
|
return false if @billable_option.nil?
|
|
447
472
|
billable_option_validator = EnumAttributeValidator.new('String', ["Billable", "DoNotBill", "NoCharge"])
|
|
448
473
|
return false unless billable_option_validator.valid?(@billable_option)
|
|
449
|
-
return false if @vendor_sku.to_s.length
|
|
450
|
-
return false if @cancelled_reason.to_s.length
|
|
451
|
-
return false if @customer_description.to_s.length
|
|
452
|
-
return false if @internal_notes.to_s.length
|
|
474
|
+
return false if !@vendor_sku.nil? && @vendor_sku.to_s.length > 50
|
|
475
|
+
return false if !@cancelled_reason.nil? && @cancelled_reason.to_s.length > 100
|
|
476
|
+
return false if !@customer_description.nil? && @customer_description.to_s.length > 6000
|
|
477
|
+
return false if !@internal_notes.nil? && @internal_notes.to_s.length > 1000
|
|
453
478
|
return true
|
|
454
479
|
end
|
|
455
480
|
|
|
@@ -466,12 +491,9 @@ module Connectwise
|
|
|
466
491
|
# Custom attribute writer method with validation
|
|
467
492
|
# @param [Object] description Value to be assigned
|
|
468
493
|
def description=(description)
|
|
469
|
-
if description.nil?
|
|
470
|
-
fail ArgumentError, "description cannot be nil"
|
|
471
|
-
end
|
|
472
494
|
|
|
473
|
-
if description.to_s.length
|
|
474
|
-
fail ArgumentError, "invalid value for 'description', the character length must be
|
|
495
|
+
if !description.nil? && description.to_s.length > 2000
|
|
496
|
+
fail ArgumentError, "invalid value for 'description', the character length must be smaller than or equal to 2000."
|
|
475
497
|
end
|
|
476
498
|
|
|
477
499
|
@description = description
|
|
@@ -500,12 +522,9 @@ module Connectwise
|
|
|
500
522
|
# Custom attribute writer method with validation
|
|
501
523
|
# @param [Object] vendor_sku Value to be assigned
|
|
502
524
|
def vendor_sku=(vendor_sku)
|
|
503
|
-
if vendor_sku.nil?
|
|
504
|
-
fail ArgumentError, "vendor_sku cannot be nil"
|
|
505
|
-
end
|
|
506
525
|
|
|
507
|
-
if vendor_sku.to_s.length
|
|
508
|
-
fail ArgumentError, "invalid value for 'vendor_sku', the character length must be
|
|
526
|
+
if !vendor_sku.nil? && vendor_sku.to_s.length > 50
|
|
527
|
+
fail ArgumentError, "invalid value for 'vendor_sku', the character length must be smaller than or equal to 50."
|
|
509
528
|
end
|
|
510
529
|
|
|
511
530
|
@vendor_sku = vendor_sku
|
|
@@ -514,12 +533,9 @@ module Connectwise
|
|
|
514
533
|
# Custom attribute writer method with validation
|
|
515
534
|
# @param [Object] cancelled_reason Value to be assigned
|
|
516
535
|
def cancelled_reason=(cancelled_reason)
|
|
517
|
-
if cancelled_reason.nil?
|
|
518
|
-
fail ArgumentError, "cancelled_reason cannot be nil"
|
|
519
|
-
end
|
|
520
536
|
|
|
521
|
-
if cancelled_reason.to_s.length
|
|
522
|
-
fail ArgumentError, "invalid value for 'cancelled_reason', the character length must be
|
|
537
|
+
if !cancelled_reason.nil? && cancelled_reason.to_s.length > 100
|
|
538
|
+
fail ArgumentError, "invalid value for 'cancelled_reason', the character length must be smaller than or equal to 100."
|
|
523
539
|
end
|
|
524
540
|
|
|
525
541
|
@cancelled_reason = cancelled_reason
|
|
@@ -528,12 +544,9 @@ module Connectwise
|
|
|
528
544
|
# Custom attribute writer method with validation
|
|
529
545
|
# @param [Object] customer_description Value to be assigned
|
|
530
546
|
def customer_description=(customer_description)
|
|
531
|
-
if customer_description.nil?
|
|
532
|
-
fail ArgumentError, "customer_description cannot be nil"
|
|
533
|
-
end
|
|
534
547
|
|
|
535
|
-
if customer_description.to_s.length
|
|
536
|
-
fail ArgumentError, "invalid value for 'customer_description', the character length must be
|
|
548
|
+
if !customer_description.nil? && customer_description.to_s.length > 6000
|
|
549
|
+
fail ArgumentError, "invalid value for 'customer_description', the character length must be smaller than or equal to 6000."
|
|
537
550
|
end
|
|
538
551
|
|
|
539
552
|
@customer_description = customer_description
|
|
@@ -542,12 +555,9 @@ module Connectwise
|
|
|
542
555
|
# Custom attribute writer method with validation
|
|
543
556
|
# @param [Object] internal_notes Value to be assigned
|
|
544
557
|
def internal_notes=(internal_notes)
|
|
545
|
-
if internal_notes.nil?
|
|
546
|
-
fail ArgumentError, "internal_notes cannot be nil"
|
|
547
|
-
end
|
|
548
558
|
|
|
549
|
-
if internal_notes.to_s.length
|
|
550
|
-
fail ArgumentError, "invalid value for 'internal_notes', the character length must be
|
|
559
|
+
if !internal_notes.nil? && internal_notes.to_s.length > 1000
|
|
560
|
+
fail ArgumentError, "invalid value for 'internal_notes', the character length must be smaller than or equal to 1000."
|
|
551
561
|
end
|
|
552
562
|
|
|
553
563
|
@internal_notes = internal_notes
|