docusign_rooms 1.0.0 → 1.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docusign_rooms-1.0.0.gem +0 -0
- data/lib/docusign_rooms.rb +13 -2
- data/lib/docusign_rooms/.DS_Store +0 -0
- data/lib/docusign_rooms/api/accounts_api.rb +1 -1
- data/lib/docusign_rooms/api/activity_types_api.rb +1 -1
- data/lib/docusign_rooms/api/closing_statuses_api.rb +1 -1
- data/lib/docusign_rooms/api/contact_sides_api.rb +1 -1
- data/lib/docusign_rooms/api/countries_api.rb +1 -1
- data/lib/docusign_rooms/api/currencies_api.rb +1 -1
- data/lib/docusign_rooms/api/documents_api.rb +10 -12
- data/lib/docusign_rooms/api/e_sign_permission_profiles_api.rb +1 -1
- data/lib/docusign_rooms/api/external_form_fill_sessions_api.rb +8 -10
- data/lib/docusign_rooms/api/fields_api.rb +2 -2
- data/lib/docusign_rooms/api/financing_types_api.rb +1 -1
- data/lib/docusign_rooms/api/form_details_api.rb +1 -1
- data/lib/docusign_rooms/api/form_groups_api.rb +441 -1
- data/lib/docusign_rooms/api/form_libraries_api.rb +2 -2
- data/lib/docusign_rooms/api/offices_api.rb +14 -16
- data/lib/docusign_rooms/api/origins_of_leads_api.rb +1 -1
- data/lib/docusign_rooms/api/property_types_api.rb +1 -1
- data/lib/docusign_rooms/api/regions_api.rb +14 -16
- data/lib/docusign_rooms/api/roles_api.rb +19 -23
- data/lib/docusign_rooms/api/room_contact_types_api.rb +1 -1
- data/lib/docusign_rooms/api/room_folders_api.rb +1 -1
- data/lib/docusign_rooms/api/room_templates_api.rb +6 -2
- data/lib/docusign_rooms/api/rooms_api.rb +85 -96
- data/lib/docusign_rooms/api/seller_decision_types_api.rb +1 -1
- data/lib/docusign_rooms/api/special_circumstance_types_api.rb +1 -1
- data/lib/docusign_rooms/api/states_api.rb +1 -1
- data/lib/docusign_rooms/api/task_date_types_api.rb +1 -1
- data/lib/docusign_rooms/api/task_list_templates_api.rb +1 -1
- data/lib/docusign_rooms/api/task_lists_api.rb +14 -16
- data/lib/docusign_rooms/api/task_responsibility_types_api.rb +1 -1
- data/lib/docusign_rooms/api/task_statuses_api.rb +1 -1
- data/lib/docusign_rooms/api/time_zones_api.rb +1 -1
- data/lib/docusign_rooms/api/transaction_sides_api.rb +1 -1
- data/lib/docusign_rooms/api/users_api.rb +87 -107
- data/lib/docusign_rooms/models/access_level.rb +32 -0
- data/lib/docusign_rooms/models/account_status.rb +29 -0
- data/lib/docusign_rooms/models/account_summary.rb +1 -35
- data/lib/docusign_rooms/models/assignable_roles.rb +13 -4
- data/lib/docusign_rooms/models/classic_agent_to_invite.rb +10 -1
- data/lib/docusign_rooms/models/classic_manager_to_invite.rb +1 -35
- data/lib/docusign_rooms/models/document.rb +10 -1
- data/lib/docusign_rooms/models/fields_custom_data_filter_type.rb +30 -0
- data/lib/docusign_rooms/models/form_group.rb +214 -0
- data/lib/docusign_rooms/models/form_group_for_create.rb +188 -0
- data/lib/docusign_rooms/models/form_group_for_update.rb +188 -0
- data/lib/docusign_rooms/models/form_group_form_to_assign.rb +197 -0
- data/lib/docusign_rooms/models/form_group_summary_list.rb +13 -4
- data/lib/docusign_rooms/models/form_library_summary_list.rb +13 -4
- data/lib/docusign_rooms/models/form_summary_list.rb +13 -4
- data/lib/docusign_rooms/models/group_form.rb +210 -0
- data/lib/docusign_rooms/models/member_sorting_option.rb +33 -0
- data/lib/docusign_rooms/models/office_summary_list.rb +13 -4
- data/lib/docusign_rooms/models/permissions.rb +70 -7
- data/lib/docusign_rooms/models/product_version.rb +29 -0
- data/lib/docusign_rooms/models/region_summary_list.rb +13 -4
- data/lib/docusign_rooms/models/role.rb +1 -1
- data/lib/docusign_rooms/models/role_summary_list.rb +13 -4
- data/lib/docusign_rooms/models/room.rb +1 -1
- data/lib/docusign_rooms/models/room_document.rb +31 -4
- data/lib/docusign_rooms/models/room_document_list.rb +10 -1
- data/lib/docusign_rooms/models/room_document_owner.rb +219 -0
- data/lib/docusign_rooms/models/room_folder_list.rb +13 -4
- data/lib/docusign_rooms/models/room_status.rb +31 -0
- data/lib/docusign_rooms/models/room_summary_list.rb +13 -4
- data/lib/docusign_rooms/models/room_templates_summary_list.rb +13 -4
- data/lib/docusign_rooms/models/room_user_sorting_option.rb +33 -0
- data/lib/docusign_rooms/models/room_user_summary.rb +22 -4
- data/lib/docusign_rooms/models/room_users_result.rb +13 -4
- data/lib/docusign_rooms/models/task_list_template_list.rb +13 -4
- data/lib/docusign_rooms/models/user.rb +1 -35
- data/lib/docusign_rooms/models/user_summary.rb +1 -35
- data/lib/docusign_rooms/models/user_summary_list.rb +13 -4
- data/lib/docusign_rooms/models/user_to_invite.rb +1 -35
- data/lib/docusign_rooms/version.rb +1 -1
- data/tests/Gemfile.lock +2 -2
- metadata +18 -4
@@ -0,0 +1,32 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Rooms API - v2
|
3
|
+
|
4
|
+
#An API for an integrator to access the features of DocuSign Rooms
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_Rooms
|
15
|
+
class AccessLevel
|
16
|
+
|
17
|
+
CONTRIBUTOR = 'Contributor'.freeze
|
18
|
+
OFFICE = 'Office'.freeze
|
19
|
+
REGION = 'Region'.freeze
|
20
|
+
COMPANY = 'Company'.freeze
|
21
|
+
ADMIN = 'Admin'.freeze
|
22
|
+
|
23
|
+
# Builds the enum from string
|
24
|
+
# @param [String] The enum value in the form of the string
|
25
|
+
# @return [String] The enum value
|
26
|
+
def build_from_hash(value)
|
27
|
+
constantValues = AccessLevel.constants.select { |c| AccessLevel::const_get(c) == value }
|
28
|
+
raise "Invalid ENUM value #{value} for class #AccessLevel" if constantValues.empty?
|
29
|
+
value
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Rooms API - v2
|
3
|
+
|
4
|
+
#An API for an integrator to access the features of DocuSign Rooms
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_Rooms
|
15
|
+
class AccountStatus
|
16
|
+
|
17
|
+
ACTIVE = 'Active'.freeze
|
18
|
+
PENDING = 'Pending'.freeze
|
19
|
+
|
20
|
+
# Builds the enum from string
|
21
|
+
# @param [String] The enum value in the form of the string
|
22
|
+
# @return [String] The enum value
|
23
|
+
def build_from_hash(value)
|
24
|
+
constantValues = AccountStatus.constants.select { |c| AccountStatus::const_get(c) == value }
|
25
|
+
raise "Invalid ENUM value #{value} for class #AccountStatus" if constantValues.empty?
|
26
|
+
value
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -25,28 +25,6 @@ module DocuSign_Rooms
|
|
25
25
|
|
26
26
|
attr_accessor :require_office_library_assignments
|
27
27
|
|
28
|
-
class EnumAttributeValidator
|
29
|
-
attr_reader :datatype
|
30
|
-
attr_reader :allowable_values
|
31
|
-
|
32
|
-
def initialize(datatype, allowable_values)
|
33
|
-
@allowable_values = allowable_values.map do |value|
|
34
|
-
case datatype.to_s
|
35
|
-
when /Integer/i
|
36
|
-
value.to_i
|
37
|
-
when /Float/i
|
38
|
-
value.to_f
|
39
|
-
else
|
40
|
-
value
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def valid?(value)
|
46
|
-
!value || allowable_values.include?(value)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
29
|
def self.attribute_map
|
52
30
|
{
|
@@ -64,7 +42,7 @@ module DocuSign_Rooms
|
|
64
42
|
{
|
65
43
|
:'company_id' => :'Integer',
|
66
44
|
:'name' => :'String',
|
67
|
-
:'company_version' => :'
|
45
|
+
:'company_version' => :'ProductVersion',
|
68
46
|
:'docu_sign_account_guid' => :'String',
|
69
47
|
:'default_field_set_id' => :'String',
|
70
48
|
:'require_office_library_assignments' => :'BOOLEAN'
|
@@ -114,21 +92,9 @@ module DocuSign_Rooms
|
|
114
92
|
# Check to see if the all the properties in the model are valid
|
115
93
|
# @return true if the model is valid
|
116
94
|
def valid?
|
117
|
-
company_version_validator = EnumAttributeValidator.new('String', ['v5', 'v6'])
|
118
|
-
return false unless company_version_validator.valid?(@company_version)
|
119
95
|
true
|
120
96
|
end
|
121
97
|
|
122
|
-
# Custom attribute writer method checking allowed values (enum).
|
123
|
-
# @param [Object] company_version Object to be assigned
|
124
|
-
def company_version=(company_version)
|
125
|
-
validator = EnumAttributeValidator.new('String', ['v5', 'v6'])
|
126
|
-
unless validator.valid?(company_version)
|
127
|
-
fail ArgumentError, 'invalid value for "company_version", must be one of #{validator.allowable_values}.'
|
128
|
-
end
|
129
|
-
@company_version = company_version
|
130
|
-
end
|
131
|
-
|
132
98
|
# Checks equality by comparing each attribute.
|
133
99
|
# @param [Object] Object to be compared
|
134
100
|
def ==(o)
|
@@ -27,6 +27,8 @@ module DocuSign_Rooms
|
|
27
27
|
|
28
28
|
attr_accessor :prior_uri
|
29
29
|
|
30
|
+
attr_accessor :total_row_count
|
31
|
+
|
30
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
33
|
def self.attribute_map
|
32
34
|
{
|
@@ -36,7 +38,8 @@ module DocuSign_Rooms
|
|
36
38
|
:'start_position' => :'startPosition',
|
37
39
|
:'end_position' => :'endPosition',
|
38
40
|
:'next_uri' => :'nextUri',
|
39
|
-
:'prior_uri' => :'priorUri'
|
41
|
+
:'prior_uri' => :'priorUri',
|
42
|
+
:'total_row_count' => :'totalRowCount'
|
40
43
|
}
|
41
44
|
end
|
42
45
|
|
@@ -49,7 +52,8 @@ module DocuSign_Rooms
|
|
49
52
|
:'start_position' => :'Integer',
|
50
53
|
:'end_position' => :'Integer',
|
51
54
|
:'next_uri' => :'String',
|
52
|
-
:'prior_uri' => :'String'
|
55
|
+
:'prior_uri' => :'String',
|
56
|
+
:'total_row_count' => :'Integer'
|
53
57
|
}
|
54
58
|
end
|
55
59
|
|
@@ -90,6 +94,10 @@ module DocuSign_Rooms
|
|
90
94
|
if attributes.has_key?(:'priorUri')
|
91
95
|
self.prior_uri = attributes[:'priorUri']
|
92
96
|
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'totalRowCount')
|
99
|
+
self.total_row_count = attributes[:'totalRowCount']
|
100
|
+
end
|
93
101
|
end
|
94
102
|
|
95
103
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -116,7 +124,8 @@ module DocuSign_Rooms
|
|
116
124
|
start_position == o.start_position &&
|
117
125
|
end_position == o.end_position &&
|
118
126
|
next_uri == o.next_uri &&
|
119
|
-
prior_uri == o.prior_uri
|
127
|
+
prior_uri == o.prior_uri &&
|
128
|
+
total_row_count == o.total_row_count
|
120
129
|
end
|
121
130
|
|
122
131
|
# @see the `==` method
|
@@ -128,7 +137,7 @@ module DocuSign_Rooms
|
|
128
137
|
# Calculates hash code according to all attributes.
|
129
138
|
# @return [Fixnum] Hash code
|
130
139
|
def hash
|
131
|
-
[current_role_id, roles, result_set_size, start_position, end_position, next_uri, prior_uri].hash
|
140
|
+
[current_role_id, roles, result_set_size, start_position, end_position, next_uri, prior_uri, total_row_count].hash
|
132
141
|
end
|
133
142
|
|
134
143
|
# Builds the object from hash
|
@@ -21,6 +21,8 @@ module DocuSign_Rooms
|
|
21
21
|
|
22
22
|
attr_accessor :office_id
|
23
23
|
|
24
|
+
attr_accessor :company_type_id
|
25
|
+
|
24
26
|
# Required when the company is tightly bound to an eSign account; otherwise ignored.
|
25
27
|
attr_accessor :e_sign_permission_profile_id
|
26
28
|
|
@@ -31,6 +33,7 @@ module DocuSign_Rooms
|
|
31
33
|
:'last_name' => :'lastName',
|
32
34
|
:'email' => :'email',
|
33
35
|
:'office_id' => :'officeId',
|
36
|
+
:'company_type_id' => :'companyTypeId',
|
34
37
|
:'e_sign_permission_profile_id' => :'eSignPermissionProfileId'
|
35
38
|
}
|
36
39
|
end
|
@@ -42,6 +45,7 @@ module DocuSign_Rooms
|
|
42
45
|
:'last_name' => :'String',
|
43
46
|
:'email' => :'String',
|
44
47
|
:'office_id' => :'Integer',
|
48
|
+
:'company_type_id' => :'String',
|
45
49
|
:'e_sign_permission_profile_id' => :'String'
|
46
50
|
}
|
47
51
|
end
|
@@ -70,6 +74,10 @@ module DocuSign_Rooms
|
|
70
74
|
self.office_id = attributes[:'officeId']
|
71
75
|
end
|
72
76
|
|
77
|
+
if attributes.has_key?(:'companyTypeId')
|
78
|
+
self.company_type_id = attributes[:'companyTypeId']
|
79
|
+
end
|
80
|
+
|
73
81
|
if attributes.has_key?(:'eSignPermissionProfileId')
|
74
82
|
self.e_sign_permission_profile_id = attributes[:'eSignPermissionProfileId']
|
75
83
|
end
|
@@ -117,6 +125,7 @@ module DocuSign_Rooms
|
|
117
125
|
last_name == o.last_name &&
|
118
126
|
email == o.email &&
|
119
127
|
office_id == o.office_id &&
|
128
|
+
company_type_id == o.company_type_id &&
|
120
129
|
e_sign_permission_profile_id == o.e_sign_permission_profile_id
|
121
130
|
end
|
122
131
|
|
@@ -129,7 +138,7 @@ module DocuSign_Rooms
|
|
129
138
|
# Calculates hash code according to all attributes.
|
130
139
|
# @return [Fixnum] Hash code
|
131
140
|
def hash
|
132
|
-
[first_name, last_name, email, office_id, e_sign_permission_profile_id].hash
|
141
|
+
[first_name, last_name, email, office_id, company_type_id, e_sign_permission_profile_id].hash
|
133
142
|
end
|
134
143
|
|
135
144
|
# Builds the object from hash
|
@@ -34,28 +34,6 @@ module DocuSign_Rooms
|
|
34
34
|
# Required when the company is tightly bound to an eSign account; otherwise ignored.
|
35
35
|
attr_accessor :e_sign_permission_profile_id
|
36
36
|
|
37
|
-
class EnumAttributeValidator
|
38
|
-
attr_reader :datatype
|
39
|
-
attr_reader :allowable_values
|
40
|
-
|
41
|
-
def initialize(datatype, allowable_values)
|
42
|
-
@allowable_values = allowable_values.map do |value|
|
43
|
-
case datatype.to_s
|
44
|
-
when /Integer/i
|
45
|
-
value.to_i
|
46
|
-
when /Float/i
|
47
|
-
value.to_f
|
48
|
-
else
|
49
|
-
value
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def valid?(value)
|
55
|
-
!value || allowable_values.include?(value)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
38
|
def self.attribute_map
|
61
39
|
{
|
@@ -80,7 +58,7 @@ module DocuSign_Rooms
|
|
80
58
|
:'email' => :'String',
|
81
59
|
:'default_office_id' => :'Integer',
|
82
60
|
:'title_id' => :'Integer',
|
83
|
-
:'access_level' => :'
|
61
|
+
:'access_level' => :'AccessLevel',
|
84
62
|
:'permissions' => :'ClassicManagerPermissions',
|
85
63
|
:'offices' => :'Array<Integer>',
|
86
64
|
:'regions' => :'Array<Integer>',
|
@@ -185,22 +163,10 @@ module DocuSign_Rooms
|
|
185
163
|
return false if @default_office_id.nil?
|
186
164
|
return false if @title_id.nil?
|
187
165
|
return false if @access_level.nil?
|
188
|
-
access_level_validator = EnumAttributeValidator.new('String', ['Contributor', 'Office', 'Region', 'Company', 'Admin'])
|
189
|
-
return false unless access_level_validator.valid?(@access_level)
|
190
166
|
return false if @permissions.nil?
|
191
167
|
true
|
192
168
|
end
|
193
169
|
|
194
|
-
# Custom attribute writer method checking allowed values (enum).
|
195
|
-
# @param [Object] access_level Object to be assigned
|
196
|
-
def access_level=(access_level)
|
197
|
-
validator = EnumAttributeValidator.new('String', ['Contributor', 'Office', 'Region', 'Company', 'Admin'])
|
198
|
-
unless validator.valid?(access_level)
|
199
|
-
fail ArgumentError, 'invalid value for "access_level", must be one of #{validator.allowable_values}.'
|
200
|
-
end
|
201
|
-
@access_level = access_level
|
202
|
-
end
|
203
|
-
|
204
170
|
# Checks equality by comparing each attribute.
|
205
171
|
# @param [Object] Object to be compared
|
206
172
|
def ==(o)
|
@@ -29,6 +29,8 @@ module DocuSign_Rooms
|
|
29
29
|
|
30
30
|
attr_accessor :is_signed
|
31
31
|
|
32
|
+
attr_accessor :content_type
|
33
|
+
|
32
34
|
attr_accessor :base64_contents
|
33
35
|
|
34
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -42,6 +44,7 @@ module DocuSign_Rooms
|
|
42
44
|
:'folder_id' => :'folderId',
|
43
45
|
:'created_date' => :'createdDate',
|
44
46
|
:'is_signed' => :'isSigned',
|
47
|
+
:'content_type' => :'contentType',
|
45
48
|
:'base64_contents' => :'base64Contents'
|
46
49
|
}
|
47
50
|
end
|
@@ -57,6 +60,7 @@ module DocuSign_Rooms
|
|
57
60
|
:'folder_id' => :'Integer',
|
58
61
|
:'created_date' => :'DateTime',
|
59
62
|
:'is_signed' => :'BOOLEAN',
|
63
|
+
:'content_type' => :'String',
|
60
64
|
:'base64_contents' => :'String'
|
61
65
|
}
|
62
66
|
end
|
@@ -101,6 +105,10 @@ module DocuSign_Rooms
|
|
101
105
|
self.is_signed = attributes[:'isSigned']
|
102
106
|
end
|
103
107
|
|
108
|
+
if attributes.has_key?(:'contentType')
|
109
|
+
self.content_type = attributes[:'contentType']
|
110
|
+
end
|
111
|
+
|
104
112
|
if attributes.has_key?(:'base64Contents')
|
105
113
|
self.base64_contents = attributes[:'base64Contents']
|
106
114
|
end
|
@@ -142,6 +150,7 @@ module DocuSign_Rooms
|
|
142
150
|
folder_id == o.folder_id &&
|
143
151
|
created_date == o.created_date &&
|
144
152
|
is_signed == o.is_signed &&
|
153
|
+
content_type == o.content_type &&
|
145
154
|
base64_contents == o.base64_contents
|
146
155
|
end
|
147
156
|
|
@@ -154,7 +163,7 @@ module DocuSign_Rooms
|
|
154
163
|
# Calculates hash code according to all attributes.
|
155
164
|
# @return [Fixnum] Hash code
|
156
165
|
def hash
|
157
|
-
[document_id, name, room_id, owner_id, size, folder_id, created_date, is_signed, base64_contents].hash
|
166
|
+
[document_id, name, room_id, owner_id, size, folder_id, created_date, is_signed, content_type, base64_contents].hash
|
158
167
|
end
|
159
168
|
|
160
169
|
# Builds the object from hash
|
@@ -0,0 +1,30 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Rooms API - v2
|
3
|
+
|
4
|
+
#An API for an integrator to access the features of DocuSign Rooms
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_Rooms
|
15
|
+
class FieldsCustomDataFilterType
|
16
|
+
|
17
|
+
NONE = 'None'.freeze
|
18
|
+
IS_REQUIRED_ON_CREATE = 'IsRequiredOnCreate'.freeze
|
19
|
+
IS_REQUIRED_ON_SUBMIT = 'IsRequiredOnSubmit'.freeze
|
20
|
+
|
21
|
+
# Builds the enum from string
|
22
|
+
# @param [String] The enum value in the form of the string
|
23
|
+
# @return [String] The enum value
|
24
|
+
def build_from_hash(value)
|
25
|
+
constantValues = FieldsCustomDataFilterType.constants.select { |c| FieldsCustomDataFilterType::const_get(c) == value }
|
26
|
+
raise "Invalid ENUM value #{value} for class #FieldsCustomDataFilterType" if constantValues.empty?
|
27
|
+
value
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,214 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Rooms API - v2
|
3
|
+
|
4
|
+
#An API for an integrator to access the features of DocuSign Rooms
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_Rooms
|
15
|
+
class FormGroup
|
16
|
+
attr_accessor :form_group_id
|
17
|
+
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
attr_accessor :office_ids
|
21
|
+
|
22
|
+
attr_accessor :forms
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'form_group_id' => :'formGroupId',
|
28
|
+
:'name' => :'name',
|
29
|
+
:'office_ids' => :'officeIds',
|
30
|
+
:'forms' => :'forms'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.swagger_types
|
36
|
+
{
|
37
|
+
:'form_group_id' => :'String',
|
38
|
+
:'name' => :'String',
|
39
|
+
:'office_ids' => :'Array<Integer>',
|
40
|
+
:'forms' => :'Array<GroupForm>'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Initializes the object
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
46
|
+
def initialize(attributes = {})
|
47
|
+
return unless attributes.is_a?(Hash)
|
48
|
+
|
49
|
+
# convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
51
|
+
|
52
|
+
if attributes.has_key?(:'formGroupId')
|
53
|
+
self.form_group_id = attributes[:'formGroupId']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes.has_key?(:'name')
|
57
|
+
self.name = attributes[:'name']
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes.has_key?(:'officeIds')
|
61
|
+
if (value = attributes[:'officeIds']).is_a?(Array)
|
62
|
+
self.office_ids = value
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'forms')
|
67
|
+
if (value = attributes[:'forms']).is_a?(Array)
|
68
|
+
self.forms = value
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
invalid_properties = Array.new
|
77
|
+
invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
form_group_id == o.form_group_id &&
|
92
|
+
name == o.name &&
|
93
|
+
office_ids == o.office_ids &&
|
94
|
+
forms == o.forms
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Fixnum] Hash code
|
105
|
+
def hash
|
106
|
+
[form_group_id, name, office_ids, forms].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def build_from_hash(attributes)
|
113
|
+
return nil unless attributes.is_a?(Hash)
|
114
|
+
self.class.swagger_types.each_pair do |key, type|
|
115
|
+
if type =~ /\AArray<(.*)>/i
|
116
|
+
# check to ensure the input is an array given that the attribute
|
117
|
+
# is documented as an array but the input is not
|
118
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
119
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
120
|
+
end
|
121
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
123
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
124
|
+
end
|
125
|
+
|
126
|
+
self
|
127
|
+
end
|
128
|
+
|
129
|
+
# Deserializes the data based on type
|
130
|
+
# @param string type Data type
|
131
|
+
# @param string value Value to be deserialized
|
132
|
+
# @return [Object] Deserialized data
|
133
|
+
def _deserialize(type, value)
|
134
|
+
case type.to_sym
|
135
|
+
when :DateTime
|
136
|
+
DateTime.parse(value)
|
137
|
+
when :Date
|
138
|
+
Date.parse(value)
|
139
|
+
when :String
|
140
|
+
value.to_s
|
141
|
+
when :Integer
|
142
|
+
value.to_i
|
143
|
+
when :Float
|
144
|
+
value.to_f
|
145
|
+
when :BOOLEAN
|
146
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
147
|
+
true
|
148
|
+
else
|
149
|
+
false
|
150
|
+
end
|
151
|
+
when :Object
|
152
|
+
# generic object (usually a Hash), return directly
|
153
|
+
value
|
154
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
155
|
+
inner_type = Regexp.last_match[:inner_type]
|
156
|
+
value.map { |v| _deserialize(inner_type, v) }
|
157
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
158
|
+
k_type = Regexp.last_match[:k_type]
|
159
|
+
v_type = Regexp.last_match[:v_type]
|
160
|
+
{}.tap do |hash|
|
161
|
+
value.each do |k, v|
|
162
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
else # model
|
166
|
+
temp_model = DocuSign_Rooms.const_get(type).new
|
167
|
+
temp_model.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
next if value.nil?
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map { |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
end
|
214
|
+
end
|