Class: Spree::Api::V3::Admin::WebhookDeliveriesController
- Inherits:
-
ResourceController
- Object
- ActionController::API
- BaseController
- ResourceController
- ResourceController
- Spree::Api::V3::Admin::WebhookDeliveriesController
- Defined in:
- app/controllers/spree/api/v3/admin/webhook_deliveries_controller.rb
Overview
Nested under WebhookEndpoint — deliveries are always read in the context of their endpoint (the delivery log on the endpoint detail page) and never accessed by ID at the top level.
Constant Summary
Constants included from ScopedAuthorization
ScopedAuthorization::READ_ACTIONS
Constants inherited from BaseController
BaseController::RATE_LIMIT_RESPONSE
Constants included from Idempotent
Idempotent::IDEMPOTENCY_HEADER, Idempotent::IDEMPOTENCY_TTL, Idempotent::MAX_KEY_LENGTH, Idempotent::MUTATING_METHODS
Constants included from ErrorHandler
Constants included from JwtAuthentication
JwtAuthentication::JWT_AUDIENCE_ADMIN, JwtAuthentication::JWT_AUDIENCE_STORE, JwtAuthentication::JWT_ISSUER, JwtAuthentication::USER_TYPE_ADMIN, JwtAuthentication::USER_TYPE_CUSTOMER
Instance Method Summary collapse
-
#redeliver ⇒ Hash
POST /api/v3/admin/webhook_endpoints/:webhook_endpoint_id/deliveries/:id/redeliver.
Methods inherited from ResourceController
#create, #destroy, #index, #show, #update
Methods included from Spree::Api::V3::ApiKeyAuthentication
#authenticate_api_key!, #authenticate_secret_key!
Methods included from JwtAuthentication
#authenticate_user, #require_authentication!
Instance Method Details
#redeliver ⇒ Hash
POST /api/v3/admin/webhook_endpoints/:webhook_endpoint_id/deliveries/:id/redeliver
Creates a new delivery row with the same payload + event_name and queues it. The original row is preserved for audit history.
18 19 20 21 22 23 24 |
# File 'app/controllers/spree/api/v3/admin/webhook_deliveries_controller.rb', line 18 def redeliver @resource = find_resource (:update, webhook_endpoint) new_delivery = @resource.redeliver! render json: serialize_resource(new_delivery), status: :created end |