Sha256: 7d402914668c9442d247bab995ee28ae2bda8dea01e9b9d6f00e39fb4659176a
Contents?: true
Size: 1.22 KB
Versions: 11
Compression:
Stored size: 1.22 KB
Contents
json.cache! [I18n.locale, shipment] do json.(shipment, *shipment_attributes) json.order_id(shipment.order.number) json.stock_location_name(shipment.stock_location.name) json.shipping_rates(shipment.shipping_rates) do |shipping_rate| json.partial!("spree/api/shipping_rates/shipping_rate", shipping_rate: shipping_rate) end json.selected_shipping_rate do if shipment.selected_shipping_rate json.partial!("spree/api/shipping_rates/shipping_rate", shipping_rate: shipment.selected_shipping_rate) else json.nil! end end json.shipping_methods(shipment.shipping_methods) do |shipping_method| json.(shipping_method, :id, :code, :name) json.zones(shipping_method.zones) do |zone| json.(zone, :id, :name, :description) end json.shipping_categories(shipping_method.shipping_categories) do |shipping_category| json.(shipping_category, :id, :name) end end json.manifest(shipment.manifest) do |manifest_item| json.variant_id manifest_item.variant.id json.quantity(manifest_item.quantity) json.states(manifest_item.states) end json.adjustments(shipment.adjustments) do |adjustment| json.partial!("spree/api/adjustments/adjustment", adjustment: adjustment) end end
Version data entries
11 entries across 11 versions & 1 rubygems