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
@@ -16,7 +16,7 @@ require 'time'
16
16
  module DocSpring
17
17
  # What went wrong.
18
18
  class ErrorInfo < ApiModelBase
19
- # A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count) or the embedded template editor. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): a request with the same Idempotency-Key is still being processed. Send the request again in a few seconds; when the first request has already created its record, its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request.
19
+ # A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `insufficient_credits_to_send` (402): your credit balance can't cover a live signature request that DocSpring would email, so nothing was saved. Add credits and send the request again. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count), the embedded template editor, email actions, or live signature requests before your account's first payment. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): the first request with the same Idempotency-Key is still being processed, and the response has a `Retry-After` header: send the request again then. Without the header, the first request was processed but its response is no longer kept. When the first request created a record, its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id`, `template_id`, `folder_id`, `custom_file_id` or `webhook_id`. `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request. `rate_limited` (429): too many API requests. Wait for the `Retry-After` header's seconds. `daily_email_limit_reached` (429): a submission that DocSpring would email would take your account over its daily email limit, so nothing was saved. Send it again after the `Retry-After` header's seconds (midnight UTC), or send the signing links yourself (`send_email: false`).
20
20
  attr_accessor :code
21
21
 
22
22
  # A human-readable explanation, safe to show to developers.
@@ -28,18 +28,27 @@ module DocSpring
28
28
  # The ID of the request. Include it when you contact support.
29
29
  attr_accessor :request_id
30
30
 
31
- # When a submission's data fails validation, the submission is still recorded (state `invalid_data`) so you can see it in the dashboard. This is its ID. With `insufficient_credits`, the submission that waits for credits. With `polling_timeout` or `idempotency_key_in_use`, the submission that's still being processed.
31
+ # When a submission's data fails validation, the submission is still recorded (state `invalid_data`) so you can see it in the dashboard. This is its ID. With `insufficient_credits`, the submission that waits for credits. With `polling_timeout`, the submission that's still being processed. With `idempotency_key_in_use`, the submission the first request with the key created.
32
32
  attr_accessor :submission_id
33
33
 
34
- # The ID of the recorded batch, when items in a batch fail validation. With `insufficient_credits`, the batch whose submissions wait for credits. With `polling_timeout` or `idempotency_key_in_use`, the batch that's still being processed.
34
+ # The ID of the recorded batch, when items in a batch fail validation. With `insufficient_credits`, the batch whose submissions wait for credits. With `polling_timeout`, the batch that's still being processed. With `idempotency_key_in_use`, the batch the first request with the key created.
35
35
  attr_accessor :submission_batch_id
36
36
 
37
- # With `insufficient_credits`, the combined PDF that waits for credits. With `polling_timeout` or `idempotency_key_in_use`, the combined PDF that's still being processed.
37
+ # With `insufficient_credits`, the combined PDF that waits for credits. With `polling_timeout`, the combined PDF that's still being processed. With `idempotency_key_in_use`, the combined PDF the first request with the key created.
38
38
  attr_accessor :combined_pdf_id
39
39
 
40
- # With `polling_timeout`, the template whose PDF is still being processed.
40
+ # With `polling_timeout`, the template whose PDF is still being processed. With `idempotency_key_in_use`, the template the first request with the key created.
41
41
  attr_accessor :template_id
42
42
 
43
+ # With `idempotency_key_in_use`, the folder the first request with the key created.
44
+ attr_accessor :folder_id
45
+
46
+ # With `idempotency_key_in_use`, the custom file the first request with the key created.
47
+ attr_accessor :custom_file_id
48
+
49
+ # With `idempotency_key_in_use`, the webhook the first request with the key created.
50
+ attr_accessor :webhook_id
51
+
43
52
  class EnumAttributeValidator
44
53
  attr_reader :datatype
45
54
  attr_reader :allowable_values
@@ -72,7 +81,10 @@ module DocSpring
72
81
  :'submission_id' => :'submission_id',
73
82
  :'submission_batch_id' => :'submission_batch_id',
74
83
  :'combined_pdf_id' => :'combined_pdf_id',
