active_call-zoho_sign 0.1.6 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d081ad9bfcfa500488f91ef33523321354c2e92125798dabf903b73455a36969
4
- data.tar.gz: c1e116320af36f5a82b2c5fc438accc3417246c073957544e49ce31aa40baa1e
3
+ metadata.gz: 24fd5f8a6cedfeae21a85de1412a2c6abefa4b8749151f8e55f63200460a3307
4
+ data.tar.gz: 05f78e8283339dc0703ceee1e64ac997c3e2ae3018b709e7ce24a43dfcf91979
5
5
  SHA512:
6
- metadata.gz: 61d2c71ceb5d3cd761adf9bcba5c6b82c32df65de03059be03c53cf0b77756e591347cb93399ff01d0ef0cbef049aafd7dd5dbbf8cab204c6cad6ba823c404dc
7
- data.tar.gz: 303712d85e4e32f67f060d0bfcffde7673d10f2c01f8b8e4f9890655097417b0bb53ef02ec75b79702049e0c9daf249ed2ecf7fdb9379418a0ae3756952dccfb
6
+ metadata.gz: b5f686d8c6a75657ab589f4ea999614e2e2340f52f760816036da2be33a271a3001c63a36a4713891c7a00b8b03da0b6036fda0e69146112998987324077029d
7
+ data.tar.gz: 8bcca9f1cc1fb120a724093d2f6bd31b1694afcb4c9889753433335ac0b304a4ff3fee22e74853533be663b030c4be5e80c90db45f92771a6a73a79763b935af
data/.rubocop.yml CHANGED
@@ -22,6 +22,7 @@ Layout/HashAlignment:
22
22
  Layout/LineLength:
23
23
  AllowedPatterns:
24
24
  - initialize
25
+ - '#'
25
26
 
26
27
  Lint/MissingSuper:
27
28
  Enabled: false
@@ -43,6 +44,9 @@ Metrics/CyclomaticComplexity:
43
44
  Metrics/MethodLength:
44
45
  Enabled: false
45
46
 
47
+ Metrics/ParameterLists:
48
+ Enabled: false
49
+
46
50
  Metrics/PerceivedComplexity:
47
51
  Exclude:
48
52
  - lib/zoho_sign/concerns/enumerable.rb
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- ## [0.1.5] - 2025-04-05
1
+ ## [0.1.7] - 2025-05-09
2
+
3
+ - README updates with links to API endpoint docs.
4
+ - `EmbedToken::GetService` path does not need to set the full path `/api/v1/requests/...` -> `requests/...`.
5
+ - README and Gemspec description updates.
6
+
7
+ ## [0.1.6] - 2025-04-05
2
8
 
3
9
  - Added `ZohoSign::GrantToken::GetService`.
4
10
  - Set access token in `before_call` hook instead of lambda so we can capture errors from the access token service objects.
data/README.md CHANGED
@@ -2,7 +2,15 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/active_call-zoho_sign.svg?icon=si%3Arubygems)](https://badge.fury.io/rb/active_call-zoho_sign)
4
4
 
5
- Zoho Sign exposes the [Zoho Sign API](https://www.zoho.com/sign/api) endpoints through service objects.
5
+ Zoho Sign exposes the [Zoho Sign API](https://www.zoho.com/sign/api) endpoints through [Active Call](https://rubygems.org/gems/active_call) service objects.
6
+
7
+ <div align="center">
8
+ <a href="https://platform45.com?utm_source=github&utm_content=zoho_sign">
9
+ <picture>
10
+ <img src="https://github.com/user-attachments/assets/19fd40df-2ce9-4f30-8120-d53f3fbf9f07">
11
+ </picture>
12
+ </a>
13
+ </div>
6
14
 
7
15
  - [Installation](#installation)
8
16
  - [Configuration](#configuration)
@@ -224,7 +232,9 @@ Note that the `offset` argument starts at `1` for the first item.
224
232
  #### List documents
225
233
 
226
234
  ```ruby
227
- service = ZohoSign::Document::ListService.call(offset: 1, limit: 10).each do |facade|
235
+ # https://www.zoho.com/sign/api/document-managment/get-document-list.html
236
+
237
+ ZohoSign::Document::ListService.call(offset: 1, limit: 10).each do |facade|
228
238
  facade.description
229
239
  end
230
240
  ```
@@ -246,6 +256,8 @@ Columns to sort and filter by are `request_name`, `folder_name`, `owner_full_nam
246
256
  #### Get a document
247
257
 
248
258
  ```ruby
259
+ # https://www.zoho.com/sign/api/document-managment/get-details-of-a-particular-document.html
260
+
249
261
  service = ZohoSign::Document::GetService.call(id: '')
250
262
  service.request_name
251
263
  service.request_id
@@ -261,7 +273,9 @@ service.sign_percentage
261
273
  #### Create a document
262
274
 
263
275
  ```ruby
264
- service = ZohoSign::Document::CreateService.call(
276
+ # https://www.zoho.com/sign/api/document-managment/create-document.html
277
+
278
+ ZohoSign::Document::CreateService.call(
265
279
  file: '/path/to/file.pdf', # or File.open('/path/to/file.pdf')
266
280
  file_name: 'file.pdf',
267
281
  file_content_type: 'application/pdf',
@@ -284,7 +298,9 @@ service = ZohoSign::Document::CreateService.call(
284
298
  #### Update a document
285
299
 
286
300
  ```ruby
287
- service = ZohoSign::Document::UpdateService.call(
301
+ # https://www.zoho.com/sign/api/document-managment/update-document.html
302
+
303
+ ZohoSign::Document::UpdateService.call(
288
304
  id: '',
289
305
  data: {
290
306
  requests: {
@@ -303,7 +319,9 @@ service = ZohoSign::Document::UpdateService.call(
303
319
  #### Delete a document
304
320
 
305
321
  ```ruby
306
- service = ZohoSign::Document::DeleteService.call(id: '')
322
+ # https://www.zoho.com/sign/api/document-managment/delete-document.html
323
+
324
+ ZohoSign::Document::DeleteService.call(id: '')
307
325
  ```
308
326
 
309
327
  #### Sign a document
@@ -311,6 +329,8 @@ service = ZohoSign::Document::DeleteService.call(id: '')
311
329
  A unique signing URL will be generated, which will be valid for two minutes. If the signing page is not open by then, a new link needs to be generated and it is a one-time usable URL.
312
330
 
313
331
  ```ruby
332
+ # https://www.zoho.com/sign/api/embedded-signing.html
333
+
314
334
  service = ZohoSign::Document::Action::EmbedToken::GetService.call(request_id: '', action_id: '', host: '')
315
335
  service.sign_url
316
336
  ```
@@ -352,6 +372,8 @@ TODO: ...
352
372
  #### List templates
353
373
 
354
374
  ```ruby
375
+ # https://www.zoho.com/sign/api/template-managment/get-template-list.html
376
+
355
377
  ZohoSign::Template::ListService.call(offset: 1, limit: 10).each do |facade|
356
378
  facade.description
357
379
  end
@@ -374,6 +396,8 @@ Columns to sort and filter by are `template_name`, `owner_first_name` and `modif
374
396
  #### Get a template
375
397
 
376
398
  ```ruby
399
+ # https://www.zoho.com/sign/api/template-managment/get-template-details.html
400
+
377
401
  service = ZohoSign::Template::GetService.call(id: '')
378
402
  service.description
379
403
  service.document_fields
@@ -383,6 +407,7 @@ service.folder_name
383
407
  service.folder_id
384
408
  service.owner_email
385
409
  service.template_name
410
+ service.request_status
386
411
  ...
387
412
  ```
388
413
 
@@ -403,7 +428,9 @@ TODO: ...
403
428
  The auto filled fields specified in the `field_data` object should be marked as **Prefill by you** when creating the document template.
404
429
 
405
430
  ```ruby
406
- service = ZohoSign::Template::Document::CreateService.call!(
431
+ # https://www.zoho.com/sign/api/template-managment/send-documents-using-template.html
432
+
433
+ ZohoSign::Template::Document::CreateService.call!(
407
434
  id: '',
408
435
  is_quicksend: true,
409
436
  data: {
@@ -9,6 +9,8 @@ class ZohoSign::AccessToken::GetService < ZohoSign::BaseService
9
9
 
10
10
  # Get access token.
11
11
  #
12
+ # https://www.zoho.com/accounts/protocol/oauth/web-apps/access-token-expiry.html
13
+ #
12
14
  # ==== Examples
13
15
  #
14
16
  # service = ZohoSign::AccessToken::GetService.call
@@ -17,6 +17,8 @@ class ZohoSign::Document::Action::EmbedToken::GetService < ZohoSign::BaseService
17
17
 
18
18
  # Get a signing URL.
19
19
  #
20
+ # https://www.zoho.com/sign/api/embedded-signing.html
21
+ #
20
22
  # A unique signing URL will be generated, which will be valid for two minutes. If the signing page is not open by
21
23
  # then, a new link needs to be generated and it is a one-time usable URL.
22
24
  #
@@ -37,7 +39,7 @@ class ZohoSign::Document::Action::EmbedToken::GetService < ZohoSign::BaseService
37
39
  #
38
40
  # POST /api/v1/requests/:request_id/actions/:action_id/embedtoken
39
41
  def call
40
- connection.post("/api/v1/requests/#{request_id}/actions/#{action_id}/embedtoken", **params)
42
+ connection.post("requests/#{request_id}/actions/#{action_id}/embedtoken", **params)
41
43
  end
42
44
 
43
45
  private
@@ -18,6 +18,8 @@ class ZohoSign::Document::CreateService < ZohoSign::BaseService
18
18
 
19
19
  # Create a document.
20
20
  #
21
+ # https://www.zoho.com/sign/api/document-managment/create-document.html
22
+ #
21
23
  # ==== Examples
22
24
  #
23
25
  # service = ZohoSign::Document::CreateService.call(
@@ -11,6 +11,8 @@ class ZohoSign::Document::DeleteService < ZohoSign::BaseService
11
11
 
12
12
  # Delete a document.
13
13
  #
14
+ # https://www.zoho.com/sign/api/document-managment/delete-document.html
15
+ #
14
16
  # ==== Examples
15
17
  #
16
18
  # service = ZohoSign::Document::DeleteService.call(id: '')
@@ -15,6 +15,8 @@ class ZohoSign::Document::GetService < ZohoSign::BaseService
15
15
 
16
16
  # Get a document.
17
17
  #
18
+ # https://www.zoho.com/sign/api/document-managment/get-details-of-a-particular-document.html
19
+ #
18
20
  # ==== Examples
19
21
  #
20
22
  # service = ZohoSign::Document::GetService.call(id: '')
@@ -25,6 +25,8 @@ class ZohoSign::Document::ListService < ZohoSign::BaseService
25
25
 
26
26
  # List documents.
27
27
  #
28
+ # https://www.zoho.com/sign/api/document-managment/get-document-list.html
29
+ #
28
30
  # ==== Examples
29
31
  #
30
32
  # service = ZohoSign::Document::ListService.call.first
@@ -16,6 +16,8 @@ class ZohoSign::Document::UpdateService < ZohoSign::BaseService
16
16
 
17
17
  # Update a document.
18
18
  #
19
+ # https://www.zoho.com/sign/api/document-managment/update-document.html
20
+ #
19
21
  # ==== Examples
20
22
  #
21
23
  # service = ZohoSign::Document::UpdateService.call(
@@ -18,6 +18,8 @@ class ZohoSign::GrantToken::GetService < ZohoSign::BaseService
18
18
 
19
19
  # Get refresh token from grant token.
20
20
  #
21
+ # https://www.zoho.com/accounts/protocol/oauth/web-apps/access-token.html
22
+ #
21
23
  # ==== Examples
22
24
  #
23
25
  # service = ZohoSign::GrantToken::GetService.call(grant_token: '', client_id: '', client_secret: '')
@@ -18,6 +18,8 @@ class ZohoSign::Template::Document::CreateService < ZohoSign::BaseService
18
18
 
19
19
  # Create a document from a template.
20
20
  #
21
+ # https://www.zoho.com/sign/api/template-managment/send-documents-using-template.html
22
+ #
21
23
  # ==== Examples
22
24
  #
23
25
  # service = ZohoSign::Template::Document::CreateService.call!(
@@ -15,6 +15,8 @@ class ZohoSign::Template::GetService < ZohoSign::BaseService
15
15
 
16
16
  # Get a document.
17
17
  #
18
+ # https://www.zoho.com/sign/api/template-managment/get-template-details.html
19
+ #
18
20
  # ==== Examples
19
21
  #
20
22
  # service = ZohoSign::Template::GetService.call(id: '')
@@ -25,6 +25,8 @@ class ZohoSign::Template::ListService < ZohoSign::BaseService
25
25
 
26
26
  # List documents.
27
27
  #
28
+ # https://www.zoho.com/sign/api/template-managment/get-template-list.html
29
+ #
28
30
  # ==== Examples
29
31
  #
30
32
  # service = ZohoSign::Template::ListService.call.first
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZohoSign
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_call-zoho_sign
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kobus Joubert
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-04-05 00:00:00.000000000 Z
11
+ date: 2025-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_call-api
@@ -38,7 +38,8 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
- description: Zoho Sign exposes the Zoho Sign API endpoints through service objects.
41
+ description: Zoho Sign exposes the Zoho Sign API endpoints through Active Call service
42
+ objects.
42
43
  email:
43
44
  - kobus@translate3d.com
44
45
  executables: []
@@ -104,5 +105,5 @@ requirements: []
104
105
  rubygems_version: 3.3.27
105
106
  signing_key:
106
107
  specification_version: 4
107
- summary: Zoho Sign
108
+ summary: Zoho Sign service objects
108
109
  test_files: []