Class: CheckoutSdk::Previous::Webhooks::WebhooksClient
- Inherits:
-
Client
- Object
- Client
- CheckoutSdk::Previous::Webhooks::WebhooksClient
show all
- Defined in:
- lib/checkout_sdk/webhooks/webhooks_client.rb
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary
collapse
Constructor Details
#initialize(api_client, configuration) ⇒ WebhooksClient
Returns a new instance of WebhooksClient.
12
13
14
|
# File 'lib/checkout_sdk/webhooks/webhooks_client.rb', line 12
def initialize(api_client, configuration)
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY)
end
|
Instance Method Details
#patch_webhook(webhook_id, webhook_request) ⇒ Object
39
40
41
|
# File 'lib/checkout_sdk/webhooks/webhooks_client.rb', line 39
def patch_webhook(webhook_id, webhook_request)
api_client.invoke_patch(build_path(WEBHOOKS, webhook_id), sdk_authorization, webhook_request)
end
|
#register_webhook(webhook_request, idempotency_key = nil) ⇒ Object
22
23
24
|
# File 'lib/checkout_sdk/webhooks/webhooks_client.rb', line 22
def register_webhook(webhook_request, idempotency_key = nil)
api_client.invoke_post(WEBHOOKS, sdk_authorization, webhook_request, idempotency_key)
end
|
#remove_webhook(webhook_id) ⇒ Object
44
45
46
|
# File 'lib/checkout_sdk/webhooks/webhooks_client.rb', line 44
def remove_webhook(webhook_id)
api_client.invoke_delete(build_path(WEBHOOKS, webhook_id), sdk_authorization)
end
|
#retrieve_webhook(webhook_id) ⇒ Object
27
28
29
|
# File 'lib/checkout_sdk/webhooks/webhooks_client.rb', line 27
def retrieve_webhook(webhook_id)
api_client.invoke_get(build_path(WEBHOOKS, webhook_id), sdk_authorization)
end
|
#retrieve_webhooks ⇒ Object
16
17
18
|
# File 'lib/checkout_sdk/webhooks/webhooks_client.rb', line 16
def retrieve_webhooks
api_client.invoke_get(WEBHOOKS, sdk_authorization)
end
|
#update_webhook(webhook_id, webhook_request) ⇒ Object
33
34
35
|
# File 'lib/checkout_sdk/webhooks/webhooks_client.rb', line 33
def update_webhook(webhook_id, webhook_request)
api_client.invoke_put(build_path(WEBHOOKS, webhook_id), sdk_authorization, webhook_request)
end
|