View Source ExChargebee.Coupon (ex_chargebee v0.4.5)

An interface for Interacting with coupons

For More information see Chargebee coupon Documentation

Summary

Functions

Perform a copy on individual coupon.

Perform a coupon create_for_items.

Perform a delete on individual coupon.

Returns a list of coupons. Pagination is handled automatically unless the opt paginate is set to false.

Returns a stream of coupons. Pagination is handled automatically as the stream is consumed.

Perform a unarchive on individual coupon.

Perform a update_for_items on individual coupon.

Functions

Link to this function

copy(resource_id, params \\ %{}, opts \\ [])

View Source
@spec copy(String.t(), map(), keyword()) :: map() | nil

Perform a copy on individual coupon.

Find more information in the Chargebee Documentation

Link to this function

create_for_items(params, opts \\ [])

View Source
@spec create_for_items(
  map(),
  keyword()
) :: map() | nil

Perform a coupon create_for_items.

Find more information in the Chargebee Documentation

Link to this function

delete(resource_id, params \\ %{}, opts \\ [])

View Source
@spec delete(String.t(), map(), keyword()) :: map() | nil

Perform a delete on individual coupon.

Find more information in the Chargebee Documentation

Link to this function

list(params \\ %{}, opts \\ [])

View Source
@spec list(
  map(),
  keyword()
) :: [map()] | nil

Returns a list of coupons. Pagination is handled automatically unless the opt paginate is set to false.

opts:

  • site: the site to use for the request. Defaults to the default site.
  • paginate: whether to paginate the results. Defaults to false. If false, all results will be returned.
@spec operations() :: Keyword.t()
Link to this function

retrieve(resource_id, opts \\ [])

View Source
@spec retrieve(
  String.t(),
  keyword()
) :: map() | nil
Link to this function

stream_list(params \\ %{}, opts \\ [])

View Source
@spec stream_list(
  map(),
  keyword()
) :: Enumerable.t()

Returns a stream of coupons. Pagination is handled automatically as the stream is consumed.

Link to this function

unarchive(resource_id, params \\ %{}, opts \\ [])

View Source
@spec unarchive(String.t(), map(), keyword()) :: map() | nil

Perform a unarchive on individual coupon.

Find more information in the Chargebee Documentation

Link to this function

update_for_items(resource_id, params \\ %{}, opts \\ [])

View Source
@spec update_for_items(String.t(), map(), keyword()) :: map() | nil

Perform a update_for_items on individual coupon.

Find more information in the Chargebee Documentation