From 1725ec68de00c95004c8bcda9384fa593778510c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurice=20Preu=C3=9F=20=28envoyr=29?= Date: Thu, 1 May 2025 18:16:51 +0200 Subject: [PATCH] update subscriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maurice Preuß (envoyr) --- src/Id/Resources/Subscription.php | 12 ++++++------ src/Id/Resources/Subscriptions.php | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Id/Resources/Subscription.php b/src/Id/Resources/Subscription.php index fca2b52..45ebd75 100644 --- a/src/Id/Resources/Subscription.php +++ b/src/Id/Resources/Subscription.php @@ -26,21 +26,21 @@ class Subscription extends BaseResource * Update a given subscription from the current user. * * @param array{ - * name: null, + * name: string, * description: null|string, * unit: string, * price: float, - * vat_rate: null|float, + * vat_rate: float, * payload: null|array, * ends_at: null|string, * webhook_url: null|string, * webhook_secret: null|string * } $attributes The subscription data: - * - name: The name + * - name: The name (required when set) * - description: The description (optional) - * - unit: The unit (e.g. "hour", "day", "week", "month", "year") - * - price: The price per unit - * - vat_rate: The VAT rate (optional) + * - unit: The unit (required when set, e.g. "hour", "day", "week", "month", "year") + * - price: The price per unit (required when set) + * - vat_rate: The VAT rate (required when set) * - payload: The payload (optional) * - ends_at: The end date (optional) * - webhook_url: The webhook URL (optional) diff --git a/src/Id/Resources/Subscriptions.php b/src/Id/Resources/Subscriptions.php index fd9f7f0..8933707 100644 --- a/src/Id/Resources/Subscriptions.php +++ b/src/Id/Resources/Subscriptions.php @@ -14,11 +14,11 @@ class Subscriptions extends BaseCollection * Create a new subscription for the current user. * * @param array{ - * name: null, + * name: string, * description: null|string, * unit: string, * price: float, - * vat_rate: null|float, + * vat_rate: float, * payload: null|array, * ends_at: null|string, * webhook_url: null|string, @@ -28,7 +28,7 @@ class Subscriptions extends BaseCollection * - description: The description (optional) * - unit: The unit (e.g. "hour", "day", "week", "month", "year") * - price: The price per unit - * - vat_rate: The VAT rate (optional) + * - vat_rate: The VAT rate (required when set) * - payload: The payload (optional) * - ends_at: The end date (optional) * - webhook_url: The webhook URL (optional)