signwell_sdk 0.0.1.pre.alpha.1
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 +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +24 -0
- data/README.md +398 -0
- data/SECURITY.md +23 -0
- data/lib/signwell_sdk/client.rb +72 -0
- data/lib/signwell_sdk/errors.rb +228 -0
- data/lib/signwell_sdk/file_part.rb +58 -0
- data/lib/signwell_sdk/internal/transport/base_client.rb +573 -0
- data/lib/signwell_sdk/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/signwell_sdk/internal/type/array_of.rb +168 -0
- data/lib/signwell_sdk/internal/type/base_model.rb +531 -0
- data/lib/signwell_sdk/internal/type/base_page.rb +55 -0
- data/lib/signwell_sdk/internal/type/boolean.rb +77 -0
- data/lib/signwell_sdk/internal/type/converter.rb +327 -0
- data/lib/signwell_sdk/internal/type/enum.rb +156 -0
- data/lib/signwell_sdk/internal/type/file_input.rb +111 -0
- data/lib/signwell_sdk/internal/type/hash_of.rb +188 -0
- data/lib/signwell_sdk/internal/type/request_parameters.rb +42 -0
- data/lib/signwell_sdk/internal/type/union.rb +243 -0
- data/lib/signwell_sdk/internal/type/unknown.rb +81 -0
- data/lib/signwell_sdk/internal/util.rb +920 -0
- data/lib/signwell_sdk/internal.rb +20 -0
- data/lib/signwell_sdk/models/attachment_request_info.rb +34 -0
- data/lib/signwell_sdk/models/checkbox_group_info.rb +66 -0
- data/lib/signwell_sdk/models/checkbox_validation.rb +18 -0
- data/lib/signwell_sdk/models/copied_contact_info.rb +34 -0
- data/lib/signwell_sdk/models/date_format.rb +20 -0
- data/lib/signwell_sdk/models/field_type.rb +29 -0
- data/lib/signwell_sdk/models/file_info.rb +26 -0
- data/lib/signwell_sdk/models/label_info.rb +26 -0
- data/lib/signwell_sdk/models/text_validation.rb +25 -0
- data/lib/signwell_sdk/models/v1/api_application_delete_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/api_application_retrieve_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/attachment_request.rb +38 -0
- data/lib/signwell_sdk/models/v1/bulk_send_create_params.rb +107 -0
- data/lib/signwell_sdk/models/v1/bulk_send_list_params.rb +55 -0
- data/lib/signwell_sdk/models/v1/bulk_send_retrieve_csv_template_params.rb +39 -0
- data/lib/signwell_sdk/models/v1/bulk_send_retrieve_documents_params.rb +32 -0
- data/lib/signwell_sdk/models/v1/bulk_send_retrieve_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/bulk_send_validate_csv_params.rb +39 -0
- data/lib/signwell_sdk/models/v1/checkbox_group.rb +80 -0
- data/lib/signwell_sdk/models/v1/copied_contact.rb +26 -0
- data/lib/signwell_sdk/models/v1/document.rb +543 -0
- data/lib/signwell_sdk/models/v1/document_create_from_template_params.rb +740 -0
- data/lib/signwell_sdk/models/v1/document_create_from_template_response.rb +500 -0
- data/lib/signwell_sdk/models/v1/document_create_params.rb +620 -0
- data/lib/signwell_sdk/models/v1/document_delete_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/document_file.rb +34 -0
- data/lib/signwell_sdk/models/v1/document_list_params.rb +32 -0
- data/lib/signwell_sdk/models/v1/document_list_response.rb +50 -0
- data/lib/signwell_sdk/models/v1/document_remind_params.rb +49 -0
- data/lib/signwell_sdk/models/v1/document_retrieve_completed_pdf_params.rb +55 -0
- data/lib/signwell_sdk/models/v1/document_retrieve_completed_pdf_response.rb +22 -0
- data/lib/signwell_sdk/models/v1/document_retrieve_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/document_send_params.rb +198 -0
- data/lib/signwell_sdk/models/v1/document_template.rb +503 -0
- data/lib/signwell_sdk/models/v1/document_template_create_params.rb +599 -0
- data/lib/signwell_sdk/models/v1/document_template_delete_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/document_template_list_params.rb +32 -0
- data/lib/signwell_sdk/models/v1/document_template_list_response.rb +50 -0
- data/lib/signwell_sdk/models/v1/document_template_retrieve_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/document_template_update_params.rb +162 -0
- data/lib/signwell_sdk/models/v1/hook_create_params.rb +32 -0
- data/lib/signwell_sdk/models/v1/hook_delete_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/hook_list_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/label.rb +22 -0
- data/lib/signwell_sdk/models/v1/template_checkbox_group.rb +80 -0
- data/lib/signwell_sdk/models/v1_me_params.rb +14 -0
- data/lib/signwell_sdk/models.rb +63 -0
- data/lib/signwell_sdk/request_options.rb +77 -0
- data/lib/signwell_sdk/resources/v1/api_applications.rb +59 -0
- data/lib/signwell_sdk/resources/v1/bulk_sends.rb +198 -0
- data/lib/signwell_sdk/resources/v1/document_templates.rb +204 -0
- data/lib/signwell_sdk/resources/v1/documents.rb +372 -0
- data/lib/signwell_sdk/resources/v1/hooks.rb +78 -0
- data/lib/signwell_sdk/resources/v1.rb +47 -0
- data/lib/signwell_sdk/version.rb +5 -0
- data/lib/signwell_sdk.rb +107 -0
- data/manifest.yaml +17 -0
- data/rbi/signwell_sdk/client.rbi +49 -0
- data/rbi/signwell_sdk/errors.rbi +205 -0
- data/rbi/signwell_sdk/file_part.rbi +37 -0
- data/rbi/signwell_sdk/internal/transport/base_client.rbi +302 -0
- data/rbi/signwell_sdk/internal/transport/pooled_net_requester.rbi +84 -0
- data/rbi/signwell_sdk/internal/type/array_of.rbi +104 -0
- data/rbi/signwell_sdk/internal/type/base_model.rbi +308 -0
- data/rbi/signwell_sdk/internal/type/base_page.rbi +43 -0
- data/rbi/signwell_sdk/internal/type/boolean.rbi +58 -0
- data/rbi/signwell_sdk/internal/type/converter.rbi +216 -0
- data/rbi/signwell_sdk/internal/type/enum.rbi +82 -0
- data/rbi/signwell_sdk/internal/type/file_input.rbi +59 -0
- data/rbi/signwell_sdk/internal/type/hash_of.rbi +104 -0
- data/rbi/signwell_sdk/internal/type/request_parameters.rbi +31 -0
- data/rbi/signwell_sdk/internal/type/union.rbi +128 -0
- data/rbi/signwell_sdk/internal/type/unknown.rbi +58 -0
- data/rbi/signwell_sdk/internal/util.rbi +487 -0
- data/rbi/signwell_sdk/internal.rbi +18 -0
- data/rbi/signwell_sdk/models/attachment_request_info.rbi +52 -0
- data/rbi/signwell_sdk/models/checkbox_group_info.rbi +89 -0
- data/rbi/signwell_sdk/models/checkbox_validation.rbi +27 -0
- data/rbi/signwell_sdk/models/copied_contact_info.rbi +50 -0
- data/rbi/signwell_sdk/models/date_format.rbi +26 -0
- data/rbi/signwell_sdk/models/field_type.rbi +41 -0
- data/rbi/signwell_sdk/models/file_info.rbi +36 -0
- data/rbi/signwell_sdk/models/label_info.rbi +40 -0
- data/rbi/signwell_sdk/models/text_validation.rbi +44 -0
- data/rbi/signwell_sdk/models/v1/api_application_delete_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/api_application_retrieve_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/attachment_request.rbi +59 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_create_params.rbi +160 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_list_params.rbi +92 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_retrieve_csv_template_params.rbi +67 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_retrieve_documents_params.rbi +62 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_retrieve_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_validate_csv_params.rbi +64 -0
- data/rbi/signwell_sdk/models/v1/checkbox_group.rbi +121 -0
- data/rbi/signwell_sdk/models/v1/copied_contact.rbi +41 -0
- data/rbi/signwell_sdk/models/v1/document.rbi +833 -0
- data/rbi/signwell_sdk/models/v1/document_create_from_template_params.rbi +1270 -0
- data/rbi/signwell_sdk/models/v1/document_create_from_template_response.rbi +856 -0
- data/rbi/signwell_sdk/models/v1/document_create_params.rbi +1019 -0
- data/rbi/signwell_sdk/models/v1/document_delete_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_file.rbi +55 -0
- data/rbi/signwell_sdk/models/v1/document_list_params.rbi +62 -0
- data/rbi/signwell_sdk/models/v1/document_list_response.rbi +71 -0
- data/rbi/signwell_sdk/models/v1/document_remind_params.rbi +107 -0
- data/rbi/signwell_sdk/models/v1/document_retrieve_completed_pdf_params.rbi +123 -0
- data/rbi/signwell_sdk/models/v1/document_retrieve_completed_pdf_response.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_retrieve_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_send_params.rbi +307 -0
- data/rbi/signwell_sdk/models/v1/document_template.rbi +830 -0
- data/rbi/signwell_sdk/models/v1/document_template_create_params.rbi +1050 -0
- data/rbi/signwell_sdk/models/v1/document_template_delete_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_template_list_params.rbi +62 -0
- data/rbi/signwell_sdk/models/v1/document_template_list_response.rbi +71 -0
- data/rbi/signwell_sdk/models/v1/document_template_retrieve_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_template_update_params.rbi +257 -0
- data/rbi/signwell_sdk/models/v1/hook_create_params.rbi +59 -0
- data/rbi/signwell_sdk/models/v1/hook_delete_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/hook_list_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/label.rbi +29 -0
- data/rbi/signwell_sdk/models/v1/template_checkbox_group.rbi +121 -0
- data/rbi/signwell_sdk/models/v1_me_params.rbi +27 -0
- data/rbi/signwell_sdk/models.rbi +25 -0
- data/rbi/signwell_sdk/request_options.rbi +59 -0
- data/rbi/signwell_sdk/resources/v1/api_applications.rbi +45 -0
- data/rbi/signwell_sdk/resources/v1/bulk_sends.rbi +173 -0
- data/rbi/signwell_sdk/resources/v1/document_templates.rbi +276 -0
- data/rbi/signwell_sdk/resources/v1/documents.rbi +527 -0
- data/rbi/signwell_sdk/resources/v1/hooks.rbi +52 -0
- data/rbi/signwell_sdk/resources/v1.rbi +32 -0
- data/rbi/signwell_sdk/version.rbi +5 -0
- data/sig/signwell_sdk/client.rbs +26 -0
- data/sig/signwell_sdk/errors.rbs +117 -0
- data/sig/signwell_sdk/file_part.rbs +21 -0
- data/sig/signwell_sdk/internal/transport/base_client.rbs +133 -0
- data/sig/signwell_sdk/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/signwell_sdk/internal/type/array_of.rbs +48 -0
- data/sig/signwell_sdk/internal/type/base_model.rbs +102 -0
- data/sig/signwell_sdk/internal/type/base_page.rbs +24 -0
- data/sig/signwell_sdk/internal/type/boolean.rbs +26 -0
- data/sig/signwell_sdk/internal/type/converter.rbs +79 -0
- data/sig/signwell_sdk/internal/type/enum.rbs +32 -0
- data/sig/signwell_sdk/internal/type/file_input.rbs +25 -0
- data/sig/signwell_sdk/internal/type/hash_of.rbs +48 -0
- data/sig/signwell_sdk/internal/type/request_parameters.rbs +19 -0
- data/sig/signwell_sdk/internal/type/union.rbs +52 -0
- data/sig/signwell_sdk/internal/type/unknown.rbs +26 -0
- data/sig/signwell_sdk/internal/util.rbs +185 -0
- data/sig/signwell_sdk/internal.rbs +9 -0
- data/sig/signwell_sdk/models/attachment_request_info.rbs +19 -0
- data/sig/signwell_sdk/models/checkbox_group_info.rbs +52 -0
- data/sig/signwell_sdk/models/checkbox_validation.rbs +16 -0
- data/sig/signwell_sdk/models/copied_contact_info.rbs +21 -0
- data/sig/signwell_sdk/models/date_format.rbs +22 -0
- data/sig/signwell_sdk/models/field_type.rbs +42 -0
- data/sig/signwell_sdk/models/file_info.rbs +15 -0
- data/sig/signwell_sdk/models/label_info.rbs +19 -0
- data/sig/signwell_sdk/models/text_validation.rbs +34 -0
- data/sig/signwell_sdk/models/v1/api_application_delete_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/api_application_retrieve_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/attachment_request.rbs +26 -0
- data/sig/signwell_sdk/models/v1/bulk_send_create_params.rbs +89 -0
- data/sig/signwell_sdk/models/v1/bulk_send_list_params.rbs +51 -0
- data/sig/signwell_sdk/models/v1/bulk_send_retrieve_csv_template_params.rbs +32 -0
- data/sig/signwell_sdk/models/v1/bulk_send_retrieve_documents_params.rbs +34 -0
- data/sig/signwell_sdk/models/v1/bulk_send_retrieve_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/bulk_send_validate_csv_params.rbs +30 -0
- data/sig/signwell_sdk/models/v1/checkbox_group.rbs +69 -0
- data/sig/signwell_sdk/models/v1/copied_contact.rbs +19 -0
- data/sig/signwell_sdk/models/v1/document.rbs +563 -0
- data/sig/signwell_sdk/models/v1/document_create_from_template_params.rbs +570 -0
- data/sig/signwell_sdk/models/v1/document_create_from_template_response.rbs +518 -0
- data/sig/signwell_sdk/models/v1/document_create_params.rbs +473 -0
- data/sig/signwell_sdk/models/v1/document_delete_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/document_file.rbs +32 -0
- data/sig/signwell_sdk/models/v1/document_list_params.rbs +34 -0
- data/sig/signwell_sdk/models/v1/document_list_response.rbs +47 -0
- data/sig/signwell_sdk/models/v1/document_remind_params.rbs +48 -0
- data/sig/signwell_sdk/models/v1/document_retrieve_completed_pdf_params.rbs +57 -0
- data/sig/signwell_sdk/models/v1/document_retrieve_completed_pdf_response.rbs +15 -0
- data/sig/signwell_sdk/models/v1/document_retrieve_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/document_send_params.rbs +160 -0
- data/sig/signwell_sdk/models/v1/document_template.rbs +530 -0
- data/sig/signwell_sdk/models/v1/document_template_create_params.rbs +459 -0
- data/sig/signwell_sdk/models/v1/document_template_delete_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/document_template_list_params.rbs +34 -0
- data/sig/signwell_sdk/models/v1/document_template_list_response.rbs +47 -0
- data/sig/signwell_sdk/models/v1/document_template_retrieve_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/document_template_update_params.rbs +132 -0
- data/sig/signwell_sdk/models/v1/hook_create_params.rbs +32 -0
- data/sig/signwell_sdk/models/v1/hook_delete_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/hook_list_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/label.rbs +15 -0
- data/sig/signwell_sdk/models/v1/template_checkbox_group.rbs +69 -0
- data/sig/signwell_sdk/models/v1_me_params.rbs +14 -0
- data/sig/signwell_sdk/models.rbs +23 -0
- data/sig/signwell_sdk/request_options.rbs +36 -0
- data/sig/signwell_sdk/resources/v1/api_applications.rbs +19 -0
- data/sig/signwell_sdk/resources/v1/bulk_sends.rbs +55 -0
- data/sig/signwell_sdk/resources/v1/document_templates.rbs +71 -0
- data/sig/signwell_sdk/resources/v1/documents.rbs +130 -0
- data/sig/signwell_sdk/resources/v1/hooks.rbs +22 -0
- data/sig/signwell_sdk/resources/v1.rbs +19 -0
- data/sig/signwell_sdk/version.rbs +3 -0
- metadata +298 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SignwellSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class V1
|
|
6
|
+
class BulkSends
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {SignwellSDK::Models::V1::BulkSendCreateParams} for more details.
|
|
9
|
+
#
|
|
10
|
+
# Creates a bulk send, and it validates the CSV file before creating the bulk
|
|
11
|
+
# send.
|
|
12
|
+
#
|
|
13
|
+
# @overload create(bulk_send_csv:, template_ids:, api_application_id: nil, apply_signing_order: nil, custom_requester_email: nil, custom_requester_name: nil, message: nil, name: nil, skip_row_errors: nil, subject: nil, request_options: {})
|
|
14
|
+
#
|
|
15
|
+
# @param bulk_send_csv [String] A RFC 4648 base64 string of the template CSV file to be validated.
|
|
16
|
+
#
|
|
17
|
+
# @param template_ids [Array<String>] Unique identifiers for a list of templates.
|
|
18
|
+
#
|
|
19
|
+
# @param api_application_id [String] Unique identifier for API Application settings to use. API Applications are opti
|
|
20
|
+
#
|
|
21
|
+
# @param apply_signing_order [Boolean] When set to `true` recipients will sign one at a time in the order of the `recip
|
|
22
|
+
#
|
|
23
|
+
# @param custom_requester_email [String] Sets the custom requester email for the document. When set, this is the email us
|
|
24
|
+
#
|
|
25
|
+
# @param custom_requester_name [String] Sets the custom requester name for the document. When set, this is the name used
|
|
26
|
+
#
|
|
27
|
+
# @param message [String] Email message for the signature request that recipients will see. Defaults to th
|
|
28
|
+
#
|
|
29
|
+
# @param name [String] The name of the Bulk Send. Will be used as the document name for each of the doc
|
|
30
|
+
#
|
|
31
|
+
# @param skip_row_errors [Boolean] Whether to skip errors in the rows. Defaults to `false`.
|
|
32
|
+
#
|
|
33
|
+
# @param subject [String] Email subject for the signature request that recipients will see. Defaults to th
|
|
34
|
+
#
|
|
35
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
36
|
+
#
|
|
37
|
+
# @return [nil]
|
|
38
|
+
#
|
|
39
|
+
# @see SignwellSDK::Models::V1::BulkSendCreateParams
|
|
40
|
+
def create(params)
|
|
41
|
+
parsed, options = SignwellSDK::V1::BulkSendCreateParams.dump_request(params)
|
|
42
|
+
@client.request(
|
|
43
|
+
method: :post,
|
|
44
|
+
path: "api/v1/bulk_sends",
|
|
45
|
+
body: parsed,
|
|
46
|
+
model: NilClass,
|
|
47
|
+
options: options
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns information about the Bulk Send.
|
|
52
|
+
#
|
|
53
|
+
# @overload retrieve(id, request_options: {})
|
|
54
|
+
#
|
|
55
|
+
# @param id [String] Unique identifier for a bulk send.
|
|
56
|
+
#
|
|
57
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
58
|
+
#
|
|
59
|
+
# @return [nil]
|
|
60
|
+
#
|
|
61
|
+
# @see SignwellSDK::Models::V1::BulkSendRetrieveParams
|
|
62
|
+
def retrieve(id, params = {})
|
|
63
|
+
@client.request(
|
|
64
|
+
method: :get,
|
|
65
|
+
path: ["api/v1/bulk_sends/%1$s", id],
|
|
66
|
+
model: NilClass,
|
|
67
|
+
options: params[:request_options]
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Some parameter documentations has been truncated, see
|
|
72
|
+
# {SignwellSDK::Models::V1::BulkSendListParams} for more details.
|
|
73
|
+
#
|
|
74
|
+
# Returns information about the Bulk Send.
|
|
75
|
+
#
|
|
76
|
+
# @overload list(api_application_id: nil, limit: nil, page: nil, user_email: nil, request_options: {})
|
|
77
|
+
#
|
|
78
|
+
# @param api_application_id [String] Unique identifier for API Application settings to use. API Applications are opti
|
|
79
|
+
#
|
|
80
|
+
# @param limit [Integer] The number of documents to fetch. Defaults to 10, max is 50.
|
|
81
|
+
#
|
|
82
|
+
# @param page [Integer] The page number for pagination. Defaults to the first page.
|
|
83
|
+
#
|
|
84
|
+
# @param user_email [String] The email address of the user that sent the Bulk Send. Must have the `admin` or
|
|
85
|
+
#
|
|
86
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
87
|
+
#
|
|
88
|
+
# @return [nil]
|
|
89
|
+
#
|
|
90
|
+
# @see SignwellSDK::Models::V1::BulkSendListParams
|
|
91
|
+
def list(params = {})
|
|
92
|
+
parsed, options = SignwellSDK::V1::BulkSendListParams.dump_request(params)
|
|
93
|
+
@client.request(
|
|
94
|
+
method: :get,
|
|
95
|
+
path: "api/v1/bulk_sends",
|
|
96
|
+
query: parsed,
|
|
97
|
+
model: NilClass,
|
|
98
|
+
options: options
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Some parameter documentations has been truncated, see
|
|
103
|
+
# {SignwellSDK::Models::V1::BulkSendRetrieveCsvTemplateParams} for more details.
|
|
104
|
+
#
|
|
105
|
+
# Fetches a CSV template that corresponds to the provided document template IDs.
|
|
106
|
+
# CSV templates are blank CSV files that have columns containing required and
|
|
107
|
+
# optional data that can be sent when creating a bulk send. Fields can be
|
|
108
|
+
# referenced by the field label. Example: [placeholder name]\_[field label] could
|
|
109
|
+
# be something like customer_address or signer_company_name (if 'Customer' and
|
|
110
|
+
# 'Signer' were placeholder names for templates set up in SignWell).
|
|
111
|
+
#
|
|
112
|
+
# @overload retrieve_csv_template(template_ids:, base64: nil, request_options: {})
|
|
113
|
+
#
|
|
114
|
+
# @param template_ids [Array<String>] Specify one or more templates to generate a single blank CSV file that will cont
|
|
115
|
+
#
|
|
116
|
+
# @param base64 [String] A RFC 4648 base64 string of the template CSV file to be validated.
|
|
117
|
+
#
|
|
118
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
119
|
+
#
|
|
120
|
+
# @return [StringIO]
|
|
121
|
+
#
|
|
122
|
+
# @see SignwellSDK::Models::V1::BulkSendRetrieveCsvTemplateParams
|
|
123
|
+
def retrieve_csv_template(params)
|
|
124
|
+
parsed, options = SignwellSDK::V1::BulkSendRetrieveCsvTemplateParams.dump_request(params)
|
|
125
|
+
@client.request(
|
|
126
|
+
method: :get,
|
|
127
|
+
path: "api/v1/bulk_sends/csv_template",
|
|
128
|
+
query: parsed,
|
|
129
|
+
headers: {"accept" => "application/octet-stream"},
|
|
130
|
+
model: StringIO,
|
|
131
|
+
options: options
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Returns information about the Bulk Send.
|
|
136
|
+
#
|
|
137
|
+
# @overload retrieve_documents(id, limit: nil, page: nil, request_options: {})
|
|
138
|
+
#
|
|
139
|
+
# @param id [String] Unique identifier for a bulk send.
|
|
140
|
+
#
|
|
141
|
+
# @param limit [Integer] The number of documents to fetch. Defaults to 10, max is 50.
|
|
142
|
+
#
|
|
143
|
+
# @param page [Integer] The page number for pagination. Defaults to the first page.
|
|
144
|
+
#
|
|
145
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
146
|
+
#
|
|
147
|
+
# @return [nil]
|
|
148
|
+
#
|
|
149
|
+
# @see SignwellSDK::Models::V1::BulkSendRetrieveDocumentsParams
|
|
150
|
+
def retrieve_documents(id, params = {})
|
|
151
|
+
parsed, options = SignwellSDK::V1::BulkSendRetrieveDocumentsParams.dump_request(params)
|
|
152
|
+
@client.request(
|
|
153
|
+
method: :get,
|
|
154
|
+
path: ["api/v1/bulk_sends/%1$s/documents", id],
|
|
155
|
+
query: parsed,
|
|
156
|
+
model: NilClass,
|
|
157
|
+
options: options
|
|
158
|
+
)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Some parameter documentations has been truncated, see
|
|
162
|
+
# {SignwellSDK::Models::V1::BulkSendValidateCsvParams} for more details.
|
|
163
|
+
#
|
|
164
|
+
# Validates a Bulk Send CSV file before creating the Bulk Send. It will check the
|
|
165
|
+
# structure of the CSV and the data it contains, and return any errors found.
|
|
166
|
+
#
|
|
167
|
+
# @overload validate_csv(bulk_send_csv:, template_ids:, request_options: {})
|
|
168
|
+
#
|
|
169
|
+
# @param bulk_send_csv [String] A RFC 4648 base64 string of the template CSV file to be validated.
|
|
170
|
+
#
|
|
171
|
+
# @param template_ids [Array<String>] Specify one or more templates to generate a single blank CSV file that will cont
|
|
172
|
+
#
|
|
173
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
174
|
+
#
|
|
175
|
+
# @return [nil]
|
|
176
|
+
#
|
|
177
|
+
# @see SignwellSDK::Models::V1::BulkSendValidateCsvParams
|
|
178
|
+
def validate_csv(params)
|
|
179
|
+
parsed, options = SignwellSDK::V1::BulkSendValidateCsvParams.dump_request(params)
|
|
180
|
+
@client.request(
|
|
181
|
+
method: :post,
|
|
182
|
+
path: "api/v1/bulk_sends/validate_csv",
|
|
183
|
+
body: parsed,
|
|
184
|
+
model: NilClass,
|
|
185
|
+
options: options
|
|
186
|
+
)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @api private
|
|
190
|
+
#
|
|
191
|
+
# @param client [SignwellSDK::Client]
|
|
192
|
+
def initialize(client:)
|
|
193
|
+
@client = client
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SignwellSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class V1
|
|
6
|
+
class DocumentTemplates
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {SignwellSDK::Models::V1::DocumentTemplateCreateParams} for more details.
|
|
9
|
+
#
|
|
10
|
+
# Creates a new template.
|
|
11
|
+
#
|
|
12
|
+
# @overload create(files:, placeholders:, allow_decline: nil, allow_reassign: nil, api_application_id: nil, apply_signing_order: nil, attachment_requests: nil, checkbox_groups: nil, copied_placeholders: nil, decline_redirect_url: nil, draft: nil, expires_in: nil, fields: nil, labels: nil, language: nil, message: nil, metadata: nil, name: nil, redirect_url: nil, reminders: nil, subject: nil, text_tags: nil, request_options: {})
|
|
13
|
+
#
|
|
14
|
+
# @param files [Array<SignwellSDK::Models::V1::DocumentFile>] Document files can be uploaded by specifying a file URL or base64 string. Either
|
|
15
|
+
#
|
|
16
|
+
# @param placeholders [Array<SignwellSDK::Models::V1::DocumentTemplateCreateParams::Placeholder>] Placeholders are generally job roles that must complete and/or sign the document
|
|
17
|
+
#
|
|
18
|
+
# @param allow_decline [Boolean] Whether to allow recipients the option to decline signing a document. If multipl
|
|
19
|
+
#
|
|
20
|
+
# @param allow_reassign [Boolean] In some cases a signer is not the right person to sign and may need to reassign
|
|
21
|
+
#
|
|
22
|
+
# @param api_application_id [String] Unique identifier for API Application settings to use. API Applications are opti
|
|
23
|
+
#
|
|
24
|
+
# @param apply_signing_order [Boolean] When set to `true` recipients will sign one at a time in the order of the `recip
|
|
25
|
+
#
|
|
26
|
+
# @param attachment_requests [Array<SignwellSDK::Models::V1::DocumentTemplateCreateParams::AttachmentRequest>] Attachments that a recipient must upload to complete the signing process. Attach
|
|
27
|
+
#
|
|
28
|
+
# @param checkbox_groups [Array<SignwellSDK::Models::V1::TemplateCheckboxGroup>] Checkbox fields that are placed on a document can be grouped with selection requ
|
|
29
|
+
#
|
|
30
|
+
# @param copied_placeholders [Array<SignwellSDK::Models::V1::DocumentTemplateCreateParams::CopiedPlaceholder>] Copied placeholders are emailed the final document once it has been completed by
|
|
31
|
+
#
|
|
32
|
+
# @param decline_redirect_url [String] A URL that recipients are redirected to if the document is declined.
|
|
33
|
+
#
|
|
34
|
+
# @param draft [Boolean] Whether the template can still be updated before it is ready for usage. If set t
|
|
35
|
+
#
|
|
36
|
+
# @param expires_in [Integer] Number of days before the signature request expires. Defaults to the account exp
|
|
37
|
+
#
|
|
38
|
+
# @param fields [Array<Array<SignwellSDK::Models::V1::DocumentTemplateCreateParams::Field>>] Document fields placed on a document for collecting data or signatures from reci
|
|
39
|
+
#
|
|
40
|
+
# @param labels [Array<SignwellSDK::Models::V1::Label>] Labels can be used to organize documents in a way that can make it easy to find
|
|
41
|
+
#
|
|
42
|
+
# @param language [String] Sets the language for the template and documents created from the template for a
|
|
43
|
+
#
|
|
44
|
+
# @param message [String] Email message for the signature request that recipients will see. Defaults to th
|
|
45
|
+
#
|
|
46
|
+
# @param metadata [Hash{Symbol=>String}] Optional key-value data that can be associated with the document. If set, will b
|
|
47
|
+
#
|
|
48
|
+
# @param name [String] The name of the template.
|
|
49
|
+
#
|
|
50
|
+
# @param redirect_url [String] A URL that recipients are redirected to after successfully signing a document.
|
|
51
|
+
#
|
|
52
|
+
# @param reminders [Boolean] Whether to send signing reminders to recipients. Reminders are sent on day 3, da
|
|
53
|
+
#
|
|
54
|
+
# @param subject [String] Email subject for the signature request that recipients will see. Defaults to th
|
|
55
|
+
#
|
|
56
|
+
# @param text_tags [Boolean] An alternative way (if you can’t use the recommended way) of placing fields in s
|
|
57
|
+
#
|
|
58
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
59
|
+
#
|
|
60
|
+
# @return [SignwellSDK::Models::V1::DocumentTemplate]
|
|
61
|
+
#
|
|
62
|
+
# @see SignwellSDK::Models::V1::DocumentTemplateCreateParams
|
|
63
|
+
def create(params)
|
|
64
|
+
parsed, options = SignwellSDK::V1::DocumentTemplateCreateParams.dump_request(params)
|
|
65
|
+
@client.request(
|
|
66
|
+
method: :post,
|
|
67
|
+
path: "api/v1/document_templates",
|
|
68
|
+
body: parsed,
|
|
69
|
+
model: SignwellSDK::V1::DocumentTemplate,
|
|
70
|
+
options: options
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Returns a template and all associated template data. Supply the unique template
|
|
75
|
+
# ID from either a Create Template request or template page URL.
|
|
76
|
+
#
|
|
77
|
+
# @overload retrieve(id, request_options: {})
|
|
78
|
+
#
|
|
79
|
+
# @param id [String] Unique identifier for a template.
|
|
80
|
+
#
|
|
81
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
82
|
+
#
|
|
83
|
+
# @return [SignwellSDK::Models::V1::DocumentTemplate]
|
|
84
|
+
#
|
|
85
|
+
# @see SignwellSDK::Models::V1::DocumentTemplateRetrieveParams
|
|
86
|
+
def retrieve(id, params = {})
|
|
87
|
+
@client.request(
|
|
88
|
+
method: :get,
|
|
89
|
+
path: ["api/v1/document_templates/%1$s", id],
|
|
90
|
+
model: SignwellSDK::V1::DocumentTemplate,
|
|
91
|
+
options: params[:request_options]
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Some parameter documentations has been truncated, see
|
|
96
|
+
# {SignwellSDK::Models::V1::DocumentTemplateUpdateParams} for more details.
|
|
97
|
+
#
|
|
98
|
+
# Updates an existing template.
|
|
99
|
+
#
|
|
100
|
+
# @overload update(id, allow_decline: nil, allow_reassign: nil, api_application_id: nil, apply_signing_order: nil, checkbox_groups: nil, decline_redirect_url: nil, draft: nil, expires_in: nil, labels: nil, message: nil, metadata: nil, name: nil, redirect_url: nil, reminders: nil, subject: nil, request_options: {})
|
|
101
|
+
#
|
|
102
|
+
# @param id [String] Unique identifier for a template.
|
|
103
|
+
#
|
|
104
|
+
# @param allow_decline [Boolean] Whether to allow recipients the option to decline signing a document. If multipl
|
|
105
|
+
#
|
|
106
|
+
# @param allow_reassign [Boolean] In some cases a signer is not the right person to sign and may need to reassign
|
|
107
|
+
#
|
|
108
|
+
# @param api_application_id [String] Unique identifier for API Application settings to use. API Applications are opti
|
|
109
|
+
#
|
|
110
|
+
# @param apply_signing_order [Boolean] When set to `true` recipients will sign one at a time in the order of the `recip
|
|
111
|
+
#
|
|
112
|
+
# @param checkbox_groups [Array<SignwellSDK::Models::V1::TemplateCheckboxGroup>] Checkbox fields that are placed on a document can be grouped with selection requ
|
|
113
|
+
#
|
|
114
|
+
# @param decline_redirect_url [String] A URL that recipients are redirected to if the document is declined.
|
|
115
|
+
#
|
|
116
|
+
# @param draft [Boolean] Whether the template can still be updated before it is ready for usage. If set t
|
|
117
|
+
#
|
|
118
|
+
# @param expires_in [Integer] Number of days before the signature request expires. Defaults to the account exp
|
|
119
|
+
#
|
|
120
|
+
# @param labels [Array<SignwellSDK::Models::V1::Label>] Labels can be used to organize documents in a way that can make it easy to find
|
|
121
|
+
#
|
|
122
|
+
# @param message [String] Email message for the signature request that recipients will see. Defaults to th
|
|
123
|
+
#
|
|
124
|
+
# @param metadata [Hash{Symbol=>String}] Optional key-value data that can be associated with the document. If set, will b
|
|
125
|
+
#
|
|
126
|
+
# @param name [String] The name of the template.
|
|
127
|
+
#
|
|
128
|
+
# @param redirect_url [String] A URL that recipients are redirected to after successfully signing a document.
|
|
129
|
+
#
|
|
130
|
+
# @param reminders [Boolean] Whether to send signing reminders to recipients. Reminders are sent on day 3, da
|
|
131
|
+
#
|
|
132
|
+
# @param subject [String] Email subject for the signature request that recipients will see. Defaults to th
|
|
133
|
+
#
|
|
134
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
135
|
+
#
|
|
136
|
+
# @return [SignwellSDK::Models::V1::DocumentTemplate]
|
|
137
|
+
#
|
|
138
|
+
# @see SignwellSDK::Models::V1::DocumentTemplateUpdateParams
|
|
139
|
+
def update(id, params = {})
|
|
140
|
+
parsed, options = SignwellSDK::V1::DocumentTemplateUpdateParams.dump_request(params)
|
|
141
|
+
@client.request(
|
|
142
|
+
method: :put,
|
|
143
|
+
path: ["api/v1/document_templates/%1$s", id],
|
|
144
|
+
body: parsed,
|
|
145
|
+
model: SignwellSDK::V1::DocumentTemplate,
|
|
146
|
+
options: options
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Returns a paginated list of templates for the authenticated account.
|
|
151
|
+
#
|
|
152
|
+
# @overload list(limit: nil, page: nil, request_options: {})
|
|
153
|
+
#
|
|
154
|
+
# @param limit [Integer] The number of documents to fetch. Defaults to 10, max is 50.
|
|
155
|
+
#
|
|
156
|
+
# @param page [Integer] The page number for pagination. Defaults to the first page.
|
|
157
|
+
#
|
|
158
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
159
|
+
#
|
|
160
|
+
# @return [SignwellSDK::Models::V1::DocumentTemplateListResponse]
|
|
161
|
+
#
|
|
162
|
+
# @see SignwellSDK::Models::V1::DocumentTemplateListParams
|
|
163
|
+
def list(params = {})
|
|
164
|
+
parsed, options = SignwellSDK::V1::DocumentTemplateListParams.dump_request(params)
|
|
165
|
+
@client.request(
|
|
166
|
+
method: :get,
|
|
167
|
+
path: "api/v1/document_templates",
|
|
168
|
+
query: parsed,
|
|
169
|
+
model: SignwellSDK::Models::V1::DocumentTemplateListResponse,
|
|
170
|
+
options: options
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Deletes a template. Supply the unique template ID from either a Create Template
|
|
175
|
+
# request or template page URL.
|
|
176
|
+
#
|
|
177
|
+
# @overload delete(id, request_options: {})
|
|
178
|
+
#
|
|
179
|
+
# @param id [String] Unique identifier for a template.
|
|
180
|
+
#
|
|
181
|
+
# @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
182
|
+
#
|
|
183
|
+
# @return [nil]
|
|
184
|
+
#
|
|
185
|
+
# @see SignwellSDK::Models::V1::DocumentTemplateDeleteParams
|
|
186
|
+
def delete(id, params = {})
|
|
187
|
+
@client.request(
|
|
188
|
+
method: :delete,
|
|
189
|
+
path: ["api/v1/document_templates/%1$s", id],
|
|
190
|
+
model: NilClass,
|
|
191
|
+
options: params[:request_options]
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# @api private
|
|
196
|
+
#
|
|
197
|
+
# @param client [SignwellSDK::Client]
|
|
198
|
+
def initialize(client:)
|
|
199
|
+
@client = client
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|