docusign_rooms 1.2.0.rc1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/docusign_rooms.gemspec +9 -7
  4. data/lib/docusign_rooms/api/accounts_api.rb +1 -1
  5. data/lib/docusign_rooms/api/activity_types_api.rb +3 -3
  6. data/lib/docusign_rooms/api/closing_statuses_api.rb +1 -1
  7. data/lib/docusign_rooms/api/contact_sides_api.rb +1 -1
  8. data/lib/docusign_rooms/api/countries_api.rb +1 -1
  9. data/lib/docusign_rooms/api/currencies_api.rb +1 -1
  10. data/lib/docusign_rooms/api/documents_api.rb +6 -6
  11. data/lib/docusign_rooms/api/e_sign_permission_profiles_api.rb +1 -1
  12. data/lib/docusign_rooms/api/external_form_fill_sessions_api.rb +6 -6
  13. data/lib/docusign_rooms/api/fields_api.rb +1 -1
  14. data/lib/docusign_rooms/api/financing_types_api.rb +1 -1
  15. data/lib/docusign_rooms/api/form_details_api.rb +1 -1
  16. data/lib/docusign_rooms/api/form_group_forms_api.rb +95 -0
  17. data/lib/docusign_rooms/api/form_groups_api.rb +18 -18
  18. data/lib/docusign_rooms/api/form_libraries_api.rb +2 -2
  19. data/lib/docusign_rooms/api/form_provider_associations_api.rb +95 -0
  20. data/lib/docusign_rooms/api/offices_api.rb +12 -12
  21. data/lib/docusign_rooms/api/origins_of_leads_api.rb +1 -1
  22. data/lib/docusign_rooms/api/property_types_api.rb +1 -1
  23. data/lib/docusign_rooms/api/regions_api.rb +8 -8
  24. data/lib/docusign_rooms/api/roles_api.rb +11 -14
  25. data/lib/docusign_rooms/api/room_contact_types_api.rb +1 -1
  26. data/lib/docusign_rooms/api/room_envelopes_api.rb +81 -0
  27. data/lib/docusign_rooms/api/room_folders_api.rb +1 -1
  28. data/lib/docusign_rooms/api/room_templates_api.rb +1 -1
  29. data/lib/docusign_rooms/api/rooms_api.rb +36 -42
  30. data/lib/docusign_rooms/api/seller_decision_types_api.rb +1 -1
  31. data/lib/docusign_rooms/api/special_circumstance_types_api.rb +1 -1
  32. data/lib/docusign_rooms/api/states_api.rb +1 -1
  33. data/lib/docusign_rooms/api/task_date_types_api.rb +1 -1
  34. data/lib/docusign_rooms/api/task_list_templates_api.rb +1 -1
  35. data/lib/docusign_rooms/api/task_lists_api.rb +5 -5
  36. data/lib/docusign_rooms/api/task_responsibility_types_api.rb +1 -1
  37. data/lib/docusign_rooms/api/task_statuses_api.rb +1 -1
  38. data/lib/docusign_rooms/api/time_zones_api.rb +1 -1
  39. data/lib/docusign_rooms/api/transaction_sides_api.rb +1 -1
  40. data/lib/docusign_rooms/api/users_api.rb +34 -202
  41. data/lib/docusign_rooms/client/api_client.rb +14 -10
  42. data/lib/docusign_rooms/client/api_error.rb +2 -2
  43. data/lib/docusign_rooms/client/auth/oauth.rb +1 -1
  44. data/lib/docusign_rooms/models/account_summary.rb +35 -1
  45. data/lib/docusign_rooms/models/api_error.rb +13 -4
  46. data/lib/docusign_rooms/models/envelope.rb +183 -0
  47. data/lib/docusign_rooms/models/envelope_for_create.rb +194 -0
  48. data/lib/docusign_rooms/models/external_form_fill_session_for_create.rb +12 -6
  49. data/lib/docusign_rooms/models/form_group_form.rb +210 -0
  50. data/lib/docusign_rooms/models/form_group_form_list.rb +239 -0
  51. data/lib/docusign_rooms/models/form_provider_association_summary.rb +219 -0
  52. data/lib/docusign_rooms/models/form_provider_associations_summary_list.rb +239 -0
  53. data/lib/docusign_rooms/models/form_summary.rb +13 -4
  54. data/lib/docusign_rooms/models/group_form.rb +13 -4
  55. data/lib/docusign_rooms/models/listing_type.rb +29 -0
  56. data/lib/docusign_rooms/models/permissions.rb +49 -4
  57. data/lib/docusign_rooms/models/room.rb +21 -1
  58. data/lib/docusign_rooms/models/room_for_create.rb +47 -4
  59. data/lib/docusign_rooms/models/user.rb +35 -1
  60. data/lib/docusign_rooms/models/user_summary.rb +35 -1
  61. data/lib/docusign_rooms/models/user_to_invite.rb +47 -2
  62. data/lib/docusign_rooms/version.rb +1 -1
  63. data/lib/docusign_rooms.rb +10 -3
  64. metadata +115 -89
