Sha256: 6b1a616e77ab65e2e11955decc2c4c1de55c91b9efc9c89ab6144a7c0ca531fd
Contents?: true
Size: 1.35 KB
Versions: 35
Compression:
Stored size: 1.35 KB
Contents
module Spree module Api module V2 module Storefront module Account class OrdersController < ::Spree::Api::V2::ResourceController before_action :require_spree_current_user private def collection collection_finder.new(user: spree_current_user, store: current_store).execute end def resource resource = resource_finder.new(user: spree_current_user, number: params[:id], store: current_store).execute.take raise ActiveRecord::RecordNotFound if resource.nil? resource end def allowed_sort_attributes super << :completed_at end def collection_serializer Spree::Api::Dependencies.storefront_order_serializer.constantize end def resource_serializer Spree::Api::Dependencies.storefront_order_serializer.constantize end def collection_finder Spree::Api::Dependencies.storefront_completed_order_finder.constantize end def resource_finder Spree::Api::Dependencies.storefront_completed_order_finder.constantize end def model_class Spree::Order end end end end end end end
Version data entries
35 entries across 35 versions & 3 rubygems