docusign_rooms 1.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +66 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +71 -0
- data/LICENSE +21 -0
- data/README.md +80 -0
- data/Rakefile +8 -0
- data/docusign_rooms-1.0.0.pre.alpha.gem +0 -0
- data/docusign_rooms.gemspec +45 -0
- data/git_push.sh +55 -0
- data/lib/.DS_Store +0 -0
- data/lib/docusign_rooms.rb +193 -0
- data/lib/docusign_rooms/.DS_Store +0 -0
- data/lib/docusign_rooms/api/accounts_api.rb +73 -0
- data/lib/docusign_rooms/api/activity_types_api.rb +69 -0
- data/lib/docusign_rooms/api/closing_statuses_api.rb +69 -0
- data/lib/docusign_rooms/api/contact_sides_api.rb +69 -0
- data/lib/docusign_rooms/api/countries_api.rb +69 -0
- data/lib/docusign_rooms/api/currencies_api.rb +69 -0
- data/lib/docusign_rooms/api/documents_api.rb +200 -0
- data/lib/docusign_rooms/api/e_sign_permission_profiles_api.rb +73 -0
- data/lib/docusign_rooms/api/external_form_fill_sessions_api.rb +79 -0
- data/lib/docusign_rooms/api/fields_api.rb +92 -0
- data/lib/docusign_rooms/api/financing_types_api.rb +69 -0
- data/lib/docusign_rooms/api/form_details_api.rb +77 -0
- data/lib/docusign_rooms/api/form_groups_api.rb +89 -0
- data/lib/docusign_rooms/api/form_libraries_api.rb +158 -0
- data/lib/docusign_rooms/api/offices_api.rb +310 -0
- data/lib/docusign_rooms/api/origins_of_leads_api.rb +69 -0
- data/lib/docusign_rooms/api/property_types_api.rb +69 -0
- data/lib/docusign_rooms/api/regions_api.rb +306 -0
- data/lib/docusign_rooms/api/roles_api.rb +328 -0
- data/lib/docusign_rooms/api/room_contact_types_api.rb +69 -0
- data/lib/docusign_rooms/api/room_folders_api.rb +93 -0
- data/lib/docusign_rooms/api/room_templates_api.rb +97 -0
- data/lib/docusign_rooms/api/rooms_api.rb +1146 -0
- data/lib/docusign_rooms/api/seller_decision_types_api.rb +69 -0
- data/lib/docusign_rooms/api/special_circumstance_types_api.rb +69 -0
- data/lib/docusign_rooms/api/states_api.rb +69 -0
- data/lib/docusign_rooms/api/task_date_types_api.rb +69 -0
- data/lib/docusign_rooms/api/task_list_templates_api.rb +89 -0
- data/lib/docusign_rooms/api/task_lists_api.rb +188 -0
- data/lib/docusign_rooms/api/task_responsibility_types_api.rb +69 -0
- data/lib/docusign_rooms/api/task_statuses_api.rb +69 -0
- data/lib/docusign_rooms/api/time_zones_api.rb +69 -0
- data/lib/docusign_rooms/api/transaction_sides_api.rb +69 -0
- data/lib/docusign_rooms/api/users_api.rb +908 -0
- data/lib/docusign_rooms/client/.DS_Store +0 -0
- data/lib/docusign_rooms/client/api_client.rb +590 -0
- data/lib/docusign_rooms/client/api_error.rb +37 -0
- data/lib/docusign_rooms/client/auth/oauth.rb +1061 -0
- data/lib/docusign_rooms/configuration.rb +202 -0
- data/lib/docusign_rooms/models/account_summary.rb +262 -0
- data/lib/docusign_rooms/models/activity_type.rb +192 -0
- data/lib/docusign_rooms/models/api_error.rb +192 -0
- data/lib/docusign_rooms/models/assignable_roles.rb +239 -0
- data/lib/docusign_rooms/models/classic_admin_to_invite.rb +216 -0
- data/lib/docusign_rooms/models/classic_agent_to_invite.rb +240 -0
- data/lib/docusign_rooms/models/classic_manager_permissions.rb +291 -0
- data/lib/docusign_rooms/models/classic_manager_to_invite.rb +338 -0
- data/lib/docusign_rooms/models/closing_status.rb +192 -0
- data/lib/docusign_rooms/models/contact_side.rb +192 -0
- data/lib/docusign_rooms/models/country.rb +192 -0
- data/lib/docusign_rooms/models/currency.rb +192 -0
- data/lib/docusign_rooms/models/custom_data.rb +192 -0
- data/lib/docusign_rooms/models/depends_on.rb +192 -0
- data/lib/docusign_rooms/models/designated_office.rb +188 -0
- data/lib/docusign_rooms/models/designated_region.rb +188 -0
- data/lib/docusign_rooms/models/document.rb +265 -0
- data/lib/docusign_rooms/models/document_user.rb +291 -0
- data/lib/docusign_rooms/models/document_user_for_create.rb +188 -0
- data/lib/docusign_rooms/models/e_sign_account_role_settings.rb +183 -0
- data/lib/docusign_rooms/models/e_sign_permission_profile.rb +201 -0
- data/lib/docusign_rooms/models/e_sign_permission_profile_list.rb +185 -0
- data/lib/docusign_rooms/models/external_form_fill_session.rb +183 -0
- data/lib/docusign_rooms/models/external_form_fill_session_for_create.rb +211 -0
- data/lib/docusign_rooms/models/field.rb +248 -0
- data/lib/docusign_rooms/models/field_configuration.rb +259 -0
- data/lib/docusign_rooms/models/field_data.rb +185 -0
- data/lib/docusign_rooms/models/field_data_for_create.rb +185 -0
- data/lib/docusign_rooms/models/field_data_for_update.rb +185 -0
- data/lib/docusign_rooms/models/field_set.rb +203 -0
- data/lib/docusign_rooms/models/financing_type.rb +192 -0
- data/lib/docusign_rooms/models/form_details.rb +246 -0
- data/lib/docusign_rooms/models/form_for_add.rb +188 -0
- data/lib/docusign_rooms/models/form_group_summary.rb +201 -0
- data/lib/docusign_rooms/models/form_group_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/form_library_summary.rb +201 -0
- data/lib/docusign_rooms/models/form_library_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/form_summary.rb +201 -0
- data/lib/docusign_rooms/models/form_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/global_activity_types.rb +185 -0
- data/lib/docusign_rooms/models/global_closing_statuses.rb +185 -0
- data/lib/docusign_rooms/models/global_contact_sides.rb +185 -0
- data/lib/docusign_rooms/models/global_countries.rb +185 -0
- data/lib/docusign_rooms/models/global_currencies.rb +185 -0
- data/lib/docusign_rooms/models/global_financing_types.rb +185 -0
- data/lib/docusign_rooms/models/global_origins_of_leads.rb +185 -0
- data/lib/docusign_rooms/models/global_property_types.rb +185 -0
- data/lib/docusign_rooms/models/global_room_contact_types.rb +185 -0
- data/lib/docusign_rooms/models/global_seller_decision_types.rb +185 -0
- data/lib/docusign_rooms/models/global_special_circumstance_types.rb +185 -0
- data/lib/docusign_rooms/models/global_states.rb +185 -0
- data/lib/docusign_rooms/models/global_task_date_types.rb +185 -0
- data/lib/docusign_rooms/models/global_task_responsibility_types.rb +185 -0
- data/lib/docusign_rooms/models/global_task_statuses.rb +185 -0
- data/lib/docusign_rooms/models/global_time_zones.rb +185 -0
- data/lib/docusign_rooms/models/global_transaction_sides.rb +185 -0
- data/lib/docusign_rooms/models/locked_out_details.rb +188 -0
- data/lib/docusign_rooms/models/nullable_field_data.rb +185 -0
- data/lib/docusign_rooms/models/nullable_permissions.rb +660 -0
- data/lib/docusign_rooms/models/office.rb +287 -0
- data/lib/docusign_rooms/models/office_for_create.rb +269 -0
- data/lib/docusign_rooms/models/office_reference_count.rb +192 -0
- data/lib/docusign_rooms/models/office_reference_count_list.rb +185 -0
- data/lib/docusign_rooms/models/office_summary.rb +282 -0
- data/lib/docusign_rooms/models/office_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/origin_of_lead.rb +192 -0
- data/lib/docusign_rooms/models/permissions.rb +660 -0
- data/lib/docusign_rooms/models/property_type.rb +192 -0
- data/lib/docusign_rooms/models/region.rb +206 -0
- data/lib/docusign_rooms/models/region_reference_count.rb +192 -0
- data/lib/docusign_rooms/models/region_reference_count_list.rb +185 -0
- data/lib/docusign_rooms/models/region_summary.rb +201 -0
- data/lib/docusign_rooms/models/region_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/role.rb +246 -0
- data/lib/docusign_rooms/models/role_for_create.rb +201 -0
- data/lib/docusign_rooms/models/role_for_update.rb +201 -0
- data/lib/docusign_rooms/models/role_summary.rb +228 -0
- data/lib/docusign_rooms/models/role_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/room.rb +282 -0
- data/lib/docusign_rooms/models/room_contact_type.rb +192 -0
- data/lib/docusign_rooms/models/room_document.rb +246 -0
- data/lib/docusign_rooms/models/room_document_list.rb +230 -0
- data/lib/docusign_rooms/models/room_folder.rb +201 -0
- data/lib/docusign_rooms/models/room_folder_list.rb +230 -0
- data/lib/docusign_rooms/models/room_for_create.rb +248 -0
- data/lib/docusign_rooms/models/room_invite.rb +240 -0
- data/lib/docusign_rooms/models/room_invite_response.rb +237 -0
- data/lib/docusign_rooms/models/room_picture.rb +183 -0
- data/lib/docusign_rooms/models/room_summary.rb +273 -0
- data/lib/docusign_rooms/models/room_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/room_template.rb +201 -0
- data/lib/docusign_rooms/models/room_templates_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/room_user.rb +246 -0
- data/lib/docusign_rooms/models/room_user_for_update.rb +192 -0
- data/lib/docusign_rooms/models/room_user_removal_detail.rb +183 -0
- data/lib/docusign_rooms/models/room_user_summary.rb +237 -0
- data/lib/docusign_rooms/models/room_users_result.rb +230 -0
- data/lib/docusign_rooms/models/select_list_field_option.rb +201 -0
- data/lib/docusign_rooms/models/seller_decision_type.rb +192 -0
- data/lib/docusign_rooms/models/special_circumstance_type.rb +192 -0
- data/lib/docusign_rooms/models/state.rb +192 -0
- data/lib/docusign_rooms/models/task_date_type.rb +192 -0
- data/lib/docusign_rooms/models/task_list.rb +275 -0
- data/lib/docusign_rooms/models/task_list_for_create.rb +183 -0
- data/lib/docusign_rooms/models/task_list_summary.rb +264 -0
- data/lib/docusign_rooms/models/task_list_summary_list.rb +185 -0
- data/lib/docusign_rooms/models/task_list_template.rb +210 -0
- data/lib/docusign_rooms/models/task_list_template_list.rb +230 -0
- data/lib/docusign_rooms/models/task_responsibility_type.rb +192 -0
- data/lib/docusign_rooms/models/task_status.rb +192 -0
- data/lib/docusign_rooms/models/task_summary.rb +291 -0
- data/lib/docusign_rooms/models/time_zone.rb +192 -0
- data/lib/docusign_rooms/models/transaction_side.rb +192 -0
- data/lib/docusign_rooms/models/user.rb +338 -0
- data/lib/docusign_rooms/models/user_for_update.rb +188 -0
- data/lib/docusign_rooms/models/user_summary.rb +307 -0
- data/lib/docusign_rooms/models/user_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/user_to_invite.rb +337 -0
- data/lib/docusign_rooms/version.rb +14 -0
- data/tests/Gemfile +5 -0
- data/tests/Gemfile.lock +42 -0
- data/tests/docs/Test.pdf +0 -0
- data/tests/docs/private.pem +27 -0
- data/tests/spec/unit_tests_using_jwt_spec.rb +125 -0
- metadata +420 -0
@@ -0,0 +1,291 @@
|
|
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 DocumentUser
|
16
|
+
attr_accessor :user_id
|
17
|
+
|
18
|
+
attr_accessor :document_id
|
19
|
+
|
20
|
+
attr_accessor :name
|
21
|
+
|
22
|
+
attr_accessor :has_access
|
23
|
+
|
24
|
+
attr_accessor :can_approve_task
|
25
|
+
|
26
|
+
attr_accessor :can_assign_to_task_list
|
27
|
+
|
28
|
+
attr_accessor :can_copy
|
29
|
+
|
30
|
+
attr_accessor :can_delete
|
31
|
+
|
32
|
+
attr_accessor :can_remove_from_task_list
|
33
|
+
|
34
|
+
attr_accessor :can_remove_approval
|
35
|
+
|
36
|
+
attr_accessor :can_rename
|
37
|
+
|
38
|
+
attr_accessor :can_share
|
39
|
+
|
40
|
+
attr_accessor :can_view_activity
|
41
|
+
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
43
|
+
def self.attribute_map
|
44
|
+
{
|
45
|
+
:'user_id' => :'userId',
|
46
|
+
:'document_id' => :'documentId',
|
47
|
+
:'name' => :'name',
|
48
|
+
:'has_access' => :'hasAccess',
|
49
|
+
:'can_approve_task' => :'canApproveTask',
|
50
|
+
:'can_assign_to_task_list' => :'canAssignToTaskList',
|
51
|
+
:'can_copy' => :'canCopy',
|
52
|
+
:'can_delete' => :'canDelete',
|
53
|
+
:'can_remove_from_task_list' => :'canRemoveFromTaskList',
|
54
|
+
:'can_remove_approval' => :'canRemoveApproval',
|
55
|
+
:'can_rename' => :'canRename',
|
56
|
+
:'can_share' => :'canShare',
|
57
|
+
:'can_view_activity' => :'canViewActivity'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute type mapping.
|
62
|
+
def self.swagger_types
|
63
|
+
{
|
64
|
+
:'user_id' => :'Integer',
|
65
|
+
:'document_id' => :'Integer',
|
66
|
+
:'name' => :'String',
|
67
|
+
:'has_access' => :'BOOLEAN',
|
68
|
+
:'can_approve_task' => :'BOOLEAN',
|
69
|
+
:'can_assign_to_task_list' => :'BOOLEAN',
|
70
|
+
:'can_copy' => :'BOOLEAN',
|
71
|
+
:'can_delete' => :'BOOLEAN',
|
72
|
+
:'can_remove_from_task_list' => :'BOOLEAN',
|
73
|
+
:'can_remove_approval' => :'BOOLEAN',
|
74
|
+
:'can_rename' => :'BOOLEAN',
|
75
|
+
:'can_share' => :'BOOLEAN',
|
76
|
+
:'can_view_activity' => :'BOOLEAN'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
return unless attributes.is_a?(Hash)
|
84
|
+
|
85
|
+
# convert string to symbol for hash key
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
87
|
+
|
88
|
+
if attributes.has_key?(:'userId')
|
89
|
+
self.user_id = attributes[:'userId']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.has_key?(:'documentId')
|
93
|
+
self.document_id = attributes[:'documentId']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.has_key?(:'name')
|
97
|
+
self.name = attributes[:'name']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'hasAccess')
|
101
|
+
self.has_access = attributes[:'hasAccess']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'canApproveTask')
|
105
|
+
self.can_approve_task = attributes[:'canApproveTask']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.has_key?(:'canAssignToTaskList')
|
109
|
+
self.can_assign_to_task_list = attributes[:'canAssignToTaskList']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.has_key?(:'canCopy')
|
113
|
+
self.can_copy = attributes[:'canCopy']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.has_key?(:'canDelete')
|
117
|
+
self.can_delete = attributes[:'canDelete']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'canRemoveFromTaskList')
|
121
|
+
self.can_remove_from_task_list = attributes[:'canRemoveFromTaskList']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.has_key?(:'canRemoveApproval')
|
125
|
+
self.can_remove_approval = attributes[:'canRemoveApproval']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.has_key?(:'canRename')
|
129
|
+
self.can_rename = attributes[:'canRename']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.has_key?(:'canShare')
|
133
|
+
self.can_share = attributes[:'canShare']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.has_key?(:'canViewActivity')
|
137
|
+
self.can_view_activity = attributes[:'canViewActivity']
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
142
|
+
# @return Array for valid properties with the reasons
|
143
|
+
def list_invalid_properties
|
144
|
+
invalid_properties = Array.new
|
145
|
+
invalid_properties
|
146
|
+
end
|
147
|
+
|
148
|
+
# Check to see if the all the properties in the model are valid
|
149
|
+
# @return true if the model is valid
|
150
|
+
def valid?
|
151
|
+
true
|
152
|
+
end
|
153
|
+
|
154
|
+
# Checks equality by comparing each attribute.
|
155
|
+
# @param [Object] Object to be compared
|
156
|
+
def ==(o)
|
157
|
+
return true if self.equal?(o)
|
158
|
+
self.class == o.class &&
|
159
|
+
user_id == o.user_id &&
|
160
|
+
document_id == o.document_id &&
|
161
|
+
name == o.name &&
|
162
|
+
has_access == o.has_access &&
|
163
|
+
can_approve_task == o.can_approve_task &&
|
164
|
+
can_assign_to_task_list == o.can_assign_to_task_list &&
|
165
|
+
can_copy == o.can_copy &&
|
166
|
+
can_delete == o.can_delete &&
|
167
|
+
can_remove_from_task_list == o.can_remove_from_task_list &&
|
168
|
+
can_remove_approval == o.can_remove_approval &&
|
169
|
+
can_rename == o.can_rename &&
|
170
|
+
can_share == o.can_share &&
|
171
|
+
can_view_activity == o.can_view_activity
|
172
|
+
end
|
173
|
+
|
174
|
+
# @see the `==` method
|
175
|
+
# @param [Object] Object to be compared
|
176
|
+
def eql?(o)
|
177
|
+
self == o
|
178
|
+
end
|
179
|
+
|
180
|
+
# Calculates hash code according to all attributes.
|
181
|
+
# @return [Fixnum] Hash code
|
182
|
+
def hash
|
183
|
+
[user_id, document_id, name, has_access, can_approve_task, can_assign_to_task_list, can_copy, can_delete, can_remove_from_task_list, can_remove_approval, can_rename, can_share, can_view_activity].hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Builds the object from hash
|
187
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
188
|
+
# @return [Object] Returns the model itself
|
189
|
+
def build_from_hash(attributes)
|
190
|
+
return nil unless attributes.is_a?(Hash)
|
191
|
+
self.class.swagger_types.each_pair do |key, type|
|
192
|
+
if type =~ /\AArray<(.*)>/i
|
193
|
+
# check to ensure the input is an array given that the attribute
|
194
|
+
# is documented as an array but the input is not
|
195
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
196
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
197
|
+
end
|
198
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
199
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
200
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
201
|
+
end
|
202
|
+
|
203
|
+
self
|
204
|
+
end
|
205
|
+
|
206
|
+
# Deserializes the data based on type
|
207
|
+
# @param string type Data type
|
208
|
+
# @param string value Value to be deserialized
|
209
|
+
# @return [Object] Deserialized data
|
210
|
+
def _deserialize(type, value)
|
211
|
+
case type.to_sym
|
212
|
+
when :DateTime
|
213
|
+
DateTime.parse(value)
|
214
|
+
when :Date
|
215
|
+
Date.parse(value)
|
216
|
+
when :String
|
217
|
+
value.to_s
|
218
|
+
when :Integer
|
219
|
+
value.to_i
|
220
|
+
when :Float
|
221
|
+
value.to_f
|
222
|
+
when :BOOLEAN
|
223
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
224
|
+
true
|
225
|
+
else
|
226
|
+
false
|
227
|
+
end
|
228
|
+
when :Object
|
229
|
+
# generic object (usually a Hash), return directly
|
230
|
+
value
|
231
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
232
|
+
inner_type = Regexp.last_match[:inner_type]
|
233
|
+
value.map { |v| _deserialize(inner_type, v) }
|
234
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
235
|
+
k_type = Regexp.last_match[:k_type]
|
236
|
+
v_type = Regexp.last_match[:v_type]
|
237
|
+
{}.tap do |hash|
|
238
|
+
value.each do |k, v|
|
239
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
240
|
+
end
|
241
|
+
end
|
242
|
+
else # model
|
243
|
+
temp_model = DocuSign_Rooms.const_get(type).new
|
244
|
+
temp_model.build_from_hash(value)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
# Returns the string representation of the object
|
249
|
+
# @return [String] String presentation of the object
|
250
|
+
def to_s
|
251
|
+
to_hash.to_s
|
252
|
+
end
|
253
|
+
|
254
|
+
# to_body is an alias to to_hash (backward compatibility)
|
255
|
+
# @return [Hash] Returns the object in the form of hash
|
256
|
+
def to_body
|
257
|
+
to_hash
|
258
|
+
end
|
259
|
+
|
260
|
+
# Returns the object in the form of hash
|
261
|
+
# @return [Hash] Returns the object in the form of hash
|
262
|
+
def to_hash
|
263
|
+
hash = {}
|
264
|
+
self.class.attribute_map.each_pair do |attr, param|
|
265
|
+
value = self.send(attr)
|
266
|
+
next if value.nil?
|
267
|
+
hash[param] = _to_hash(value)
|
268
|
+
end
|
269
|
+
hash
|
270
|
+
end
|
271
|
+
|
272
|
+
# Outputs non-array value in the form of hash
|
273
|
+
# For object, use to_hash. Otherwise, just return the value
|
274
|
+
# @param [Object] value Any valid value
|
275
|
+
# @return [Hash] Returns the value in the form of hash
|
276
|
+
def _to_hash(value)
|
277
|
+
if value.is_a?(Array)
|
278
|
+
value.compact.map { |v| _to_hash(v) }
|
279
|
+
elsif value.is_a?(Hash)
|
280
|
+
{}.tap do |hash|
|
281
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
282
|
+
end
|
283
|
+
elsif value.respond_to? :to_hash
|
284
|
+
value.to_hash
|
285
|
+
else
|
286
|
+
value
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
end
|
291
|
+
end
|
@@ -0,0 +1,188 @@
|
|
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 DocumentUserForCreate
|
16
|
+
attr_accessor :user_id
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'user_id' => :'userId'
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.swagger_types
|
27
|
+
{
|
28
|
+
:'user_id' => :'Integer'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Initializes the object
|
33
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
34
|
+
def initialize(attributes = {})
|
35
|
+
return unless attributes.is_a?(Hash)
|
36
|
+
|
37
|
+
# convert string to symbol for hash key
|
38
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
39
|
+
|
40
|
+
if attributes.has_key?(:'userId')
|
41
|
+
self.user_id = attributes[:'userId']
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
46
|
+
# @return Array for valid properties with the reasons
|
47
|
+
def list_invalid_properties
|
48
|
+
invalid_properties = Array.new
|
49
|
+
if @user_id.nil?
|
50
|
+
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
51
|
+
end
|
52
|
+
|
53
|
+
invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
return false if @user_id.nil?
|
60
|
+
true
|
61
|
+
end
|
62
|
+
|
63
|
+
# Checks equality by comparing each attribute.
|
64
|
+
# @param [Object] Object to be compared
|
65
|
+
def ==(o)
|
66
|
+
return true if self.equal?(o)
|
67
|
+
self.class == o.class &&
|
68
|
+
user_id == o.user_id
|
69
|
+
end
|
70
|
+
|
71
|
+
# @see the `==` method
|
72
|
+
# @param [Object] Object to be compared
|
73
|
+
def eql?(o)
|
74
|
+
self == o
|
75
|
+
end
|
76
|
+
|
77
|
+
# Calculates hash code according to all attributes.
|
78
|
+
# @return [Fixnum] Hash code
|
79
|
+
def hash
|
80
|
+
[user_id].hash
|
81
|
+
end
|
82
|
+
|
83
|
+
# Builds the object from hash
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
# @return [Object] Returns the model itself
|
86
|
+
def build_from_hash(attributes)
|
87
|
+
return nil unless attributes.is_a?(Hash)
|
88
|
+
self.class.swagger_types.each_pair do |key, type|
|
89
|
+
if type =~ /\AArray<(.*)>/i
|
90
|
+
# check to ensure the input is an array given that the attribute
|
91
|
+
# is documented as an array but the input is not
|
92
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
93
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
94
|
+
end
|
95
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
96
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
97
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
98
|
+
end
|
99
|
+
|
100
|
+
self
|
101
|
+
end
|
102
|
+
|
103
|
+
# Deserializes the data based on type
|
104
|
+
# @param string type Data type
|
105
|
+
# @param string value Value to be deserialized
|
106
|
+
# @return [Object] Deserialized data
|
107
|
+
def _deserialize(type, value)
|
108
|
+
case type.to_sym
|
109
|
+
when :DateTime
|
110
|
+
DateTime.parse(value)
|
111
|
+
when :Date
|
112
|
+
Date.parse(value)
|
113
|
+
when :String
|
114
|
+
value.to_s
|
115
|
+
when :Integer
|
116
|
+
value.to_i
|
117
|
+
when :Float
|
118
|
+
value.to_f
|
119
|
+
when :BOOLEAN
|
120
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
121
|
+
true
|
122
|
+
else
|
123
|
+
false
|
124
|
+
end
|
125
|
+
when :Object
|
126
|
+
# generic object (usually a Hash), return directly
|
127
|
+
value
|
128
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
129
|
+
inner_type = Regexp.last_match[:inner_type]
|
130
|
+
value.map { |v| _deserialize(inner_type, v) }
|
131
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
132
|
+
k_type = Regexp.last_match[:k_type]
|
133
|
+
v_type = Regexp.last_match[:v_type]
|
134
|
+
{}.tap do |hash|
|
135
|
+
value.each do |k, v|
|
136
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
else # model
|
140
|
+
temp_model = DocuSign_Rooms.const_get(type).new
|
141
|
+
temp_model.build_from_hash(value)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Returns the string representation of the object
|
146
|
+
# @return [String] String presentation of the object
|
147
|
+
def to_s
|
148
|
+
to_hash.to_s
|
149
|
+
end
|
150
|
+
|
151
|
+
# to_body is an alias to to_hash (backward compatibility)
|
152
|
+
# @return [Hash] Returns the object in the form of hash
|
153
|
+
def to_body
|
154
|
+
to_hash
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the object in the form of hash
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
159
|
+
def to_hash
|
160
|
+
hash = {}
|
161
|
+
self.class.attribute_map.each_pair do |attr, param|
|
162
|
+
value = self.send(attr)
|
163
|
+
next if value.nil?
|
164
|
+
hash[param] = _to_hash(value)
|
165
|
+
end
|
166
|
+
hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Outputs non-array value in the form of hash
|
170
|
+
# For object, use to_hash. Otherwise, just return the value
|
171
|
+
# @param [Object] value Any valid value
|
172
|
+
# @return [Hash] Returns the value in the form of hash
|
173
|
+
def _to_hash(value)
|
174
|
+
if value.is_a?(Array)
|
175
|
+
value.compact.map { |v| _to_hash(v) }
|
176
|
+
elsif value.is_a?(Hash)
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
179
|
+
end
|
180
|
+
elsif value.respond_to? :to_hash
|
181
|
+
value.to_hash
|
182
|
+
else
|
183
|
+
value
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
end
|
188
|
+
end
|