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,605 @@
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 Document
18
+ attr_accessor :url
19
+
20
+ attr_accessor :team
21
+
22
+ attr_accessor :uuid
23
+
24
+ attr_accessor :user
25
+
26
+ attr_accessor :file_as_pdf
27
+
28
+ attr_accessor :name
29
+
30
+ attr_accessor :external_id
31
+
32
+ attr_accessor :frontend_id
33
+
34
+ attr_accessor :file
35
+
36
+ attr_accessor :file_from_url
37
+
38
+ attr_accessor :events_callback_url
39
+
40
+ attr_accessor :file_from_content
41
+
42
+ attr_accessor :file_from_content_name
43
+
44
+ attr_accessor :template
45
+
46
+ attr_accessor :prefill_tags
47
+
48
+ attr_accessor :integrations
49
+
50
+ attr_accessor :file_from_sf
51
+
52
+ attr_accessor :auto_delete_days
53
+
54
+ attr_accessor :pdf
55
+
56
+ attr_accessor :status
57
+
58
+ attr_accessor :signrequest
59
+
60
+ attr_accessor :api_used
61
+
62
+ attr_accessor :signing_log
63
+
64
+ attr_accessor :security_hash
65
+
66
+ attr_accessor :attachments
67
+
68
+ attr_accessor :auto_delete_after
69
+
70
+ class EnumAttributeValidator
71
+ attr_reader :datatype
72
+ attr_reader :allowable_values
73
+
74
+ def initialize(datatype, allowable_values)
75
+ @allowable_values = allowable_values.map do |value|
76
+ case datatype.to_s
77
+ when /Integer/i
78
+ value.to_i
79
+ when /Float/i
80
+ value.to_f
81
+ else
82
+ value
83
+ end
84
+ end
85
+ end
86
+
87
+ def valid?(value)
88
+ !value || allowable_values.include?(value)
89
+ end
90
+ end
91
+
92
+ # Attribute mapping from ruby-style variable name to JSON key.
93
+ def self.attribute_map
94
+ {
95
+ :'url' => :'url',
96
+ :'team' => :'team',
97
+ :'uuid' => :'uuid',
98
+ :'user' => :'user',
99
+ :'file_as_pdf' => :'file_as_pdf',
100
+ :'name' => :'name',
101
+ :'external_id' => :'external_id',
102
+ :'frontend_id' => :'frontend_id',
103
+ :'file' => :'file',
104
+ :'file_from_url' => :'file_from_url',
105
+ :'events_callback_url' => :'events_callback_url',
106
+ :'file_from_content' => :'file_from_content',
107
+ :'file_from_content_name' => :'file_from_content_name',
108
+ :'template' => :'template',
109
+ :'prefill_tags' => :'prefill_tags',
110
+ :'integrations' => :'integrations',
111
+ :'file_from_sf' => :'file_from_sf',
112
+ :'auto_delete_days' => :'auto_delete_days',
113
+ :'pdf' => :'pdf',
114
+ :'status' => :'status',
115
+ :'signrequest' => :'signrequest',
116
+ :'api_used' => :'api_used',
117
+ :'signing_log' => :'signing_log',
118
+ :'security_hash' => :'security_hash',
119
+ :'attachments' => :'attachments',
120
+ :'auto_delete_after' => :'auto_delete_after'
121
+ }
122
+ end
123
+
124
+ # Attribute type mapping.
125
+ def self.swagger_types
126
+ {
127
+ :'url' => :'String',
128
+ :'team' => :'InlineTeam',
129
+ :'uuid' => :'String',
130
+ :'user' => :'User',
131
+ :'file_as_pdf' => :'String',
132
+ :'name' => :'String',
133
+ :'external_id' => :'String',
134
+ :'frontend_id' => :'String',
135
+ :'file' => :'String',
136
+ :'file_from_url' => :'String',
137
+ :'events_callback_url' => :'String',
138
+ :'file_from_content' => :'String',
139
+ :'file_from_content_name' => :'String',
140
+ :'template' => :'String',
141
+ :'prefill_tags' => :'Array<InlinePrefillTags>',
142
+ :'integrations' => :'Array<InlineIntegrationData>',
143
+ :'file_from_sf' => :'FileFromSf',
144
+ :'auto_delete_days' => :'Integer',
145
+ :'pdf' => :'String',
146
+ :'status' => :'String',
147
+ :'signrequest' => :'InlineSignRequest',
148
+ :'api_used' => :'BOOLEAN',
149
+ :'signing_log' => :'SigningLog',
150
+ :'security_hash' => :'String',
151
+ :'attachments' => :'Array<DocumentAttachment>',
152
+ :'auto_delete_after' => :'DateTime'
153
+ }
154
+ end
155
+
156
+ # Initializes the object
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ def initialize(attributes = {})
159
+ return unless attributes.is_a?(Hash)
160
+
161
+ # convert string to symbol for hash key
162
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
163
+
164
+ if attributes.has_key?(:'url')
165
+ self.url = attributes[:'url']
166
+ end
167
+
168
+ if attributes.has_key?(:'team')
169
+ self.team = attributes[:'team']
170
+ end
171
+
172
+ if attributes.has_key?(:'uuid')
173
+ self.uuid = attributes[:'uuid']
174
+ end
175
+
176
+ if attributes.has_key?(:'user')
177
+ self.user = attributes[:'user']
178
+ end
179
+
180
+ if attributes.has_key?(:'file_as_pdf')
181
+ self.file_as_pdf = attributes[:'file_as_pdf']
182
+ end
183
+
184
+ if attributes.has_key?(:'name')
185
+ self.name = attributes[:'name']
186
+ end
187
+
188
+ if attributes.has_key?(:'external_id')
189
+ self.external_id = attributes[:'external_id']
190
+ end
191
+
192
+ if attributes.has_key?(:'frontend_id')
193
+ self.frontend_id = attributes[:'frontend_id']
194
+ end
195
+
196
+ if attributes.has_key?(:'file')
197
+ self.file = attributes[:'file']
198
+ end
199
+
200
+ if attributes.has_key?(:'file_from_url')
201
+ self.file_from_url = attributes[:'file_from_url']
202
+ end
203
+
204
+ if attributes.has_key?(:'events_callback_url')
205
+ self.events_callback_url = attributes[:'events_callback_url']
206
+ end
207
+
208
+ if attributes.has_key?(:'file_from_content')
209
+ self.file_from_content = attributes[:'file_from_content']
210
+ end
211
+
212
+ if attributes.has_key?(:'file_from_content_name')
213
+ self.file_from_content_name = attributes[:'file_from_content_name']
214
+ end
215
+
216
+ if attributes.has_key?(:'template')
217
+ self.template = attributes[:'template']
218
+ end
219
+
220
+ if attributes.has_key?(:'prefill_tags')
221
+ if (value = attributes[:'prefill_tags']).is_a?(Array)
222
+ self.prefill_tags = value
223
+ end
224
+ end
225
+
226
+ if attributes.has_key?(:'integrations')
227
+ if (value = attributes[:'integrations']).is_a?(Array)
228
+ self.integrations = value
229
+ end
230
+ end
231
+
232
+ if attributes.has_key?(:'file_from_sf')
233
+ self.file_from_sf = attributes[:'file_from_sf']
234
+ end
235
+
236
+ if attributes.has_key?(:'auto_delete_days')
237
+ self.auto_delete_days = attributes[:'auto_delete_days']
238
+ end
239
+
240
+ if attributes.has_key?(:'pdf')
241
+ self.pdf = attributes[:'pdf']
242
+ end
243
+
244
+ if attributes.has_key?(:'status')
245
+ self.status = attributes[:'status']
246
+ end
247
+
248
+ if attributes.has_key?(:'signrequest')
249
+ self.signrequest = attributes[:'signrequest']
250
+ end
251
+
252
+ if attributes.has_key?(:'api_used')
253
+ self.api_used = attributes[:'api_used']
254
+ end
255
+
256
+ if attributes.has_key?(:'signing_log')
257
+ self.signing_log = attributes[:'signing_log']
258
+ end
259
+
260
+ if attributes.has_key?(:'security_hash')
261
+ self.security_hash = attributes[:'security_hash']
262
+ end
263
+
264
+ if attributes.has_key?(:'attachments')
265
+ if (value = attributes[:'attachments']).is_a?(Array)
266
+ self.attachments = value
267
+ end
268
+ end
269
+
270
+ if attributes.has_key?(:'auto_delete_after')
271
+ self.auto_delete_after = attributes[:'auto_delete_after']
272
+ end
273
+
274
+ end
275
+
276
+ # Show invalid properties with the reasons. Usually used together with valid?
277
+ # @return Array for valid properties with the reasons
278
+ def list_invalid_properties
279
+ invalid_properties = Array.new
280
+ if !@uuid.nil? && @uuid.to_s.length < 1
281
+ invalid_properties.push("invalid value for 'uuid', the character length must be great than or equal to 1.")
282
+ end
283
+
284
+ if !@file_as_pdf.nil? && @file_as_pdf.to_s.length < 1
285
+ invalid_properties.push("invalid value for 'file_as_pdf', the character length must be great than or equal to 1.")
286
+ end
287
+
288
+ if !@name.nil? && @name.to_s.length > 255
289
+ invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 255.")
290
+ end
291
+
292
+ if !@external_id.nil? && @external_id.to_s.length > 255
293
+ invalid_properties.push("invalid value for 'external_id', the character length must be smaller than or equal to 255.")
294
+ end
295
+
296
+ if !@frontend_id.nil? && @frontend_id.to_s.length > 255
297
+ invalid_properties.push("invalid value for 'frontend_id', the character length must be smaller than or equal to 255.")
298
+ end
299
+
300
+ if !@file_from_url.nil? && @file_from_url.to_s.length > 2100
301
+ invalid_properties.push("invalid value for 'file_from_url', the character length must be smaller than or equal to 2100.")
302
+ end
303
+
304
+ if !@events_callback_url.nil? && @events_callback_url.to_s.length > 2100
305
+ invalid_properties.push("invalid value for 'events_callback_url', the character length must be smaller than or equal to 2100.")
306
+ end
307
+
308
+ if !@auto_delete_days.nil? && @auto_delete_days > 730
309
+ invalid_properties.push("invalid value for 'auto_delete_days', must be smaller than or equal to 730.")
310
+ end
311
+
312
+ if !@auto_delete_days.nil? && @auto_delete_days < 1
313
+ invalid_properties.push("invalid value for 'auto_delete_days', must be greater than or equal to 1.")
314
+ end
315
+
316
+ if !@security_hash.nil? && @security_hash.to_s.length < 1
317
+ invalid_properties.push("invalid value for 'security_hash', the character length must be great than or equal to 1.")
318
+ end
319
+
320
+ return invalid_properties
321
+ end
322
+
323
+ # Check to see if the all the properties in the model are valid
324
+ # @return true if the model is valid
325
+ def valid?
326
+ return false if !@uuid.nil? && @uuid.to_s.length < 1
327
+ return false if !@file_as_pdf.nil? && @file_as_pdf.to_s.length < 1
328
+ return false if !@name.nil? && @name.to_s.length > 255
329
+ return false if !@external_id.nil? && @external_id.to_s.length > 255
330
+ return false if !@frontend_id.nil? && @frontend_id.to_s.length > 255
331
+ return false if !@file_from_url.nil? && @file_from_url.to_s.length > 2100
332
+ return false if !@events_callback_url.nil? && @events_callback_url.to_s.length > 2100
333
+ return false if !@auto_delete_days.nil? && @auto_delete_days > 730
334
+ return false if !@auto_delete_days.nil? && @auto_delete_days < 1
335
+ status_validator = EnumAttributeValidator.new('String', ["co", "ne", "se", "vi", "si", "do", "sd", "ca", "de", "ec", "es"])
336
+ return false unless status_validator.valid?(@status)
337
+ return false if !@security_hash.nil? && @security_hash.to_s.length < 1
338
+ return true
339
+ end
340
+
341
+ # Custom attribute writer method with validation
342
+ # @param [Object] uuid Value to be assigned
343
+ def uuid=(uuid)
344
+
345
+ if !uuid.nil? && uuid.to_s.length < 1
346
+ fail ArgumentError, "invalid value for 'uuid', the character length must be great than or equal to 1."
347
+ end
348
+
349
+ @uuid = uuid
350
+ end
351
+
352
+ # Custom attribute writer method with validation
353
+ # @param [Object] file_as_pdf Value to be assigned
354
+ def file_as_pdf=(file_as_pdf)
355
+
356
+ if !file_as_pdf.nil? && file_as_pdf.to_s.length < 1
357
+ fail ArgumentError, "invalid value for 'file_as_pdf', the character length must be great than or equal to 1."
358
+ end
359
+
360
+ @file_as_pdf = file_as_pdf
361
+ end
362
+
363
+ # Custom attribute writer method with validation
364
+ # @param [Object] name Value to be assigned
365
+ def name=(name)
366
+
367
+ if !name.nil? && name.to_s.length > 255
368
+ fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 255."
369
+ end
370
+
371
+ @name = name
372
+ end
373
+
374
+ # Custom attribute writer method with validation
375
+ # @param [Object] external_id Value to be assigned
376
+ def external_id=(external_id)
377
+
378
+ if !external_id.nil? && external_id.to_s.length > 255
379
+ fail ArgumentError, "invalid value for 'external_id', the character length must be smaller than or equal to 255."
380
+ end
381
+
382
+ @external_id = external_id
383
+ end
384
+
385
+ # Custom attribute writer method with validation
386
+ # @param [Object] frontend_id Value to be assigned
387
+ def frontend_id=(frontend_id)
388
+
389
+ if !frontend_id.nil? && frontend_id.to_s.length > 255
390
+ fail ArgumentError, "invalid value for 'frontend_id', the character length must be smaller than or equal to 255."
391
+ end
392
+
393
+ @frontend_id = frontend_id
394
+ end
395
+
396
+ # Custom attribute writer method with validation
397
+ # @param [Object] file_from_url Value to be assigned
398
+ def file_from_url=(file_from_url)
399
+
400
+ if !file_from_url.nil? && file_from_url.to_s.length > 2100
401
+ fail ArgumentError, "invalid value for 'file_from_url', the character length must be smaller than or equal to 2100."
402
+ end
403
+
404
+ @file_from_url = file_from_url
405
+ end
406
+
407
+ # Custom attribute writer method with validation
408
+ # @param [Object] events_callback_url Value to be assigned
409
+ def events_callback_url=(events_callback_url)
410
+
411
+ if !events_callback_url.nil? && events_callback_url.to_s.length > 2100
412
+ fail ArgumentError, "invalid value for 'events_callback_url', the character length must be smaller than or equal to 2100."
413
+ end
414
+
415
+ @events_callback_url = events_callback_url
416
+ end
417
+
418
+ # Custom attribute writer method with validation
419
+ # @param [Object] auto_delete_days Value to be assigned
420
+ def auto_delete_days=(auto_delete_days)
421
+
422
+ if !auto_delete_days.nil? && auto_delete_days > 730
423
+ fail ArgumentError, "invalid value for 'auto_delete_days', must be smaller than or equal to 730."
424
+ end
425
+
426
+ if !auto_delete_days.nil? && auto_delete_days < 1
427
+ fail ArgumentError, "invalid value for 'auto_delete_days', must be greater than or equal to 1."
428
+ end
429
+
430
+ @auto_delete_days = auto_delete_days
431
+ end
432
+
433
+ # Custom attribute writer method checking allowed values (enum).
434
+ # @param [Object] status Object to be assigned
435
+ def status=(status)
436
+ validator = EnumAttributeValidator.new('String', ["co", "ne", "se", "vi", "si", "do", "sd", "ca", "de", "ec", "es"])
437
+ unless validator.valid?(status)
438
+ fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
439
+ end
440
+ @status = status
441
+ end
442
+
443
+ # Custom attribute writer method with validation
444
+ # @param [Object] security_hash Value to be assigned
445
+ def security_hash=(security_hash)
446
+
447
+ if !security_hash.nil? && security_hash.to_s.length < 1
448
+ fail ArgumentError, "invalid value for 'security_hash', the character length must be great than or equal to 1."
449
+ end
450
+
451
+ @security_hash = security_hash
452
+ end
453
+
454
+ # Checks equality by comparing each attribute.
455
+ # @param [Object] Object to be compared
456
+ def ==(o)
457
+ return true if self.equal?(o)
458
+ self.class == o.class &&
459
+ url == o.url &&
460
+ team == o.team &&
461
+ uuid == o.uuid &&
462
+ user == o.user &&
463
+ file_as_pdf == o.file_as_pdf &&
464
+ name == o.name &&
465
+ external_id == o.external_id &&
466
+ frontend_id == o.frontend_id &&
467
+ file == o.file &&
468
+ file_from_url == o.file_from_url &&
469
+ events_callback_url == o.events_callback_url &&
470
+ file_from_content == o.file_from_content &&
471
+ file_from_content_name == o.file_from_content_name &&
472
+ template == o.template &&
473
+ prefill_tags == o.prefill_tags &&
474
+ integrations == o.integrations &&
475
+ file_from_sf == o.file_from_sf &&
476
+ auto_delete_days == o.auto_delete_days &&
477
+ pdf == o.pdf &&
478
+ status == o.status &&
479
+ signrequest == o.signrequest &&
480
+ api_used == o.api_used &&
481
+ signing_log == o.signing_log &&
482
+ security_hash == o.security_hash &&
483
+ attachments == o.attachments &&
484
+ auto_delete_after == o.auto_delete_after
485
+ end
486
+
487
+ # @see the `==` method
488
+ # @param [Object] Object to be compared
489
+ def eql?(o)
490
+ self == o
491
+ end
492
+
493
+ # Calculates hash code according to all attributes.
494
+ # @return [Fixnum] Hash code
495
+ def hash
496
+ [url, team, uuid, user, file_as_pdf, name, external_id, frontend_id, file, file_from_url, events_callback_url, file_from_content, file_from_content_name, template, prefill_tags, integrations, file_from_sf, auto_delete_days, pdf, status, signrequest, api_used, signing_log, security_hash, attachments, auto_delete_after].hash
497
+ end
498
+
499
+ # Builds the object from hash
500
+ # @param [Hash] attributes Model attributes in the form of hash
501
+ # @return [Object] Returns the model itself
502
+ def build_from_hash(attributes)
503
+ return nil unless attributes.is_a?(Hash)
504
+ self.class.swagger_types.each_pair do |key, type|
505
+ if type =~ /\AArray<(.*)>/i
506
+ # check to ensure the input is an array given that the the attribute
507
+ # is documented as an array but the input is not
508
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
509
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
510
+ end
511
+ elsif !attributes[self.class.attribute_map[key]].nil?
512
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
513
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
514
+ end
515
+
516
+ self
517
+ end
518
+
519
+ # Deserializes the data based on type
520
+ # @param string type Data type
521
+ # @param string value Value to be deserialized
522
+ # @return [Object] Deserialized data
523
+ def _deserialize(type, value)
524
+ case type.to_sym
525
+ when :DateTime
526
+ DateTime.parse(value)
527
+ when :Date
528
+ Date.parse(value)
529
+ when :String
530
+ value.to_s
531
+ when :Integer
532
+ value.to_i
533
+ when :Float
534
+ value.to_f
535
+ when :BOOLEAN
536
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
537
+ true
538
+ else
539
+ false
540
+ end
541
+ when :Object
542
+ # generic object (usually a Hash), return directly
543
+ value
544
+ when /\AArray<(?<inner_type>.+)>\z/
545
+ inner_type = Regexp.last_match[:inner_type]
546
+ value.map { |v| _deserialize(inner_type, v) }
547
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
548
+ k_type = Regexp.last_match[:k_type]
549
+ v_type = Regexp.last_match[:v_type]
550
+ {}.tap do |hash|
551
+ value.each do |k, v|
552
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
553
+ end
554
+ end
555
+ else # model
556
+ temp_model = SignRequestClient.const_get(type).new
557
+ temp_model.build_from_hash(value)
558
+ end
559
+ end
560
+
561
+ # Returns the string representation of the object
562
+ # @return [String] String presentation of the object
563
+ def to_s
564
+ to_hash.to_s
565
+ end
566
+
567
+ # to_body is an alias to to_hash (backward compatibility)
568
+ # @return [Hash] Returns the object in the form of hash
569
+ def to_body
570
+ to_hash
571
+ end
572
+
573
+ # Returns the object in the form of hash
574
+ # @return [Hash] Returns the object in the form of hash
575
+ def to_hash
576
+ hash = {}
577
+ self.class.attribute_map.each_pair do |attr, param|
578
+ value = self.send(attr)
579
+ next if value.nil?
580
+ hash[param] = _to_hash(value)
581
+ end
582
+ hash
583
+ end
584
+
585
+ # Outputs non-array value in the form of hash
586
+ # For object, use to_hash. Otherwise, just return the value
587
+ # @param [Object] value Any valid value
588
+ # @return [Hash] Returns the value in the form of hash
589
+ def _to_hash(value)
590
+ if value.is_a?(Array)
591
+ value.compact.map{ |v| _to_hash(v) }
592
+ elsif value.is_a?(Hash)
593
+ {}.tap do |hash|
594
+ value.each { |k, v| hash[k] = _to_hash(v) }
595
+ end
596
+ elsif value.respond_to? :to_hash
597
+ value.to_hash
598
+ else
599
+ value
600
+ end
601
+ end
602
+
603
+ end
604
+
605
+ end