Class: SignwellSDK::Resources::V1::BulkSends
- Inherits:
-
Object
- Object
- SignwellSDK::Resources::V1::BulkSends
- Defined in:
- lib/signwell_sdk/resources/v1/bulk_sends.rb
Instance Method Summary collapse
-
#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: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::V1::BulkSendCreateParams for more details.
-
#initialize(client:) ⇒ BulkSends
constructor
private
A new instance of BulkSends.
-
#list(api_application_id: nil, limit: nil, page: nil, user_email: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::V1::BulkSendListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ nil
Returns information about the Bulk Send.
-
#retrieve_csv_template(template_ids:, base64: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::V1::BulkSendRetrieveCsvTemplateParams for more details.
-
#retrieve_documents(id, limit: nil, page: nil, request_options: {}) ⇒ nil
Returns information about the Bulk Send.
-
#validate_csv(bulk_send_csv:, template_ids:, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::V1::BulkSendValidateCsvParams for more details.
Constructor Details
#initialize(client:) ⇒ BulkSends
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of BulkSends.
192 193 194 |
# File 'lib/signwell_sdk/resources/v1/bulk_sends.rb', line 192 def initialize(client:) @client = client end |
Instance Method Details
#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: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::V1::BulkSendCreateParams for more details.
Creates a bulk send, and it validates the CSV file before creating the bulk send.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/signwell_sdk/resources/v1/bulk_sends.rb', line 40 def create(params) parsed, = SignwellSDK::V1::BulkSendCreateParams.dump_request(params) @client.request( method: :post, path: "api/v1/bulk_sends", body: parsed, model: NilClass, options: ) end |
#list(api_application_id: nil, limit: nil, page: nil, user_email: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::V1::BulkSendListParams for more details.
Returns information about the Bulk Send.
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/signwell_sdk/resources/v1/bulk_sends.rb', line 91 def list(params = {}) parsed, = SignwellSDK::V1::BulkSendListParams.dump_request(params) @client.request( method: :get, path: "api/v1/bulk_sends", query: parsed, model: NilClass, options: ) end |
#retrieve(id, request_options: {}) ⇒ nil
Returns information about the Bulk Send.
62 63 64 65 66 67 68 69 |
# File 'lib/signwell_sdk/resources/v1/bulk_sends.rb', line 62 def retrieve(id, params = {}) @client.request( method: :get, path: ["api/v1/bulk_sends/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#retrieve_csv_template(template_ids:, base64: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::V1::BulkSendRetrieveCsvTemplateParams for more details.
Fetches a CSV template that corresponds to the provided document template IDs. CSV templates are blank CSV files that have columns containing required and optional data that can be sent when creating a bulk send. Fields can be referenced by the field label. Example: [placeholder name]_[field label] could be something like customer_address or signer_company_name (if ‘Customer’ and ‘Signer’ were placeholder names for templates set up in SignWell).
123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/signwell_sdk/resources/v1/bulk_sends.rb', line 123 def retrieve_csv_template(params) parsed, = SignwellSDK::V1::BulkSendRetrieveCsvTemplateParams.dump_request(params) @client.request( method: :get, path: "api/v1/bulk_sends/csv_template", query: parsed, headers: {"accept" => "application/octet-stream"}, model: StringIO, options: ) end |
#retrieve_documents(id, limit: nil, page: nil, request_options: {}) ⇒ nil
Returns information about the Bulk Send.
150 151 152 153 154 155 156 157 158 159 |
# File 'lib/signwell_sdk/resources/v1/bulk_sends.rb', line 150 def retrieve_documents(id, params = {}) parsed, = SignwellSDK::V1::BulkSendRetrieveDocumentsParams.dump_request(params) @client.request( method: :get, path: ["api/v1/bulk_sends/%1$s/documents", id], query: parsed, model: NilClass, options: ) end |
#validate_csv(bulk_send_csv:, template_ids:, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::V1::BulkSendValidateCsvParams for more details.
Validates a Bulk Send CSV file before creating the Bulk Send. It will check the structure of the CSV and the data it contains, and return any errors found.
178 179 180 181 182 183 184 185 186 187 |
# File 'lib/signwell_sdk/resources/v1/bulk_sends.rb', line 178 def validate_csv(params) parsed, = SignwellSDK::V1::BulkSendValidateCsvParams.dump_request(params) @client.request( method: :post, path: "api/v1/bulk_sends/validate_csv", body: parsed, model: NilClass, options: ) end |