signrequest_client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +69 -0
  4. data/LICENSE +21 -0
  5. data/README.md +122 -0
  6. data/Rakefile +9 -0
  7. data/docs/ApiTokensApi.md +226 -0
  8. data/docs/AuthToken.md +13 -0
  9. data/docs/Document.md +33 -0
  10. data/docs/DocumentAttachment.md +15 -0
  11. data/docs/DocumentAttachmentsApi.md +179 -0
  12. data/docs/DocumentSearch.md +22 -0
  13. data/docs/DocumentSignerTemplateConf.md +14 -0
  14. data/docs/DocumentsApi.md +301 -0
  15. data/docs/DocumentsSearchApi.md +119 -0
  16. data/docs/Event.md +17 -0
  17. data/docs/EventsApi.md +145 -0
  18. data/docs/FileFromSf.md +9 -0
  19. data/docs/InlineDocumentSignerIntegrationData.md +9 -0
  20. data/docs/InlineIntegrationData.md +9 -0
  21. data/docs/InlinePrefillTags.md +11 -0
  22. data/docs/InlineResponse200.md +11 -0
  23. data/docs/InlineResponse2001.md +11 -0
  24. data/docs/InlineResponse2002.md +11 -0
  25. data/docs/InlineResponse2003.md +11 -0
  26. data/docs/InlineResponse2004.md +11 -0
  27. data/docs/InlineResponse2005.md +11 -0
  28. data/docs/InlineResponse2006.md +11 -0
  29. data/docs/InlineResponse2007.md +11 -0
  30. data/docs/InlineResponse2008.md +11 -0
  31. data/docs/InlineResponse2009.md +11 -0
  32. data/docs/InlineSignRequest.md +25 -0
  33. data/docs/InlineTeam.md +10 -0
  34. data/docs/InlineTeamMember.md +13 -0
  35. data/docs/InviteMember.md +10 -0
  36. data/docs/Placeholder.md +15 -0
  37. data/docs/RequiredAttachment.md +9 -0
  38. data/docs/SignRequest.md +29 -0
  39. data/docs/SignRequestQuickCreate.md +42 -0
  40. data/docs/Signer.md +40 -0
  41. data/docs/SignerAttachment.md +11 -0
  42. data/docs/SignerInputs.md +14 -0
  43. data/docs/SigningLog.md +9 -0
  44. data/docs/SignrequestQuickCreateApi.md +62 -0
  45. data/docs/SignrequestsApi.md +291 -0
  46. data/docs/Team.md +15 -0
  47. data/docs/TeamMember.md +14 -0
  48. data/docs/TeamMembersApi.md +131 -0
  49. data/docs/TeamsApi.md +344 -0
  50. data/docs/Template.md +14 -0
  51. data/docs/TemplatesApi.md +119 -0
  52. data/docs/User.md +11 -0
  53. data/docs/WebhookSubscription.md +15 -0
  54. data/docs/WebhooksApi.md +340 -0
  55. data/git_push.sh +55 -0
  56. data/lib/signrequest_client/api/api_tokens_api.rb +242 -0
  57. data/lib/signrequest_client/api/document_attachments_api.rb +197 -0
  58. data/lib/signrequest_client/api/documents_api.rb +330 -0
  59. data/lib/signrequest_client/api/documents_search_api.rb +133 -0
  60. data/lib/signrequest_client/api/events_api.rb +172 -0
  61. data/lib/signrequest_client/api/signrequest_quick_create_api.rb +78 -0
  62. data/lib/signrequest_client/api/signrequests_api.rb +316 -0
  63. data/lib/signrequest_client/api/team_members_api.rb +151 -0
  64. data/lib/signrequest_client/api/teams_api.rb +371 -0
  65. data/lib/signrequest_client/api/templates_api.rb +133 -0
  66. data/lib/signrequest_client/api/webhooks_api.rb +364 -0
  67. data/lib/signrequest_client/api_client.rb +389 -0
  68. data/lib/signrequest_client/api_error.rb +38 -0
  69. data/lib/signrequest_client/configuration.rb +209 -0
  70. data/lib/signrequest_client/models/auth_token.rb +298 -0
  71. data/lib/signrequest_client/models/document.rb +605 -0
  72. data/lib/signrequest_client/models/document_attachment.rb +304 -0
  73. data/lib/signrequest_client/models/document_search.rb +519 -0
  74. data/lib/signrequest_client/models/document_signer_template_conf.rb +294 -0
  75. data/lib/signrequest_client/models/event.rb +330 -0
  76. data/lib/signrequest_client/models/file_from_sf.rb +245 -0
  77. data/lib/signrequest_client/models/inline_document_signer_integration_data.rb +230 -0
  78. data/lib/signrequest_client/models/inline_integration_data.rb +230 -0
  79. data/lib/signrequest_client/models/inline_prefill_tags.rb +231 -0
  80. data/lib/signrequest_client/models/inline_response_200.rb +227 -0
  81. data/lib/signrequest_client/models/inline_response_200_1.rb +227 -0
  82. data/lib/signrequest_client/models/inline_response_200_2.rb +227 -0
  83. data/lib/signrequest_client/models/inline_response_200_3.rb +227 -0
  84. data/lib/signrequest_client/models/inline_response_200_4.rb +227 -0
  85. data/lib/signrequest_client/models/inline_response_200_5.rb +227 -0
  86. data/lib/signrequest_client/models/inline_response_200_6.rb +227 -0
  87. data/lib/signrequest_client/models/inline_response_200_7.rb +227 -0
  88. data/lib/signrequest_client/models/inline_response_200_8.rb +227 -0
  89. data/lib/signrequest_client/models/inline_response_200_9.rb +227 -0
  90. data/lib/signrequest_client/models/inline_sign_request.rb +496 -0
  91. data/lib/signrequest_client/models/inline_team.rb +247 -0
  92. data/lib/signrequest_client/models/inline_team_member.rb +249 -0
  93. data/lib/signrequest_client/models/invite_member.rb +234 -0
  94. data/lib/signrequest_client/models/placeholder.rb +326 -0
  95. data/lib/signrequest_client/models/required_attachment.rb +246 -0
  96. data/lib/signrequest_client/models/sign_request.rb +543 -0
  97. data/lib/signrequest_client/models/sign_request_quick_create.rb +764 -0
  98. data/lib/signrequest_client/models/signer.rb +751 -0
  99. data/lib/signrequest_client/models/signer_attachment.rb +247 -0
  100. data/lib/signrequest_client/models/signer_inputs.rb +312 -0
  101. data/lib/signrequest_client/models/signing_log.rb +213 -0
  102. data/lib/signrequest_client/models/team.rb +367 -0
  103. data/lib/signrequest_client/models/team_member.rb +258 -0
  104. data/lib/signrequest_client/models/template.rb +309 -0
  105. data/lib/signrequest_client/models/user.rb +296 -0
  106. data/lib/signrequest_client/models/webhook_subscription.rb +366 -0
  107. data/lib/signrequest_client/version.rb +15 -0
  108. data/lib/signrequest_client.rb +87 -0
  109. data/pkg/signrequest_client-0.1.0.gem +0 -0
  110. data/signrequest_client.gemspec +45 -0
  111. data/signrequst_client/.git/HEAD +1 -0
  112. data/signrequst_client/.git/config +7 -0
  113. data/signrequst_client/.git/description +1 -0
  114. data/signrequst_client/.git/hooks/applypatch-msg.sample +15 -0
  115. data/signrequst_client/.git/hooks/commit-msg.sample +24 -0
  116. data/signrequst_client/.git/hooks/fsmonitor-watchman.sample +114 -0
  117. data/signrequst_client/.git/hooks/post-update.sample +8 -0
  118. data/signrequst_client/.git/hooks/pre-applypatch.sample +14 -0
  119. data/signrequst_client/.git/hooks/pre-commit.sample +49 -0
  120. data/signrequst_client/.git/hooks/pre-push.sample +53 -0
  121. data/signrequst_client/.git/hooks/pre-rebase.sample +169 -0
  122. data/signrequst_client/.git/hooks/pre-receive.sample +24 -0
  123. data/signrequst_client/.git/hooks/prepare-commit-msg.sample +42 -0
  124. data/signrequst_client/.git/hooks/update.sample +128 -0
  125. data/signrequst_client/.git/index +0 -0
  126. data/signrequst_client/.git/info/exclude +6 -0
  127. data/signrequst_client/.git/objects/30/68cc8a074ffc0c7b8891cb21d68b5d367cb8c4 +0 -0
  128. data/signrequst_client/.git/objects/32/c4b7e9f988621ed2ce28954f1aaf088f340848 +2 -0
  129. data/signrequst_client/.git/objects/3e/8c4c2f8d1d5334612f3072160124e985f27e8c +0 -0
  130. data/signrequst_client/.git/objects/43/022f711e20ed55baf2470278eb8e428a04856f +0 -0
  131. data/signrequst_client/.git/objects/6f/8caa83dfb6dc8a987a2829cbfefae18c8870c3 +0 -0
  132. data/signrequst_client/.git/objects/91/06b2a345b019a799c02e5069affa88370b35dd +0 -0
  133. data/signrequst_client/.git/objects/aa/58e53f733551ac2bde6f7a50b5a9f16ddbf110 +0 -0
  134. data/signrequst_client/.git/objects/dc/e67d860af47a4eb630117ce03624bae45dcf26 +3 -0
  135. data/signrequst_client/.git/objects/f1/c9171bed4c19fd22429ffd68d4cbb2c3ce2fce +0 -0
  136. data/signrequst_client/.git/objects/f8/e4c2573ebc57d5a365ebe14d5c18cc8d0716c4 +0 -0
  137. data/spec/api/api_tokens_api_spec.rb +84 -0
  138. data/spec/api/document_attachments_api_spec.rb +75 -0
  139. data/spec/api/documents_api_spec.rb +106 -0
  140. data/spec/api/documents_search_api_spec.rb +60 -0
  141. data/spec/api/events_api_spec.rb +73 -0
  142. data/spec/api/signrequest_quick_create_api_spec.rb +47 -0
  143. data/spec/api/signrequests_api_spec.rb +100 -0
  144. data/spec/api/team_members_api_spec.rb +66 -0
  145. data/spec/api/teams_api_spec.rb +111 -0
  146. data/spec/api/templates_api_spec.rb +60 -0
  147. data/spec/api/webhooks_api_spec.rb +110 -0
  148. data/spec/api_client_spec.rb +226 -0
  149. data/spec/configuration_spec.rb +42 -0
  150. data/spec/models/auth_token_spec.rb +72 -0
  151. data/spec/models/document_attachment_spec.rb +84 -0
  152. data/spec/models/document_search_spec.rb +126 -0
  153. data/spec/models/document_signer_template_conf_spec.rb +78 -0
  154. data/spec/models/document_spec.rb +196 -0
  155. data/spec/models/event_spec.rb +104 -0
  156. data/spec/models/file_from_sf_spec.rb +48 -0
  157. data/spec/models/inline_document_signer_integration_data_spec.rb +52 -0
  158. data/spec/models/inline_integration_data_spec.rb +52 -0
  159. data/spec/models/inline_prefill_tags_spec.rb +60 -0
  160. data/spec/models/inline_response_200_1_spec.rb +60 -0
  161. data/spec/models/inline_response_200_2_spec.rb +60 -0
  162. data/spec/models/inline_response_200_3_spec.rb +60 -0
  163. data/spec/models/inline_response_200_4_spec.rb +60 -0
  164. data/spec/models/inline_response_200_5_spec.rb +60 -0
  165. data/spec/models/inline_response_200_6_spec.rb +60 -0
  166. data/spec/models/inline_response_200_7_spec.rb +60 -0
  167. data/spec/models/inline_response_200_8_spec.rb +60 -0
  168. data/spec/models/inline_response_200_9_spec.rb +60 -0
  169. data/spec/models/inline_response_200_spec.rb +60 -0
  170. data/spec/models/inline_sign_request_spec.rb +148 -0
  171. data/spec/models/inline_team_member_spec.rb +72 -0
  172. data/spec/models/inline_team_spec.rb +54 -0
  173. data/spec/models/invite_member_spec.rb +54 -0
  174. data/spec/models/placeholder_spec.rb +88 -0
  175. data/spec/models/required_attachment_spec.rb +48 -0
  176. data/spec/models/sign_request_quick_create_spec.rb +254 -0
  177. data/spec/models/sign_request_spec.rb +176 -0
  178. data/spec/models/signer_attachment_spec.rb +60 -0
  179. data/spec/models/signer_inputs_spec.rb +82 -0
  180. data/spec/models/signer_spec.rb +238 -0
  181. data/spec/models/signing_log_spec.rb +48 -0
  182. data/spec/models/team_member_spec.rb +78 -0
  183. data/spec/models/team_spec.rb +84 -0
  184. data/spec/models/template_spec.rb +82 -0
  185. data/spec/models/user_spec.rb +60 -0
  186. data/spec/models/webhook_subscription_spec.rb +92 -0
  187. data/spec/spec_helper.rb +111 -0
  188. metadata +461 -0
