Packages

🚂 Complete Polar SDK for Elixir with 1:1 feature parity to the official JavaScript SDK. Full API coverage. Fully typed per-event modules. Modern stack: Finch HTTP/2, RustyJSON, connection pooling, automatic retries, OAuth, webhooks, telemetry, explicit client options, streaming pagination.

Current section

Files

Jump to
polar_express lib polar_express events subscription_active.ex
Raw

lib/polar_express/events/subscription_active.ex

# File generated from our OpenAPI spec
defmodule PolarExpress.Events.SubscriptionActive do
@moduledoc """
Webhook event for `subscription.active`.
Sent when a subscription becomes active,
whether because it's a new paid subscription or because payment was recovered.
**Discord & Slack support:** Full
The `data` field contains a `PolarExpress.Schemas.Subscription` struct.
"""
@typedoc """
* `type` - Always `"subscription.active"`.
* `data` - The event payload. See `PolarExpress.Schemas.Subscription`.
* `timestamp` - ISO 8601 timestamp of when the event occurred.
"""
@type t :: %__MODULE__{
type: String.t(),
data: PolarExpress.Schemas.Subscription.t(),
timestamp: String.t()
}
defstruct [:type, :data, :timestamp]
@doc "Returns the event type string."
@spec event_type() :: String.t()
def event_type, do: "subscription.active"
end