docspring 4.3.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +80 -0
  3. data/.openapi-generator/FILES +84 -0
  4. data/CHANGELOG.md +55 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +20 -1
  7. data/docs/AddTemplateFieldsRequest.md +1 -1
  8. data/docs/Client.md +2311 -766
  9. data/docs/CombinedPdfSource.md +1 -1
  10. data/docs/CreateAccountEmailActionRequest.md +54 -0
  11. data/docs/CreateEmailActionRequest.md +50 -0
  12. data/docs/CreateEmailDomainRequest.md +18 -0
  13. data/docs/CreateSubmissionBatchRequest.md +2 -2
  14. data/docs/CreateSubmissionRequest.md +22 -4
  15. data/docs/CreateTemplateRequest.md +22 -6
  16. data/docs/DnsRecordType.md +15 -0
  17. data/docs/EmailAction.md +76 -0
  18. data/docs/EmailActionConditions.md +20 -0
  19. data/docs/EmailActionConditionsInput.md +20 -0
  20. data/docs/EmailActionCustomization.md +36 -0
  21. data/docs/EmailActionDelivery.md +15 -0
  22. data/docs/EmailActionFileFormats.md +15 -0
  23. data/docs/EmailActionList.md +20 -0
  24. data/docs/EmailActionSetting.md +15 -0
  25. data/docs/EmailActionSubmissionType.md +15 -0
  26. data/docs/EmailActionTestEmail.md +18 -0
  27. data/docs/EmailDomain.md +38 -0
  28. data/docs/EmailDomainDnsRecord.md +24 -0
  29. data/docs/EmailDomainDnsRecordPurpose.md +15 -0
  30. data/docs/EmailDomainList.md +20 -0
  31. data/docs/EmailDomainRecordState.md +15 -0
  32. data/docs/EmailDomainState.md +15 -0
  33. data/docs/ErrorInfo.md +12 -6
  34. data/docs/Field.md +1 -1
  35. data/docs/FieldInput.md +1 -1
  36. data/docs/HtmlEngineOptions.md +1 -1
  37. data/docs/HtmlEngineOptionsInput.md +1 -1
  38. data/docs/SendAccountEmailActionTestEmailRequest.md +18 -0
  39. data/docs/SignatureRequest.md +9 -1
  40. data/docs/SignatureRequestEmailAttachments.md +15 -0
  41. data/docs/SignatureRequestEmailStatus.md +15 -0
  42. data/docs/SignatureRequestInput.md +7 -3
  43. data/docs/SignatureRequestReminders.md +20 -0
  44. data/docs/SigningOrder.md +15 -0
  45. data/docs/Submission.md +4 -2
  46. data/docs/SubmissionAction.md +5 -3
  47. data/docs/SubmissionInput.md +3 -3
  48. data/docs/SubmissionSummary.md +1 -1
  49. data/docs/Template.md +23 -7
  50. data/docs/TemplateSourcePdf.md +1 -1
  51. data/docs/TemplateSummary.md +4 -4
  52. data/docs/UpdateAccountEmailActionRequest.md +54 -0
  53. data/docs/UpdateEmailActionCustomizationRequest.md +46 -0
  54. data/docs/UpdateEmailActionRequest.md +50 -0
  55. data/docs/UpdateTemplateDocumentRequest.md +1 -1
  56. data/docs/UpdateTemplateRequest.md +21 -5
  57. data/docs/ValidateSubmissionRequest.md +22 -4
  58. data/lib/docspring/api/client.rb +1749 -314
  59. data/lib/docspring/api_client.rb +1 -1
  60. data/lib/docspring/models/add_template_fields_request.rb +1 -1
  61. data/lib/docspring/models/combined_pdf_source.rb +1 -1
  62. data/lib/docspring/models/create_account_email_action_request.rb +388 -0
  63. data/lib/docspring/models/create_email_action_request.rb +364 -0
  64. data/lib/docspring/models/create_email_domain_request.rb +185 -0
  65. data/lib/docspring/models/create_submission_batch_request.rb +2 -2
  66. data/lib/docspring/models/create_submission_request.rb +143 -7
  67. data/lib/docspring/models/create_template_request.rb +107 -7
  68. data/lib/docspring/models/dns_record_type.rb +42 -0
  69. data/lib/docspring/models/email_action.rb +790 -0
  70. data/lib/docspring/models/email_action_conditions.rb +219 -0
  71. data/lib/docspring/models/email_action_conditions_input.rb +219 -0
  72. data/lib/docspring/models/email_action_customization.rb +360 -0
  73. data/lib/docspring/models/email_action_delivery.rb +41 -0
  74. data/lib/docspring/models/email_action_file_formats.rb +43 -0
  75. data/lib/docspring/models/email_action_list.rb +200 -0
  76. data/lib/docspring/models/email_action_setting.rb +53 -0
  77. data/lib/docspring/models/email_action_submission_type.rb +42 -0
  78. data/lib/docspring/models/email_action_test_email.rb +185 -0
  79. data/lib/docspring/models/email_domain.rb +423 -0
  80. data/lib/docspring/models/email_domain_dns_record.rb +288 -0
  81. data/lib/docspring/models/email_domain_dns_record_purpose.rb +42 -0
  82. data/lib/docspring/models/email_domain_list.rb +200 -0
  83. data/lib/docspring/models/email_domain_record_state.rb +42 -0
  84. data/lib/docspring/models/email_domain_state.rb +42 -0
  85. data/lib/docspring/models/error_code.rb +3 -1
  86. data/lib/docspring/models/error_info.rb +39 -9
  87. data/lib/docspring/models/field.rb +1 -1
  88. data/lib/docspring/models/field_input.rb +1 -1
  89. data/lib/docspring/models/html_engine_options.rb +1 -1
  90. data/lib/docspring/models/html_engine_options_input.rb +1 -1
  91. data/lib/docspring/models/send_account_email_action_test_email_request.rb +168 -0
  92. data/lib/docspring/models/signature_request.rb +68 -2
  93. data/lib/docspring/models/signature_request_email_attachments.rb +41 -0
  94. data/lib/docspring/models/signature_request_email_status.rb +47 -0
  95. data/lib/docspring/models/signature_request_event_type.rb +3 -1
  96. data/lib/docspring/models/signature_request_input.rb +25 -22
  97. data/lib/docspring/models/signature_request_reminders.rb +212 -0
  98. data/lib/docspring/models/signing_order.rb +41 -0
  99. data/lib/docspring/models/string_condition_type.rb +8 -1
  100. data/lib/docspring/models/submission.rb +30 -3
  101. data/lib/docspring/models/submission_action.rb +18 -5
  102. data/lib/docspring/models/submission_input.rb +3 -3
  103. data/lib/docspring/models/submission_summary.rb +1 -1
  104. data/lib/docspring/models/template.rb +144 -8
  105. data/lib/docspring/models/template_source_pdf.rb +1 -1
  106. data/lib/docspring/models/template_summary.rb +4 -4
  107. data/lib/docspring/models/template_type.rb +2 -1
  108. data/lib/docspring/models/update_account_email_action_request.rb +388 -0
  109. data/lib/docspring/models/update_email_action_customization_request.rb +343 -0
  110. data/lib/docspring/models/update_email_action_request.rb +364 -0
  111. data/lib/docspring/models/update_template_document_request.rb +1 -1
  112. data/lib/docspring/models/update_template_request.rb +108 -8
  113. data/lib/docspring/models/validate_submission_request.rb +143 -7
  114. data/lib/docspring/models/webhook_event_type.rb +3 -1
  115. data/lib/docspring/request_schemas.json +1691 -145
  116. data/lib/docspring/request_validator.rb +4 -0
  117. data/lib/docspring/version.rb +1 -1
  118. data/lib/docspring.rb +28 -0
  119. data/spec/api/client_spec.rb +306 -18
  120. data/spec/models/create_account_email_action_request_spec.rb +144 -0
  121. data/spec/models/create_email_action_request_spec.rb +132 -0
  122. data/spec/models/create_email_domain_request_spec.rb +36 -0
  123. data/spec/models/create_submission_request_spec.rb +54 -0
  124. data/spec/models/create_template_request_spec.rb +48 -0
  125. data/spec/models/dns_record_type_spec.rb +30 -0
  126. data/spec/models/email_action_conditions_input_spec.rb +42 -0
  127. data/spec/models/email_action_conditions_spec.rb +42 -0
  128. data/spec/models/email_action_customization_spec.rb +90 -0
  129. data/spec/models/email_action_delivery_spec.rb +30 -0
  130. data/spec/models/email_action_file_formats_spec.rb +30 -0
  131. data/spec/models/email_action_list_spec.rb +42 -0
  132. data/spec/models/email_action_setting_spec.rb +30 -0
  133. data/spec/models/email_action_spec.rb +210 -0
  134. data/spec/models/email_action_submission_type_spec.rb +30 -0
  135. data/spec/models/email_action_test_email_spec.rb +36 -0
  136. data/spec/models/email_domain_dns_record_purpose_spec.rb +30 -0
  137. data/spec/models/email_domain_dns_record_spec.rb +54 -0
  138. data/spec/models/email_domain_list_spec.rb +42 -0
  139. data/spec/models/email_domain_record_state_spec.rb +30 -0
  140. data/spec/models/email_domain_spec.rb +96 -0
  141. data/spec/models/email_domain_state_spec.rb +30 -0
  142. data/spec/models/error_info_spec.rb +18 -0
  143. data/spec/models/send_account_email_action_test_email_request_spec.rb +36 -0
  144. data/spec/models/signature_request_email_attachments_spec.rb +30 -0
  145. data/spec/models/signature_request_email_status_spec.rb +30 -0
  146. data/spec/models/signature_request_input_spec.rb +12 -0
  147. data/spec/models/signature_request_reminders_spec.rb +42 -0
  148. data/spec/models/signature_request_spec.rb +24 -0
  149. data/spec/models/signing_order_spec.rb +30 -0
  150. data/spec/models/submission_action_spec.rb +6 -0
  151. data/spec/models/submission_spec.rb +6 -0
  152. data/spec/models/template_spec.rb +48 -0
  153. data/spec/models/update_account_email_action_request_spec.rb +144 -0
  154. data/spec/models/update_email_action_customization_request_spec.rb +120 -0
  155. data/spec/models/update_email_action_request_spec.rb +132 -0
  156. data/spec/models/update_template_request_spec.rb +48 -0
  157. data/spec/models/validate_submission_request_spec.rb +54 -0
  158. metadata +115 -4
  159. data/.gitlab-ci.yml +0 -26
  160. data/.travis.yml +0 -11
