Infusionsoft.Endpoints.XML.Discount (Infusionsoft v0.7.0) View Source

Provides the raw endpoints to Infusionsoft's XML API for Discount.

Link to this section Summary

Functions

Link to this section Functions

Link to this function

assign_product_to_discount(id, product_id, token, app \\ nil)

View Source

Specs

assign_product_to_discount(integer(), integer(), String.t(), nil | String.t()) ::
  {:ok, map()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-assign-a-product-to-a-category-discount

Link to this function

create_a_category_discount(name, description, apply_discount_to_commission, amt, token, app \\ nil)

View Source

Specs

create_a_category_discount(
  String.t(),
  String.t(),
  boolean(),
  float(),
  String.t(),
  nil | String.t()
) :: {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-create-a-category-discount

Link to this function

create_a_shipping_discount(name, description, apply_discount_to_commission, percent_or_amt, amt, token, app \\ nil)

View Source

Specs

create_a_shipping_discount(
  String.t(),
  String.t(),
  boolean(),
  :percent | :amount,
  float(),
  String.t(),
  nil | String.t()
) :: {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-create-a-shipping-discount

Link to this function

create_order_discount(name, apply_discount_to_commision, percent_or_amt, pay_type, token, app \\ nil)

View Source

Specs

create_order_discount(
  String.t(),
  String.t(),
  :percent | :amount,
  :gross | :net,
  String.t(),
  nil | String.t()
) :: {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-create-an-order-discount

Link to this function

create_product_discount(name, description, apply_discount_to_commission, product_id, percent_or_amt, amt, token, app \\ nil)

View Source

Specs

create_product_discount(
  String.t(),
  String.t(),
  boolean(),
  integer(),
  :percent | :amount,
  float(),
  String.t(),
  nil | String.t()
) :: {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-create-a-product-discount

Link to this function

create_subscription_trial(name, description, free_trial_days, hide_price, subscription_plan_id, token, app \\ nil)

View Source

Specs

create_subscription_trial(
  String.t(),
  String.t(),
  integer(),
  boolean(),
  integer(),
  String.t(),
  nil | String.t()
) :: {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-create-a-free-trial-on-a-subscription

Link to this function

retrieve_a_category_discount(id, token, app \\ nil)

View Source

Specs

retrieve_a_category_discount(integer(), String.t(), nil | String.t()) ::
  {:ok, map()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-retrieve-a-category-discount

Link to this function

retrieve_a_shipping_discount(shipping_discount_id, token, app \\ nil)

View Source

Specs

retrieve_a_shipping_discount(integer(), String.t(), nil | String.t()) ::
  {:ok, map()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-retrieve-a-shipping-discount

Link to this function

retrieve_discounts_assignments(id, token, app \\ nil)

View Source

Specs

retrieve_discounts_assignments(integer(), String.t(), nil | String.t()) ::
  {:ok, map()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-retrieve-a-category-discount-s-category-assignments

Link to this function

retrieve_order_discount(id, token, app \\ nil)

View Source

Specs

retrieve_order_discount(integer(), String.t(), nil | String.t()) ::
  {:ok, map()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-retrieve-an-order-s-total-discount

Link to this function

retrieve_product_discount(product_discount_id, token, app \\ nil)

View Source

Specs

retrieve_product_discount(integer(), String.t(), nil | String.t()) ::
  {:ok, map()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-retrieve-a-product-total-discount

Link to this function

retrieve_subscription_trial(trial_id, token, app \\ nil)

View Source

Specs

retrieve_subscription_trial(integer(), String.t(), nil | String.t()) ::
  {:ok, map()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#discount-retrieve-a-subscription-s-free-trial