mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-04 15:24:23 +01:00
15 lines
491 B
Ruby
15 lines
491 B
Ruby
# frozen_string_literal: true
|
|
|
|
json.extract! order, :id, :token, :statistic_profile_id, :operator_id, :reference, :state, :created_at
|
|
json.amount order.amount / 100.0 if order.amount.present?
|
|
|
|
json.order_items_attributes order.order_items do |item|
|
|
json.id item.id
|
|
json.orderable_type item.orderable_type
|
|
json.orderable_id item.orderable_id
|
|
json.orderable_name item.orderable.name
|
|
json.quantity item.quantity
|
|
json.amount item.amount / 100.0
|
|
json.is_offered item.is_offered
|
|
end
|