Braintree v0.4.0 Braintree.Subscription
Manage customer subscriptions to reocurring billing plans.
For additional reference see: https://developers.braintreepayments.com/reference/request/subscription/create/ruby
Summary
Functions
Create a subscription, or return an error response with after failed validation
Types
t :: %Braintree.Subscription{add_ons: [], balance: String.t, billing_day_of_month: String.t, billing_period_end_date: String.t, billing_period_start_date: String.t, created_at: String.t, current_billing_cycle: String.t, days_past_due: String.t, descriptor: String.t, discounts: [], failure_count: String.t, first_billing_date: String.t, id: String.t, merchant_account_id: String.t, never_expires: String.t, next_bill_amount: String.t, next_billing_date: String.t, next_billing_period_amount: String.t, number_of_billing_cycles: String.t, paid_through_date: String.t, payment_method_token: String.t, plan_id: String.t, price: String.t, status: String.t, status_history: [], transactions: [], trial_duration: String.t, trial_duration_unit: String.t, trial_period: String.t, updated_at: String.t}
Functions
Specs
create(Map.t) ::
{:ok, t} |
{:error, Braintree.ErrorResponse.t}
Create a subscription, or return an error response with after failed validation.
Example
{:ok, customer} = Braintree.Customer.create(%{payment_method_nonce: "fake-valid-nonce"})
{:ok, subscription} = Braintree.Subscription.create(%{})
customer.company # Braintree