Module: JPSClient::API::Webhook
- Included in:
- Client
- Defined in:
- lib/jpsclient/api/webhook.rb
Overview
Webhook 相关 API 自动生成的模块,处理 webhook 相关接口
Instance Method Summary collapse
-
#create_callback(params: {}) ⇒ Hash
Create Callback.
-
#create_event(params: {}) ⇒ Hash
Create Event.
Instance Method Details
#create_callback(params: {}) ⇒ Hash
Create Callback
11 12 13 14 15 16 17 18 |
# File 'lib/jpsclient/api/webhook.rb', line 11 def create_callback(params: {}) config = @request_config && @request_config["webhook_callback"] raise JPSClient::ExceptionError, "Missing config for webhook_callback" unless config && config["url"] path = config["url"] return request_with_auth(:post, path, body: params) end |
#create_event(params: {}) ⇒ Hash
Create Event
24 25 26 27 28 29 30 31 |
# File 'lib/jpsclient/api/webhook.rb', line 24 def create_event(params: {}) config = @request_config && @request_config["webhook_event"] raise JPSClient::ExceptionError, "Missing config for webhook_event" unless config && config["url"] path = config["url"] return request_with_auth(:post, path, body: params) end |