ThinkificAdminAPI.Api.Coupons (Thinkific Admin API v0.1.3)
API calls for all endpoints tagged Coupons
.
Link to this section Summary
Functions
bulkCreateCoupons Bulk Create Coupons
createCoupon Create a Coupon
deleteCouponByID Deletes a coupon identified by the provided id
getCouponByID Retrieve a Coupon
getCoupons Retrieve a list of all Coupons
updateCoupon Update an existing Coupon
Link to this section Functions
Link to this function
bulk_create_coupons(connection, promotion_id, body, opts \\ [])
Specs
bulk_create_coupons( Tesla.Env.client(), float(), ThinkificAdminAPI.Model.BulkCreateCouponRequest.t(), keyword() ) :: {:ok, ThinkificAdminAPI.Model.CreateBulkCouponResponse.t()} | {:error, Tesla.Env.t()}
bulkCreateCoupons Bulk Create Coupons
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- promotion_id (float()): The ID of the Promotion for which to bulk create the Coupons.
- body (BulkCreateCouponRequest): New Coupon attributes
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
Link to this function
create_coupon(connection, promotion_id, body, opts \\ [])
Specs
create_coupon( Tesla.Env.client(), float(), ThinkificAdminAPI.Model.CreateCouponRequest.t(), keyword() ) :: {:ok, ThinkificAdminAPI.Model.CouponResponse.t()} | {:error, Tesla.Env.t()}
createCoupon Create a Coupon
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- promotion_id (float()): ID of the Promotion to add the Coupon to in the form of an integer.
- body (CreateCouponRequest): New Coupon attributes
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
Link to this function
delete_coupon_by_id(connection, id, opts \\ [])
Specs
delete_coupon_by_id(Tesla.Env.client(), float(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
deleteCouponByID Deletes a coupon identified by the provided id
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- id (float()): The ID of the Coupon in the form of an integer.
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
Link to this function
get_coupon_by_id(connection, id, opts \\ [])
Specs
get_coupon_by_id(Tesla.Env.client(), float(), keyword()) :: {:ok, ThinkificAdminAPI.Model.CouponResponse.t()} | {:error, Tesla.Env.t()}
getCouponByID Retrieve a Coupon
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- id (float()): The ID of the Coupon in the form of an integer.
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
Link to this function
get_coupons(connection, promotion_id, opts \\ [])
Specs
get_coupons(Tesla.Env.client(), float(), keyword()) :: {:ok, ThinkificAdminAPI.Model.GetCouponResponse.t()} | {:error, Tesla.Env.t()}
getCoupons Retrieve a list of all Coupons
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- promotion_id (float()): The ID of the Promotion for which to get the Coupons in the form of an integer.
- opts (KeywordList): [optional] Optional parameters
- :page (float()): The page within the collection to fetch.
- :limit (float()): The number of items to be returned
Returns
} on success {:error, info} on failure
Link to this function
update_coupon(connection, id, body, opts \\ [])
Specs
update_coupon( Tesla.Env.client(), float(), ThinkificAdminAPI.Model.UpdateCoupon.t(), keyword() ) :: {:ok, ThinkificAdminAPI.Model.CouponResponse.t()} | {:error, Tesla.Env.t()}
updateCoupon Update an existing Coupon
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- id (float()): The ID of the Coupon in the form of an integer.
- body (UpdateCoupon): Update an existing coupon
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure