Class: ZohoSign::Document::UpdateService
- Inherits:
-
BaseService
- Object
- BaseService
- ZohoSign::Document::UpdateService
- Defined in:
- lib/zoho_sign/document/update_service.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#call ⇒ Object
Update a document.
-
#initialize(id:, data:) ⇒ UpdateService
constructor
A new instance of UpdateService.
Constructor Details
#initialize(id:, data:) ⇒ UpdateService
Returns a new instance of UpdateService.
12 13 14 15 |
# File 'lib/zoho_sign/document/update_service.rb', line 12 def initialize(id:, data:) @id = id @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/zoho_sign/document/update_service.rb', line 4 def data @data end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/zoho_sign/document/update_service.rb', line 4 def id @id end |
Instance Method Details
#call ⇒ Object
Update a document.
www.zoho.com/sign/api/document-managment/update-document.html
Examples
service = ZohoSign::Document::UpdateService.call(
id: '',
data: {
requests: {
request_name: 'Name Updated',
actions: [{
action_id: '',
action_type: 'SIGN',
recipient_email: '[email protected]',
recipient_name: 'Stan Marsh'
}]
}
}
)
service.success? # => true
service.errors # => #<ActiveModel::Errors []>
service.response # => #<Faraday::Response ...>
service.response.status # => 200
service.response.body # => {}
service.facade # => #<ZohoSign::Document::Facade ...>
service.facade.request_name
service.request_name
PUT /api/v1/requests/:id
50 51 52 |
# File 'lib/zoho_sign/document/update_service.rb', line 50 def call connection.put("requests/#{id}", **params) end |