2016-03-23 18:39:41 +01:00
|
|
|
json.price @amount[:total] / 100.00
|
2016-11-24 13:58:41 +01:00
|
|
|
json.price_without_coupon @amount[:before_coupon] / 100.00
|
2020-11-03 16:50:11 +01:00
|
|
|
if @amount[:elements]
|
|
|
|
json.details do
|
|
|
|
json.slots @amount[:elements][:slots] do |slot|
|
|
|
|
json.start_at slot[:start_at]
|
|
|
|
json.price slot[:price] / 100.00
|
|
|
|
json.promo slot[:promo]
|
|
|
|
end
|
|
|
|
json.plan @amount[:elements][:plan] / 100.00 if @amount[:elements][:plan]
|
2016-03-23 18:39:41 +01:00
|
|
|
end
|
2020-11-03 16:50:11 +01:00
|
|
|
end
|
|
|
|
if @amount[:schedule]
|
|
|
|
json.schedule do
|
|
|
|
json.items @amount[:schedule][:items] do |item|
|
2020-11-12 16:44:55 +01:00
|
|
|
json.amount item.amount / 100.00
|
2020-11-03 16:50:11 +01:00
|
|
|
json.due_date item.due_date
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|