stripity_stripe v2.0.0-alpha.10 Stripe.Coupon
Work with Stripe coupon objects.
You can:
- Create a coupon
- Retrieve a coupon
- Update a coupon
- Delete a coupon
- list all coupons
Stripe API reference: https://stripe.com/docs/api#coupons
Summary
Types
t()
t :: %Stripe.Coupon{amount_off: term, created: term, currency: term, duration: term, duration_in_months: term, id: term, livemode: term, max_redemptions: term, metadata: term, object: term, percent_off: term, redeem_by: term, times_redeemed: term}
Functions
Create a coupon.
Delete a coupon.
list(params \\ %{}, opts \\ [])
list(map, Keyword.t) :: {:ok, Stripe.List.t} | {:error, Stripe.api_error_struct}
List all coupons.
retrieve(id, opts \\ [])
retrieve(binary, Keyword.t) :: {:ok, t} | {:error, Stripe.api_error_struct}
Retrieve a coupon.
update(id, changes, opts \\ [])
update(binary, map, list) ::
{:ok, t} |
{:error, Stripe.api_error_struct}
Update a coupon.
Takes the id and a map of changes.