code_corps v0.0.1 CodeCorps.StripeConnectSubscription View Source
Represents a Subscription object created using the Stripe API
Fields
application_fee_percent- Percentage of fee taken by Code Corpscancelled_at- Timestamp of cancellation, provided the subscription has been cancelledcreated- A timestamp, indicating when the plan was created by Stripecurrent_period_end- End date of the period the subscription has been last invoiced forcurrent_period_start- Start date of the period the subscription was last invoicedcustomer_id_from_stripe- Stripe’scustomer_idended_at- End date, if the subscribtion has been ended (by cancelling or switching plans)id_from_stripe- Stripe’sidplan_id_from_stripe- Stripe’s planidquantity- Quantity of the plan to subscribe to. For example, we have a $0.01 plan, which we subscribe in multiple quantities for.start- Date the most recent update to this subscription startedstatus- trialing, active, past_due, canceled, or unpaid
Note on status
Subscriptioms start at trialing and then move on to active when trial period is over.
When active, if payment fails, it will go into past_due.
Once enough retry attempts failures occur,
it goes either to cancelled or unpaid depending on settings.
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t() :: %CodeCorps.StripeConnectSubscription{__meta__: term(), application_fee_percent: term(), cancelled_at: term(), created: term(), current_period_end: term(), current_period_start: term(), customer_id_from_stripe: term(), ended_at: term(), id: term(), id_from_stripe: term(), inserted_at: term(), plan_id_from_stripe: term(), project: term(), quantity: term(), start: term(), status: term(), stripe_connect_plan: term(), stripe_connect_plan_id: term(), updated_at: term(), user: term(), user_id: term()}
Link to this section Functions
Link to this function
create_changeset(struct, params \\ %{})
View Source
create_changeset(CodeCorps.StripeConnectSubscription.t(), map()) :: Ecto.Changeset.t()
Link to this function
webhook_update_changeset(struct, params \\ %{})
View Source
webhook_update_changeset(CodeCorps.StripeConnectSubscription.t(), map()) :: Ecto.Changeset.t()