Class: ApolloDeploySignalSdkRails::Webhooks
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::Webhooks
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb
Overview
webhooks API domain
Instance Attribute Summary collapse
-
#transport ⇒ Object
readonly
Returns the value of attribute transport.
Instance Method Summary collapse
- #create_webhook(project_id:, body:) ⇒ WebhookCreateResponse
- #delete_webhook(project_id:, endpoint_id:) ⇒ nil
- #get_webhook(project_id:, endpoint_id:) ⇒ WebhookResponse
- #get_webhook_delivery(project_id:, endpoint_id:, delivery_id:) ⇒ WebhookDeliveryResponse
-
#initialize(transport) ⇒ Webhooks
constructor
A new instance of Webhooks.
- #list_webhook_deliveries(project_id:, endpoint_id:) ⇒ WebhookDeliveryPageResponse
- #list_webhooks(project_id:) ⇒ WebhookPageResponse
- #replay_webhook_delivery(project_id:, endpoint_id:, delivery_id:) ⇒ nil
- #test_webhook(project_id:, endpoint_id:) ⇒ WebhookDeliveryResponse
- #update_webhook(project_id:, endpoint_id:, body:) ⇒ WebhookResponse
Constructor Details
#initialize(transport) ⇒ Webhooks
Returns a new instance of Webhooks.
11 12 13 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 11 def initialize(transport) @transport = transport end |
Instance Attribute Details
#transport ⇒ Object (readonly)
Returns the value of attribute transport.
9 10 11 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 9 def transport @transport end |
Instance Method Details
#create_webhook(project_id:, body:) ⇒ WebhookCreateResponse
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 91 def create_webhook(project_id:, body:) path_params = { "projectId" => project_id, } transport.request( method: :post, path: "/v1/projects/${projectId}/webhooks", path_params: path_params, body: body, content_type: "application/json", timeout_ms: nil, ) end |
#delete_webhook(project_id:, endpoint_id:) ⇒ nil
131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 131 def delete_webhook(project_id:, endpoint_id:) path_params = { "projectId" => project_id, "endpointId" => endpoint_id, } transport.request( method: :delete, path: "/v1/projects/${projectId}/webhooks/${endpointId}", path_params: path_params, timeout_ms: nil, ) end |
#get_webhook(project_id:, endpoint_id:) ⇒ WebhookResponse
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 35 def get_webhook(project_id:, endpoint_id:) path_params = { "projectId" => project_id, "endpointId" => endpoint_id, } transport.request( method: :get, path: "/v1/projects/${projectId}/webhooks/${endpointId}", path_params: path_params, timeout_ms: nil, ) end |
#get_webhook_delivery(project_id:, endpoint_id:, delivery_id:) ⇒ WebhookDeliveryResponse
72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 72 def get_webhook_delivery(project_id:, endpoint_id:, delivery_id:) path_params = { "projectId" => project_id, "endpointId" => endpoint_id, "deliveryId" => delivery_id, } transport.request( method: :get, path: "/v1/projects/${projectId}/webhooks/${endpointId}/deliveries/${deliveryId}", path_params: path_params, timeout_ms: nil, ) end |
#list_webhook_deliveries(project_id:, endpoint_id:) ⇒ WebhookDeliveryPageResponse
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 53 def list_webhook_deliveries(project_id:, endpoint_id:) path_params = { "projectId" => project_id, "endpointId" => endpoint_id, } transport.request( method: :get, path: "/v1/projects/${projectId}/webhooks/${endpointId}/deliveries", path_params: path_params, timeout_ms: nil, ) end |
#list_webhooks(project_id:) ⇒ WebhookPageResponse
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 18 def list_webhooks(project_id:) path_params = { "projectId" => project_id, } transport.request( method: :get, path: "/v1/projects/${projectId}/webhooks", path_params: path_params, timeout_ms: nil, ) end |
#replay_webhook_delivery(project_id:, endpoint_id:, delivery_id:) ⇒ nil
168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 168 def replay_webhook_delivery(project_id:, endpoint_id:, delivery_id:) path_params = { "projectId" => project_id, "endpointId" => endpoint_id, "deliveryId" => delivery_id, } transport.request( method: :post, path: "/v1/projects/${projectId}/webhooks/${endpointId}/replay/${deliveryId}", path_params: path_params, timeout_ms: nil, ) end |
#test_webhook(project_id:, endpoint_id:) ⇒ WebhookDeliveryResponse
149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 149 def test_webhook(project_id:, endpoint_id:) path_params = { "projectId" => project_id, "endpointId" => endpoint_id, } transport.request( method: :post, path: "/v1/projects/${projectId}/webhooks/${endpointId}/test", path_params: path_params, timeout_ms: nil, ) end |
#update_webhook(project_id:, endpoint_id:, body:) ⇒ WebhookResponse
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/apollo_deploy_signal_sdk_rails/resources/webhooks.rb', line 111 def update_webhook(project_id:, endpoint_id:, body:) path_params = { "projectId" => project_id, "endpointId" => endpoint_id, } transport.request( method: :patch, path: "/v1/projects/${projectId}/webhooks/${endpointId}", path_params: path_params, body: body, content_type: "application/json", timeout_ms: nil, ) end |