Sha256: dcebfc2b8a70ca1bad386fb92f520afd2270df19759bc1a2eeb3bff0270e4097
Contents?: true
Size: 1.05 KB
Versions: 10
Compression:
Stored size: 1.05 KB
Contents
module Spree module Api module V2 module Storefront class OrderStatusController < ::Spree::Api::V2::BaseController include Spree::Api::V2::Storefront::OrderConcern def show render_serialized_payload { serialize_resource(resource) } end private def resource resource = resource_finder.new(number: params[:number], token: order_token).execute.take raise ActiveRecord::RecordNotFound if resource.nil? resource end def serialize_resource(resource) resource_serializer.new( resource, include: resource_includes, sparse_fields: sparse_fields ).serializable_hash end def resource_finder Spree::Api::Dependencies.storefront_completed_order_finder.constantize end def resource_serializer Spree::Api::Dependencies.storefront_cart_serializer.constantize end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems