active_call-zoho_sign 0.1.3 → 0.1.4

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: d75781aad919dcd23868fbc1e9e4bd86e9d69c923cdbd0142a29c78e44357e48
4
- data.tar.gz: dd7e55f14105e2081f6f4b1668231614949e77809e0310cbc525c9fbfd3d79c7
3
+ metadata.gz: 9f5b979aa0e18b49ea40fa109aba4afd213e5c1935cde79c60b14b5ae700420a
4
+ data.tar.gz: 5c06f8ad0695d64905affc7c84432e39977d1531ac3e1aa94fcd9761c7fd2537
5
5
  SHA512:
6
- metadata.gz: a7831f4b4ff12eccab031060e6f5184457181ef1412b7cbd046f18b2bef7bb8cbd772108e97898c3d2b7e9968d8b1985d394d04a1c60ff0f0ee08f4c00986e25
7
- data.tar.gz: df1e6eb122cacf3d23be1d9b5cee762ba439eaeae116a9b98a3d2136e05fbd0fafaa5eadbcb9a70ac45ac7e1a9acdfa7335e6dff70454ca75492b0ba5457d9a0
6
+ metadata.gz: f928364c2384f5b4437c1712d9d09185d1b187e7c1f52d2a04f29c4478b37e09172a5c3231b4bb79d071818a90a3bf909a7fbcde785619490c04b7ad6498611f
7
+ data.tar.gz: 0d57d5710f292b8659b90c82a95cb6ac40c34feae262726e945aef322522fb59dcf45a8fb9a050d44a612aea88359e62eb028e7184f8f9fd4287a9de8b581958
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
- ## [Unreleased]
1
+ ## [0.1.4] - 2025-03-31
2
+
3
+ - Sign a document embedded link fix.
2
4
 
3
5
  ## [0.1.3] - 2025-03-25
4
6
 
data/README.md CHANGED
@@ -283,6 +283,15 @@ service = ZohoSign::Document::UpdateService.call(
283
283
  service = ZohoSign::Document::DeleteService.call(id: '')
284
284
  ```
285
285
 
286
+ #### Sign a document.
287
+
288
+ 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.
289
+
290
+ ```ruby
291
+ service = ZohoSign::Document::Action::EmbedToken::GetService.call(request_id: '', action_id: '', host: '')
292
+ service.sign_url
293
+ ```
294
+
286
295
  ### Folders
287
296
 
288
297
  TODO: ...
@@ -1,25 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ZohoSign::Document::Action::EmbedToken::GetService < ZohoSign::BaseService
4
- attr_reader :id, :request_id, :host
4
+ attr_reader :request_id, :action_id, :host
5
+
6
+ validates :request_id, :action_id, :host, presence: true
5
7
 
6
8
  after_call :set_facade
7
9
 
8
10
  delegate_missing_to :@facade
9
11
 
10
- validates :id, :request_id, :host, presence: true
11
-
12
- def initialize(id:, request_id:, host:)
13
- @id = id
12
+ def initialize(request_id:, action_id:, host:)
14
13
  @request_id = request_id
14
+ @action_id = action_id
15
15
  @host = host
16
16
  end
17
17
 
18
- # Get a document.
18
+ # Get a signing URL.
19
+ #
20
+ # A unique signing URL will be generated, which will be valid for two minutes. If the signing page is not open by
21
+ # then, a new link needs to be generated and it is a one-time usable URL.
19
22
  #
20
23
  # ==== Examples
21
24
  #
22
- # service = ZohoSign::Document::Action::EmbedToken::GetService.call(id: '', request_id: '', host: '')
25
+ # service = ZohoSign::Document::Action::EmbedToken::GetService.call(request_id: '', action_id: '', host: '')
23
26
  #
24
27
  # service.success? # => true
25
28
  # service.errors # => #<ActiveModel::Errors []>
@@ -29,12 +32,12 @@ class ZohoSign::Document::Action::EmbedToken::GetService < ZohoSign::BaseService
29
32
  # service.response.body # => {}
30
33
  #
31
34
  # service.facade # => #<ZohoSign::Document::Action::EmbedToken::Facade ...>
32
- # service.facade.request_name
33
- # service.request_name
35
+ # service.facade.sign_url
36
+ # service.sign_url
34
37
  #
35
- # POST /api/v1/requests/:request_id/actions/:id/embedtoken
38
+ # POST /api/v1/requests/:request_id/actions/:action_id/embedtoken
36
39
  def call
37
- connection.post("/api/v1/requests/#{request_id}/actions/#{id}/embedtoken", **params)
40
+ connection.post("/api/v1/requests/#{request_id}/actions/#{action_id}/embedtoken", **params)
38
41
  end
39
42
 
40
43
  private
@@ -46,6 +49,6 @@ class ZohoSign::Document::Action::EmbedToken::GetService < ZohoSign::BaseService
46
49
  end
47
50
 
48
51
  def set_facade
49
- @facade = ZohoSign::Document::Action::EmbedToken.new(response.body)
52
+ @facade = ZohoSign::Document::Action::EmbedToken::Facade.new(response.body)
50
53
  end
51
54
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZohoSign
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
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.3
4
+ version: 0.1.4
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-03-25 00:00:00.000000000 Z
11
+ date: 2025-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_call