ThinkificAdminAPI.Api.Promotions (Thinkific Admin API v0.1.3)
API calls for all endpoints tagged Promotions
.
Link to this section Summary
Functions
createPromotion Create a new promotion
deletePromotionByID Delete promotion by provided ID
getPromotionByID Get promotion by provided ID
Get Promotion associated with the provided Coupon code. Find a Promotion by Coupon Code and Product
getPromotions List promotions
updatePromotionByID Update promotion by provided ID
Link to this section Functions
create_promotion(connection, opts \\ [])
Specs
create_promotion(Tesla.Env.client(), keyword()) :: {:ok, ThinkificAdminAPI.Model.PromotionResponse.t()} | {:error, Tesla.Env.t()}
createPromotion Create a new promotion
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :body (PromotionRequest): New Promotion parameters
Returns
} on success {:error, info} on failure
delete_promotion_by_id(connection, id, opts \\ [])
Specs
delete_promotion_by_id(Tesla.Env.client(), float(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
deletePromotionByID Delete promotion by provided ID
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- id (float()): Id of the promotion in the form of an integer
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
get_promotion_by_id(connection, id, opts \\ [])
Specs
get_promotion_by_id(Tesla.Env.client(), float(), keyword()) :: {:ok, ThinkificAdminAPI.Model.PromotionResponse.t()} | {:error, Tesla.Env.t()}
getPromotionByID Get promotion by provided ID
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- id (float()): Id of the promotion in the form of an integer
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
get_promotionassociatedwiththeprovided_couponcode_(connection, product_id, coupon_code, opts \\ [])
Specs
get_promotionassociatedwiththeprovided_couponcode_( Tesla.Env.client(), float(), String.t(), keyword() ) :: {:ok, ThinkificAdminAPI.Model.PromotionResponse.t()} | {:error, Tesla.Env.t()}
Get Promotion associated with the provided Coupon code. Find a Promotion by Coupon Code and Product
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- product_id (float()): The id of the Product to which the promotion applies.
- coupon_code (String.t): The Coupon code to be used as search critieria.
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
get_promotions(connection, opts \\ [])
Specs
get_promotions(Tesla.Env.client(), keyword()) :: {:ok, ThinkificAdminAPI.Model.GetPromotionsResponse.t()} | {:error, Tesla.Env.t()}
getPromotions List promotions
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- 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
update_promotion_by_id(connection, id, opts \\ [])
Specs
update_promotion_by_id(Tesla.Env.client(), float(), keyword()) :: {:ok, ThinkificAdminAPI.Model.PromotionResponse.t()} | {:error, Tesla.Env.t()}
updatePromotionByID Update promotion by provided ID
Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- id (float()): Id of the promotion in the form of an integer
- opts (KeywordList): [optional] Optional parameters
- :body (PromotionRequest): Promotion attributes
Returns
} on success {:error, info} on failure