Compare commits

...
Author SHA1 Message Date
envoyr b074ec3c0c Merge pull request #12 from anikeen-com/feature/monthly-cap
Document monthly_cap, predecessor_id and expected_monthly_price
2026-11-03 12:49:37 +01:00
Maurice PreußandClaude Opus 5.5 c2493b76fd Document monthly_cap, predecessor_id and expected_monthly_price
Subscriptions (user token and app token) and checkout-session subscriptions
take a net monthly cap and the subscription they replace (a resize shares
the cap within the month). Attributes are passed through unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VbpgPaLqhBzo1AXHNs9Cx5
2026-11-03 12:43:17 +01:00
envoyr 285594e7e9 Merge pull request #11 from anikeen-com/feature/trusted-checkout-sessions
Checkout sessions: one hosted checkout for several subscriptions
2026-11-02 17:36:08 +01:00
5 changed files with 20 additions and 0 deletions

No files matched your search

+2
View File
@@ -32,6 +32,8 @@ class AppCheckoutSessions
* description?: null|string, * description?: null|string,
* unit: string, * unit: string,
* price: float|string, * price: float|string,
* monthly_cap?: null|float|string,
* predecessor_id?: null|string,
* vat_rate?: float, * vat_rate?: float,
* payload?: null|array, * payload?: null|array,
* ends_at?: null|string * ends_at?: null|string
+3
View File
@@ -17,6 +17,9 @@ use JsonSerializable;
* @property ?string $description * @property ?string $description
* @property string $unit * @property string $unit
* @property float $price * @property float $price
* @property ?float $monthly_cap net, at most this per calendar month (hour and day units)
* @property ?float $expected_monthly_price gross estimate for a month (720 hours, at most the monthly cap)
* @property ?string $predecessor_id the subscription this one replaced (a resize); they share the monthly cap
* @property ?float $vat_rate * @property ?float $vat_rate
* @property bool $active * @property bool $active
* @property bool $autorenew * @property bool $autorenew
+6
View File
@@ -44,12 +44,18 @@ class AppSubscriptions
* description?: null|string, * description?: null|string,
* unit: string, * unit: string,
* price: float|string, * price: float|string,
* monthly_cap?: null|float|string,
* predecessor_id?: null|string,
* vat_rate?: float, * vat_rate?: float,
* payload?: null|array, * payload?: null|array,
* ends_at?: null|string, * ends_at?: null|string,
* idempotency_key?: null|string * idempotency_key?: null|string
* } $attributes With an idempotency_key (max. 191 characters), a retried call returns the * } $attributes With an idempotency_key (max. 191 characters), a retried call returns the
* subscription created by the first one instead of a duplicate. * subscription created by the first one instead of a duplicate.
* monthly_cap: net, at most this per calendar month (hour and day units only,
* at most 2 decimals, not below price; null = no cap).
* predecessor_id: the subscription this one replaces (a resize; same user and
* app, checked out, not cancelled): both share the monthly cap within a month.
* *
* @throws ApiException * @throws ApiException
*/ */
+5
View File
@@ -13,6 +13,9 @@ use Throwable;
* @property string $description * @property string $description
* @property string $unit * @property string $unit
* @property float $price * @property float $price
* @property ?float $monthly_cap net, at most this per calendar month (hour and day units)
* @property ?float $expected_monthly_price gross estimate for a month (720 hours, at most the monthly cap)
* @property ?string $predecessor_id the subscription this one replaced (a resize); they share the monthly cap
* @property float $vat_rate * @property float $vat_rate
* @property array $payload * @property array $payload
* @property string $ends_at * @property string $ends_at
@@ -32,6 +35,7 @@ class Subscription extends BaseResource
* description: null|string, * description: null|string,
* unit: string, * unit: string,
* price: float, * price: float,
* monthly_cap?: null|float,
* vat_rate: float, * vat_rate: float,
* payload: null|array, * payload: null|array,
* ends_at: null|string * ends_at: null|string
@@ -41,6 +45,7 @@ class Subscription extends BaseResource
* - description: The description (optional) * - description: The description (optional)
* - unit: The unit (required when set, e.g. "hour", "day", "week", "month", "year") * - unit: The unit (required when set, e.g. "hour", "day", "week", "month", "year")
* - price: The price per unit (required when set) * - price: The price per unit (required when set)
* - monthly_cap: Net, at most this per calendar month (hour and day units; optional)
* - vat_rate: The VAT rate (required when set) * - vat_rate: The VAT rate (required when set)
* - payload: The payload (optional) * - payload: The payload (optional)
* - ends_at: The end date (optional) * - ends_at: The end date (optional)
+4
View File
@@ -20,6 +20,8 @@ class Subscriptions extends BaseCollection
* description: null|string, * description: null|string,
* unit: string, * unit: string,
* price: float, * price: float,
* monthly_cap?: null|float,
* predecessor_id?: null|string,
* vat_rate: float, * vat_rate: float,
* payload: null|array, * payload: null|array,
* ends_at: null|string * ends_at: null|string
@@ -29,6 +31,8 @@ class Subscriptions extends BaseCollection
* - description: The description (optional) * - description: The description (optional)
* - unit: The unit (e.g. "hour", "day", "week", "month", "year") * - unit: The unit (e.g. "hour", "day", "week", "month", "year")
* - price: The price per unit * - price: The price per unit
* - monthly_cap: Net, at most this per calendar month (hour and day units, max. 2 decimals; optional)
* - predecessor_id: The subscription this one replaces (a resize); both share the monthly cap (optional)
* - vat_rate: The VAT rate (required when set) * - vat_rate: The VAT rate (required when set)
* - payload: The payload (optional) * - payload: The payload (optional)
* - ends_at: The end date (optional) * - ends_at: The end date (optional)