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,764 @@
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 SignRequestQuickCreate
18
+ attr_accessor :from_email
19
+
20
+ attr_accessor :from_email_name
21
+
22
+ attr_accessor :is_being_prepared
23
+
24
+ attr_accessor :prepare_url
25
+
26
+ attr_accessor :redirect_url
27
+
28
+ attr_accessor :required_attachments
29
+
30
+ attr_accessor :disable_attachments
31
+
32
+ attr_accessor :disable_text_signatures
33
+
34
+ attr_accessor :disable_text
35
+
36
+ attr_accessor :disable_date
37
+
38
+ attr_accessor :disable_emails
39
+
40
+ attr_accessor :disable_upload_signatures
41
+
42
+ attr_accessor :subject
43
+
44
+ attr_accessor :message
45
+
46
+ attr_accessor :who
47
+
48
+ attr_accessor :send_reminders
49
+
50
+ attr_accessor :signers
51
+
52
+ attr_accessor :uuid
53
+
54
+ attr_accessor :url
55
+
56
+ attr_accessor :document
57
+
58
+ attr_accessor :integration
59
+
60
+ attr_accessor :integration_data
61
+
62
+ attr_accessor :name
63
+
64
+ attr_accessor :external_id
65
+
66
+ attr_accessor :frontend_id
67
+
68
+ attr_accessor :file
69
+
70
+ attr_accessor :file_from_url
71
+
72
+ attr_accessor :events_callback_url
73
+
74
+ attr_accessor :file_from_content
75
+
76
+ attr_accessor :file_from_content_name
77
+
78
+ attr_accessor :template
79
+
80
+ attr_accessor :prefill_tags
81
+
82
+ attr_accessor :integrations
83
+
84
+ attr_accessor :file_from_sf
85
+
86
+ attr_accessor :auto_delete_days
87
+
88
+ class EnumAttributeValidator
89
+ attr_reader :datatype
90
+ attr_reader :allowable_values
91
+
92
+ def initialize(datatype, allowable_values)
93
+ @allowable_values = allowable_values.map do |value|
94
+ case datatype.to_s
95
+ when /Integer/i
96
+ value.to_i
97
+ when /Float/i
98
+ value.to_f
99
+ else
100
+ value
101
+ end
102
+ end
103
+ end
104
+
105
+ def valid?(value)
106
+ !value || allowable_values.include?(value)
107
+ end
108
+ end
109
+
110
+ # Attribute mapping from ruby-style variable name to JSON key.
111
+ def self.attribute_map
112
+ {
113
+ :'from_email' => :'from_email',
114
+ :'from_email_name' => :'from_email_name',
115
+ :'is_being_prepared' => :'is_being_prepared',
116
+ :'prepare_url' => :'prepare_url',
117
+ :'redirect_url' => :'redirect_url',
118
+ :'required_attachments' => :'required_attachments',
119
+ :'disable_attachments' => :'disable_attachments',
120
+ :'disable_text_signatures' => :'disable_text_signatures',
121
+ :'disable_text' => :'disable_text',
122
+ :'disable_date' => :'disable_date',
123
+ :'disable_emails' => :'disable_emails',
124
+ :'disable_upload_signatures' => :'disable_upload_signatures',
125
+ :'subject' => :'subject',
126
+ :'message' => :'message',
127
+ :'who' => :'who',
128
+ :'send_reminders' => :'send_reminders',
129
+ :'signers' => :'signers',
130
+ :'uuid' => :'uuid',
131
+ :'url' => :'url',
132
+ :'document' => :'document',
133
+ :'integration' => :'integration',
134
+ :'integration_data' => :'integration_data',
135
+ :'name' => :'name',
136
+ :'external_id' => :'external_id',
137
+ :'frontend_id' => :'frontend_id',
138
+ :'file' => :'file',
139
+ :'file_from_url' => :'file_from_url',
140
+ :'events_callback_url' => :'events_callback_url',
141
+ :'file_from_content' => :'file_from_content',
142
+ :'file_from_content_name' => :'file_from_content_name',
143
+ :'template' => :'template',
144
+ :'prefill_tags' => :'prefill_tags',
145
+ :'integrations' => :'integrations',
146
+ :'file_from_sf' => :'file_from_sf',
147
+ :'auto_delete_days' => :'auto_delete_days'
148
+ }
149
+ end
150
+
151
+ # Attribute type mapping.
152
+ def self.swagger_types
153
+ {
154
+ :'from_email' => :'String',
155
+ :'from_email_name' => :'String',
156
+ :'is_being_prepared' => :'BOOLEAN',
157
+ :'prepare_url' => :'String',
158
+ :'redirect_url' => :'String',
159
+ :'required_attachments' => :'Array<RequiredAttachment>',
160
+ :'disable_attachments' => :'BOOLEAN',
161
+ :'disable_text_signatures' => :'BOOLEAN',
162
+ :'disable_text' => :'BOOLEAN',
163
+ :'disable_date' => :'BOOLEAN',
164
+ :'disable_emails' => :'BOOLEAN',
165
+ :'disable_upload_signatures' => :'BOOLEAN',
166
+ :'subject' => :'String',
167
+ :'message' => :'String',
168
+ :'who' => :'String',
169
+ :'send_reminders' => :'BOOLEAN',
170
+ :'signers' => :'Array<Signer>',
171
+ :'uuid' => :'String',
172
+ :'url' => :'String',
173
+ :'document' => :'String',
174
+ :'integration' => :'String',
175
+ :'integration_data' => :'String',
176
+ :'name' => :'String',
177
+ :'external_id' => :'String',
178
+ :'frontend_id' => :'String',
179
+ :'file' => :'String',
180
+ :'file_from_url' => :'String',
181
+ :'events_callback_url' => :'String',
182
+ :'file_from_content' => :'String',
183
+ :'file_from_content_name' => :'String',
184
+ :'template' => :'String',
185
+ :'prefill_tags' => :'Array<InlinePrefillTags>',
186
+ :'integrations' => :'Array<InlineIntegrationData>',
187
+ :'file_from_sf' => :'FileFromSf',
188
+ :'auto_delete_days' => :'Integer'
189
+ }
190
+ end
191
+
192
+ # Initializes the object
193
+ # @param [Hash] attributes Model attributes in the form of hash
194
+ def initialize(attributes = {})
195
+ return unless attributes.is_a?(Hash)
196
+
197
+ # convert string to symbol for hash key
198
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
199
+
200
+ if attributes.has_key?(:'from_email')
201
+ self.from_email = attributes[:'from_email']
202
+ end
203
+
204
+ if attributes.has_key?(:'from_email_name')
205
+ self.from_email_name = attributes[:'from_email_name']
206
+ end
207
+
208
+ if attributes.has_key?(:'is_being_prepared')
209
+ self.is_being_prepared = attributes[:'is_being_prepared']
210
+ end
211
+
212
+ if attributes.has_key?(:'prepare_url')
213
+ self.prepare_url = attributes[:'prepare_url']
214
+ end
215
+
216
+ if attributes.has_key?(:'redirect_url')
217
+ self.redirect_url = attributes[:'redirect_url']
218
+ end
219
+
220
+ if attributes.has_key?(:'required_attachments')
221
+ if (value = attributes[:'required_attachments']).is_a?(Array)
222
+ self.required_attachments = value
223
+ end
224
+ end
225
+
226
+ if attributes.has_key?(:'disable_attachments')
227
+ self.disable_attachments = attributes[:'disable_attachments']
228
+ end
229
+
230
+ if attributes.has_key?(:'disable_text_signatures')
231
+ self.disable_text_signatures = attributes[:'disable_text_signatures']
232
+ end
233
+
234
+ if attributes.has_key?(:'disable_text')
235
+ self.disable_text = attributes[:'disable_text']
236
+ end
237
+
238
+ if attributes.has_key?(:'disable_date')
239
+ self.disable_date = attributes[:'disable_date']
240
+ end
241
+
242
+ if attributes.has_key?(:'disable_emails')
243
+ self.disable_emails = attributes[:'disable_emails']
244
+ end
245
+
246
+ if attributes.has_key?(:'disable_upload_signatures')
247
+ self.disable_upload_signatures = attributes[:'disable_upload_signatures']
248
+ end
249
+
250
+ if attributes.has_key?(:'subject')
251
+ self.subject = attributes[:'subject']
252
+ end
253
+
254
+ if attributes.has_key?(:'message')
255
+ self.message = attributes[:'message']
256
+ end
257
+
258
+ if attributes.has_key?(:'who')
259
+ self.who = attributes[:'who']
260
+ else
261
+ self.who = "o"
262
+ end
263
+
264
+ if attributes.has_key?(:'send_reminders')
265
+ self.send_reminders = attributes[:'send_reminders']
266
+ end
267
+
268
+ if attributes.has_key?(:'signers')
269
+ if (value = attributes[:'signers']).is_a?(Array)
270
+ self.signers = value
271
+ end
272
+ end
273
+
274
+ if attributes.has_key?(:'uuid')
275
+ self.uuid = attributes[:'uuid']
276
+ end
277
+
278
+ if attributes.has_key?(:'url')
279
+ self.url = attributes[:'url']
280
+ end
281
+
282
+ if attributes.has_key?(:'document')
283
+ self.document = attributes[:'document']
284
+ end
285
+
286
+ if attributes.has_key?(:'integration')
287
+ self.integration = attributes[:'integration']
288
+ end
289
+
290
+ if attributes.has_key?(:'integration_data')
291
+ self.integration_data = attributes[:'integration_data']
292
+ end
293
+
294
+ if attributes.has_key?(:'name')
295
+ self.name = attributes[:'name']
296
+ end
297
+
298
+ if attributes.has_key?(:'external_id')
299
+ self.external_id = attributes[:'external_id']
300
+ end
301
+
302
+ if attributes.has_key?(:'frontend_id')
303
+ self.frontend_id = attributes[:'frontend_id']
304
+ end
305
+
306
+ if attributes.has_key?(:'file')
307
+ self.file = attributes[:'file']
308
+ end
309
+
310
+ if attributes.has_key?(:'file_from_url')
311
+ self.file_from_url = attributes[:'file_from_url']
312
+ end
313
+
314
+ if attributes.has_key?(:'events_callback_url')
315
+ self.events_callback_url = attributes[:'events_callback_url']
316
+ end
317
+
318
+ if attributes.has_key?(:'file_from_content')
319
+ self.file_from_content = attributes[:'file_from_content']
320
+ end
321
+
322
+ if attributes.has_key?(:'file_from_content_name')
323
+ self.file_from_content_name = attributes[:'file_from_content_name']
324
+ end
325
+
326
+ if attributes.has_key?(:'template')
327
+ self.template = attributes[:'template']
328
+ end
329
+
330
+ if attributes.has_key?(:'prefill_tags')
331
+ if (value = attributes[:'prefill_tags']).is_a?(Array)
332
+ self.prefill_tags = value
333
+ end
334
+ end
335
+
336
+ if attributes.has_key?(:'integrations')
337
+ if (value = attributes[:'integrations']).is_a?(Array)
338
+ self.integrations = value
339
+ end
340
+ end
341
+
342
+ if attributes.has_key?(:'file_from_sf')
343
+ self.file_from_sf = attributes[:'file_from_sf']
344
+ end
345
+
346
+ if attributes.has_key?(:'auto_delete_days')
347
+ self.auto_delete_days = attributes[:'auto_delete_days']
348
+ end
349
+
350
+ end
351
+
352
+ # Show invalid properties with the reasons. Usually used together with valid?
353
+ # @return Array for valid properties with the reasons
354
+ def list_invalid_properties
355
+ invalid_properties = Array.new
356
+ if !@from_email.nil? && @from_email.to_s.length > 255
357
+ invalid_properties.push("invalid value for 'from_email', the character length must be smaller than or equal to 255.")
358
+ end
359
+
360
+ if !@from_email.nil? && @from_email.to_s.length < 1
361
+ invalid_properties.push("invalid value for 'from_email', the character length must be great than or equal to 1.")
362
+ end
363
+
364
+ if !@from_email_name.nil? && @from_email_name.to_s.length > 255
365
+ invalid_properties.push("invalid value for 'from_email_name', the character length must be smaller than or equal to 255.")
366
+ end
367
+
368
+ if !@prepare_url.nil? && @prepare_url.to_s.length < 1
369
+ invalid_properties.push("invalid value for 'prepare_url', the character length must be great than or equal to 1.")
370
+ end
371
+
372
+ if !@redirect_url.nil? && @redirect_url.to_s.length > 2100
373
+ invalid_properties.push("invalid value for 'redirect_url', the character length must be smaller than or equal to 2100.")
374
+ end
375
+
376
+ if !@subject.nil? && @subject.to_s.length > 512
377
+ invalid_properties.push("invalid value for 'subject', the character length must be smaller than or equal to 512.")
378
+ end
379
+
380
+ if @signers.nil?
381
+ invalid_properties.push("invalid value for 'signers', signers cannot be nil.")
382
+ end
383
+
384
+ if !@uuid.nil? && @uuid.to_s.length < 1
385
+ invalid_properties.push("invalid value for 'uuid', the character length must be great than or equal to 1.")
386
+ end
387
+
388
+ if !@name.nil? && @name.to_s.length > 255
389
+ invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 255.")
390
+ end
391
+
392
+ if !@external_id.nil? && @external_id.to_s.length > 255
393
+ invalid_properties.push("invalid value for 'external_id', the character length must be smaller than or equal to 255.")
394
+ end
395
+
396
+ if !@frontend_id.nil? && @frontend_id.to_s.length > 255
397
+ invalid_properties.push("invalid value for 'frontend_id', the character length must be smaller than or equal to 255.")
398
+ end
399
+
400
+ if !@file_from_url.nil? && @file_from_url.to_s.length > 2100
401
+ invalid_properties.push("invalid value for 'file_from_url', the character length must be smaller than or equal to 2100.")
402
+ end
403
+
404
+ if !@events_callback_url.nil? && @events_callback_url.to_s.length > 2100
405
+ invalid_properties.push("invalid value for 'events_callback_url', the character length must be smaller than or equal to 2100.")
406
+ end
407
+
408
+ if !@auto_delete_days.nil? && @auto_delete_days > 730
409
+ invalid_properties.push("invalid value for 'auto_delete_days', must be smaller than or equal to 730.")
410
+ end
411
+
412
+ if !@auto_delete_days.nil? && @auto_delete_days < 1
413
+ invalid_properties.push("invalid value for 'auto_delete_days', must be greater than or equal to 1.")
414
+ end
415
+
416
+ return invalid_properties
417
+ end
418
+
419
+ # Check to see if the all the properties in the model are valid
420
+ # @return true if the model is valid
421
+ def valid?
422
+ return false if !@from_email.nil? && @from_email.to_s.length > 255
423
+ return false if !@from_email.nil? && @from_email.to_s.length < 1
424
+ return false if !@from_email_name.nil? && @from_email_name.to_s.length > 255
425
+ return false if !@prepare_url.nil? && @prepare_url.to_s.length < 1
426
+ return false if !@redirect_url.nil? && @redirect_url.to_s.length > 2100
427
+ return false if !@subject.nil? && @subject.to_s.length > 512
428
+ who_validator = EnumAttributeValidator.new('String', ["m", "mo", "o"])
429
+ return false unless who_validator.valid?(@who)
430
+ return false if @signers.nil?
431
+ return false if !@uuid.nil? && @uuid.to_s.length < 1
432
+ integration_validator = EnumAttributeValidator.new('String', ["mfiles", "salesforce", "formdesk", "zapier", "txhash"])
433
+ return false unless integration_validator.valid?(@integration)
434
+ return false if !@name.nil? && @name.to_s.length > 255
435
+ return false if !@external_id.nil? && @external_id.to_s.length > 255
436
+ return false if !@frontend_id.nil? && @frontend_id.to_s.length > 255
437
+ return false if !@file_from_url.nil? && @file_from_url.to_s.length > 2100
438
+ return false if !@events_callback_url.nil? && @events_callback_url.to_s.length > 2100
439
+ return false if !@auto_delete_days.nil? && @auto_delete_days > 730
440
+ return false if !@auto_delete_days.nil? && @auto_delete_days < 1
441
+ return true
442
+ end
443
+
444
+ # Custom attribute writer method with validation
445
+ # @param [Object] from_email Value to be assigned
446
+ def from_email=(from_email)
447
+
448
+ if !from_email.nil? && from_email.to_s.length > 255
449
+ fail ArgumentError, "invalid value for 'from_email', the character length must be smaller than or equal to 255."
450
+ end
451
+
452
+ if !from_email.nil? && from_email.to_s.length < 1
453
+ fail ArgumentError, "invalid value for 'from_email', the character length must be great than or equal to 1."
454
+ end
455
+
456
+ @from_email = from_email
457
+ end
458
+
459
+ # Custom attribute writer method with validation
460
+ # @param [Object] from_email_name Value to be assigned
461
+ def from_email_name=(from_email_name)
462
+
463
+ if !from_email_name.nil? && from_email_name.to_s.length > 255
464
+ fail ArgumentError, "invalid value for 'from_email_name', the character length must be smaller than or equal to 255."
465
+ end
466
+
467
+ @from_email_name = from_email_name
468
+ end
469
+
470
+ # Custom attribute writer method with validation
471
+ # @param [Object] prepare_url Value to be assigned
472
+ def prepare_url=(prepare_url)
473
+
474
+ if !prepare_url.nil? && prepare_url.to_s.length < 1
475
+ fail ArgumentError, "invalid value for 'prepare_url', the character length must be great than or equal to 1."
476
+ end
477
+
478
+ @prepare_url = prepare_url
479
+ end
480
+
481
+ # Custom attribute writer method with validation
482
+ # @param [Object] redirect_url Value to be assigned
483
+ def redirect_url=(redirect_url)
484
+
485
+ if !redirect_url.nil? && redirect_url.to_s.length > 2100
486
+ fail ArgumentError, "invalid value for 'redirect_url', the character length must be smaller than or equal to 2100."
487
+ end
488
+
489
+ @redirect_url = redirect_url
490
+ end
491
+
492
+ # Custom attribute writer method with validation
493
+ # @param [Object] subject Value to be assigned
494
+ def subject=(subject)
495
+
496
+ if !subject.nil? && subject.to_s.length > 512
497
+ fail ArgumentError, "invalid value for 'subject', the character length must be smaller than or equal to 512."
498
+ end
499
+
500
+ @subject = subject
501
+ end
502
+
503
+ # Custom attribute writer method checking allowed values (enum).
504
+ # @param [Object] who Object to be assigned
505
+ def who=(who)
506
+ validator = EnumAttributeValidator.new('String', ["m", "mo", "o"])
507
+ unless validator.valid?(who)
508
+ fail ArgumentError, "invalid value for 'who', must be one of #{validator.allowable_values}."
509
+ end
510
+ @who = who
511
+ end
512
+
513
+ # Custom attribute writer method with validation
514
+ # @param [Object] uuid Value to be assigned
515
+ def uuid=(uuid)
516
+
517
+ if !uuid.nil? && uuid.to_s.length < 1
518
+ fail ArgumentError, "invalid value for 'uuid', the character length must be great than or equal to 1."
519
+ end
520
+
521
+ @uuid = uuid
522
+ end
523
+
524
+ # Custom attribute writer method checking allowed values (enum).
525
+ # @param [Object] integration Object to be assigned
526
+ def integration=(integration)
527
+ validator = EnumAttributeValidator.new('String', ["mfiles", "salesforce", "formdesk", "zapier", "txhash"])
528
+ unless validator.valid?(integration)
529
+ fail ArgumentError, "invalid value for 'integration', must be one of #{validator.allowable_values}."
530
+ end
531
+ @integration = integration
532
+ end
533
+
534
+ # Custom attribute writer method with validation
535
+ # @param [Object] name Value to be assigned
536
+ def name=(name)
537
+
538
+ if !name.nil? && name.to_s.length > 255
539
+ fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 255."
540
+ end
541
+
542
+ @name = name
543
+ end
544
+
545
+ # Custom attribute writer method with validation
546
+ # @param [Object] external_id Value to be assigned
547
+ def external_id=(external_id)
548
+
549
+ if !external_id.nil? && external_id.to_s.length > 255
550
+ fail ArgumentError, "invalid value for 'external_id', the character length must be smaller than or equal to 255."
551
+ end
552
+
553
+ @external_id = external_id
554
+ end
555
+
556
+ # Custom attribute writer method with validation
557
+ # @param [Object] frontend_id Value to be assigned
558
+ def frontend_id=(frontend_id)
559
+
560
+ if !frontend_id.nil? && frontend_id.to_s.length > 255
561
+ fail ArgumentError, "invalid value for 'frontend_id', the character length must be smaller than or equal to 255."
562
+ end
563
+
564
+ @frontend_id = frontend_id
565
+ end
566
+
567
+ # Custom attribute writer method with validation
568
+ # @param [Object] file_from_url Value to be assigned
569
+ def file_from_url=(file_from_url)
570
+
571
+ if !file_from_url.nil? && file_from_url.to_s.length > 2100
572
+ fail ArgumentError, "invalid value for 'file_from_url', the character length must be smaller than or equal to 2100."
573
+ end
574
+
575
+ @file_from_url = file_from_url
576
+ end
577
+
578
+ # Custom attribute writer method with validation
579
+ # @param [Object] events_callback_url Value to be assigned
580
+ def events_callback_url=(events_callback_url)
581
+
582
+ if !events_callback_url.nil? && events_callback_url.to_s.length > 2100
583
+ fail ArgumentError, "invalid value for 'events_callback_url', the character length must be smaller than or equal to 2100."
584
+ end
585
+
586
+ @events_callback_url = events_callback_url
587
+ end
588
+
589
+ # Custom attribute writer method with validation
590
+ # @param [Object] auto_delete_days Value to be assigned
591
+ def auto_delete_days=(auto_delete_days)
592
+
593
+ if !auto_delete_days.nil? && auto_delete_days > 730
594
+ fail ArgumentError, "invalid value for 'auto_delete_days', must be smaller than or equal to 730."
595
+ end
596
+
597
+ if !auto_delete_days.nil? && auto_delete_days < 1
598
+ fail ArgumentError, "invalid value for 'auto_delete_days', must be greater than or equal to 1."
599
+ end
600
+
601
+ @auto_delete_days = auto_delete_days
602
+ end
603
+
604
+ # Checks equality by comparing each attribute.
605
+ # @param [Object] Object to be compared
606
+ def ==(o)
607
+ return true if self.equal?(o)
608
+ self.class == o.class &&
609
+ from_email == o.from_email &&
610
+ from_email_name == o.from_email_name &&
611
+ is_being_prepared == o.is_being_prepared &&
612
+ prepare_url == o.prepare_url &&
613
+ redirect_url == o.redirect_url &&
614
+ required_attachments == o.required_attachments &&
615
+ disable_attachments == o.disable_attachments &&
616
+ disable_text_signatures == o.disable_text_signatures &&
617
+ disable_text == o.disable_text &&
618
+ disable_date == o.disable_date &&
619
+ disable_emails == o.disable_emails &&
620
+ disable_upload_signatures == o.disable_upload_signatures &&
621
+ subject == o.subject &&
622
+ message == o.message &&
623
+ who == o.who &&
624
+ send_reminders == o.send_reminders &&
625
+ signers == o.signers &&
626
+ uuid == o.uuid &&
627
+ url == o.url &&
628
+ document == o.document &&
629
+ integration == o.integration &&
630
+ integration_data == o.integration_data &&
631
+ name == o.name &&
632
+ external_id == o.external_id &&
633
+ frontend_id == o.frontend_id &&
634
+ file == o.file &&
635
+ file_from_url == o.file_from_url &&
636
+ events_callback_url == o.events_callback_url &&
637
+ file_from_content == o.file_from_content &&
638
+ file_from_content_name == o.file_from_content_name &&
639
+ template == o.template &&
640
+ prefill_tags == o.prefill_tags &&
641
+ integrations == o.integrations &&
642
+ file_from_sf == o.file_from_sf &&
643
+ auto_delete_days == o.auto_delete_days
644
+ end
645
+
646
+ # @see the `==` method
647
+ # @param [Object] Object to be compared
648
+ def eql?(o)
649
+ self == o
650
+ end
651
+
652
+ # Calculates hash code according to all attributes.
653
+ # @return [Fixnum] Hash code
654
+ def hash
655
+ [from_email, from_email_name, is_being_prepared, prepare_url, redirect_url, required_attachments, disable_attachments, disable_text_signatures, disable_text, disable_date, disable_emails, disable_upload_signatures, subject, message, who, send_reminders, signers, uuid, url, document, integration, integration_data, 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].hash
656
+ end
657
+
658
+ # Builds the object from hash
659
+ # @param [Hash] attributes Model attributes in the form of hash
660
+ # @return [Object] Returns the model itself
661
+ def build_from_hash(attributes)
662
+ return nil unless attributes.is_a?(Hash)
663
+ self.class.swagger_types.each_pair do |key, type|
664
+ if type =~ /\AArray<(.*)>/i
665
+ # check to ensure the input is an array given that the the attribute
666
+ # is documented as an array but the input is not
667
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
668
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
669
+ end
670
+ elsif !attributes[self.class.attribute_map[key]].nil?
671
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
672
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
673
+ end
674
+
675
+ self
676
+ end
677
+
678
+ # Deserializes the data based on type
679
+ # @param string type Data type
680
+ # @param string value Value to be deserialized
681
+ # @return [Object] Deserialized data
682
+ def _deserialize(type, value)
683
+ case type.to_sym
684
+ when :DateTime
685
+ DateTime.parse(value)
686
+ when :Date
687
+ Date.parse(value)
688
+ when :String
689
+ value.to_s
690
+ when :Integer
691
+ value.to_i
692
+ when :Float
693
+ value.to_f
694
+ when :BOOLEAN
695
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
696
+ true
697
+ else
698
+ false
699
+ end
700
+ when :Object
701
+ # generic object (usually a Hash), return directly
702
+ value
703
+ when /\AArray<(?<inner_type>.+)>\z/
704
+ inner_type = Regexp.last_match[:inner_type]
705
+ value.map { |v| _deserialize(inner_type, v) }
706
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
707
+ k_type = Regexp.last_match[:k_type]
708
+ v_type = Regexp.last_match[:v_type]
709
+ {}.tap do |hash|
710
+ value.each do |k, v|
711
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
712
+ end
713
+ end
714
+ else # model
715
+ temp_model = SignRequestClient.const_get(type).new
716
+ temp_model.build_from_hash(value)
717
+ end
718
+ end
719
+
720
+ # Returns the string representation of the object
721
+ # @return [String] String presentation of the object
722
+ def to_s
723
+ to_hash.to_s
724
+ end
725
+
726
+ # to_body is an alias to to_hash (backward compatibility)
727
+ # @return [Hash] Returns the object in the form of hash
728
+ def to_body
729
+ to_hash
730
+ end
731
+
732
+ # Returns the object in the form of hash
733
+ # @return [Hash] Returns the object in the form of hash
734
+ def to_hash
735
+ hash = {}
736
+ self.class.attribute_map.each_pair do |attr, param|
737
+ value = self.send(attr)
738
+ next if value.nil?
739
+ hash[param] = _to_hash(value)
740
+ end
741
+ hash
742
+ end
743
+
744
+ # Outputs non-array value in the form of hash
745
+ # For object, use to_hash. Otherwise, just return the value
746
+ # @param [Object] value Any valid value
747
+ # @return [Hash] Returns the value in the form of hash
748
+ def _to_hash(value)
749
+ if value.is_a?(Array)
750
+ value.compact.map{ |v| _to_hash(v) }
751
+ elsif value.is_a?(Hash)
752
+ {}.tap do |hash|
753
+ value.each { |k, v| hash[k] = _to_hash(v) }
754
+ end
755
+ elsif value.respond_to? :to_hash
756
+ value.to_hash
757
+ else
758
+ value
759
+ end
760
+ end
761
+
762
+ end
763
+
764
+ end