docusign_rooms 1.0.0.beta

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