Sha256: 387516cb7f89537ae42aa36ccc3c253dd9628c1daccdb1378d961a6709e78575

Contents?: true

Size: 960 Bytes

Versions: 2

Compression:

Stored size: 960 Bytes

Contents

object @order
extends "spree/api/orders/order"

node(:use_billing) { @order.bill_address == @order.ship_address }

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

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

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

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

child :payments => :payments do
  attributes *payment_attributes

  child :payment_method => :payment_method do
    attributes :id, :name, :environment
  end

  child :source => :source do
    attributes *payment_source_attributes
  end
end

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sprangular-0.1.0 app/views/spree/api/orders/show.rabl
sprangular-0.0.1 app/views/spree/api/orders/show.rabl