@@ -0,0 +1,239 @@
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 FormGroupFormList
16
+ attr_accessor :forms
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
+ attr_accessor :total_row_count
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'forms' => :'forms',
34
+ :'result_set_size' => :'resultSetSize',
35
+ :'start_position' => :'startPosition',
36
+ :'end_position' => :'endPosition',
37
+ :'next_uri' => :'nextUri',
38
+ :'prior_uri' => :'priorUri',
39
+ :'total_row_count' => :'totalRowCount'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'forms' => :'Array<FormGroupForm>',
47
+ :'result_set_size' => :'Integer',
48
+ :'start_position' => :'Integer',
49
+ :'end_position' => :'Integer',
50
+ :'next_uri' => :'String',
51
+ :'prior_uri' => :'String',
52
+ :'total_row_count' => :'Integer'
53
+ }
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ return unless attributes.is_a?(Hash)
60
+
61
+ # convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
+
64
+ if attributes.has_key?(:'forms')
65
+ if (value = attributes[:'forms']).is_a?(Array)
66
+ self.forms = value
67
+ end
68
+ end
69
+
70
+ if attributes.has_key?(:'resultSetSize')
71
+ self.result_set_size = attributes[:'resultSetSize']
72
+ end
73
+
74
+ if attributes.has_key?(:'startPosition')
75
+ self.start_position = attributes[:'startPosition']
76
+ end
77
+
78
+ if attributes.has_key?(:'endPosition')
79
+ self.end_position = attributes[:'endPosition']
80
+ end
81
+
82
+ if attributes.has_key?(:'nextUri')
83
+ self.next_uri = attributes[:'nextUri']
84
+ end
85
+
86
+ if attributes.has_key?(:'priorUri')
87
+ self.prior_uri = attributes[:'priorUri']
88
+ end
89
+
90
+ if attributes.has_key?(:'totalRowCount')
91
+ self.total_row_count = attributes[:'totalRowCount']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ forms == o.forms &&
114
+ result_set_size == o.result_set_size &&
115
+ start_position == o.start_position &&
116
+ end_position == o.end_position &&
117
+ next_uri == o.next_uri &&
118
+ prior_uri == o.prior_uri &&
119
+ total_row_count == o.total_row_count
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Fixnum] Hash code
130
+ def hash
131
+ [forms, result_set_size, start_position, end_position, next_uri, prior_uri, total_row_count].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ self.class.swagger_types.each_pair do |key, type|
140
+ if type =~ /\AArray<(.*)>/i
141
+ # check to ensure the input is an array given that the attribute
142
+ # is documented as an array but the input is not
143
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
144
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
145
+ end
146
+ elsif !attributes[self.class.attribute_map[key]].nil?
147
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
149
+ end
150
+
151
+ self
152
+ end
153
+
154
+ # Deserializes the data based on type
155
+ # @param string type Data type
156
+ # @param string value Value to be deserialized
157
+ # @return [Object] Deserialized data
158
+ def _deserialize(type, value)
159
+ case type.to_sym
160
+ when :DateTime
161
+ DateTime.parse(value)
162
+ when :Date
163
+ Date.parse(value)
164
+ when :String
165
+ value.to_s
166
+ when :Integer
167
+ value.to_i
168
+ when :Float
169
+ value.to_f
170
+ when :BOOLEAN
171
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
172
+ true
173
+ else
174
+ false
175
+ end
176
+ when :Object
177
+ # generic object (usually a Hash), return directly
178
+ value
179
+ when /\AArray<(?<inner_type>.+)>\z/
180
+ inner_type = Regexp.last_match[:inner_type]
181
+ value.map { |v| _deserialize(inner_type, v) }
182
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
183
+ k_type = Regexp.last_match[:k_type]
184
+ v_type = Regexp.last_match[:v_type]
185
+ {}.tap do |hash|
186
+ value.each do |k, v|
187
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
188
+ end
189
+ end
190
+ else # model
191
+ temp_model = DocuSign_Rooms.const_get(type).new
192
+ temp_model.build_from_hash(value)
193
+ end
194
+ end
195
+
196
+ # Returns the string representation of the object
197
+ # @return [String] String presentation of the object
198
+ def to_s
199
+ to_hash.to_s
200
+ end
201
+
202
+ # to_body is an alias to to_hash (backward compatibility)
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_body
205
+ to_hash
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ next if value.nil?
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+ end
@@ -0,0 +1,219 @@
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 FormProviderAssociationSummary
16
+ attr_accessor :association_id
17
+
18
+ attr_accessor :provider_id
19
+
20
+ attr_accessor :last_update_date
21
+
22
+ attr_accessor :form_provider_association_guid
23
+
24
+ attr_accessor :form_provider_association_name
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'association_id' => :'associationId',
30
+ :'provider_id' => :'providerId',
31
+ :'last_update_date' => :'lastUpdateDate',
32
+ :'form_provider_association_guid' => :'formProviderAssociationGuid',
33
+ :'form_provider_association_name' => :'formProviderAssociationName'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.swagger_types
39
+ {
40
+ :'association_id' => :'String',
41
+ :'provider_id' => :'String',
42
+ :'last_update_date' => :'DateTime',
43
+ :'form_provider_association_guid' => :'String',
44
+ :'form_provider_association_name' => :'String'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ return unless attributes.is_a?(Hash)
52
+
53
+ # convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
55
+
56
+ if attributes.has_key?(:'associationId')
57
+ self.association_id = attributes[:'associationId']
58
+ end
59
+
60
+ if attributes.has_key?(:'providerId')
61
+ self.provider_id = attributes[:'providerId']
62
+ end
63
+
64
+ if attributes.has_key?(:'lastUpdateDate')
65
+ self.last_update_date = attributes[:'lastUpdateDate']
66
+ end
67
+
68
+ if attributes.has_key?(:'formProviderAssociationGuid')
69
+ self.form_provider_association_guid = attributes[:'formProviderAssociationGuid']
70
+ end
71
+
72
+ if attributes.has_key?(:'formProviderAssociationName')
73
+ self.form_provider_association_name = attributes[:'formProviderAssociationName']
74
+ end
75
+ end
76
+
77
+ # Show invalid properties with the reasons. Usually used together with valid?
78
+ # @return Array for valid properties with the reasons
79
+ def list_invalid_properties
80
+ invalid_properties = Array.new
81
+ invalid_properties
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ def valid?
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ association_id == o.association_id &&
96
+ provider_id == o.provider_id &&
97
+ last_update_date == o.last_update_date &&
98
+ form_provider_association_guid == o.form_provider_association_guid &&
99
+ form_provider_association_name == o.form_provider_association_name
100
+ end
101
+
102
+ # @see the `==` method
103
+ # @param [Object] Object to be compared
104
+ def eql?(o)
105
+ self == o
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Fixnum] Hash code
110
+ def hash
111
+ [association_id, provider_id, last_update_date, form_provider_association_guid, form_provider_association_name].hash
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.swagger_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ DateTime.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :BOOLEAN
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ temp_model = DocuSign_Rooms.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ next if value.nil?
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+ end
@@ -0,0 +1,239 @@
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 FormProviderAssociationsSummaryList
16
+ attr_accessor :form_provider_associations
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
+ attr_accessor :total_row_count
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'form_provider_associations' => :'formProviderAssociations',
34
+ :'result_set_size' => :'resultSetSize',
35
+ :'start_position' => :'startPosition',
36
+ :'end_position' => :'endPosition',
37
+ :'next_uri' => :'nextUri',
38
+ :'prior_uri' => :'priorUri',
39
+ :'total_row_count' => :'totalRowCount'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'form_provider_associations' => :'Array<FormProviderAssociationSummary>',
47
+ :'result_set_size' => :'Integer',
48
+ :'start_position' => :'Integer',
49
+ :'end_position' => :'Integer',
50
+ :'next_uri' => :'String',
51
+ :'prior_uri' => :'String',
52
+ :'total_row_count' => :'Integer'
53
+ }
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ return unless attributes.is_a?(Hash)
60
+
61
+ # convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
+
64
+ if attributes.has_key?(:'formProviderAssociations')
65
+ if (value = attributes[:'formProviderAssociations']).is_a?(Array)
66
+ self.form_provider_associations = value
67
+ end
68
+ end
69
+
70
+ if attributes.has_key?(:'resultSetSize')
71
+ self.result_set_size = attributes[:'resultSetSize']
72
+ end
73
+
74
+ if attributes.has_key?(:'startPosition')
75
+ self.start_position = attributes[:'startPosition']
76
+ end
77
+
78
+ if attributes.has_key?(:'endPosition')
79
+ self.end_position = attributes[:'endPosition']
80
+ end
81
+
82
+ if attributes.has_key?(:'nextUri')
83
+ self.next_uri = attributes[:'nextUri']
84
+ end
85
+
86
+ if attributes.has_key?(:'priorUri')
87
+ self.prior_uri = attributes[:'priorUri']
88
+ end
89
+
90
+ if attributes.has_key?(:'totalRowCount')
91
+ self.total_row_count = attributes[:'totalRowCount']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ form_provider_associations == o.form_provider_associations &&
114
+ result_set_size == o.result_set_size &&
115
+ start_position == o.start_position &&
116
+ end_position == o.end_position &&
117
+ next_uri == o.next_uri &&
118
+ prior_uri == o.prior_uri &&
119
+ total_row_count == o.total_row_count
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Fixnum] Hash code
130
+ def hash
131
+ [form_provider_associations, result_set_size, start_position, end_position, next_uri, prior_uri, total_row_count].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ self.class.swagger_types.each_pair do |key, type|
140
+ if type =~ /\AArray<(.*)>/i
141
+ # check to ensure the input is an array given that the attribute
142
+ # is documented as an array but the input is not
143
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
144
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
145
+ end
146
+ elsif !attributes[self.class.attribute_map[key]].nil?
147
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
149
+ end
150
+
151
+ self
152
+ end
153
+
154
+ # Deserializes the data based on type
155
+ # @param string type Data type
156
+ # @param string value Value to be deserialized
157
+ # @return [Object] Deserialized data
158
+ def _deserialize(type, value)
159
+ case type.to_sym
160
+ when :DateTime
161
+ DateTime.parse(value)
162
+ when :Date
163
+ Date.parse(value)
164
+ when :String
165
+ value.to_s
166
+ when :Integer
167
+ value.to_i
168
+ when :Float
169
+ value.to_f
170
+ when :BOOLEAN
171
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
172
+ true
173
+ else
174
+ false
175
+ end
176
+ when :Object
177
+ # generic object (usually a Hash), return directly
178
+ value
179
+ when /\AArray<(?<inner_type>.+)>\z/
180
+ inner_type = Regexp.last_match[:inner_type]
181
+ value.map { |v| _deserialize(inner_type, v) }
182
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
183
+ k_type = Regexp.last_match[:k_type]
184
+ v_type = Regexp.last_match[:v_type]
185
+ {}.tap do |hash|
186
+ value.each do |k, v|
187
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
188
+ end
189
+ end
190
+ else # model
191
+ temp_model = DocuSign_Rooms.const_get(type).new
192
+ temp_model.build_from_hash(value)
193
+ end
194
+ end
195
+
196
+ # Returns the string representation of the object
197
+ # @return [String] String presentation of the object
198
+ def to_s
199
+ to_hash.to_s
200
+ end
201
+
202
+ # to_body is an alias to to_hash (backward compatibility)
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_body
205
+ to_hash
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ next if value.nil?
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+ end