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