Braintree.AddOn (Braintree v0.13.0)

Add-ons and discounts are created in the Control Panel. You cannot create or update them through the API.

Add-ons and discounts can be applied manually on a case-by-case basis, or you can associate them with certain plans to apply them automatically to new subscriptions. When creating a subscription, it will automatically inherit any add-ons and/or discounts associated with the plan. You can override those details at the time you create or update the subscription.

Link to this section Summary

Functions

Returns a list of Braintree::AddOn structs.

Link to this section Types

@type t() :: %Braintree.AddOn{
  amount: String.t(),
  current_billing_cycle: integer(),
  description: String.t(),
  id: String.t(),
  kind: String.t(),
  name: String.t(),
  never_expires?: boolean(),
  number_of_billing_cycles: integer(),
  quantity: integer()
}

Link to this section Functions

Link to this function

all(opts \\ [])

@spec all(Keyword.t()) :: {:ok, [t()]} | {:error, Braintree.ErrorResponse.t()}

Returns a list of Braintree::AddOn structs.

example

Example

{:ok, addons} = Braintree.AddOns.all()