AshBilling.Subscription

Copy Markdown View Source

A Spark DSL extension for Ash resources storing subscriptions in the database.

Usage

defmodule MyApp.Billing.Subscription do
  use Ash.Resource,
    domain: MyApp.Billing,
    extensions: [AshBilling.Subscription]

  billing_subscription do
    customer_relationship :user
    provider AshBilling.Providers.Stripe
  end
end

billing_subscription

Configuration for billing subscription resources.

Options

NameTypeDefaultDocs
providermoduleAshBilling.Providers.StripeThe billing provider module.
customer_relationshipatomThe relationship linking to the customer resource.