Class: Spree::Api::V3::Admin::GiftCardsController

Inherits:
ResourceController show all
Defined in:
app/controllers/spree/api/v3/admin/gift_cards_controller.rb

Overview

Admin CRUD for ‘Spree::GiftCard`. Scoped to the current store via the model’s ‘SingleStoreResource` include — the base controller’s ‘scope` already applies `model_class.for_store(current_store)`.

‘store` and `created_by` are auto-stamped by `build_resource` in `Spree::Api::V3::ResourceController`, so create requests only need to include user-facing attributes (amount, currency, expires_at, optional code, optional user_id).

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

ErrorHandler::ERROR_CODES

Constants included from JwtAuthentication

JwtAuthentication::JWT_AUDIENCE_ADMIN, JwtAuthentication::JWT_AUDIENCE_STORE, JwtAuthentication::JWT_ISSUER, JwtAuthentication::USER_TYPE_ADMIN, JwtAuthentication::USER_TYPE_CUSTOMER

Method Summary

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!