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 +4 -4
- data/CHANGELOG.md +3 -1
- data/README.md +9 -0
- data/lib/zoho_sign/document/action/embed_token/get_service.rb +15 -12
- data/lib/zoho_sign/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f5b979aa0e18b49ea40fa109aba4afd213e5c1935cde79c60b14b5ae700420a
|
4
|
+
data.tar.gz: 5c06f8ad0695d64905affc7c84432e39977d1531ac3e1aa94fcd9761c7fd2537
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f928364c2384f5b4437c1712d9d09185d1b187e7c1f52d2a04f29c4478b37e09172a5c3231b4bb79d071818a90a3bf909a7fbcde785619490c04b7ad6498611f
|
7
|
+
data.tar.gz: 0d57d5710f292b8659b90c82a95cb6ac40c34feae262726e945aef322522fb59dcf45a8fb9a050d44a612aea88359e62eb028e7184f8f9fd4287a9de8b581958
|
data/CHANGELOG.md
CHANGED
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 :
|
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
|
-
|
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
|
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(
|
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.
|
33
|
-
# service.
|
35
|
+
# service.facade.sign_url
|
36
|
+
# service.sign_url
|
34
37
|
#
|
35
|
-
# POST /api/v1/requests/:request_id/actions/:
|
38
|
+
# POST /api/v1/requests/:request_id/actions/:action_id/embedtoken
|
36
39
|
def call
|
37
|
-
connection.post("/api/v1/requests/#{request_id}/actions/#{
|
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
|
data/lib/zoho_sign/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2025-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_call
|