Sha256: eed1a273298ad7b89249eb218b868eefe4c7b8b1e33e61ec00fd4f84af9fdf4f

Contents?: true

Size: 692 Bytes

Versions: 7

Compression:

Stored size: 692 Bytes

Contents

object @order
attributes *order_attributes

if lookup_context.find_all("spree/api/v1/orders/#{@order.state}").present?
  extends "spree/api/v1/orders/#{@order.state}"
end

child :billing_address => :bill_address do
  extends "spree/api/v1/addresses/show"
end

child :shipping_address => :ship_address do
  extends "spree/api/v1/addresses/show"
end

child :line_items => :line_items do
  extends "spree/api/v1/line_items/show"
end

child :payments => :payments do
  attributes :id, :amount, :state, :payment_method_id
  child :payment_method => :payment_method do
    attributes :id, :name, :environment
  end
end

child :shipments => :shipments do
  extends "spree/api/v1/shipments/show"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spree_api-1.2.5 app/views/spree/api/v1/orders/show.rabl
spree_api-1.1.6 app/views/spree/api/v1/orders/show.rabl
spree_api-1.1.5 app/views/spree/api/v1/orders/show.rabl
spree_api-1.2.4 app/views/spree/api/v1/orders/show.rabl
spree_api-1.2.3 app/views/spree/api/v1/orders/show.rabl
spree_api-1.2.2 app/views/spree/api/v1/orders/show.rabl
spree_api-1.1.4 app/views/spree/api/v1/orders/show.rabl