75
- :'template_id' => :'template_id'
84
+ :'template_id' => :'template_id',
85
+ :'folder_id' => :'folder_id',
86
+ :'custom_file_id' => :'custom_file_id',
87
+ :'webhook_id' => :'webhook_id'
76
88
  }
77
89
  end
78
90
 
@@ -96,7 +108,10 @@ module DocSpring
96
108
  :'submission_id' => :'String',
97
109
  :'submission_batch_id' => :'String',
98
110
  :'combined_pdf_id' => :'String',
99
- :'template_id' => :'String'
111
+ :'template_id' => :'String',
112
+ :'folder_id' => :'String',
113
+ :'custom_file_id' => :'String',
114
+ :'webhook_id' => :'String'
100
115
  }
101
116
  end
102
117
 
@@ -174,6 +189,18 @@ module DocSpring
174
189
  if attributes.key?(:'template_id')
175
190
  self.template_id = attributes[:'template_id']
176
191
  end
192
+
193
+ if attributes.key?(:'folder_id')
194
+ self.folder_id = attributes[:'folder_id']
195
+ end
196
+
197
+ if attributes.key?(:'custom_file_id')
198
+ self.custom_file_id = attributes[:'custom_file_id']
199
+ end
200
+
201
+ if attributes.key?(:'webhook_id')
202
+ self.webhook_id = attributes[:'webhook_id']
203
+ end
177
204
  end
178
205
 
179
206
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -248,7 +275,10 @@ module DocSpring
248
275
  submission_id == o.submission_id &&
249
276
  submission_batch_id == o.submission_batch_id &&
250
277
  combined_pdf_id == o.combined_pdf_id &&
251
- template_id == o.template_id
278
+ template_id == o.template_id &&
279
+ folder_id == o.folder_id &&
280
+ custom_file_id == o.custom_file_id &&
281
+ webhook_id == o.webhook_id
252
282
  end
253
283
 
254
284
  # @see the `==` method
@@ -260,7 +290,7 @@ module DocSpring
260
290
  # Calculates hash code according to all attributes.
261
291
  # @return [Integer] Hash code
262
292
  def hash
263
- [code, message, details, request_id, submission_id, submission_batch_id, combined_pdf_id, template_id].hash
293
+ [code, message, details, request_id, submission_id, submission_batch_id, combined_pdf_id, template_id, folder_id, custom_file_id, webhook_id].hash
264
294
  end
265
295
 
266
296
  # Builds the object from hash
@@ -253,7 +253,7 @@ module DocSpring
253
253
  # Check and shape display only: the value a string or number field's value is compared with, by `string_condition_type` or `number_condition_type`, to decide whether the check mark or shape prints. Boolean fields print when `true` (see `invert_boolean_condition`), and other types print when they have a value.
254
254
  attr_accessor :condition
255
255
 
256
- # String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression the value must match.
256
+ # String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression (RE2 syntax) the value must match; each has a `not_` form that prints when it doesn't match (`not_equals`, `not_regex`, ...). `blank` prints when the value is empty or only spaces and line breaks, and `not_blank` when it isn't; they ignore `condition`.
257
257
  attr_accessor :string_condition_type
258
258
 
259
259
  # Number fields with check or shape display: how the value is compared with `condition`: `equals`, `gt` (greater than), `gte` (greater than or equal to), `lt` (less than), `lte` (less than or equal to), or `range`, between `number_condition_range_min` and `number_condition_range_max`.
@@ -247,7 +247,7 @@ module DocSpring
247
247
  # Check and shape display only: the value a string or number field's value is compared with, by `string_condition_type` or `number_condition_type`, to decide whether the check mark or shape prints. Boolean fields print when `true` (see `invert_boolean_condition`), and other types print when they have a value.
248
248
  attr_accessor :condition
249
249
 
250
- # String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression the value must match.
250
+ # String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression (RE2 syntax) the value must match; each has a `not_` form that prints when it doesn't match (`not_equals`, `not_regex`, ...). `blank` prints when the value is empty or only spaces and line breaks, and `not_blank` when it isn't; they ignore `condition`.
251
251
  attr_accessor :string_condition_type
252
252
 
