1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-05 16:24:21 +01:00
fab-manager/app/views/api/coupons/_coupon.json.jbuilder

5 lines
257 B
Plaintext
Raw Normal View History

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.usages
json.status coupon.status