Shared recurring-subscription intent schema.
The schema is payment-method neutral: Tempo and Stripe subscription methods consume the same wire fields while applying their own method constraints.
API Functions
| Function | Arity | Description | Param Kinds |
|---|---|---|---|
from_request | 1 | Parse a subscription intent from normative camelCase wire keys. | - |
to_request | 1 | Serialize a subscription intent with normative camelCase wire keys. | - |
new | 1 | Create a validated shared subscription intent. | - |
Summary
Functions
Parse a subscription intent from normative camelCase wire keys.
Create a validated shared subscription intent.
Serialize a subscription intent with normative camelCase wire keys.
Types
@type period_unit() :: :day | :week | :month
Functions
@spec from_request(map()) :: {:ok, t()} | {:error, atom()}
@spec from_request(term()) :: {:error, :missing_required_fields}
Parse a subscription intent from normative camelCase wire keys.
# descripex:contract
%{}
Create a validated shared subscription intent.
# descripex:contract
%{}
Serialize a subscription intent with normative camelCase wire keys.
# descripex:contract
%{}