253
253
  # Number fields with check or shape display: how the value is compared with `condition`: `equals`, `gt` (greater than), `gte` (greater than or equal to), `lt` (less than), `lte` (less than or equal to), or `range`, between `number_condition_range_min` and `number_condition_range_max`.
@@ -25,7 +25,7 @@ module DocSpring
25
25
  # The page height for the `Custom` format, with a unit.
26
26
  attr_accessor :height
27
27
 
28
- # How much to scale the page, such as `0.8`. `1` prints it at its normal size.
28
+ # How much to scale the page, from 0.1 to 2, such as `0.8`. `1` prints it at its normal size.
29
29
  attr_accessor :scale
30
30
 
31
31
  # Print pages in landscape orientation.
@@ -25,7 +25,7 @@ module DocSpring
25
25
  # The page height for the `Custom` format, with a unit.
26
26
  attr_accessor :height
27
27
 
28
- # How much to scale the page, such as `0.8`. `1` prints it at its normal size.
28
+ # How much to scale the page, from 0.1 to 2, such as `0.8`. `1` prints it at its normal size.
29
29
  attr_accessor :scale
30
30
 
31
31
  # Print pages in landscape orientation.
@@ -0,0 +1,168 @@
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
+ # Which template the test email is for.
18
+ class SendAccountEmailActionTestEmailRequest < ApiModelBase
19
+ # A template the email action sends for: the test uses its PDF and name. Left out, it uses the one that changed most recently.
20
+ attr_accessor :template_id
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'template_id' => :'template_id'
26
+ }
27
+ end
28
+
29
+ # Returns attribute mapping this model knows about
30
+ def self.acceptable_attribute_map
31
+ attribute_map
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ acceptable_attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'template_id' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Returns attribute type mapping
53
+ def self.acceptable_openapi_types
54
+ openapi_types
55
+ end
56
+
57
+ # Returns the nullable attributes
58
+ def self.acceptable_openapi_nullable
59
+ openapi_nullable
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SendAccountEmailActionTestEmailRequest` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SendAccountEmailActionTestEmailRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'template_id')
79
+ self.template_id = attributes[:'template_id']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ template_id == o.template_id
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [template_id].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ # include attributes inherited from allOf parents (the nearest declaration wins)
125
+ map = acceptable_attribute_map
126
+ transformed_hash = {}
127
+ acceptable_openapi_types.each_pair do |key, type|
128
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
129
+ transformed_hash["#{key}"] = nil
130
+ elsif type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[map[key]].is_a?(Array)
134
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
135
+ end
136
+ elsif !attributes[map[key]].nil?
137
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
138
+ end
139
+ end
140
+ # Responses can include enum values added after this client was released, so the enum setters
141
+ # accept any value while the model is built from a response
142
+ allocate.tap do |model|
143
+ model.instance_variable_set(:@_skip_enum_validation, true)
144
+ model.send(:initialize, transformed_hash)
145
+ model.remove_instance_variable(:@_skip_enum_validation)
146
+ end
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ # include attributes inherited from allOf parents (the nearest declaration wins)
154
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
155
+ value = self.send(attr)
156
+ if value.nil?
157
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
158
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
159
+ end
160
+
161
+ hash[param] = _to_hash(value)
162
+ end
163
+ hash
164
+ end
165
+
166
+ end
167
+
168
+ end
@@ -25,7 +25,7 @@ module DocSpring
25
25
  # The name of the person the request is for.
26
26
  attr_accessor :name
27
27
 
28
- # Their email address.
28
+ # Their email address. Null when they have none.
29
29
  attr_accessor :email
30
30
 
31
31
  # The fields this person fills in. Null for a signature request created with API v1 without a field list: it asks for every field the submission's data doesn't have.
@@ -40,6 +40,18 @@ module DocSpring
40
40
  # The signer's position, from 0: `Signer 1` is 0. The template's `@@signature_requests/<sort_order>` fields print this signature request's details.
41
41
  attr_accessor :sort_order
42
42
 
43
+ # Whether DocSpring emails this person their signing link.
44
+ attr_accessor :send_email
45
+
46
+ # When this person signs, when the submission's `signing_order` is `sequential`: everyone in step 1 first, then step 2, and so on. Null when everyone can sign at once.
47
+ attr_accessor :signing_step
48
+
49
+ # When DocSpring first emailed this person their signing link. Null until it has, and when it doesn't email them (`send_email` is false).
50
+ attr_accessor :sent_at
51
+
52
+ # What happened to the latest email DocSpring sent this person with their signing link: `sent` until the email service reports on it, then `delayed` (still trying), `delivered`, `undelivered` (it stopped trying, as with a full mailbox), `bounced` (the address doesn't exist) or `complained` (marked as spam). `failed` means DocSpring couldn't send the first email with their link, and `unknown` that it couldn't tell whether that email went: neither is sent again. Null until DocSpring has emailed them or tried to.
53
+ attr_accessor :email_status
54
+
43
55
  # `pending` until the person completes the signature request (`completed`) or declines it (`declined`).
44
56
  attr_accessor :state
45
57
 
@@ -124,6 +136,10 @@ module DocSpring
124
136
  :'metadata' => :'metadata',
125
137
  :'role' => :'role',
126
138
  :'sort_order' => :'sort_order',
139
+ :'send_email' => :'send_email',
140
+ :'signing_step' => :'signing_step',
141
+ :'sent_at' => :'sent_at',
142
+ :'email_status' => :'email_status',
127
143
  :'state' => :'state',
128
144
  :'data' => :'data',
129
145
  :'viewed_at' => :'viewed_at',
@@ -165,6 +181,10 @@ module DocSpring
165
181
  :'metadata' => :'Hash<String, Object>',
166
182
  :'role' => :'String',
167
183
  :'sort_order' => :'Integer',
184
+ :'send_email' => :'Boolean',
185
+ :'signing_step' => :'Integer',
186
+ :'sent_at' => :'Time',
187
+ :'email_status' => :'SignatureRequestEmailStatus',
168
188
  :'state' => :'SignatureRequestState',
169
189
  :'data' => :'Hash<String, Object>',
170
190
  :'viewed_at' => :'Time',
@@ -191,6 +211,9 @@ module DocSpring
191
211
  :'name',
192
212
  :'email',
193
213
  :'fields',
214
+ :'signing_step',
215
+ :'sent_at',
216
+ :'email_status',
194
217
  :'data',
195
218
  :'viewed_at',
196
219
  :'completed_at',
@@ -284,6 +307,30 @@ module DocSpring
284
307
  self.sort_order = nil
285
308
  end
286
309
 
310
+ if attributes.key?(:'send_email')
311
+ self.send_email = attributes[:'send_email']
312
+ else
313
+ self.send_email = nil
314
+ end
315
+
316
+ if attributes.key?(:'signing_step')
317
+ self.signing_step = attributes[:'signing_step']
318
+ else
319
+ self.signing_step = nil
320
+ end
321
+
322
+ if attributes.key?(:'sent_at')
323
+ self.sent_at = attributes[:'sent_at']
324
+ else
325
+ self.sent_at = nil
326
+ end
327
+
328
+ if attributes.key?(:'email_status')
329
+ self.email_status = attributes[:'email_status']
330
+ else
331
+ self.email_status = nil
332
+ end
333
+
287
334
  if attributes.key?(:'state')
288
335
  self.state = attributes[:'state']
289
336
  else
@@ -414,6 +461,10 @@ module DocSpring
414
461
  invalid_properties.push('invalid value for "sort_order", sort_order cannot be nil.')
415
462
  end
416
463
 
464
+ if @send_email.nil?
465
+ invalid_properties.push('invalid value for "send_email", send_email cannot be nil.')
466
+ end
467
+
417
468
  if @state.nil?
418
469
  invalid_properties.push('invalid value for "state", state cannot be nil.')
419
470
  end
@@ -446,6 +497,7 @@ module DocSpring
446
497
  return false if @metadata.nil?
447
498
  return false if @role.nil?
448
499
  return false if @sort_order.nil?
500
+ return false if @send_email.nil?
449
501
  return false if @state.nil?
450
502
  return false if @auth_type.nil?
451
503
  return false if @auth_second_factor_type.nil?
@@ -504,6 +556,16 @@ module DocSpring
504
556
  @sort_order = sort_order
505
557
  end
506
558
 
559
+ # Custom attribute writer method with validation
560
+ # @param [Object] send_email Value to be assigned
561
+ def send_email=(send_email)
562
+ if send_email.nil?
563
+ fail ArgumentError, 'send_email cannot be nil'
564
+ end
565
+
566
+ @send_email = send_email
567
+ end
568
+
507
569
  # Custom attribute writer method with validation
508
570
  # @param [Object] state Value to be assigned
509
571
  def state=(state)
@@ -567,6 +629,10 @@ module DocSpring
567
629
  metadata == o.metadata &&
568
630
  role == o.role &&
569
631
  sort_order == o.sort_order &&
632
+ send_email == o.send_email &&
633
+ signing_step == o.signing_step &&
634
+ sent_at == o.sent_at &&
635
+ email_status == o.email_status &&
570
636
  state == o.state &&
571
637
  data == o.data &&
572
638
  viewed_at == o.viewed_at &&
@@ -595,7 +661,7 @@ module DocSpring
595
661
  # Calculates hash code according to all attributes.
596
662
  # @return [Integer] Hash code
597
663
  def hash
598
- [id, submission_id, name, email, fields, metadata, role, sort_order, state, data, viewed_at, completed_at, declined_at, 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, ip_address, user_agent, created_at, updated_at].hash
664
+ [id, submission_id, name, email, fields, metadata, role, sort_order, send_email, signing_step, sent_at, email_status, state, data, viewed_at, completed_at, declined_at, 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, ip_address, user_agent, created_at, updated_at].hash
599
665
  end
600
666
 
601
667
  # Builds the object from hash
@@ -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 SignatureRequestEmailAttachments
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,47 @@
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 SignatureRequestEmailStatus
18
+ SENT = "sent".freeze
19
+ DELAYED = "delayed".freeze
20
+ DELIVERED = "delivered".freeze
21
+ UNDELIVERED = "undelivered".freeze
22
+ BOUNCED = "bounced".freeze
23
+ COMPLAINED = "complained".freeze
24
+ FAILED = "failed".freeze
25
+ UNKNOWN = "unknown".freeze
26
+
27
+ def self.all_vars
28
+ @all_vars ||= [SENT, DELAYED, DELIVERED, UNDELIVERED, BOUNCED, COMPLAINED, FAILED, UNKNOWN].freeze
29
+ end
30
+
31
+ # Builds the enum from string
32
+ # @param [String] The enum value in the form of the string
33
+ # @return [String] The enum value
34
+ def self.build_from_hash(value)
35
+ new.build_from_hash(value)
36
+ end
37
+
38
+ # Builds the enum from string
39
+ # @param [String] The enum value in the form of the string
40
+ # @return [String] The enum value
41
+ def build_from_hash(value)
42
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
43
+ # is: the constants are the values this client knows
44
+ value
45
+ end
46
+ end
47
+ end
@@ -21,9 +21,11 @@ module DocSpring
21
21
  DECLINE_REQUEST = "decline_request".freeze
22
22
  SIGN_REQUEST = "sign_request".freeze
23
23
  ALL_COMPLETED = "all_completed".freeze
24
+ EMAIL_BOUNCED = "email_bounced".freeze
25
+ EMAIL_MARKED_AS_SPAM = "email_marked_as_spam".freeze
24
26
 
25
27
  def self.all_vars
26
- @all_vars ||= [SEND_REQUEST, VIEW_REQUEST, ACCEPTED_TERMS, DECLINE_REQUEST, SIGN_REQUEST, ALL_COMPLETED].freeze
28
+ @all_vars ||= [SEND_REQUEST, VIEW_REQUEST, ACCEPTED_TERMS, DECLINE_REQUEST, SIGN_REQUEST, ALL_COMPLETED, EMAIL_BOUNCED, EMAIL_MARKED_AS_SPAM].freeze
27
29
  end
28
30
 
29
31
  # Builds the enum from string