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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67365aa2854f003f880b8c827d65e2d2183eff97
|
|
4
|
+
data.tar.gz: 0e4d40ec6fc74f26949e7264d93e954637900a09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2737476272003e3c5a97e767816472f909d7ce276eaeb5458d978aacfa396cb893764fc17e9c1c8882e0ff94747da61e65d3fdb6a3fb07ddf7917d4bdb89377a
|
|
7
|
+
data.tar.gz: 5868f60606b66161d561862b722dac6daaff854e6723738faef315ebdafff2cab651172f84925bf8580912a77ad250074c39e8af966339acd976aa50310332dc
|
data/README.md
CHANGED
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
# connectwise-ruby-sdk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Connectwise - the Ruby gem for the Connectwise REST API
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
ConnectWise API
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
gem build connectwise-ruby-sdk.gemspec
|
|
9
|
-
```
|
|
7
|
+
## Installation
|
|
10
8
|
|
|
11
9
|
Then either install the gem locally:
|
|
12
10
|
|
|
13
11
|
```shell
|
|
14
|
-
gem install ./connectwise-ruby-sdk-1.0.
|
|
12
|
+
gem install ./connectwise-ruby-sdk-1.0.2
|
|
15
13
|
```
|
|
16
|
-
(for development, run `gem install --dev ./connectwise-ruby-sdk-1.0.0.gem` to install the development dependencies)
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Finally add this to the Gemfile:
|
|
21
|
-
|
|
22
|
-
gem 'connectwise-ruby-sdk', '~> 1.0.0'
|
|
15
|
+
Or install from [RubyGems](https://rubygems.org/).
|
|
23
16
|
|
|
17
|
+
Add this to the Gemfile:
|
|
18
|
+
```ruby
|
|
19
|
+
gem 'connectwise-ruby-sdk', '~> 1.0.2"
|
|
20
|
+
```
|
|
24
21
|
### Install from Git
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
gem 'connectwise-ruby-sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
|
29
|
-
|
|
22
|
+
```ruby
|
|
23
|
+
gem 'connectwise-ruby-sdk', :git => 'https://github.com/vc3/connectwise-rest-api'
|
|
24
|
+
```
|
|
30
25
|
### Include the Ruby code directly
|
|
31
26
|
|
|
32
27
|
Include the Ruby code directly using `-I` as follows:
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
OpenAPI spec version: 1.0.0
|
|
9
9
|
Contact: platform@connectwise.com
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
11
|
|
|
11
12
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
13
|
you may not use this file except in compliance with the License.
|
|
@@ -33,7 +34,7 @@ Gem::Specification.new do |s|
|
|
|
33
34
|
s.email = ["cameron@sowder.io"]
|
|
34
35
|
s.homepage = "http://sowder.io"
|
|
35
36
|
s.summary = "Connectwise ruby gem"
|
|
36
|
-
s.description = "A ruby client to interact with the Connectwise REST API
|
|
37
|
+
s.description = "A ruby client to interact with the Connectwise REST API"
|
|
37
38
|
s.license = "Apache 2.0"
|
|
38
39
|
|
|
39
40
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
@@ -378,14 +378,14 @@ module Connectwise
|
|
|
378
378
|
end
|
|
379
379
|
# verify the required parameter 'title' is set
|
|
380
380
|
fail ArgumentError, "Missing the required parameter 'title' when calling DocumentsApi.system_documents_id_post" if title.nil?
|
|
381
|
-
if title.to_s.length
|
|
382
|
-
fail ArgumentError, 'invalid value for "title" when calling DocumentsApi.system_documents_id_post, the character length must be
|
|
381
|
+
if title.to_s.length > 100
|
|
382
|
+
fail ArgumentError, 'invalid value for "title" when calling DocumentsApi.system_documents_id_post, the character length must be smaller than or equal to 100.'
|
|
383
383
|
end
|
|
384
384
|
|
|
385
385
|
# verify the required parameter 'url' is set
|
|
386
386
|
fail ArgumentError, "Missing the required parameter 'url' when calling DocumentsApi.system_documents_id_post" if url.nil?
|
|
387
|
-
if url.to_s.length
|
|
388
|
-
fail ArgumentError, 'invalid value for "url" when calling DocumentsApi.system_documents_id_post, the character length must be
|
|
387
|
+
if url.to_s.length > 500
|
|
388
|
+
fail ArgumentError, 'invalid value for "url" when calling DocumentsApi.system_documents_id_post, the character length must be smaller than or equal to 500.'
|
|
389
389
|
end
|
|
390
390
|
|
|
391
391
|
# resource path
|
|
@@ -472,14 +472,14 @@ module Connectwise
|
|
|
472
472
|
end
|
|
473
473
|
# verify the required parameter 'title' is set
|
|
474
474
|
fail ArgumentError, "Missing the required parameter 'title' when calling DocumentsApi.system_documents_post" if title.nil?
|
|
475
|
-
if title.to_s.length
|
|
476
|
-
fail ArgumentError, 'invalid value for "title" when calling DocumentsApi.system_documents_post, the character length must be
|
|
475
|
+
if title.to_s.length > 100
|
|
476
|
+
fail ArgumentError, 'invalid value for "title" when calling DocumentsApi.system_documents_post, the character length must be smaller than or equal to 100.'
|
|
477
477
|
end
|
|
478
478
|
|
|
479
479
|
# verify the required parameter 'url' is set
|
|
480
480
|
fail ArgumentError, "Missing the required parameter 'url' when calling DocumentsApi.system_documents_post" if url.nil?
|
|
481
|
-
if url.to_s.length
|
|
482
|
-
fail ArgumentError, 'invalid value for "url" when calling DocumentsApi.system_documents_post, the character length must be
|
|
481
|
+
if url.to_s.length > 500
|
|
482
|
+
fail ArgumentError, 'invalid value for "url" when calling DocumentsApi.system_documents_post, the character length must be smaller than or equal to 500.'
|
|
483
483
|
end
|
|
484
484
|
|
|
485
485
|
# resource path
|
|
@@ -39,7 +39,7 @@ module Connectwise
|
|
|
39
39
|
attr_accessor :default_headers
|
|
40
40
|
|
|
41
41
|
# Initializes the ApiClient
|
|
42
|
-
# @option config [Configuration]
|
|
42
|
+
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
43
43
|
def initialize(config = Configuration.default)
|
|
44
44
|
@config = config
|
|
45
45
|
@user_agent = "Swagger-Codegen/#{VERSION}/ruby"
|
|
@@ -240,6 +240,24 @@ module Connectwise
|
|
|
240
240
|
# @return Array for valid properies with the reasons
|
|
241
241
|
def list_invalid_properties
|
|
242
242
|
invalid_properties = Array.new
|
|
243
|
+
if @name.nil?
|
|
244
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if @name.to_s.length > 100
|
|
248
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 100.")
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
if !@phone_number.nil? && @phone_number.to_s.length > 30
|
|
253
|
+
invalid_properties.push("invalid value for 'phone_number', the character length must be smaller than or equal to 30.")
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
if !@email.nil? && @email.to_s.length > 250
|
|
258
|
+
invalid_properties.push("invalid value for 'email', the character length must be smaller than or equal to 250.")
|
|
259
|
+
end
|
|
260
|
+
|
|
243
261
|
return invalid_properties
|
|
244
262
|
end
|
|
245
263
|
|
|
@@ -247,9 +265,9 @@ module Connectwise
|
|
|
247
265
|
# @return true if the model is valid
|
|
248
266
|
def valid?
|
|
249
267
|
return false if @name.nil?
|
|
250
|
-
return false if @name.to_s.length
|
|
251
|
-
return false if @phone_number.to_s.length
|
|
252
|
-
return false if @email.to_s.length
|
|
268
|
+
return false if @name.to_s.length > 100
|
|
269
|
+
return false if !@phone_number.nil? && @phone_number.to_s.length > 30
|
|
270
|
+
return false if !@email.nil? && @email.to_s.length > 250
|
|
253
271
|
return false if @status.nil?
|
|
254
272
|
return false if @assign_to.nil?
|
|
255
273
|
return true
|
|
@@ -262,8 +280,8 @@ module Connectwise
|
|
|
262
280
|
fail ArgumentError, "name cannot be nil"
|
|
263
281
|
end
|
|
264
282
|
|
|
265
|
-
if name.to_s.length
|
|
266
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
283
|
+
if name.to_s.length > 100
|
|
284
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 100."
|
|
267
285
|
end
|
|
268
286
|
|
|
269
287
|
@name = name
|
|
@@ -272,12 +290,9 @@ module Connectwise
|
|
|
272
290
|
# Custom attribute writer method with validation
|
|
273
291
|
# @param [Object] phone_number Value to be assigned
|
|
274
292
|
def phone_number=(phone_number)
|
|
275
|
-
if phone_number.nil?
|
|
276
|
-
fail ArgumentError, "phone_number cannot be nil"
|
|
277
|
-
end
|
|
278
293
|
|
|
279
|
-
if phone_number.to_s.length
|
|
280
|
-
fail ArgumentError, "invalid value for 'phone_number', the character length must be
|
|
294
|
+
if !phone_number.nil? && phone_number.to_s.length > 30
|
|
295
|
+
fail ArgumentError, "invalid value for 'phone_number', the character length must be smaller than or equal to 30."
|
|
281
296
|
end
|
|
282
297
|
|
|
283
298
|
@phone_number = phone_number
|
|
@@ -286,12 +301,9 @@ module Connectwise
|
|
|
286
301
|
# Custom attribute writer method with validation
|
|
287
302
|
# @param [Object] email Value to be assigned
|
|
288
303
|
def email=(email)
|
|
289
|
-
if email.nil?
|
|
290
|
-
fail ArgumentError, "email cannot be nil"
|
|
291
|
-
end
|
|
292
304
|
|
|
293
|
-
if email.to_s.length
|
|
294
|
-
fail ArgumentError, "invalid value for 'email', the character length must be
|
|
305
|
+
if !email.nil? && email.to_s.length > 250
|
|
306
|
+
fail ArgumentError, "invalid value for 'email', the character length must be smaller than or equal to 250."
|
|
295
307
|
end
|
|
296
308
|
|
|
297
309
|
@email = email
|
|
@@ -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 > 30
|
|
118
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 30.")
|
|
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 > 30
|
|
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 > 30
|
|
140
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 30."
|
|
133
141
|
end
|
|
134
142
|
|
|
135
143
|
@name = name
|
|
@@ -118,6 +118,14 @@ module Connectwise
|
|
|
118
118
|
# @return Array for valid properies with the reasons
|
|
119
119
|
def list_invalid_properties
|
|
120
120
|
invalid_properties = Array.new
|
|
121
|
+
if @name.nil?
|
|
122
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if @name.to_s.length > 50
|
|
126
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 50.")
|
|
127
|
+
end
|
|
128
|
+
|
|
121
129
|
return invalid_properties
|
|
122
130
|
end
|
|
123
131
|
|
|
@@ -125,7 +133,7 @@ module Connectwise
|
|
|
125
133
|
# @return true if the model is valid
|
|
126
134
|
def valid?
|
|
127
135
|
return false if @name.nil?
|
|
128
|
-
return false if @name.to_s.length
|
|
136
|
+
return false if @name.to_s.length > 50
|
|
129
137
|
return true
|
|
130
138
|
end
|
|
131
139
|
|
|
@@ -136,8 +144,8 @@ module Connectwise
|
|
|
136
144
|
fail ArgumentError, "name cannot be nil"
|
|
137
145
|
end
|
|
138
146
|
|
|
139
|
-
if name.to_s.length
|
|
140
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
147
|
+
if name.to_s.length > 50
|
|
148
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 50."
|
|
141
149
|
end
|
|
142
150
|
|
|
143
151
|
@name = name
|
|
@@ -259,6 +259,16 @@ module Connectwise
|
|
|
259
259
|
# @return Array for valid properies with the reasons
|
|
260
260
|
def list_invalid_properties
|
|
261
261
|
invalid_properties = Array.new
|
|
262
|
+
|
|
263
|
+
if !@serial_number.nil? && @serial_number.to_s.length > 50
|
|
264
|
+
invalid_properties.push("invalid value for 'serial_number', the character length must be smaller than or equal to 50.")
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
if !@invoice_description.nil? && @invoice_description.to_s.length > 6000
|
|
269
|
+
invalid_properties.push("invalid value for 'invoice_description', the character length must be smaller than or equal to 6000.")
|
|
270
|
+
end
|
|
271
|
+
|
|
262
272
|
return invalid_properties
|
|
263
273
|
end
|
|
264
274
|
|
|
@@ -269,8 +279,8 @@ module Connectwise
|
|
|
269
279
|
return false if @bill_customer.nil?
|
|
270
280
|
bill_customer_validator = EnumAttributeValidator.new('String', ["Billable", "DoNotBill", "NoCharge"])
|
|
271
281
|
return false unless bill_customer_validator.valid?(@bill_customer)
|
|
272
|
-
return false if @serial_number.to_s.length
|
|
273
|
-
return false if @invoice_description.to_s.length
|
|
282
|
+
return false if !@serial_number.nil? && @serial_number.to_s.length > 50
|
|
283
|
+
return false if !@invoice_description.nil? && @invoice_description.to_s.length > 6000
|
|
274
284
|
return true
|
|
275
285
|
end
|
|
276
286
|
|
|
@@ -287,12 +297,9 @@ module Connectwise
|
|
|
287
297
|
# Custom attribute writer method with validation
|
|
288
298
|
# @param [Object] serial_number Value to be assigned
|
|
289
299
|
def serial_number=(serial_number)
|
|
290
|
-
if serial_number.nil?
|
|
291
|
-
fail ArgumentError, "serial_number cannot be nil"
|
|
292
|
-
end
|
|
293
300
|
|
|
294
|
-
if serial_number.to_s.length
|
|
295
|
-
fail ArgumentError, "invalid value for 'serial_number', the character length must be
|
|
301
|
+
if !serial_number.nil? && serial_number.to_s.length > 50
|
|
302
|
+
fail ArgumentError, "invalid value for 'serial_number', the character length must be smaller than or equal to 50."
|
|
296
303
|
end
|
|
297
304
|
|
|
298
305
|
@serial_number = serial_number
|
|
@@ -301,12 +308,9 @@ module Connectwise
|
|
|
301
308
|
# Custom attribute writer method with validation
|
|
302
309
|
# @param [Object] invoice_description Value to be assigned
|
|
303
310
|
def invoice_description=(invoice_description)
|
|
304
|
-
if invoice_description.nil?
|
|
305
|
-
fail ArgumentError, "invoice_description cannot be nil"
|
|
306
|
-
end
|
|
307
311
|
|
|
308
|
-
if invoice_description.to_s.length
|
|
309
|
-
fail ArgumentError, "invalid value for 'invoice_description', the character length must be
|
|
312
|
+
if !invoice_description.nil? && invoice_description.to_s.length > 6000
|
|
313
|
+
fail ArgumentError, "invalid value for 'invoice_description', the character length must be smaller than or equal to 6000."
|
|
310
314
|
end
|
|
311
315
|
|
|
312
316
|
@invoice_description = invoice_description
|
|
@@ -102,25 +102,27 @@ module Connectwise
|
|
|
102
102
|
# @return Array for valid properies with the reasons
|
|
103
103
|
def list_invalid_properties
|
|
104
104
|
invalid_properties = Array.new
|
|
105
|
+
|
|
106
|
+
if !@description.nil? && @description.to_s.length > 1000
|
|
107
|
+
invalid_properties.push("invalid value for 'description', the character length must be smaller than or equal to 1000.")
|
|
108
|
+
end
|
|
109
|
+
|
|
105
110
|
return invalid_properties
|
|
106
111
|
end
|
|
107
112
|
|
|
108
113
|
# Check to see if the all the properties in the model are valid
|
|
109
114
|
# @return true if the model is valid
|
|
110
115
|
def valid?
|
|
111
|
-
return false if @description.to_s.length
|
|
116
|
+
return false if !@description.nil? && @description.to_s.length > 1000
|
|
112
117
|
return true
|
|
113
118
|
end
|
|
114
119
|
|
|
115
120
|
# Custom attribute writer method with validation
|
|
116
121
|
# @param [Object] description Value to be assigned
|
|
117
122
|
def description=(description)
|
|
118
|
-
if description.nil?
|
|
119
|
-
fail ArgumentError, "description cannot be nil"
|
|
120
|
-
end
|
|
121
123
|
|
|
122
|
-
if description.to_s.length
|
|
123
|
-
fail ArgumentError, "invalid value for 'description', the character length must be
|
|
124
|
+
if !description.nil? && description.to_s.length > 1000
|
|
125
|
+
fail ArgumentError, "invalid value for 'description', the character length must be smaller than or equal to 1000."
|
|
124
126
|
end
|
|
125
127
|
|
|
126
128
|
@description = description
|
|
@@ -627,6 +627,34 @@ module Connectwise
|
|
|
627
627
|
# @return Array for valid properies with the reasons
|
|
628
628
|
def list_invalid_properties
|
|
629
629
|
invalid_properties = Array.new
|
|
630
|
+
if @name.nil?
|
|
631
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
if @name.to_s.length > 100
|
|
635
|
+
invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 100.")
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
if !@customer_po.nil? && @customer_po.to_s.length > 50
|
|
640
|
+
invalid_properties.push("invalid value for 'customer_po', the character length must be smaller than or equal to 50.")
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
if !@reason_cancelled.nil? && @reason_cancelled.to_s.length > 50
|
|
645
|
+
invalid_properties.push("invalid value for 'reason_cancelled', the character length must be smaller than or equal to 50.")
|
|
646
|
+
end
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
if !@work_order.nil? && @work_order.to_s.length > 20
|
|
650
|
+
invalid_properties.push("invalid value for 'work_order', the character length must be smaller than or equal to 20.")
|
|
651
|
+
end
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
if !@internal_notes.nil? && @internal_notes.to_s.length > 5000
|
|
655
|
+
invalid_properties.push("invalid value for 'internal_notes', the character length must be smaller than or equal to 5000.")
|
|
656
|
+
end
|
|
657
|
+
|
|
630
658
|
return invalid_properties
|
|
631
659
|
end
|
|
632
660
|
|
|
@@ -634,14 +662,14 @@ module Connectwise
|
|
|
634
662
|
# @return true if the model is valid
|
|
635
663
|
def valid?
|
|
636
664
|
return false if @name.nil?
|
|
637
|
-
return false if @name.to_s.length
|
|
665
|
+
return false if @name.to_s.length > 100
|
|
638
666
|
return false if @type.nil?
|
|
639
667
|
return false if @company.nil?
|
|
640
668
|
return false if @contact.nil?
|
|
641
|
-
return false if @customer_po.to_s.length
|
|
642
|
-
return false if @reason_cancelled.to_s.length
|
|
643
|
-
return false if @work_order.to_s.length
|
|
644
|
-
return false if @internal_notes.to_s.length
|
|
669
|
+
return false if !@customer_po.nil? && @customer_po.to_s.length > 50
|
|
670
|
+
return false if !@reason_cancelled.nil? && @reason_cancelled.to_s.length > 50
|
|
671
|
+
return false if !@work_order.nil? && @work_order.to_s.length > 20
|
|
672
|
+
return false if !@internal_notes.nil? && @internal_notes.to_s.length > 5000
|
|
645
673
|
application_units_validator = EnumAttributeValidator.new('String', ["Amount", "Hours", "Incidents"])
|
|
646
674
|
return false unless application_units_validator.valid?(@application_units)
|
|
647
675
|
application_cycle_validator = EnumAttributeValidator.new('String', ["Contract2Weeks", "Contract4Weeks", "ContractYear", "CalendarMonth", "CalendarQuarter", "CalendarWeek", "ContractQuarter", "CalendarYear"])
|
|
@@ -670,8 +698,8 @@ module Connectwise
|
|
|
670
698
|
fail ArgumentError, "name cannot be nil"
|
|
671
699
|
end
|
|
672
700
|
|
|
673
|
-
if name.to_s.length
|
|
674
|
-
fail ArgumentError, "invalid value for 'name', the character length must be
|
|
701
|
+
if name.to_s.length > 100
|
|
702
|
+
fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 100."
|
|
675
703
|
end
|
|
676
704
|
|
|
677
705
|
@name = name
|
|
@@ -680,12 +708,9 @@ module Connectwise
|
|
|
680
708
|
# Custom attribute writer method with validation
|
|
681
709
|
# @param [Object] customer_po Value to be assigned
|
|
682
710
|
def customer_po=(customer_po)
|
|
683
|
-
if customer_po.nil?
|
|
684
|
-
fail ArgumentError, "customer_po cannot be nil"
|
|
685
|
-
end
|
|
686
711
|
|
|
687
|
-
if customer_po.to_s.length
|
|
688
|
-
fail ArgumentError, "invalid value for 'customer_po', the character length must be
|
|
712
|
+
if !customer_po.nil? && customer_po.to_s.length > 50
|
|
713
|
+
fail ArgumentError, "invalid value for 'customer_po', the character length must be smaller than or equal to 50."
|
|
689
714
|
end
|
|
690
715
|
|
|
691
716
|
@customer_po = customer_po
|
|
@@ -694,12 +719,9 @@ module Connectwise
|
|
|
694
719
|
# Custom attribute writer method with validation
|
|
695
720
|
# @param [Object] reason_cancelled Value to be assigned
|
|
696
721
|
def reason_cancelled=(reason_cancelled)
|
|
697
|
-
if reason_cancelled.nil?
|
|
698
|
-
fail ArgumentError, "reason_cancelled cannot be nil"
|
|
699
|
-
end
|
|
700
722
|
|
|
701
|
-
if reason_cancelled.to_s.length
|
|
702
|
-
fail ArgumentError, "invalid value for 'reason_cancelled', the character length must be
|
|
723
|
+
if !reason_cancelled.nil? && reason_cancelled.to_s.length > 50
|
|
724
|
+
fail ArgumentError, "invalid value for 'reason_cancelled', the character length must be smaller than or equal to 50."
|
|
703
725
|
end
|
|
704
726
|
|
|
705
727
|
@reason_cancelled = reason_cancelled
|
|
@@ -708,12 +730,9 @@ module Connectwise
|
|
|
708
730
|
# Custom attribute writer method with validation
|
|
709
731
|
# @param [Object] work_order Value to be assigned
|
|
710
732
|
def work_order=(work_order)
|
|
711
|
-
if work_order.nil?
|
|
712
|
-
fail ArgumentError, "work_order cannot be nil"
|
|
713
|
-
end
|
|
714
733
|
|
|
715
|
-
if work_order.to_s.length
|
|
716
|
-
fail ArgumentError, "invalid value for 'work_order', the character length must be
|
|
734
|
+
if !work_order.nil? && work_order.to_s.length > 20
|
|
735
|
+
fail ArgumentError, "invalid value for 'work_order', the character length must be smaller than or equal to 20."
|
|
717
736
|
end
|
|
718
737
|
|
|
719
738
|
@work_order = work_order
|
|
@@ -722,12 +741,9 @@ module Connectwise
|
|
|
722
741
|
# Custom attribute writer method with validation
|
|
723
742
|
# @param [Object] internal_notes Value to be assigned
|
|
724
743
|
def internal_notes=(internal_notes)
|
|
725
|
-
if internal_notes.nil?
|
|
726
|
-
fail ArgumentError, "internal_notes cannot be nil"
|
|
727
|
-
end
|
|
728
744
|
|
|
729
|
-
if internal_notes.to_s.length
|
|
730
|
-
fail ArgumentError, "invalid value for 'internal_notes', the character length must be
|
|
745
|
+
if !internal_notes.nil? && internal_notes.to_s.length > 5000
|
|
746
|
+
fail ArgumentError, "invalid value for 'internal_notes', the character length must be smaller than or equal to 5000."
|
|
731
747
|
end
|
|
732
748
|
|
|
733
749
|
@internal_notes = internal_notes
|