Class: Spree::Api::V3::Store::CurrenciesController

Inherits:
Store::BaseController
  • Object
show all
Includes:
HttpCaching
Defined in:
app/controllers/spree/api/v3/store/currencies_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject

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