@@ -0,0 +1,360 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ # A template's changes to an account email action.
18
+ class EmailActionCustomization < ApiModelBase
19
+ # Whether the account email action sends for this template. It also needs to be on itself (`enabled`).
20
+ attr_accessor :enabled
21
+
22
+ # The settings this template changes. The others follow the account email action.
23
+ attr_accessor :customized
24
+
25
+ # How many of this template's emails in a row have failed because of a setting it changes.
26
+ attr_accessor :consecutive_failures
27
+
28
+ # When the current run of those failures started.
29
+ attr_accessor :failing_since
30
+
31
+ # When one of those emails last failed.
32
+ attr_accessor :last_failure_at
33
+
34
+ # Why it failed.
35
+ attr_accessor :last_failure_message
36
+
37
+ # When DocSpring turned the email action off for this template, such as when an address the template added bounced.
38
+ attr_accessor :disabled_at
39
+
40
+ # Why DocSpring turned it off for this template.
41
+ attr_accessor :disabled_reason
42
+
43
+ # When the template first changed the email action.
44
+ attr_accessor :created_at
45
+
46
+ # When the template's changes last changed.
47
+ attr_accessor :updated_at
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'enabled' => :'enabled',
53
+ :'customized' => :'customized',
54
+ :'consecutive_failures' => :'consecutive_failures',
55
+ :'failing_since' => :'failing_since',
56
+ :'last_failure_at' => :'last_failure_at',
57
+ :'last_failure_message' => :'last_failure_message',
58
+ :'disabled_at' => :'disabled_at',
59
+ :'disabled_reason' => :'disabled_reason',
60
+ :'created_at' => :'created_at',
61
+ :'updated_at' => :'updated_at'
62
+ }
63
+ end
64
+
65
+ # Returns attribute mapping this model knows about
66
+ def self.acceptable_attribute_map
67
+ attribute_map
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ acceptable_attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'enabled' => :'Boolean',
79
+ :'customized' => :'Array<EmailActionSetting>',
80
+ :'consecutive_failures' => :'Integer',
81
+ :'failing_since' => :'Time',
82
+ :'last_failure_at' => :'Time',
83
+ :'last_failure_message' => :'String',
84
+ :'disabled_at' => :'Time',
85
+ :'disabled_reason' => :'String',
86
+ :'created_at' => :'Time',
87
+ :'updated_at' => :'Time'
88
+ }
89
+ end
90
+
91
+ # List of attributes with nullable: true
92
+ def self.openapi_nullable
93
+ Set.new([
94
+ :'failing_since',
95
+ :'last_failure_at',
96
+ :'last_failure_message',
97
+ :'disabled_at',
98
+ :'disabled_reason',
99
+ ])
100
+ end
101
+
102
+ # Returns attribute type mapping
103
+ def self.acceptable_openapi_types
104
+ openapi_types
105
+ end
106
+
107
+ # Returns the nullable attributes
108
+ def self.acceptable_openapi_nullable
109
+ openapi_nullable
110
+ end
111
+
112
+ # Initializes the object
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ def initialize(attributes = {})
115
+ if (!attributes.is_a?(Hash))
116
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::EmailActionCustomization` initialize method"
117
+ end
118
+
119
+ # check to see if the attribute exists and convert string to symbol for hash key
120
+ acceptable_attribute_map = self.class.acceptable_attribute_map
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!acceptable_attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::EmailActionCustomization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'enabled')
129
+ self.enabled = attributes[:'enabled']
130
+ else
131
+ self.enabled = nil
132
+ end
133
+
134
+ if attributes.key?(:'customized')
135
+ if (value = attributes[:'customized']).is_a?(Array)
136
+ self.customized = value
137
+ end
138
+ else
139
+ self.customized = nil
140
+ end
141
+
142
+ if attributes.key?(:'consecutive_failures')
143
+ self.consecutive_failures = attributes[:'consecutive_failures']
144
+ else
145
+ self.consecutive_failures = nil
146
+ end
147
+
148
+ if attributes.key?(:'failing_since')
149
+ self.failing_since = attributes[:'failing_since']
150
+ else
151
+ self.failing_since = nil
152
+ end
153
+
154
+ if attributes.key?(:'last_failure_at')
155
+ self.last_failure_at = attributes[:'last_failure_at']
156
+ else
157
+ self.last_failure_at = nil
158
+ end
159
+
160
+ if attributes.key?(:'last_failure_message')
161
+ self.last_failure_message = attributes[:'last_failure_message']
162
+ else
163
+ self.last_failure_message = nil
164
+ end
165
+
166
+ if attributes.key?(:'disabled_at')
167
+ self.disabled_at = attributes[:'disabled_at']
168
+ else
169
+ self.disabled_at = nil
170
+ end
171
+
172
+ if attributes.key?(:'disabled_reason')
173
+ self.disabled_reason = attributes[:'disabled_reason']
174
+ else
175
+ self.disabled_reason = nil
176
+ end
177
+
178
+ if attributes.key?(:'created_at')
179
+ self.created_at = attributes[:'created_at']
180
+ else
181
+ self.created_at = nil
182
+ end
183
+
184
+ if attributes.key?(:'updated_at')
185
+ self.updated_at = attributes[:'updated_at']
186
+ else
187
+ self.updated_at = nil
188
+ end
189
+ end
190
+
191
+ # Show invalid properties with the reasons. Usually used together with valid?
192
+ # @return Array for valid properties with the reasons
193
+ def list_invalid_properties
194
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
195
+ invalid_properties = Array.new
196
+ if @enabled.nil?
197
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
198
+ end
199
+
200
+ if @customized.nil?
201
+ invalid_properties.push('invalid value for "customized", customized cannot be nil.')
202
+ end
203
+
204
+ if @consecutive_failures.nil?
205
+ invalid_properties.push('invalid value for "consecutive_failures", consecutive_failures cannot be nil.')
206
+ end
207
+
208
+ if @created_at.nil?
209
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
210
+ end
211
+
212
+ if @updated_at.nil?
213
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
214
+ end
215
+
216
+ invalid_properties
217
+ end
218
+
219
+ # Check to see if the all the properties in the model are valid
220
+ # @return true if the model is valid
221
+ def valid?
222
+ warn '[DEPRECATED] the `valid?` method is obsolete'
223
+ return false if @enabled.nil?
224
+ return false if @customized.nil?
225
+ return false if @consecutive_failures.nil?
226
+ return false if @created_at.nil?
227
+ return false if @updated_at.nil?
228
+ true
229
+ end
230
+
231
+ # Custom attribute writer method with validation
232
+ # @param [Object] enabled Value to be assigned
233
+ def enabled=(enabled)
234
+ if enabled.nil?
235
+ fail ArgumentError, 'enabled cannot be nil'
236
+ end
237
+
238
+ @enabled = enabled
239
+ end
240
+
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] customized Value to be assigned
243
+ def customized=(customized)
244
+ if customized.nil?
245
+ fail ArgumentError, 'customized cannot be nil'
246
+ end
247
+
248
+ @customized = customized
249
+ end
250
+
251
+ # Custom attribute writer method with validation
252
+ # @param [Object] consecutive_failures Value to be assigned
253
+ def consecutive_failures=(consecutive_failures)
254
+ if consecutive_failures.nil?
255
+ fail ArgumentError, 'consecutive_failures cannot be nil'
256
+ end
257
+
258
+ @consecutive_failures = consecutive_failures
259
+ end
260
+
261
+ # Custom attribute writer method with validation
262
+ # @param [Object] created_at Value to be assigned
263
+ def created_at=(created_at)
264
+ if created_at.nil?
265
+ fail ArgumentError, 'created_at cannot be nil'
266
+ end
267
+
268
+ @created_at = created_at
269
+ end
270
+
271
+ # Custom attribute writer method with validation
272
+ # @param [Object] updated_at Value to be assigned
273
+ def updated_at=(updated_at)
274
+ if updated_at.nil?
275
+ fail ArgumentError, 'updated_at cannot be nil'
276
+ end
277
+
278
+ @updated_at = updated_at
279
+ end
280
+
281
+ # Checks equality by comparing each attribute.
282
+ # @param [Object] Object to be compared
283
+ def ==(o)
284
+ return true if self.equal?(o)
285
+ self.class == o.class &&
286
+ enabled == o.enabled &&
287
+ customized == o.customized &&
288
+ consecutive_failures == o.consecutive_failures &&
289
+ failing_since == o.failing_since &&
290
+ last_failure_at == o.last_failure_at &&
291
+ last_failure_message == o.last_failure_message &&
292
+ disabled_at == o.disabled_at &&
293
+ disabled_reason == o.disabled_reason &&
294
+ created_at == o.created_at &&
295
+ updated_at == o.updated_at
296
+ end
297
+
298
+ # @see the `==` method
299
+ # @param [Object] Object to be compared
300
+ def eql?(o)
301
+ self == o
302
+ end
303
+
304
+ # Calculates hash code according to all attributes.
305
+ # @return [Integer] Hash code
306
+ def hash
307
+ [enabled, customized, consecutive_failures, failing_since, last_failure_at, last_failure_message, disabled_at, disabled_reason, created_at, updated_at].hash
308
+ end
309
+
310
+ # Builds the object from hash
311
+ # @param [Hash] attributes Model attributes in the form of hash
312
+ # @return [Object] Returns the model itself
313
+ def self.build_from_hash(attributes)
314
+ return nil unless attributes.is_a?(Hash)
315
+ attributes = attributes.transform_keys(&:to_sym)
316
+ # include attributes inherited from allOf parents (the nearest declaration wins)
317
+ map = acceptable_attribute_map
318
+ transformed_hash = {}
319
+ acceptable_openapi_types.each_pair do |key, type|
320
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
321
+ transformed_hash["#{key}"] = nil
322
+ elsif type =~ /\AArray<(.*)>/i
323
+ # check to ensure the input is an array given that the attribute
324
+ # is documented as an array but the input is not
325
+ if attributes[map[key]].is_a?(Array)
326
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
327
+ end
328
+ elsif !attributes[map[key]].nil?
329
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
330
+ end
331
+ end
332
+ # Responses can include enum values added after this client was released, so the enum setters
333
+ # accept any value while the model is built from a response
334
+ allocate.tap do |model|
335
+ model.instance_variable_set(:@_skip_enum_validation, true)
336
+ model.send(:initialize, transformed_hash)
337
+ model.remove_instance_variable(:@_skip_enum_validation)
338
+ end
339
+ end
340
+
341
+ # Returns the object in the form of hash
342
+ # @return [Hash] Returns the object in the form of hash
343
+ def to_hash
344
+ hash = {}
345
+ # include attributes inherited from allOf parents (the nearest declaration wins)
346
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
347
+ value = self.send(attr)
348
+ if value.nil?
349
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
350
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
351
+ end
352
+
353
+ hash[param] = _to_hash(value)
354
+ end
355
+ hash
356
+ end
357
+
358
+ end
359
+
360
+ end
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ class EmailActionDelivery
18
+ ATTACHMENT = "attachment".freeze
19
+ LINK = "link".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [ATTACHMENT, LINK].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
37
+ # is: the constants are the values this client knows
38
+ value
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,43 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ class EmailActionFileFormats
18
+ DOCX = "docx".freeze
19
+ ODT = "odt".freeze
20
+ PDF = "pdf".freeze
21
+ ALL = "all".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [DOCX, ODT, PDF, ALL].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
39
+ # is: the constants are the values this client knows
40
+ value
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,200 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ # A page of a template's email actions, newest first.
18
+ class EmailActionList < ApiModelBase
19
+ # The items on this page.
20
+ attr_accessor :data
21
+
22
+ # Pass it as `cursor` to get the next page. Null on the last page.
23
+ attr_accessor :next_cursor
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'data' => :'data',
29
+ :'next_cursor' => :'next_cursor'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'data' => :'Array<EmailAction>',
47
+ :'next_cursor' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ :'next_cursor'
55
+ ])
56
+ end
57
+
58
+ # Returns attribute type mapping
59
+ def self.acceptable_openapi_types
60
+ openapi_types
61
+ end
62
+
63
+ # Returns the nullable attributes
64
+ def self.acceptable_openapi_nullable
65
+ openapi_nullable
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::EmailActionList` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ acceptable_attribute_map = self.class.acceptable_attribute_map
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!acceptable_attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::EmailActionList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'data')
85
+ if (value = attributes[:'data']).is_a?(Array)
86
+ self.data = value
87
+ end
88
+ else
89
+ self.data = nil
90
+ end
91
+
92
+ if attributes.key?(:'next_cursor')
93
+ self.next_cursor = attributes[:'next_cursor']
94
+ else
95
+ self.next_cursor = nil
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ if @data.nil?
105
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @data.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] data Value to be assigned
121
+ def data=(data)
122
+ if data.nil?
123
+ fail ArgumentError, 'data cannot be nil'
124
+ end
125
+
126
+ @data = data
127
+ end
128
+
129
+ # Checks equality by comparing each attribute.
130
+ # @param [Object] Object to be compared
131
+ def ==(o)
132
+ return true if self.equal?(o)
133
+ self.class == o.class &&
134
+ data == o.data &&
135
+ next_cursor == o.next_cursor
136
+ end
137
+
138
+ # @see the `==` method
139
+ # @param [Object] Object to be compared
140
+ def eql?(o)
141
+ self == o
142
+ end
143
+
144
+ # Calculates hash code according to all attributes.
145
+ # @return [Integer] Hash code
146
+ def hash
147
+ [data, next_cursor].hash
148
+ end
149
+
150
+ # Builds the object from hash
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ # @return [Object] Returns the model itself
153
+ def self.build_from_hash(attributes)
154
+ return nil unless attributes.is_a?(Hash)
155
+ attributes = attributes.transform_keys(&:to_sym)
156
+ # include attributes inherited from allOf parents (the nearest declaration wins)
157
+ map = acceptable_attribute_map
158
+ transformed_hash = {}
159
+ acceptable_openapi_types.each_pair do |key, type|
160
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
170
+ end
171
+ end
172
+ # Responses can include enum values added after this client was released, so the enum setters
173
+ # accept any value while the model is built from a response
174
+ allocate.tap do |model|
175
+ model.instance_variable_set(:@_skip_enum_validation, true)
176
+ model.send(:initialize, transformed_hash)
177
+ model.remove_instance_variable(:@_skip_enum_validation)
178
+ end
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ # include attributes inherited from allOf parents (the nearest declaration wins)
186
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ end
199
+
200
+ end
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ class EmailActionSetting
18
+ TO = "to".freeze
19
+ CC = "cc".freeze
20
+ BCC = "bcc".freeze
21
+ FROM_NAME = "from_name".freeze
22
+ FROM_ADDRESS = "from_address".freeze
23
+ REPLY_TO = "reply_to".freeze
24
+ SUBJECT = "subject".freeze
25
+ MESSAGE = "message".freeze
26
+ FILE_NAME = "file_name".freeze
27
+ FILE_FORMATS = "file_formats".freeze
28
+ DELIVERY = "delivery".freeze
29
+ MAX_ATTACHMENT_MB = "max_attachment_mb".freeze
30
+ SUBMISSION_TYPE = "submission_type".freeze
31
+ SEND_WHEN = "send_when".freeze
32
+
33
+ def self.all_vars
34
+ @all_vars ||= [TO, CC, BCC, FROM_NAME, FROM_ADDRESS, REPLY_TO, SUBJECT, MESSAGE, FILE_NAME, FILE_FORMATS, DELIVERY, MAX_ATTACHMENT_MB, SUBMISSION_TYPE, SEND_WHEN].freeze
35
+ end
36
+
37
+ # Builds the enum from string
38
+ # @param [String] The enum value in the form of the string
39
+ # @return [String] The enum value
40
+ def self.build_from_hash(value)
41
+ new.build_from_hash(value)
42
+ end
43
+
44
+ # Builds the enum from string
45
+ # @param [String] The enum value in the form of the string
46
+ # @return [String] The enum value
47
+ def build_from_hash(value)
48
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
49
+ # is: the constants are the values this client knows
50
+ value
51
+ end
52
+ end
53
+ end