Nombaone.Coupon (Nomba One v0.1.0)

View Source

A reusable discount rule. Applying a coupon to a customer or subscription creates a Nombaone.Discount — the coupon is the rule, the discount is one application of it.

Exactly one of amount_off_in_kobo (integer kobo) or percent_off (1–100) is non-nil. duration is one of once, repeating, forever.

Summary

Types

t()

@type t() :: %Nombaone.Coupon{
  __raw__: term(),
  amount_off_in_kobo: term(),
  code: term(),
  created_at: term(),
  domain: term(),
  duration: term(),
  duration_in_cycles: term(),
  id: term(),
  max_redemptions: term(),
  mode: term(),
  percent_off: term(),
  redeem_by: term(),
  times_redeemed: term()
}