Class: Spree::Api::V3::Store::CurrenciesController
- Inherits:
-
BaseController
- Object
- ActionController::API
- BaseController
- BaseController
- Spree::Api::V3::Store::CurrenciesController
- Includes:
- HttpCaching
- Defined in:
- app/controllers/spree/api/v3/store/currencies_controller.rb
Constant Summary
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
-
#index ⇒ Object
GET /api/v3/store/currencies.
Methods included from ApiKeyAuthentication
#authenticate_api_key!, #authenticate_secret_key!
Methods included from JwtAuthentication
#authenticate_user, #require_authentication!
Instance Method Details
#index ⇒ Object
GET /api/v3/store/currencies
9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/spree/api/v3/store/currencies_controller.rb', line 9 def index currencies = current_store.supported_currencies_list return unless cache_collection(currencies) render json: { data: currencies.map { |currency| Spree.api.currency_serializer.new(currency).to_h } } end |