Class: SignwellSDK::Resources::V1::Hooks
- Inherits:
-
Object
- Object
- SignwellSDK::Resources::V1::Hooks
- Defined in:
- lib/signwell_sdk/resources/v1/hooks.rb
Instance Method Summary collapse
-
#create(callback_url:, api_application_id: nil, request_options: {}) ⇒ nil
Register a callback URL that we will post document events to.
-
#delete(id, request_options: {}) ⇒ nil
Deletes a registered callback URL that we are posting document events to.
-
#initialize(client:) ⇒ Hooks
constructor
private
A new instance of Hooks.
-
#list(request_options: {}) ⇒ nil
List all the webhooks in the account.
Constructor Details
#initialize(client:) ⇒ Hooks
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Hooks.
72 73 74 |
# File 'lib/signwell_sdk/resources/v1/hooks.rb', line 72 def initialize(client:) @client = client end |
Instance Method Details
#create(callback_url:, api_application_id: nil, request_options: {}) ⇒ nil
Register a callback URL that we will post document events to.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/signwell_sdk/resources/v1/hooks.rb', line 20 def create(params) parsed, = SignwellSDK::V1::HookCreateParams.dump_request(params) @client.request( method: :post, path: "api/v1/hooks", body: parsed, model: NilClass, options: ) end |
#delete(id, request_options: {}) ⇒ nil
Deletes a registered callback URL that we are posting document events to.
60 61 62 63 64 65 66 67 |
# File 'lib/signwell_sdk/resources/v1/hooks.rb', line 60 def delete(id, params = {}) @client.request( method: :delete, path: ["api/v1/hooks/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#list(request_options: {}) ⇒ nil
List all the webhooks in the account.
40 41 42 43 44 45 46 47 |
# File 'lib/signwell_sdk/resources/v1/hooks.rb', line 40 def list(params = {}) @client.request( method: :get, path: "api/v1/hooks", model: NilClass, options: params[:request_options] ) end |