Class: ZohoSign::Document::Action::EmbedToken::GetService
- Inherits:
-
BaseService
- Object
- BaseService
- ZohoSign::Document::Action::EmbedToken::GetService
- Defined in:
- lib/zoho_sign/document/action/embed_token/get_service.rb
Instance Attribute Summary collapse
-
#action_id ⇒ Object
readonly
Returns the value of attribute action_id.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
Instance Method Summary collapse
-
#call ⇒ Object
Get a signing URL.
-
#initialize(request_id:, action_id:, host:) ⇒ GetService
constructor
A new instance of GetService.
Constructor Details
#initialize(request_id:, action_id:, host:) ⇒ GetService
Returns a new instance of GetService.
12 13 14 15 16 |
# File 'lib/zoho_sign/document/action/embed_token/get_service.rb', line 12 def initialize(request_id:, action_id:, host:) @request_id = request_id @action_id = action_id @host = host end |
Instance Attribute Details
#action_id ⇒ Object (readonly)
Returns the value of attribute action_id.
4 5 6 |
# File 'lib/zoho_sign/document/action/embed_token/get_service.rb', line 4 def action_id @action_id end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
4 5 6 |
# File 'lib/zoho_sign/document/action/embed_token/get_service.rb', line 4 def host @host end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
4 5 6 |
# File 'lib/zoho_sign/document/action/embed_token/get_service.rb', line 4 def request_id @request_id end |
Instance Method Details
#call ⇒ Object
Get a signing URL.
www.zoho.com/sign/api/embedded-signing.html
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.
Examples
service = ZohoSign::Document::Action::EmbedToken::GetService.call(request_id: '', action_id: '', host: '')
service.success? # => true
service.errors # => #<ActiveModel::Errors []>
service.response # => #<Faraday::Response ...>
service.response.status # => 200
service.response.body # => {}
service.facade # => #<ZohoSign::Document::Action::EmbedToken::Facade ...>
service.facade.sign_url
service.sign_url
POST /api/v1/requests/:request_id/actions/:action_id/embedtoken
41 42 43 |
# File 'lib/zoho_sign/document/action/embed_token/get_service.rb', line 41 def call connection.post("requests/#{request_id}/actions/#{action_id}/embedtoken", **params) end |