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,201 @@
|
|
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 RoomFolder
|
16
|
+
attr_accessor :room_folder_id
|
17
|
+
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
attr_accessor :is_default
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'room_folder_id' => :'roomFolderId',
|
26
|
+
:'name' => :'name',
|
27
|
+
:'is_default' => :'isDefault'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'room_folder_id' => :'Integer',
|
35
|
+
:'name' => :'String',
|
36
|
+
:'is_default' => :'BOOLEAN'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
return unless attributes.is_a?(Hash)
|
44
|
+
|
45
|
+
# convert string to symbol for hash key
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
47
|
+
|
48
|
+
if attributes.has_key?(:'roomFolderId')
|
49
|
+
self.room_folder_id = attributes[:'roomFolderId']
|
50
|
+
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'name')
|
53
|
+
self.name = attributes[:'name']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes.has_key?(:'isDefault')
|
57
|
+
self.is_default = attributes[:'isDefault']
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
invalid_properties
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
def valid?
|
71
|
+
true
|
72
|
+
end
|
73
|
+
|
74
|
+
# Checks equality by comparing each attribute.
|
75
|
+
# @param [Object] Object to be compared
|
76
|
+
def ==(o)
|
77
|
+
return true if self.equal?(o)
|
78
|
+
self.class == o.class &&
|
79
|
+
room_folder_id == o.room_folder_id &&
|
80
|
+
name == o.name &&
|
81
|
+
is_default == o.is_default
|
82
|
+
end
|
83
|
+
|
84
|
+
# @see the `==` method
|
85
|
+
# @param [Object] Object to be compared
|
86
|
+
def eql?(o)
|
87
|
+
self == o
|
88
|
+
end
|
89
|
+
|
90
|
+
# Calculates hash code according to all attributes.
|
91
|
+
# @return [Fixnum] Hash code
|
92
|
+
def hash
|
93
|
+
[room_folder_id, name, is_default].hash
|
94
|
+
end
|
95
|
+
|
96
|
+
# Builds the object from hash
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
# @return [Object] Returns the model itself
|
99
|
+
def build_from_hash(attributes)
|
100
|
+
return nil unless attributes.is_a?(Hash)
|
101
|
+
self.class.swagger_types.each_pair do |key, type|
|
102
|
+
if type =~ /\AArray<(.*)>/i
|
103
|
+
# check to ensure the input is an array given that the attribute
|
104
|
+
# is documented as an array but the input is not
|
105
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
106
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
107
|
+
end
|
108
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
109
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
110
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
111
|
+
end
|
112
|
+
|
113
|
+
self
|
114
|
+
end
|
115
|
+
|
116
|
+
# Deserializes the data based on type
|
117
|
+
# @param string type Data type
|
118
|
+
# @param string value Value to be deserialized
|
119
|
+
# @return [Object] Deserialized data
|
120
|
+
def _deserialize(type, value)
|
121
|
+
case type.to_sym
|
122
|
+
when :DateTime
|
123
|
+
DateTime.parse(value)
|
124
|
+
when :Date
|
125
|
+
Date.parse(value)
|
126
|
+
when :String
|
127
|
+
value.to_s
|
128
|
+
when :Integer
|
129
|
+
value.to_i
|
130
|
+
when :Float
|
131
|
+
value.to_f
|
132
|
+
when :BOOLEAN
|
133
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
134
|
+
true
|
135
|
+
else
|
136
|
+
false
|
137
|
+
end
|
138
|
+
when :Object
|
139
|
+
# generic object (usually a Hash), return directly
|
140
|
+
value
|
141
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
142
|
+
inner_type = Regexp.last_match[:inner_type]
|
143
|
+
value.map { |v| _deserialize(inner_type, v) }
|
144
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
145
|
+
k_type = Regexp.last_match[:k_type]
|
146
|
+
v_type = Regexp.last_match[:v_type]
|
147
|
+
{}.tap do |hash|
|
148
|
+
value.each do |k, v|
|
149
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
else # model
|
153
|
+
temp_model = DocuSign_Rooms.const_get(type).new
|
154
|
+
temp_model.build_from_hash(value)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# Returns the string representation of the object
|
159
|
+
# @return [String] String presentation of the object
|
160
|
+
def to_s
|
161
|
+
to_hash.to_s
|
162
|
+
end
|
163
|
+
|
164
|
+
# to_body is an alias to to_hash (backward compatibility)
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_body
|
167
|
+
to_hash
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the object in the form of hash
|
171
|
+
# @return [Hash] Returns the object in the form of hash
|
172
|
+
def to_hash
|
173
|
+
hash = {}
|
174
|
+
self.class.attribute_map.each_pair do |attr, param|
|
175
|
+
value = self.send(attr)
|
176
|
+
next if value.nil?
|
177
|
+
hash[param] = _to_hash(value)
|
178
|
+
end
|
179
|
+
hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Outputs non-array value in the form of hash
|
183
|
+
# For object, use to_hash. Otherwise, just return the value
|
184
|
+
# @param [Object] value Any valid value
|
185
|
+
# @return [Hash] Returns the value in the form of hash
|
186
|
+
def _to_hash(value)
|
187
|
+
if value.is_a?(Array)
|
188
|
+
value.compact.map { |v| _to_hash(v) }
|
189
|
+
elsif value.is_a?(Hash)
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
192
|
+
end
|
193
|
+
elsif value.respond_to? :to_hash
|
194
|
+
value.to_hash
|
195
|
+
else
|
196
|
+
value
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
end
|
201
|
+
end
|
@@ -0,0 +1,230 @@
|
|
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 RoomFolderList
|
16
|
+
attr_accessor :folders
|
17
|
+
|
18
|
+
attr_accessor :result_set_size
|
19
|
+
|
20
|
+
attr_accessor :start_position
|
21
|
+
|
22
|
+
attr_accessor :end_position
|
23
|
+
|
24
|
+
attr_accessor :next_uri
|
25
|
+
|
26
|
+
attr_accessor :prior_uri
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'folders' => :'folders',
|
32
|
+
:'result_set_size' => :'resultSetSize',
|
33
|
+
:'start_position' => :'startPosition',
|
34
|
+
:'end_position' => :'endPosition',
|
35
|
+
:'next_uri' => :'nextUri',
|
36
|
+
:'prior_uri' => :'priorUri'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'folders' => :'Array<RoomFolder>',
|
44
|
+
:'result_set_size' => :'Integer',
|
45
|
+
:'start_position' => :'Integer',
|
46
|
+
:'end_position' => :'Integer',
|
47
|
+
:'next_uri' => :'String',
|
48
|
+
:'prior_uri' => :'String'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
return unless attributes.is_a?(Hash)
|
56
|
+
|
57
|
+
# convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
59
|
+
|
60
|
+
if attributes.has_key?(:'folders')
|
61
|
+
if (value = attributes[:'folders']).is_a?(Array)
|
62
|
+
self.folders = value
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'resultSetSize')
|
67
|
+
self.result_set_size = attributes[:'resultSetSize']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'startPosition')
|
71
|
+
self.start_position = attributes[:'startPosition']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.has_key?(:'endPosition')
|
75
|
+
self.end_position = attributes[:'endPosition']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.has_key?(:'nextUri')
|
79
|
+
self.next_uri = attributes[:'nextUri']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.has_key?(:'priorUri')
|
83
|
+
self.prior_uri = attributes[:'priorUri']
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
88
|
+
# @return Array for valid properties with the reasons
|
89
|
+
def list_invalid_properties
|
90
|
+
invalid_properties = Array.new
|
91
|
+
invalid_properties
|
92
|
+
end
|
93
|
+
|
94
|
+
# Check to see if the all the properties in the model are valid
|
95
|
+
# @return true if the model is valid
|
96
|
+
def valid?
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
# Checks equality by comparing each attribute.
|
101
|
+
# @param [Object] Object to be compared
|
102
|
+
def ==(o)
|
103
|
+
return true if self.equal?(o)
|
104
|
+
self.class == o.class &&
|
105
|
+
folders == o.folders &&
|
106
|
+
result_set_size == o.result_set_size &&
|
107
|
+
start_position == o.start_position &&
|
108
|
+
end_position == o.end_position &&
|
109
|
+
next_uri == o.next_uri &&
|
110
|
+
prior_uri == o.prior_uri
|
111
|
+
end
|
112
|
+
|
113
|
+
# @see the `==` method
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def eql?(o)
|
116
|
+
self == o
|
117
|
+
end
|
118
|
+
|
119
|
+
# Calculates hash code according to all attributes.
|
120
|
+
# @return [Fixnum] Hash code
|
121
|
+
def hash
|
122
|
+
[folders, result_set_size, start_position, end_position, next_uri, prior_uri].hash
|
123
|
+
end
|
124
|
+
|
125
|
+
# Builds the object from hash
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
+
# @return [Object] Returns the model itself
|
128
|
+
def build_from_hash(attributes)
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
130
|
+
self.class.swagger_types.each_pair do |key, type|
|
131
|
+
if type =~ /\AArray<(.*)>/i
|
132
|
+
# check to ensure the input is an array given that the attribute
|
133
|
+
# is documented as an array but the input is not
|
134
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
135
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
136
|
+
end
|
137
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
138
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
139
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
140
|
+
end
|
141
|
+
|
142
|
+
self
|
143
|
+
end
|
144
|
+
|
145
|
+
# Deserializes the data based on type
|
146
|
+
# @param string type Data type
|
147
|
+
# @param string value Value to be deserialized
|
148
|
+
# @return [Object] Deserialized data
|
149
|
+
def _deserialize(type, value)
|
150
|
+
case type.to_sym
|
151
|
+
when :DateTime
|
152
|
+
DateTime.parse(value)
|
153
|
+
when :Date
|
154
|
+
Date.parse(value)
|
155
|
+
when :String
|
156
|
+
value.to_s
|
157
|
+
when :Integer
|
158
|
+
value.to_i
|
159
|
+
when :Float
|
160
|
+
value.to_f
|
161
|
+
when :BOOLEAN
|
162
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
163
|
+
true
|
164
|
+
else
|
165
|
+
false
|
166
|
+
end
|
167
|
+
when :Object
|
168
|
+
# generic object (usually a Hash), return directly
|
169
|
+
value
|
170
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
171
|
+
inner_type = Regexp.last_match[:inner_type]
|
172
|
+
value.map { |v| _deserialize(inner_type, v) }
|
173
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
174
|
+
k_type = Regexp.last_match[:k_type]
|
175
|
+
v_type = Regexp.last_match[:v_type]
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each do |k, v|
|
178
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
else # model
|
182
|
+
temp_model = DocuSign_Rooms.const_get(type).new
|
183
|
+
temp_model.build_from_hash(value)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the string representation of the object
|
188
|
+
# @return [String] String presentation of the object
|
189
|
+
def to_s
|
190
|
+
to_hash.to_s
|
191
|
+
end
|
192
|
+
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_body
|
196
|
+
to_hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the object in the form of hash
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_hash
|
202
|
+
hash = {}
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
204
|
+
value = self.send(attr)
|
205
|
+
next if value.nil?
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
230
|
+
end
|
@@ -0,0 +1,248 @@
|
|
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 RoomForCreate
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
attr_accessor :role_id
|
19
|
+
|
20
|
+
# Required for a real estate company; otherwise ignored.
|
21
|
+
attr_accessor :transaction_side_id
|
22
|
+
|
23
|
+
attr_accessor :owner_id
|
24
|
+
|
25
|
+
attr_accessor :template_id
|
26
|
+
|
27
|
+
attr_accessor :office_id
|
28
|
+
|
29
|
+
attr_accessor :field_data
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'name' => :'name',
|
35
|
+
:'role_id' => :'roleId',
|
36
|
+
:'transaction_side_id' => :'transactionSideId',
|
37
|
+
:'owner_id' => :'ownerId',
|
38
|
+
:'template_id' => :'templateId',
|
39
|
+
:'office_id' => :'officeId',
|
40
|
+
:'field_data' => :'fieldData'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.swagger_types
|
46
|
+
{
|
47
|
+
:'name' => :'String',
|
48
|
+
:'role_id' => :'Integer',
|
49
|
+
:'transaction_side_id' => :'String',
|
50
|
+
:'owner_id' => :'Integer',
|
51
|
+
:'template_id' => :'Integer',
|
52
|
+
:'office_id' => :'Integer',
|
53
|
+
:'field_data' => :'FieldDataForCreate'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
return unless attributes.is_a?(Hash)
|
61
|
+
|
62
|
+
# convert string to symbol for hash key
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
64
|
+
|
65
|
+
if attributes.has_key?(:'name')
|
66
|
+
self.name = attributes[:'name']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'roleId')
|
70
|
+
self.role_id = attributes[:'roleId']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'transactionSideId')
|
74
|
+
self.transaction_side_id = attributes[:'transactionSideId']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'ownerId')
|
78
|
+
self.owner_id = attributes[:'ownerId']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'templateId')
|
82
|
+
self.template_id = attributes[:'templateId']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'officeId')
|
86
|
+
self.office_id = attributes[:'officeId']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'fieldData')
|
90
|
+
self.field_data = attributes[:'fieldData']
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
95
|
+
# @return Array for valid properties with the reasons
|
96
|
+
def list_invalid_properties
|
97
|
+
invalid_properties = Array.new
|
98
|
+
if @name.nil?
|
99
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
100
|
+
end
|
101
|
+
|
102
|
+
if @role_id.nil?
|
103
|
+
invalid_properties.push('invalid value for "role_id", role_id cannot be nil.')
|
104
|
+
end
|
105
|
+
|
106
|
+
invalid_properties
|
107
|
+
end
|
108
|
+
|
109
|
+
# Check to see if the all the properties in the model are valid
|
110
|
+
# @return true if the model is valid
|
111
|
+
def valid?
|
112
|
+
return false if @name.nil?
|
113
|
+
return false if @role_id.nil?
|
114
|
+
true
|
115
|
+
end
|
116
|
+
|
117
|
+
# Checks equality by comparing each attribute.
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def ==(o)
|
120
|
+
return true if self.equal?(o)
|
121
|
+
self.class == o.class &&
|
122
|
+
name == o.name &&
|
123
|
+
role_id == o.role_id &&
|
124
|
+
transaction_side_id == o.transaction_side_id &&
|
125
|
+
owner_id == o.owner_id &&
|
126
|
+
template_id == o.template_id &&
|
127
|
+
office_id == o.office_id &&
|
128
|
+
field_data == o.field_data
|
129
|
+
end
|
130
|
+
|
131
|
+
# @see the `==` method
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def eql?(o)
|
134
|
+
self == o
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Fixnum] Hash code
|
139
|
+
def hash
|
140
|
+
[name, role_id, transaction_side_id, owner_id, template_id, office_id, field_data].hash
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def build_from_hash(attributes)
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
148
|
+
self.class.swagger_types.each_pair do |key, type|
|
149
|
+
if type =~ /\AArray<(.*)>/i
|
150
|
+
# check to ensure the input is an array given that the attribute
|
151
|
+
# is documented as an array but the input is not
|
152
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
154
|
+
end
|
155
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
156
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
157
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
158
|
+
end
|
159
|
+
|
160
|
+
self
|
161
|
+
end
|
162
|
+
|
163
|
+
# Deserializes the data based on type
|
164
|
+
# @param string type Data type
|
165
|
+
# @param string value Value to be deserialized
|
166
|
+
# @return [Object] Deserialized data
|
167
|
+
def _deserialize(type, value)
|
168
|
+
case type.to_sym
|
169
|
+
when :DateTime
|
170
|
+
DateTime.parse(value)
|
171
|
+
when :Date
|
172
|
+
Date.parse(value)
|
173
|
+
when :String
|
174
|
+
value.to_s
|
175
|
+
when :Integer
|
176
|
+
value.to_i
|
177
|
+
when :Float
|
178
|
+
value.to_f
|
179
|
+
when :BOOLEAN
|
180
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
181
|
+
true
|
182
|
+
else
|
183
|
+
false
|
184
|
+
end
|
185
|
+
when :Object
|
186
|
+
# generic object (usually a Hash), return directly
|
187
|
+
value
|
188
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
189
|
+
inner_type = Regexp.last_match[:inner_type]
|
190
|
+
value.map { |v| _deserialize(inner_type, v) }
|
191
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
192
|
+
k_type = Regexp.last_match[:k_type]
|
193
|
+
v_type = Regexp.last_match[:v_type]
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each do |k, v|
|
196
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
else # model
|
200
|
+
temp_model = DocuSign_Rooms.const_get(type).new
|
201
|
+
temp_model.build_from_hash(value)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the string representation of the object
|
206
|
+
# @return [String] String presentation of the object
|
207
|
+
def to_s
|
208
|
+
to_hash.to_s
|
209
|
+
end
|
210
|
+
|
211
|
+
# to_body is an alias to to_hash (backward compatibility)
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
213
|
+
def to_body
|
214
|
+
to_hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the object in the form of hash
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_hash
|
220
|
+
hash = {}
|
221
|
+
self.class.attribute_map.each_pair do |attr, param|
|
222
|
+
value = self.send(attr)
|
223
|
+
next if value.nil?
|
224
|
+
hash[param] = _to_hash(value)
|
225
|
+
end
|
226
|
+
hash
|
227
|
+
end
|
228
|
+
|
229
|
+
# Outputs non-array value in the form of hash
|
230
|
+
# For object, use to_hash. Otherwise, just return the value
|
231
|
+
# @param [Object] value Any valid value
|
232
|
+
# @return [Hash] Returns the value in the form of hash
|
233
|
+
def _to_hash(value)
|
234
|
+
if value.is_a?(Array)
|
235
|
+
value.compact.map { |v| _to_hash(v) }
|
236
|
+
elsif value.is_a?(Hash)
|
237
|
+
{}.tap do |hash|
|
238
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
239
|
+
end
|
240
|
+
elsif value.respond_to? :to_hash
|
241
|
+
value.to_hash
|
242
|
+
else
|
243
|
+
value
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
end
|
248
|
+
end
|