app/views/spree/api/shipments/_big.json.jbuilder in solidus_api-2.8.6 vs app/views/spree/api/shipments/_big.json.jbuilder in solidus_api-2.9.0.rc.1
- old
+ new
@@ -1,16 +1,10 @@
# frozen_string_literal: true
json.cache! [I18n.locale, shipment] do
json.(shipment, *shipment_attributes)
- 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.partial!("spree/api/shipments/small", shipment: shipment)
json.inventory_units(shipment.inventory_units) do |inventory_unit|
json.(inventory_unit, *inventory_unit_attributes)
json.variant do
json.partial!("spree/api/variants/small", variant: inventory_unit.variant)
json.(inventory_unit.variant, :product_id)
@@ -34,12 +28,9 @@
json.nil!
end
end
json.ship_address do
json.partial!("spree/api/addresses/address", address: shipment.order.shipping_address)
- end
- json.adjustments(shipment.order.adjustments) do |adjustment|
- json.partial!("spree/api/adjustments/adjustment", adjustment: adjustment)
end
json.payments(shipment.order.payments) do |payment|
json.(payment, :id, :amount, :display_amount, :state)
if payment.source
json.source do