Class: Spree::Api::V2::Storefront::GuestOrdersController

Inherits:
ResourceController
  • Object
show all
Defined in:
app/controllers/spree/api/v2/storefront/guest_orders_controller.rb

Instance Method Summary collapse

Instance Method Details

#collectionObject



6
7
8
9
# File 'app/controllers/spree/api/v2/storefront/guest_orders_controller.rb', line 6

def collection
  orders = model_class.where(token: params[:order_tokens])
  apply_filters(orders)
end

#showObject



11
12
13
14
15
# File 'app/controllers/spree/api/v2/storefront/guest_orders_controller.rb', line 11

def show
  order = find_order

  render_serialized_payload { serialize_resource(order) }
end