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

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

Summary

Functions

Functions

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

@spec 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

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

@spec 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

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

@spec 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

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

@spec 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

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

@spec 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

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

@spec 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

retrieve_a_category_discount(id, token, app \\ nil)

@spec 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

retrieve_a_shipping_discount(shipping_discount_id, token, app \\ nil)

@spec 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

retrieve_discounts_assignments(id, token, app \\ nil)

@spec 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

retrieve_order_discount(id, token, app \\ nil)

@spec 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

retrieve_product_discount(product_discount_id, token, app \\ nil)

@spec 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

retrieve_subscription_trial(trial_id, token, app \\ nil)

@spec 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