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.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +80 -0
- data/.openapi-generator/FILES +84 -0
- data/CHANGELOG.md +55 -0
- data/Gemfile.lock +2 -2
- data/README.md +20 -1
- data/docs/AddTemplateFieldsRequest.md +1 -1
- data/docs/Client.md +2311 -766
- data/docs/CombinedPdfSource.md +1 -1
- data/docs/CreateAccountEmailActionRequest.md +54 -0
- data/docs/CreateEmailActionRequest.md +50 -0
- data/docs/CreateEmailDomainRequest.md +18 -0
- data/docs/CreateSubmissionBatchRequest.md +2 -2
- data/docs/CreateSubmissionRequest.md +22 -4
- data/docs/CreateTemplateRequest.md +22 -6
- data/docs/DnsRecordType.md +15 -0
- data/docs/EmailAction.md +76 -0
- data/docs/EmailActionConditions.md +20 -0
- data/docs/EmailActionConditionsInput.md +20 -0
- data/docs/EmailActionCustomization.md +36 -0
- data/docs/EmailActionDelivery.md +15 -0
- data/docs/EmailActionFileFormats.md +15 -0
- data/docs/EmailActionList.md +20 -0
- data/docs/EmailActionSetting.md +15 -0
- data/docs/EmailActionSubmissionType.md +15 -0
- data/docs/EmailActionTestEmail.md +18 -0
- data/docs/EmailDomain.md +38 -0
- data/docs/EmailDomainDnsRecord.md +24 -0
- data/docs/EmailDomainDnsRecordPurpose.md +15 -0
- data/docs/EmailDomainList.md +20 -0
- data/docs/EmailDomainRecordState.md +15 -0
- data/docs/EmailDomainState.md +15 -0
- data/docs/ErrorInfo.md +12 -6
- data/docs/Field.md +1 -1
- data/docs/FieldInput.md +1 -1
- data/docs/HtmlEngineOptions.md +1 -1
- data/docs/HtmlEngineOptionsInput.md +1 -1
- data/docs/SendAccountEmailActionTestEmailRequest.md +18 -0
- data/docs/SignatureRequest.md +9 -1
- data/docs/SignatureRequestEmailAttachments.md +15 -0
- data/docs/SignatureRequestEmailStatus.md +15 -0
- data/docs/SignatureRequestInput.md +7 -3
- data/docs/SignatureRequestReminders.md +20 -0
- data/docs/SigningOrder.md +15 -0
- data/docs/Submission.md +4 -2
- data/docs/SubmissionAction.md +5 -3
- data/docs/SubmissionInput.md +3 -3
- data/docs/SubmissionSummary.md +1 -1
- data/docs/Template.md +23 -7
- data/docs/TemplateSourcePdf.md +1 -1
- data/docs/TemplateSummary.md +4 -4
- data/docs/UpdateAccountEmailActionRequest.md +54 -0
- data/docs/UpdateEmailActionCustomizationRequest.md +46 -0
- data/docs/UpdateEmailActionRequest.md +50 -0
- data/docs/UpdateTemplateDocumentRequest.md +1 -1
- data/docs/UpdateTemplateRequest.md +21 -5
- data/docs/ValidateSubmissionRequest.md +22 -4
- data/lib/docspring/api/client.rb +1749 -314
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/models/add_template_fields_request.rb +1 -1
- data/lib/docspring/models/combined_pdf_source.rb +1 -1
- data/lib/docspring/models/create_account_email_action_request.rb +388 -0
- data/lib/docspring/models/create_email_action_request.rb +364 -0
- data/lib/docspring/models/create_email_domain_request.rb +185 -0
- data/lib/docspring/models/create_submission_batch_request.rb +2 -2
- data/lib/docspring/models/create_submission_request.rb +143 -7
- data/lib/docspring/models/create_template_request.rb +107 -7
- data/lib/docspring/models/dns_record_type.rb +42 -0
- data/lib/docspring/models/email_action.rb +790 -0
- data/lib/docspring/models/email_action_conditions.rb +219 -0
- data/lib/docspring/models/email_action_conditions_input.rb +219 -0
- data/lib/docspring/models/email_action_customization.rb +360 -0
- data/lib/docspring/models/email_action_delivery.rb +41 -0
- data/lib/docspring/models/email_action_file_formats.rb +43 -0
- data/lib/docspring/models/email_action_list.rb +200 -0
- data/lib/docspring/models/email_action_setting.rb +53 -0
- data/lib/docspring/models/email_action_submission_type.rb +42 -0
- data/lib/docspring/models/email_action_test_email.rb +185 -0
- data/lib/docspring/models/email_domain.rb +423 -0
- data/lib/docspring/models/email_domain_dns_record.rb +288 -0
- data/lib/docspring/models/email_domain_dns_record_purpose.rb +42 -0
- data/lib/docspring/models/email_domain_list.rb +200 -0
- data/lib/docspring/models/email_domain_record_state.rb +42 -0
- data/lib/docspring/models/email_domain_state.rb +42 -0
- data/lib/docspring/models/error_code.rb +3 -1
- data/lib/docspring/models/error_info.rb +39 -9
- data/lib/docspring/models/field.rb +1 -1
- data/lib/docspring/models/field_input.rb +1 -1
- data/lib/docspring/models/html_engine_options.rb +1 -1
- data/lib/docspring/models/html_engine_options_input.rb +1 -1
- data/lib/docspring/models/send_account_email_action_test_email_request.rb +168 -0
- data/lib/docspring/models/signature_request.rb +68 -2
- data/lib/docspring/models/signature_request_email_attachments.rb +41 -0
- data/lib/docspring/models/signature_request_email_status.rb +47 -0
- data/lib/docspring/models/signature_request_event_type.rb +3 -1
- data/lib/docspring/models/signature_request_input.rb +25 -22
- data/lib/docspring/models/signature_request_reminders.rb +212 -0
- data/lib/docspring/models/signing_order.rb +41 -0
- data/lib/docspring/models/string_condition_type.rb +8 -1
- data/lib/docspring/models/submission.rb +30 -3
- data/lib/docspring/models/submission_action.rb +18 -5
- data/lib/docspring/models/submission_input.rb +3 -3
- data/lib/docspring/models/submission_summary.rb +1 -1
- data/lib/docspring/models/template.rb +144 -8
- data/lib/docspring/models/template_source_pdf.rb +1 -1
- data/lib/docspring/models/template_summary.rb +4 -4
- data/lib/docspring/models/template_type.rb +2 -1
- data/lib/docspring/models/update_account_email_action_request.rb +388 -0
- data/lib/docspring/models/update_email_action_customization_request.rb +343 -0
- data/lib/docspring/models/update_email_action_request.rb +364 -0
- data/lib/docspring/models/update_template_document_request.rb +1 -1
- data/lib/docspring/models/update_template_request.rb +108 -8
- data/lib/docspring/models/validate_submission_request.rb +143 -7
- data/lib/docspring/models/webhook_event_type.rb +3 -1
- data/lib/docspring/request_schemas.json +1691 -145
- data/lib/docspring/request_validator.rb +4 -0
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +28 -0
- data/spec/api/client_spec.rb +306 -18
- data/spec/models/create_account_email_action_request_spec.rb +144 -0
- data/spec/models/create_email_action_request_spec.rb +132 -0
- data/spec/models/create_email_domain_request_spec.rb +36 -0
- data/spec/models/create_submission_request_spec.rb +54 -0
- data/spec/models/create_template_request_spec.rb +48 -0
- data/spec/models/dns_record_type_spec.rb +30 -0
- data/spec/models/email_action_conditions_input_spec.rb +42 -0
- data/spec/models/email_action_conditions_spec.rb +42 -0
- data/spec/models/email_action_customization_spec.rb +90 -0
- data/spec/models/email_action_delivery_spec.rb +30 -0
- data/spec/models/email_action_file_formats_spec.rb +30 -0
- data/spec/models/email_action_list_spec.rb +42 -0
- data/spec/models/email_action_setting_spec.rb +30 -0
- data/spec/models/email_action_spec.rb +210 -0
- data/spec/models/email_action_submission_type_spec.rb +30 -0
- data/spec/models/email_action_test_email_spec.rb +36 -0
- data/spec/models/email_domain_dns_record_purpose_spec.rb +30 -0
- data/spec/models/email_domain_dns_record_spec.rb +54 -0
- data/spec/models/email_domain_list_spec.rb +42 -0
- data/spec/models/email_domain_record_state_spec.rb +30 -0
- data/spec/models/email_domain_spec.rb +96 -0
- data/spec/models/email_domain_state_spec.rb +30 -0
- data/spec/models/error_info_spec.rb +18 -0
- data/spec/models/send_account_email_action_test_email_request_spec.rb +36 -0
- data/spec/models/signature_request_email_attachments_spec.rb +30 -0
- data/spec/models/signature_request_email_status_spec.rb +30 -0
- data/spec/models/signature_request_input_spec.rb +12 -0
- data/spec/models/signature_request_reminders_spec.rb +42 -0
- data/spec/models/signature_request_spec.rb +24 -0
- data/spec/models/signing_order_spec.rb +30 -0
- data/spec/models/submission_action_spec.rb +6 -0
- data/spec/models/submission_spec.rb +6 -0
- data/spec/models/template_spec.rb +48 -0
- data/spec/models/update_account_email_action_request_spec.rb +144 -0
- data/spec/models/update_email_action_customization_request_spec.rb +120 -0
- data/spec/models/update_email_action_request_spec.rb +132 -0
- data/spec/models/update_template_request_spec.rb +48 -0
- data/spec/models/validate_submission_request_spec.rb +54 -0
- metadata +115 -4
- data/.gitlab-ci.yml +0 -26
- data/.travis.yml +0 -11
|
@@ -19,7 +19,7 @@ module DocSpring
|
|
|
19
19
|
# The name of the person the request is for.
|
|
20
20
|
attr_accessor :name
|
|
21
21
|
|
|
22
|
-
# Their email address.
|
|
22
|
+
# Their email address. Null when they have none.
|
|
23
23
|
attr_accessor :email
|
|
24
24
|
|
|
25
25
|
# The fields this person fills in. Each field can only be in one signature request, and a field that `data` fills in needs `prefilled_values_editable`.
|
|
@@ -61,6 +61,12 @@ module DocSpring
|
|
|
61
61
|
# Let the person change the values that `data` already has for fields in `fields`. Without it, those fields are a 422.
|
|
62
62
|
attr_accessor :prefilled_values_editable
|
|
63
63
|
|
|
64
|
+
# Whether DocSpring emails this person their signing link. Default: the submission's `send_email`. Set it to false for someone who signs in your app (embedded signing) or whose link you send yourself. When DocSpring emails them, `email` is required and `auth_type` is `email_link` (the default). Otherwise `auth_type` is required.
|
|
65
|
+
attr_accessor :send_email
|
|
66
|
+
|
|
67
|
+
# When this person signs, with `signing_order: sequential`: everyone in step 1 first, then step 2, and so on. People in the same step sign in any order. Only the order of the numbers matters. Either every signature request has a `signing_step` or none does; without them, each person is a step of their own, in the order of `signature_requests`.
|
|
68
|
+
attr_accessor :signing_step
|
|
69
|
+
|
|
64
70
|
class EnumAttributeValidator
|
|
65
71
|
attr_reader :datatype
|
|
66
72
|
attr_reader :allowable_values
|
|
@@ -100,7 +106,9 @@ module DocSpring
|
|
|
100
106
|
:'auth_username_hash' => :'auth_username_hash',
|
|
101
107
|
:'auth_phone_number_hash' => :'auth_phone_number_hash',
|
|
102
108
|
:'ignore_unknown_fields' => :'ignore_unknown_fields',
|
|
103
|
-
:'prefilled_values_editable' => :'prefilled_values_editable'
|
|
109
|
+
:'prefilled_values_editable' => :'prefilled_values_editable',
|
|
110
|
+
:'send_email' => :'send_email',
|
|
111
|
+
:'signing_step' => :'signing_step'
|
|
104
112
|
}
|
|
105
113
|
end
|
|
106
114
|
|
|
@@ -131,7 +139,9 @@ module DocSpring
|
|
|
131
139
|
:'auth_username_hash' => :'String',
|
|
132
140
|
:'auth_phone_number_hash' => :'String',
|
|
133
141
|
:'ignore_unknown_fields' => :'Boolean',
|
|
134
|
-
:'prefilled_values_editable' => :'Boolean'
|
|
142
|
+
:'prefilled_values_editable' => :'Boolean',
|
|
143
|
+
:'send_email' => :'Boolean',
|
|
144
|
+
:'signing_step' => :'Integer'
|
|
135
145
|
}
|
|
136
146
|
end
|
|
137
147
|
|
|
@@ -203,8 +213,6 @@ module DocSpring
|
|
|
203
213
|
|
|
204
214
|
if attributes.key?(:'auth_type')
|
|
205
215
|
self.auth_type = attributes[:'auth_type']
|
|
206
|
-
else
|
|
207
|
-
self.auth_type = nil
|
|
208
216
|
end
|
|
209
217
|
|
|
210
218
|
if attributes.key?(:'auth_second_factor_type')
|
|
@@ -242,6 +250,14 @@ module DocSpring
|
|
|
242
250
|
if attributes.key?(:'prefilled_values_editable')
|
|
243
251
|
self.prefilled_values_editable = attributes[:'prefilled_values_editable']
|
|
244
252
|
end
|
|
253
|
+
|
|
254
|
+
if attributes.key?(:'send_email')
|
|
255
|
+
self.send_email = attributes[:'send_email']
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if attributes.key?(:'signing_step')
|
|
259
|
+
self.signing_step = attributes[:'signing_step']
|
|
260
|
+
end
|
|
245
261
|
end
|
|
246
262
|
|
|
247
263
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -253,10 +269,6 @@ module DocSpring
|
|
|
253
269
|
invalid_properties.push('invalid value for "fields", fields cannot be nil.')
|
|
254
270
|
end
|
|
255
271
|
|
|
256
|
-
if @auth_type.nil?
|
|
257
|
-
invalid_properties.push('invalid value for "auth_type", auth_type cannot be nil.')
|
|
258
|
-
end
|
|
259
|
-
|
|
260
272
|
invalid_properties
|
|
261
273
|
end
|
|
262
274
|
|
|
@@ -265,7 +277,6 @@ module DocSpring
|
|
|
265
277
|
def valid?
|
|
266
278
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
267
279
|
return false if @fields.nil?
|
|
268
|
-
return false if @auth_type.nil?
|
|
269
280
|
true
|
|
270
281
|
end
|
|
271
282
|
|
|
@@ -279,16 +290,6 @@ module DocSpring
|
|
|
279
290
|
@fields = fields
|
|
280
291
|
end
|
|
281
292
|
|
|
282
|
-
# Custom attribute writer method with validation
|
|
283
|
-
# @param [Object] auth_type Value to be assigned
|
|
284
|
-
def auth_type=(auth_type)
|
|
285
|
-
if auth_type.nil?
|
|
286
|
-
fail ArgumentError, 'auth_type cannot be nil'
|
|
287
|
-
end
|
|
288
|
-
|
|
289
|
-
@auth_type = auth_type
|
|
290
|
-
end
|
|
291
|
-
|
|
292
293
|
# Checks equality by comparing each attribute.
|
|
293
294
|
# @param [Object] Object to be compared
|
|
294
295
|
def ==(o)
|
|
@@ -308,7 +309,9 @@ module DocSpring
|
|
|
308
309
|
auth_username_hash == o.auth_username_hash &&
|
|
309
310
|
auth_phone_number_hash == o.auth_phone_number_hash &&
|
|
310
311
|
ignore_unknown_fields == o.ignore_unknown_fields &&
|
|
311
|
-
prefilled_values_editable == o.prefilled_values_editable
|
|
312
|
+
prefilled_values_editable == o.prefilled_values_editable &&
|
|
313
|
+
send_email == o.send_email &&
|
|
314
|
+
signing_step == o.signing_step
|
|
312
315
|
end
|
|
313
316
|
|
|
314
317
|
# @see the `==` method
|
|
@@ -320,7 +323,7 @@ module DocSpring
|
|
|
320
323
|
# Calculates hash code according to all attributes.
|
|
321
324
|
# @return [Integer] Hash code
|
|
322
325
|
def hash
|
|
323
|
-
[name, email, fields, metadata, role, auth_type, auth_second_factor_type, auth_provider, auth_session_started_at, auth_session_id_hash, auth_user_id_hash, auth_username_hash, auth_phone_number_hash, ignore_unknown_fields, prefilled_values_editable].hash
|
|
326
|
+
[name, email, fields, metadata, role, auth_type, auth_second_factor_type, auth_provider, auth_session_started_at, auth_session_id_hash, auth_user_id_hash, auth_username_hash, auth_phone_number_hash, ignore_unknown_fields, prefilled_values_editable, send_email, signing_step].hash
|
|
324
327
|
end
|
|
325
328
|
|
|
326
329
|
# Builds the object from hash
|
|
@@ -0,0 +1,212 @@
|
|
|
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
|
+
# How often DocSpring reminds people who haven't signed.
|
|
18
|
+
class SignatureRequestReminders < ApiModelBase
|
|
19
|
+
# Days between reminders.
|
|
20
|
+
attr_accessor :interval_days
|
|
21
|
+
|
|
22
|
+
# The most reminders each person gets.
|
|
23
|
+
attr_accessor :max_count
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'interval_days' => :'interval_days',
|
|
29
|
+
:'max_count' => :'max_count'
|
|
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
|
+
:'interval_days' => :'Integer',
|
|
47
|
+
:'max_count' => :'Integer'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns attribute type mapping
|
|
58
|
+
def self.acceptable_openapi_types
|
|
59
|
+
openapi_types
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns the nullable attributes
|
|
63
|
+
def self.acceptable_openapi_nullable
|
|
64
|
+
openapi_nullable
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SignatureRequestReminders` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SignatureRequestReminders`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
|
+
end
|
|
80
|
+
h[k.to_sym] = v
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'interval_days')
|
|
84
|
+
self.interval_days = attributes[:'interval_days']
|
|
85
|
+
else
|
|
86
|
+
self.interval_days = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'max_count')
|
|
90
|
+
self.max_count = attributes[:'max_count']
|
|
91
|
+
else
|
|
92
|
+
self.max_count = nil
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
97
|
+
# @return Array for valid properties with the reasons
|
|
98
|
+
def list_invalid_properties
|
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
|
+
invalid_properties = Array.new
|
|
101
|
+
if @interval_days.nil?
|
|
102
|
+
invalid_properties.push('invalid value for "interval_days", interval_days cannot be nil.')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if @max_count.nil?
|
|
106
|
+
invalid_properties.push('invalid value for "max_count", max_count cannot be nil.')
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
invalid_properties
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Check to see if the all the properties in the model are valid
|
|
113
|
+
# @return true if the model is valid
|
|
114
|
+
def valid?
|
|
115
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
116
|
+
return false if @interval_days.nil?
|
|
117
|
+
return false if @max_count.nil?
|
|
118
|
+
true
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] interval_days Value to be assigned
|
|
123
|
+
def interval_days=(interval_days)
|
|
124
|
+
if interval_days.nil?
|
|
125
|
+
fail ArgumentError, 'interval_days cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@interval_days = interval_days
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Custom attribute writer method with validation
|
|
132
|
+
# @param [Object] max_count Value to be assigned
|
|
133
|
+
def max_count=(max_count)
|
|
134
|
+
if max_count.nil?
|
|
135
|
+
fail ArgumentError, 'max_count cannot be nil'
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
@max_count = max_count
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Checks equality by comparing each attribute.
|
|
142
|
+
# @param [Object] Object to be compared
|
|
143
|
+
def ==(o)
|
|
144
|
+
return true if self.equal?(o)
|
|
145
|
+
self.class == o.class &&
|
|
146
|
+
interval_days == o.interval_days &&
|
|
147
|
+
max_count == o.max_count
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# @see the `==` method
|
|
151
|
+
# @param [Object] Object to be compared
|
|
152
|
+
def eql?(o)
|
|
153
|
+
self == o
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Calculates hash code according to all attributes.
|
|
157
|
+
# @return [Integer] Hash code
|
|
158
|
+
def hash
|
|
159
|
+
[interval_days, max_count].hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Builds the object from hash
|
|
163
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
164
|
+
# @return [Object] Returns the model itself
|
|
165
|
+
def self.build_from_hash(attributes)
|
|
166
|
+
return nil unless attributes.is_a?(Hash)
|
|
167
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
168
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
169
|
+
map = acceptable_attribute_map
|
|
170
|
+
transformed_hash = {}
|
|
171
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
172
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
173
|
+
transformed_hash["#{key}"] = nil
|
|
174
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
175
|
+
# check to ensure the input is an array given that the attribute
|
|
176
|
+
# is documented as an array but the input is not
|
|
177
|
+
if attributes[map[key]].is_a?(Array)
|
|
178
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
179
|
+
end
|
|
180
|
+
elsif !attributes[map[key]].nil?
|
|
181
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
185
|
+
# accept any value while the model is built from a response
|
|
186
|
+
allocate.tap do |model|
|
|
187
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
188
|
+
model.send(:initialize, transformed_hash)
|
|
189
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the object in the form of hash
|
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
|
195
|
+
def to_hash
|
|
196
|
+
hash = {}
|
|
197
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
198
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
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 SigningOrder
|
|
18
|
+
PARALLEL = "parallel".freeze
|
|
19
|
+
SEQUENTIAL = "sequential".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [PARALLEL, SEQUENTIAL].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
|
|
@@ -16,13 +16,20 @@ require 'time'
|
|
|
16
16
|
module DocSpring
|
|
17
17
|
class StringConditionType
|
|
18
18
|
EQUALS = "equals".freeze
|
|
19
|
+
NOT_EQUALS = "not_equals".freeze
|
|
19
20
|
CONTAINS = "contains".freeze
|
|
21
|
+
NOT_CONTAINS = "not_contains".freeze
|
|
20
22
|
STARTS_WITH = "starts_with".freeze
|
|
23
|
+
NOT_STARTS_WITH = "not_starts_with".freeze
|
|
21
24
|
ENDS_WITH = "ends_with".freeze
|
|
25
|
+
NOT_ENDS_WITH = "not_ends_with".freeze
|
|
22
26
|
REGEX = "regex".freeze
|
|
27
|
+
NOT_REGEX = "not_regex".freeze
|
|
28
|
+
BLANK = "blank".freeze
|
|
29
|
+
NOT_BLANK = "not_blank".freeze
|
|
23
30
|
|
|
24
31
|
def self.all_vars
|
|
25
|
-
@all_vars ||= [EQUALS, CONTAINS, STARTS_WITH, ENDS_WITH, REGEX].freeze
|
|
32
|
+
@all_vars ||= [EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS, STARTS_WITH, NOT_STARTS_WITH, ENDS_WITH, NOT_ENDS_WITH, REGEX, NOT_REGEX, BLANK, NOT_BLANK].freeze
|
|
26
33
|
end
|
|
27
34
|
|
|
28
35
|
# Builds the enum from string
|
|
@@ -37,7 +37,7 @@ module DocSpring
|
|
|
37
37
|
# `pending` until the files have been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the files are generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no files: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the files failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS, or in a Word template's tags), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`.
|
|
38
38
|
attr_accessor :state
|
|
39
39
|
|
|
40
|
-
# Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
|
|
40
|
+
# Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live.
|
|
41
41
|
attr_accessor :test
|
|
42
42
|
|
|
43
43
|
# `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`.
|
|
@@ -79,7 +79,10 @@ module DocSpring
|
|
|
79
79
|
# The people asked to sign the submission (and fill in their fields), in order.
|
|
80
80
|
attr_accessor :signature_requests
|
|
81
81
|
|
|
82
|
-
#
|
|
82
|
+
# `parallel`: everyone can sign at once. `sequential`: people sign one step at a time (each signature request's `signing_step`).
|
|
83
|
+
attr_accessor :signing_order
|
|
84
|
+
|
|
85
|
+
# The uploads of the submission's PDF to your storage (account integrations), and the emails its template's email actions sent.
|
|
83
86
|
attr_accessor :actions
|
|
84
87
|
|
|
85
88
|
# The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired.
|
|
@@ -137,6 +140,7 @@ module DocSpring
|
|
|
137
140
|
:'updated_at' => :'updated_at',
|
|
138
141
|
:'has_password' => :'has_password',
|
|
139
142
|
:'signature_requests' => :'signature_requests',
|
|
143
|
+
:'signing_order' => :'signing_order',
|
|
140
144
|
:'actions' => :'actions',
|
|
141
145
|
:'truncated_text' => :'truncated_text',
|
|
142
146
|
:'output_formats' => :'output_formats',
|
|
@@ -178,6 +182,7 @@ module DocSpring
|
|
|
178
182
|
:'updated_at' => :'Time',
|
|
179
183
|
:'has_password' => :'Boolean',
|
|
180
184
|
:'signature_requests' => :'Array<SignatureRequest>',
|
|
185
|
+
:'signing_order' => :'SigningOrder',
|
|
181
186
|
:'actions' => :'Array<SubmissionAction>',
|
|
182
187
|
:'truncated_text' => :'Hash<String, Array<String>>',
|
|
183
188
|
:'output_formats' => :'Array<OutputFormat>',
|
|
@@ -360,6 +365,12 @@ module DocSpring
|
|
|
360
365
|
self.signature_requests = nil
|
|
361
366
|
end
|
|
362
367
|
|
|
368
|
+
if attributes.key?(:'signing_order')
|
|
369
|
+
self.signing_order = attributes[:'signing_order']
|
|
370
|
+
else
|
|
371
|
+
self.signing_order = nil
|
|
372
|
+
end
|
|
373
|
+
|
|
363
374
|
if attributes.key?(:'actions')
|
|
364
375
|
if (value = attributes[:'actions']).is_a?(Array)
|
|
365
376
|
self.actions = value
|
|
@@ -452,6 +463,10 @@ module DocSpring
|
|
|
452
463
|
invalid_properties.push('invalid value for "signature_requests", signature_requests cannot be nil.')
|
|
453
464
|
end
|
|
454
465
|
|
|
466
|
+
if @signing_order.nil?
|
|
467
|
+
invalid_properties.push('invalid value for "signing_order", signing_order cannot be nil.')
|
|
468
|
+
end
|
|
469
|
+
|
|
455
470
|
if @actions.nil?
|
|
456
471
|
invalid_properties.push('invalid value for "actions", actions cannot be nil.')
|
|
457
472
|
end
|
|
@@ -481,6 +496,7 @@ module DocSpring
|
|
|
481
496
|
return false if @updated_at.nil?
|
|
482
497
|
return false if @has_password.nil?
|
|
483
498
|
return false if @signature_requests.nil?
|
|
499
|
+
return false if @signing_order.nil?
|
|
484
500
|
return false if @actions.nil?
|
|
485
501
|
return false if @output_formats.nil?
|
|
486
502
|
true
|
|
@@ -626,6 +642,16 @@ module DocSpring
|
|
|
626
642
|
@signature_requests = signature_requests
|
|
627
643
|
end
|
|
628
644
|
|
|
645
|
+
# Custom attribute writer method with validation
|
|
646
|
+
# @param [Object] signing_order Value to be assigned
|
|
647
|
+
def signing_order=(signing_order)
|
|
648
|
+
if signing_order.nil?
|
|
649
|
+
fail ArgumentError, 'signing_order cannot be nil'
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
@signing_order = signing_order
|
|
653
|
+
end
|
|
654
|
+
|
|
629
655
|
# Custom attribute writer method with validation
|
|
630
656
|
# @param [Object] actions Value to be assigned
|
|
631
657
|
def actions=(actions)
|
|
@@ -672,6 +698,7 @@ module DocSpring
|
|
|
672
698
|
updated_at == o.updated_at &&
|
|
673
699
|
has_password == o.has_password &&
|
|
674
700
|
signature_requests == o.signature_requests &&
|
|
701
|
+
signing_order == o.signing_order &&
|
|
675
702
|
actions == o.actions &&
|
|
676
703
|
truncated_text == o.truncated_text &&
|
|
677
704
|
output_formats == o.output_formats &&
|
|
@@ -687,7 +714,7 @@ module DocSpring
|
|
|
687
714
|
# Calculates hash code according to all attributes.
|
|
688
715
|
# @return [Integer] Hash code
|
|
689
716
|
def hash
|
|
690
|
-
[id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, files, expired, expires_at, processed_at, created_at, updated_at, has_password, signature_requests, actions, truncated_text, output_formats, preview_generated_at].hash
|
|
717
|
+
[id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, files, expired, expires_at, processed_at, created_at, updated_at, has_password, signature_requests, signing_order, actions, truncated_text, output_formats, preview_generated_at].hash
|
|
691
718
|
end
|
|
692
719
|
|
|
693
720
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
# An upload of a PDF to your storage, such as an S3 bucket.
|
|
17
|
+
# An upload of a PDF to your storage, such as an S3 bucket, or an email action's email.
|
|
18
18
|
class SubmissionAction < ApiModelBase
|
|
19
19
|
# The upload's ID.
|
|
20
20
|
attr_accessor :id
|
|
@@ -22,13 +22,16 @@ module DocSpring
|
|
|
22
22
|
# The ID of the account integration it used.
|
|
23
23
|
attr_accessor :integration_id
|
|
24
24
|
|
|
25
|
-
#
|
|
25
|
+
# The ID of the email action that sent the email. Null for an upload, or once the email action is deleted.
|
|
26
|
+
attr_accessor :email_action_id
|
|
27
|
+
|
|
28
|
+
# `pending` until the upload or email has run, then `processed`. `failed`: your storage or the email service rejected it. `error`: it failed in DocSpring.
|
|
26
29
|
attr_accessor :state
|
|
27
30
|
|
|
28
|
-
# The kind of storage, such as `aws_s3_upload` for an S3 bucket.
|
|
31
|
+
# The kind of storage, such as `aws_s3_upload` for an S3 bucket, or `email` for an email action's email.
|
|
29
32
|
attr_accessor :action_type
|
|
30
33
|
|
|
31
|
-
# Where the PDF was uploaded, such as the S3 bucket and key.
|
|
34
|
+
# Where the PDF was uploaded, such as the S3 bucket and key. For an email: its `subject`, `recipients`, each with its `address`, `kind` (`to`, `cc` or `bcc`), `source`, `field` or `metadata` when the address came from one, and `status` (`sent`, `delivered`, `bounced`, `complained`, `skipped` and others), `sent_at`, `delivery`, and `files` (the files it sent: `pdf`, `docx`, `odt`). An email whose submission didn't meet the email action's `send_when` conditions has only `skipped`, `conditions_not_met`, and its state is `processed`. An email whose submission made none of the files the email action sends has `skipped`, `no_files` and the action's `file_formats`, and its state is `processed` too. When the submission's data is left out (a batch, or a webhook without submission data), the subject and the addresses that came from fields or metadata are null.
|
|
32
35
|
attr_accessor :result_data
|
|
33
36
|
|
|
34
37
|
# Why the upload failed, when `state` is `failed` or `error`.
|
|
@@ -61,6 +64,7 @@ module DocSpring
|
|
|
61
64
|
{
|
|
62
65
|
:'id' => :'id',
|
|
63
66
|
:'integration_id' => :'integration_id',
|
|
67
|
+
:'email_action_id' => :'email_action_id',
|
|
64
68
|
:'state' => :'state',
|
|
65
69
|
:'action_type' => :'action_type',
|
|
66
70
|
:'result_data' => :'result_data',
|
|
@@ -83,6 +87,7 @@ module DocSpring
|
|
|
83
87
|
{
|
|
84
88
|
:'id' => :'String',
|
|
85
89
|
:'integration_id' => :'String',
|
|
90
|
+
:'email_action_id' => :'String',
|
|
86
91
|
:'state' => :'SubmissionActionState',
|
|
87
92
|
:'action_type' => :'SubmissionActionType',
|
|
88
93
|
:'result_data' => :'Hash<String, Object>',
|
|
@@ -94,6 +99,7 @@ module DocSpring
|
|
|
94
99
|
def self.openapi_nullable
|
|
95
100
|
Set.new([
|
|
96
101
|
:'integration_id',
|
|
102
|
+
:'email_action_id',
|
|
97
103
|
:'error_message'
|
|
98
104
|
])
|
|
99
105
|
end
|
|
@@ -136,6 +142,12 @@ module DocSpring
|
|
|
136
142
|
self.integration_id = nil
|
|
137
143
|
end
|
|
138
144
|
|
|
145
|
+
if attributes.key?(:'email_action_id')
|
|
146
|
+
self.email_action_id = attributes[:'email_action_id']
|
|
147
|
+
else
|
|
148
|
+
self.email_action_id = nil
|
|
149
|
+
end
|
|
150
|
+
|
|
139
151
|
if attributes.key?(:'state')
|
|
140
152
|
self.state = attributes[:'state']
|
|
141
153
|
else
|
|
@@ -245,6 +257,7 @@ module DocSpring
|
|
|
245
257
|
self.class == o.class &&
|
|
246
258
|
id == o.id &&
|
|
247
259
|
integration_id == o.integration_id &&
|
|
260
|
+
email_action_id == o.email_action_id &&
|
|
248
261
|
state == o.state &&
|
|
249
262
|
action_type == o.action_type &&
|
|
250
263
|
result_data == o.result_data &&
|
|
@@ -260,7 +273,7 @@ module DocSpring
|
|
|
260
273
|
# Calculates hash code according to all attributes.
|
|
261
274
|
# @return [Integer] Hash code
|
|
262
275
|
def hash
|
|
263
|
-
[id, integration_id, state, action_type, result_data, error_message].hash
|
|
276
|
+
[id, integration_id, email_action_id, state, action_type, result_data, error_message].hash
|
|
264
277
|
end
|
|
265
278
|
|
|
266
279
|
# Builds the object from hash
|
|
@@ -16,13 +16,13 @@ require 'time'
|
|
|
16
16
|
module DocSpring
|
|
17
17
|
# A submission to create in a batch, with its own template when it doesn't use the batch's.
|
|
18
18
|
class SubmissionInput < ApiModelBase
|
|
19
|
-
# Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
|
|
19
|
+
# Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live.
|
|
20
20
|
attr_accessor :test
|
|
21
21
|
|
|
22
22
|
# `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`.
|
|
23
23
|
attr_accessor :editable
|
|
24
24
|
|
|
25
|
-
# The values of the template's fields, by field name. Required for PDF
|
|
25
|
+
# The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs.
|
|
26
26
|
attr_accessor :data
|
|
27
27
|
|
|
28
28
|
# Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`).
|
|
@@ -34,7 +34,7 @@ module DocSpring
|
|
|
34
34
|
# What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission.
|
|
35
35
|
attr_accessor :output_formats
|
|
36
36
|
|
|
37
|
-
# Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours.
|
|
37
|
+
# Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours. The demo API token's submissions expire within an hour: up to 3600, and that's their default.
|
|
38
38
|
attr_accessor :expires_in
|
|
39
39
|
|
|
40
40
|
# Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. With `signature_requests`, `editable: true` is a 422, and a `default` for a signature or initials field makes the submission `invalid_data`.
|
|
@@ -37,7 +37,7 @@ module DocSpring
|
|
|
37
37
|
# `pending` until the files have been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the files are generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no files: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the files failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS, or in a Word template's tags), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`.
|
|
38
38
|
attr_accessor :state
|
|
39
39
|
|
|
40
|
-
# Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
|
|
40
|
+
# Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live.
|
|
41
41
|
attr_accessor :test
|
|
42
42
|
|
|
43
43
|
# `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`.
|