mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-05 16:24:21 +01:00
4 lines
264 B
Ruby
4 lines
264 B
Ruby
json.extract! coupon, :id, :name, :code, :type, :percent_off, :valid_until, :validity_per_user, :max_usages, :active, :created_at
|
|
json.amount_off (coupon.amount_off / 100.00) unless coupon.amount_off.nil?
|
|
json.usages coupon.invoices.count
|
|
json.status coupon.status |