@@ -0,0 +1,519 @@
1
+ =begin
2
+ #SignRequest API
3
+
4
+ #API for SignRequest.com
5
+
6
+ OpenAPI spec version: v1
7
+ Contact: tech-support@signrequest.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SignRequestClient
16
+
17
+ class DocumentSearch
18
+ attr_accessor :status
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :who
23
+
24
+ attr_accessor :nr_extra_docs
25
+
26
+ attr_accessor :from_email
27
+
28
+ attr_accessor :parent_doc
29
+
30
+ attr_accessor :uuid
31
+
32
+ attr_accessor :created
33
+
34
+ attr_accessor :autocomplete
35
+
36
+ attr_accessor :finished_on
37
+
38
+ attr_accessor :subdomain
39
+
40
+ attr_accessor :signer_emails
41
+
42
+ attr_accessor :status_display
43
+
44
+ attr_accessor :created_timestamp
45
+
46
+ attr_accessor :finished_on_timestamp
47
+
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'status' => :'status',
53
+ :'name' => :'name',
54
+ :'who' => :'who',
55
+ :'nr_extra_docs' => :'nr_extra_docs',
56
+ :'from_email' => :'from_email',
57
+ :'parent_doc' => :'parent_doc',
58
+ :'uuid' => :'uuid',
59
+ :'created' => :'created',
60
+ :'autocomplete' => :'autocomplete',
61
+ :'finished_on' => :'finished_on',
62
+ :'subdomain' => :'subdomain',
63
+ :'signer_emails' => :'signer_emails',
64
+ :'status_display' => :'status_display',
65
+ :'created_timestamp' => :'created_timestamp',
66
+ :'finished_on_timestamp' => :'finished_on_timestamp'
67
+ }
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.swagger_types
72
+ {
73
+ :'status' => :'String',
74
+ :'name' => :'String',
75
+ :'who' => :'String',
76
+ :'nr_extra_docs' => :'Integer',
77
+ :'from_email' => :'String',
78
+ :'parent_doc' => :'String',
79
+ :'uuid' => :'String',
80
+ :'created' => :'DateTime',
81
+ :'autocomplete' => :'String',
82
+ :'finished_on' => :'DateTime',
83
+ :'subdomain' => :'String',
84
+ :'signer_emails' => :'Array<String>',
85
+ :'status_display' => :'String',
86
+ :'created_timestamp' => :'Integer',
87
+ :'finished_on_timestamp' => :'Integer'
88
+ }
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ return unless attributes.is_a?(Hash)
95
+
96
+ # convert string to symbol for hash key
97
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
98
+
99
+ if attributes.has_key?(:'status')
100
+ self.status = attributes[:'status']
101
+ end
102
+
103
+ if attributes.has_key?(:'name')
104
+ self.name = attributes[:'name']
105
+ end
106
+
107
+ if attributes.has_key?(:'who')
108
+ self.who = attributes[:'who']
109
+ end
110
+
111
+ if attributes.has_key?(:'nr_extra_docs')
112
+ self.nr_extra_docs = attributes[:'nr_extra_docs']
113
+ end
114
+
115
+ if attributes.has_key?(:'from_email')
116
+ self.from_email = attributes[:'from_email']
117
+ end
118
+
119
+ if attributes.has_key?(:'parent_doc')
120
+ self.parent_doc = attributes[:'parent_doc']
121
+ end
122
+
123
+ if attributes.has_key?(:'uuid')
124
+ self.uuid = attributes[:'uuid']
125
+ end
126
+
127
+ if attributes.has_key?(:'created')
128
+ self.created = attributes[:'created']
129
+ end
130
+
131
+ if attributes.has_key?(:'autocomplete')
132
+ self.autocomplete = attributes[:'autocomplete']
133
+ end
134
+
135
+ if attributes.has_key?(:'finished_on')
136
+ self.finished_on = attributes[:'finished_on']
137
+ end
138
+
139
+ if attributes.has_key?(:'subdomain')
140
+ self.subdomain = attributes[:'subdomain']
141
+ end
142
+
143
+ if attributes.has_key?(:'signer_emails')
144
+ if (value = attributes[:'signer_emails']).is_a?(Array)
145
+ self.signer_emails = value
146
+ end
147
+ end
148
+
149
+ if attributes.has_key?(:'status_display')
150
+ self.status_display = attributes[:'status_display']
151
+ end
152
+
153
+ if attributes.has_key?(:'created_timestamp')
154
+ self.created_timestamp = attributes[:'created_timestamp']
155
+ end
156
+
157
+ if attributes.has_key?(:'finished_on_timestamp')
158
+ self.finished_on_timestamp = attributes[:'finished_on_timestamp']
159
+ end
160
+
161
+ end
162
+
163
+ # Show invalid properties with the reasons. Usually used together with valid?
164
+ # @return Array for valid properties with the reasons
165
+ def list_invalid_properties
166
+ invalid_properties = Array.new
167
+ if !@status.nil? && @status.to_s.length > 2
168
+ invalid_properties.push("invalid value for 'status', the character length must be smaller than or equal to 2.")
169
+ end
170
+
171
+ if !@status.nil? && @status.to_s.length < 1
172
+ invalid_properties.push("invalid value for 'status', the character length must be great than or equal to 1.")
173
+ end
174
+
175
+ if !@name.nil? && @name.to_s.length < 1
176
+ invalid_properties.push("invalid value for 'name', the character length must be great than or equal to 1.")
177
+ end
178
+
179
+ if @who.nil?
180
+ invalid_properties.push("invalid value for 'who', who cannot be nil.")
181
+ end
182
+
183
+ if @who.to_s.length < 1
184
+ invalid_properties.push("invalid value for 'who', the character length must be great than or equal to 1.")
185
+ end
186
+
187
+ if @nr_extra_docs.nil?
188
+ invalid_properties.push("invalid value for 'nr_extra_docs', nr_extra_docs cannot be nil.")
189
+ end
190
+
191
+ if @from_email.nil?
192
+ invalid_properties.push("invalid value for 'from_email', from_email cannot be nil.")
193
+ end
194
+
195
+ if @from_email.to_s.length < 1
196
+ invalid_properties.push("invalid value for 'from_email', the character length must be great than or equal to 1.")
197
+ end
198
+
199
+ if @parent_doc.nil?
200
+ invalid_properties.push("invalid value for 'parent_doc', parent_doc cannot be nil.")
201
+ end
202
+
203
+ if @parent_doc.to_s.length < 1
204
+ invalid_properties.push("invalid value for 'parent_doc', the character length must be great than or equal to 1.")
205
+ end
206
+
207
+ if !@uuid.nil? && @uuid.to_s.length < 1
208
+ invalid_properties.push("invalid value for 'uuid', the character length must be great than or equal to 1.")
209
+ end
210
+
211
+ if @autocomplete.nil?
212
+ invalid_properties.push("invalid value for 'autocomplete', autocomplete cannot be nil.")
213
+ end
214
+
215
+ if @autocomplete.to_s.length < 1
216
+ invalid_properties.push("invalid value for 'autocomplete', the character length must be great than or equal to 1.")
217
+ end
218
+
219
+ if @finished_on.nil?
220
+ invalid_properties.push("invalid value for 'finished_on', finished_on cannot be nil.")
221
+ end
222
+
223
+ if @subdomain.nil?
224
+ invalid_properties.push("invalid value for 'subdomain', subdomain cannot be nil.")
225
+ end
226
+
227
+ if @subdomain.to_s.length < 1
228
+ invalid_properties.push("invalid value for 'subdomain', the character length must be great than or equal to 1.")
229
+ end
230
+
231
+ if !@status_display.nil? && @status_display.to_s.length < 1
232
+ invalid_properties.push("invalid value for 'status_display', the character length must be great than or equal to 1.")
233
+ end
234
+
235
+ return invalid_properties
236
+ end
237
+
238
+ # Check to see if the all the properties in the model are valid
239
+ # @return true if the model is valid
240
+ def valid?
241
+ return false if !@status.nil? && @status.to_s.length > 2
242
+ return false if !@status.nil? && @status.to_s.length < 1
243
+ return false if !@name.nil? && @name.to_s.length < 1
244
+ return false if @who.nil?
245
+ return false if @who.to_s.length < 1
246
+ return false if @nr_extra_docs.nil?
247
+ return false if @from_email.nil?
248
+ return false if @from_email.to_s.length < 1
249
+ return false if @parent_doc.nil?
250
+ return false if @parent_doc.to_s.length < 1
251
+ return false if !@uuid.nil? && @uuid.to_s.length < 1
252
+ return false if @autocomplete.nil?
253
+ return false if @autocomplete.to_s.length < 1
254
+ return false if @finished_on.nil?
255
+ return false if @subdomain.nil?
256
+ return false if @subdomain.to_s.length < 1
257
+ return false if !@status_display.nil? && @status_display.to_s.length < 1
258
+ return true
259
+ end
260
+
261
+ # Custom attribute writer method with validation
262
+ # @param [Object] status Value to be assigned
263
+ def status=(status)
264
+
265
+ if !status.nil? && status.to_s.length > 2
266
+ fail ArgumentError, "invalid value for 'status', the character length must be smaller than or equal to 2."
267
+ end
268
+
269
+ if !status.nil? && status.to_s.length < 1
270
+ fail ArgumentError, "invalid value for 'status', the character length must be great than or equal to 1."
271
+ end
272
+
273
+ @status = status
274
+ end
275
+
276
+ # Custom attribute writer method with validation
277
+ # @param [Object] name Value to be assigned
278
+ def name=(name)
279
+
280
+ if !name.nil? && name.to_s.length < 1
281
+ fail ArgumentError, "invalid value for 'name', the character length must be great than or equal to 1."
282
+ end
283
+
284
+ @name = name
285
+ end
286
+
287
+ # Custom attribute writer method with validation
288
+ # @param [Object] who Value to be assigned
289
+ def who=(who)
290
+ if who.nil?
291
+ fail ArgumentError, "who cannot be nil"
292
+ end
293
+
294
+ if who.to_s.length < 1
295
+ fail ArgumentError, "invalid value for 'who', the character length must be great than or equal to 1."
296
+ end
297
+
298
+ @who = who
299
+ end
300
+
301
+ # Custom attribute writer method with validation
302
+ # @param [Object] from_email Value to be assigned
303
+ def from_email=(from_email)
304
+ if from_email.nil?
305
+ fail ArgumentError, "from_email cannot be nil"
306
+ end
307
+
308
+ if from_email.to_s.length < 1
309
+ fail ArgumentError, "invalid value for 'from_email', the character length must be great than or equal to 1."
310
+ end
311
+
312
+ @from_email = from_email
313
+ end
314
+
315
+ # Custom attribute writer method with validation
316
+ # @param [Object] parent_doc Value to be assigned
317
+ def parent_doc=(parent_doc)
318
+ if parent_doc.nil?
319
+ fail ArgumentError, "parent_doc cannot be nil"
320
+ end
321
+
322
+ if parent_doc.to_s.length < 1
323
+ fail ArgumentError, "invalid value for 'parent_doc', the character length must be great than or equal to 1."
324
+ end
325
+
326
+ @parent_doc = parent_doc
327
+ end
328
+
329
+ # Custom attribute writer method with validation
330
+ # @param [Object] uuid Value to be assigned
331
+ def uuid=(uuid)
332
+
333
+ if !uuid.nil? && uuid.to_s.length < 1
334
+ fail ArgumentError, "invalid value for 'uuid', the character length must be great than or equal to 1."
335
+ end
336
+
337
+ @uuid = uuid
338
+ end
339
+
340
+ # Custom attribute writer method with validation
341
+ # @param [Object] autocomplete Value to be assigned
342
+ def autocomplete=(autocomplete)
343
+ if autocomplete.nil?
344
+ fail ArgumentError, "autocomplete cannot be nil"
345
+ end
346
+
347
+ if autocomplete.to_s.length < 1
348
+ fail ArgumentError, "invalid value for 'autocomplete', the character length must be great than or equal to 1."
349
+ end
350
+
351
+ @autocomplete = autocomplete
352
+ end
353
+
354
+ # Custom attribute writer method with validation
355
+ # @param [Object] subdomain Value to be assigned
356
+ def subdomain=(subdomain)
357
+ if subdomain.nil?
358
+ fail ArgumentError, "subdomain cannot be nil"
359
+ end
360
+
361
+ if subdomain.to_s.length < 1
362
+ fail ArgumentError, "invalid value for 'subdomain', the character length must be great than or equal to 1."
363
+ end
364
+
365
+ @subdomain = subdomain
366
+ end
367
+
368
+ # Custom attribute writer method with validation
369
+ # @param [Object] status_display Value to be assigned
370
+ def status_display=(status_display)
371
+
372
+ if !status_display.nil? && status_display.to_s.length < 1
373
+ fail ArgumentError, "invalid value for 'status_display', the character length must be great than or equal to 1."
374
+ end
375
+
376
+ @status_display = status_display
377
+ end
378
+
379
+ # Checks equality by comparing each attribute.
380
+ # @param [Object] Object to be compared
381
+ def ==(o)
382
+ return true if self.equal?(o)
383
+ self.class == o.class &&
384
+ status == o.status &&
385
+ name == o.name &&
386
+ who == o.who &&
387
+ nr_extra_docs == o.nr_extra_docs &&
388
+ from_email == o.from_email &&
389
+ parent_doc == o.parent_doc &&
390
+ uuid == o.uuid &&
391
+ created == o.created &&
392
+ autocomplete == o.autocomplete &&
393
+ finished_on == o.finished_on &&
394
+ subdomain == o.subdomain &&
395
+ signer_emails == o.signer_emails &&
396
+ status_display == o.status_display &&
397
+ created_timestamp == o.created_timestamp &&
398
+ finished_on_timestamp == o.finished_on_timestamp
399
+ end
400
+
401
+ # @see the `==` method
402
+ # @param [Object] Object to be compared
403
+ def eql?(o)
404
+ self == o
405
+ end
406
+
407
+ # Calculates hash code according to all attributes.
408
+ # @return [Fixnum] Hash code
409
+ def hash
410
+ [status, name, who, nr_extra_docs, from_email, parent_doc, uuid, created, autocomplete, finished_on, subdomain, signer_emails, status_display, created_timestamp, finished_on_timestamp].hash
411
+ end
412
+
413
+ # Builds the object from hash
414
+ # @param [Hash] attributes Model attributes in the form of hash
415
+ # @return [Object] Returns the model itself
416
+ def build_from_hash(attributes)
417
+ return nil unless attributes.is_a?(Hash)
418
+ self.class.swagger_types.each_pair do |key, type|
419
+ if type =~ /\AArray<(.*)>/i
420
+ # check to ensure the input is an array given that the the attribute
421
+ # is documented as an array but the input is not
422
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
423
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
424
+ end
425
+ elsif !attributes[self.class.attribute_map[key]].nil?
426
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
427
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
428
+ end
429
+
430
+ self
431
+ end
432
+
433
+ # Deserializes the data based on type
434
+ # @param string type Data type
435
+ # @param string value Value to be deserialized
436
+ # @return [Object] Deserialized data
437
+ def _deserialize(type, value)
438
+ case type.to_sym
439
+ when :DateTime
440
+ DateTime.parse(value)
441
+ when :Date
442
+ Date.parse(value)
443
+ when :String
444
+ value.to_s
445
+ when :Integer
446
+ value.to_i
447
+ when :Float
448
+ value.to_f
449
+ when :BOOLEAN
450
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
451
+ true
452
+ else
453
+ false
454
+ end
455
+ when :Object
456
+ # generic object (usually a Hash), return directly
457
+ value
458
+ when /\AArray<(?<inner_type>.+)>\z/
459
+ inner_type = Regexp.last_match[:inner_type]
460
+ value.map { |v| _deserialize(inner_type, v) }
461
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
462
+ k_type = Regexp.last_match[:k_type]
463
+ v_type = Regexp.last_match[:v_type]
464
+ {}.tap do |hash|
465
+ value.each do |k, v|
466
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
467
+ end
468
+ end
469
+ else # model
470
+ temp_model = SignRequestClient.const_get(type).new
471
+ temp_model.build_from_hash(value)
472
+ end
473
+ end
474
+
475
+ # Returns the string representation of the object
476
+ # @return [String] String presentation of the object
477
+ def to_s
478
+ to_hash.to_s
479
+ end
480
+
481
+ # to_body is an alias to to_hash (backward compatibility)
482
+ # @return [Hash] Returns the object in the form of hash
483
+ def to_body
484
+ to_hash
485
+ end
486
+
487
+ # Returns the object in the form of hash
488
+ # @return [Hash] Returns the object in the form of hash
489
+ def to_hash
490
+ hash = {}
491
+ self.class.attribute_map.each_pair do |attr, param|
492
+ value = self.send(attr)
493
+ next if value.nil?
494
+ hash[param] = _to_hash(value)
495
+ end
496
+ hash
497
+ end
498
+
499
+ # Outputs non-array value in the form of hash
500
+ # For object, use to_hash. Otherwise, just return the value
501
+ # @param [Object] value Any valid value
502
+ # @return [Hash] Returns the value in the form of hash
503
+ def _to_hash(value)
504
+ if value.is_a?(Array)
505
+ value.compact.map{ |v| _to_hash(v) }
506
+ elsif value.is_a?(Hash)
507
+ {}.tap do |hash|
508
+ value.each { |k, v| hash[k] = _to_hash(v) }
509
+ end
510
+ elsif value.respond_to? :to_hash
511
+ value.to_hash
512
+ else
513
+ value
514
+ end
515
+ end
516
+
517
+ end
518
+
519
+ end