Class: SignwellSDK::Resources::V1::DocumentTemplates
- Inherits:
-
Object
- Object
- SignwellSDK::Resources::V1::DocumentTemplates
- Defined in:
- lib/signwell_sdk/resources/v1/document_templates.rb
Instance Method Summary collapse
-
#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: {}) ⇒ SignwellSDK::Models::V1::DocumentTemplate
Some parameter documentations has been truncated, see Models::V1::DocumentTemplateCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ nil
Deletes a template.
-
#initialize(client:) ⇒ DocumentTemplates
constructor
private
A new instance of DocumentTemplates.
-
#list(limit: nil, page: nil, request_options: {}) ⇒ SignwellSDK::Models::V1::DocumentTemplateListResponse
Returns a paginated list of templates for the authenticated account.
-
#retrieve(id, request_options: {}) ⇒ SignwellSDK::Models::V1::DocumentTemplate
Returns a template and all associated template data.
-
#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: {}) ⇒ SignwellSDK::Models::V1::DocumentTemplate
Some parameter documentations has been truncated, see Models::V1::DocumentTemplateUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ DocumentTemplates
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 DocumentTemplates.
198 199 200 |
# File 'lib/signwell_sdk/resources/v1/document_templates.rb', line 198 def initialize(client:) @client = client end |
Instance Method Details
#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: {}) ⇒ SignwellSDK::Models::V1::DocumentTemplate
Some parameter documentations has been truncated, see Models::V1::DocumentTemplateCreateParams for more details.
Creates a new template.
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/signwell_sdk/resources/v1/document_templates.rb', line 63 def create(params) parsed, = SignwellSDK::V1::DocumentTemplateCreateParams.dump_request(params) @client.request( method: :post, path: "api/v1/document_templates", body: parsed, model: SignwellSDK::V1::DocumentTemplate, options: ) end |
#delete(id, request_options: {}) ⇒ nil
Deletes a template. Supply the unique template ID from either a Create Template request or template page URL.
186 187 188 189 190 191 192 193 |
# File 'lib/signwell_sdk/resources/v1/document_templates.rb', line 186 def delete(id, params = {}) @client.request( method: :delete, path: ["api/v1/document_templates/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#list(limit: nil, page: nil, request_options: {}) ⇒ SignwellSDK::Models::V1::DocumentTemplateListResponse
Returns a paginated list of templates for the authenticated account.
163 164 165 166 167 168 169 170 171 172 |
# File 'lib/signwell_sdk/resources/v1/document_templates.rb', line 163 def list(params = {}) parsed, = SignwellSDK::V1::DocumentTemplateListParams.dump_request(params) @client.request( method: :get, path: "api/v1/document_templates", query: parsed, model: SignwellSDK::Models::V1::DocumentTemplateListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ SignwellSDK::Models::V1::DocumentTemplate
Returns a template and all associated template data. Supply the unique template ID from either a Create Template request or template page URL.
86 87 88 89 90 91 92 93 |
# File 'lib/signwell_sdk/resources/v1/document_templates.rb', line 86 def retrieve(id, params = {}) @client.request( method: :get, path: ["api/v1/document_templates/%1$s", id], model: SignwellSDK::V1::DocumentTemplate, options: params[:request_options] ) end |
#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: {}) ⇒ SignwellSDK::Models::V1::DocumentTemplate
Some parameter documentations has been truncated, see Models::V1::DocumentTemplateUpdateParams for more details.
Updates an existing template.
139 140 141 142 143 144 145 146 147 148 |
# File 'lib/signwell_sdk/resources/v1/document_templates.rb', line 139 def update(id, params = {}) parsed, = SignwellSDK::V1::DocumentTemplateUpdateParams.dump_request(params) @client.request( method: :put, path: ["api/v1/document_templates/%1$s", id], body: parsed, model: SignwellSDK::V1::DocumentTemplate, options: ) end |