Sha256: b2e7353c08542e6a8ac5de6973333e18e3ec1deb2cff387d68f03ae385378932
Contents?: true
Size: 1.24 KB
Versions: 12
Compression:
Stored size: 1.24 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).execute end def resource resource = resource_finder.new(user: spree_current_user, number: params[:id]).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 end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems