From 20156860397ebb5d935d97954b0c7c54aa2e2143 Mon Sep 17 00:00:00 2001 From: Silas Sewell Date: Tue, 12 Mar 2024 10:35:44 -0400 Subject: [PATCH] Update generated code (#14) --- composer.json | 2 +- lib/AdminV1/CardPaymentMethod.php | 27 +++++++---- lib/AdminV1/JoinOrganizationFlow.php | 9 ++++ lib/AdminV1/PaymentMethod.php | 13 +++++ lib/AdminV1/PaymentMethodInput.php | 72 ++++++++++++++++++++++++++++ lib/Internal/Constants.php | 4 +- lib/UserV1/CardPaymentMethod.php | 21 +++++--- lib/UserV1/JoinOrganizationFlow.php | 9 ++++ lib/UserV1/ListRolesResponse.php | 71 +++++++++++++++++++++++++++ lib/UserV1/PaymentMethod.php | 13 +++++ lib/UserV1/PaymentMethodInput.php | 72 ++++++++++++++++++++++++++++ lib/UserV1/Role.php | 9 ++++ tests/AdminApi/FlowsTest.php | 56 ++++++++++++++++++++-- tests/AdminApi/InvoicesTest.php | 4 +- tests/AdminApi/SubscriptionsTest.php | 11 ++++- tests/UserApi/FlowsTest.php | 66 ++++++++++++++++++++++--- tests/UserApi/InvoicesTest.php | 4 +- 17 files changed, 430 insertions(+), 33 deletions(-) create mode 100644 lib/AdminV1/PaymentMethodInput.php create mode 100644 lib/UserV1/ListRolesResponse.php create mode 100644 lib/UserV1/PaymentMethodInput.php diff --git a/composer.json b/composer.json index 52a9924..f8164c0 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ }, "require-dev": { "donatj/mock-webserver": "^2.7", - "friendsofphp/php-cs-fixer": "^3.49", + "friendsofphp/php-cs-fixer": "3.49", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^10" }, diff --git a/lib/AdminV1/CardPaymentMethod.php b/lib/AdminV1/CardPaymentMethod.php index e5e23f7..07cac48 100644 --- a/lib/AdminV1/CardPaymentMethod.php +++ b/lib/AdminV1/CardPaymentMethod.php @@ -18,11 +18,6 @@ final class CardPaymentMethod implements \JsonSerializable, JsonUnserializable */ public string $brand; - /** - * The expiration date of the card. - */ - public null|CardPaymentMethodExpiration $expiration; - /** * The last for digits of the card. */ @@ -33,25 +28,38 @@ final class CardPaymentMethod implements \JsonSerializable, JsonUnserializable */ public string $fundingType; + /** + * The expiration year. + */ + public int $expYear; + + /** + * The expiration month. + */ + public int $expMonth; + public function __construct( null|string $brand = null, - null|CardPaymentMethodExpiration $expiration = null, null|string $last4 = null, null|string $fundingType = null, + null|int $expYear = null, + null|int $expMonth = null, ) { $this->brand = $brand ?? ''; - $this->expiration = $expiration ?? null; $this->last4 = $last4 ?? ''; $this->fundingType = $fundingType ?? ''; + $this->expYear = $expYear ?? 0; + $this->expMonth = $expMonth ?? 0; } public function jsonSerialize(): mixed { return (object) [ 'brand' => $this->brand ?? null, - 'expiration' => $this->expiration ?? null, 'last4' => $this->last4 ?? null, 'fundingType' => $this->fundingType ?? null, + 'expYear' => $this->expYear ?? null, + 'expMonth' => $this->expMonth ?? null, ]; } @@ -63,9 +71,10 @@ public static function jsonUnserialize(mixed $data): static return new self( $data->{'brand'} ?? null, - isset($data->{'expiration'}) ? CardPaymentMethodExpiration::jsonUnserialize($data->{'expiration'}) : null, $data->{'last4'} ?? null, $data->{'fundingType'} ?? null, + $data->{'expYear'} ?? null, + $data->{'expMonth'} ?? null, ); } } diff --git a/lib/AdminV1/JoinOrganizationFlow.php b/lib/AdminV1/JoinOrganizationFlow.php index 850c8bd..fbff36e 100644 --- a/lib/AdminV1/JoinOrganizationFlow.php +++ b/lib/AdminV1/JoinOrganizationFlow.php @@ -23,12 +23,19 @@ final class JoinOrganizationFlow implements \JsonSerializable, JsonUnserializabl */ public null|string $email; + /** + * The role to be assigned to the invitee. + */ + public null|Role $role; + public function __construct( null|string $displayName = null, null|string $email = null, + null|Role $role = null, ) { $this->displayName = $displayName ?? null; $this->email = $email ?? null; + $this->role = $role ?? null; } public function jsonSerialize(): mixed @@ -36,6 +43,7 @@ public function jsonSerialize(): mixed return (object) [ 'displayName' => $this->displayName ?? null, 'email' => $this->email ?? null, + 'role' => $this->role ?? null, ]; } @@ -48,6 +56,7 @@ public static function jsonUnserialize(mixed $data): static return new self( $data->{'displayName'} ?? null, $data->{'email'} ?? null, + isset($data->{'role'}) ? Role::jsonUnserialize($data->{'role'}) : null, ); } } diff --git a/lib/AdminV1/PaymentMethod.php b/lib/AdminV1/PaymentMethod.php index fdc8b3f..cea822b 100644 --- a/lib/AdminV1/PaymentMethod.php +++ b/lib/AdminV1/PaymentMethod.php @@ -6,6 +6,7 @@ namespace UserHub\AdminV1; +use UserHub\ApiV1\Status; use UserHub\CommonV1\Address; use UserHub\Internal\JsonUnserializable; use UserHub\Internal\Util; @@ -63,6 +64,14 @@ final class PaymentMethod implements \JsonSerializable, JsonUnserializable */ public null|bool $default; + /** + * The last payment error. + * + * This will be unset if the payment method is updated + * or if a payment succeeds. + */ + public null|Status $lastPaymentError; + /** * The last time the payment method was pulled from the connection. */ @@ -93,6 +102,7 @@ public function __construct( null|string $fullName = null, null|Address $address = null, null|bool $default = null, + null|Status $lastPaymentError = null, null|\DateTimeInterface $pullTime = null, null|\DateTimeInterface $createTime = null, null|\DateTimeInterface $updateTime = null, @@ -107,6 +117,7 @@ public function __construct( $this->fullName = $fullName ?? null; $this->address = $address ?? null; $this->default = $default ?? null; + $this->lastPaymentError = $lastPaymentError ?? null; $this->pullTime = $pullTime ?? null; $this->createTime = $createTime ?? Util::emptyDateTime(); $this->updateTime = $updateTime ?? Util::emptyDateTime(); @@ -125,6 +136,7 @@ public function jsonSerialize(): mixed 'fullName' => $this->fullName ?? null, 'address' => $this->address ?? null, 'default' => $this->default ?? null, + 'lastPaymentError' => $this->lastPaymentError ?? null, 'pullTime' => isset($this->pullTime) ? Util::encodeDateTime($this->pullTime) : null, 'createTime' => isset($this->createTime) ? Util::encodeDateTime($this->createTime) : null, 'updateTime' => isset($this->updateTime) ? Util::encodeDateTime($this->updateTime) : null, @@ -148,6 +160,7 @@ public static function jsonUnserialize(mixed $data): static $data->{'fullName'} ?? null, isset($data->{'address'}) ? Address::jsonUnserialize($data->{'address'}) : null, $data->{'default'} ?? null, + isset($data->{'lastPaymentError'}) ? Status::jsonUnserialize($data->{'lastPaymentError'}) : null, isset($data->{'pullTime'}) ? Util::decodeDateTime($data->{'pullTime'}) : null, isset($data->{'createTime'}) ? Util::decodeDateTime($data->{'createTime'}) : null, isset($data->{'updateTime'}) ? Util::decodeDateTime($data->{'updateTime'}) : null, diff --git a/lib/AdminV1/PaymentMethodInput.php b/lib/AdminV1/PaymentMethodInput.php new file mode 100644 index 0000000..0899699 --- /dev/null +++ b/lib/AdminV1/PaymentMethodInput.php @@ -0,0 +1,72 @@ +fullName = $fullName ?? null; + $this->address = $address ?? null; + $this->expYear = $expYear ?? null; + $this->expMonth = $expMonth ?? null; + } + + public function jsonSerialize(): mixed + { + return (object) [ + 'fullName' => $this->fullName ?? null, + 'address' => $this->address ?? null, + 'expYear' => $this->expYear ?? null, + 'expMonth' => $this->expMonth ?? null, + ]; + } + + public static function jsonUnserialize(mixed $data): static + { + if (!\is_object($data)) { + throw new \TypeError('json data must be an object'); + } + + return new self( + $data->{'fullName'} ?? null, + isset($data->{'address'}) ? Address::jsonUnserialize($data->{'address'}) : null, + $data->{'expYear'} ?? null, + $data->{'expMonth'} ?? null, + ); + } +} diff --git a/lib/Internal/Constants.php b/lib/Internal/Constants.php index 77aa344..91950c1 100644 --- a/lib/Internal/Constants.php +++ b/lib/Internal/Constants.php @@ -9,8 +9,8 @@ abstract class Constants { public const API_BASE_URL = 'https://api.userhub.com'; - public const USER_AGENT = 'UserHub-PHP/0.4.1'; - public const VERSION = '0.4.1'; + public const USER_AGENT = 'UserHub-PHP/0.5.0'; + public const VERSION = '0.5.0'; public const AUTH_HEADER = 'Authorization'; public const API_KEY_HEADER = 'UserHub-Api-Key'; diff --git a/lib/UserV1/CardPaymentMethod.php b/lib/UserV1/CardPaymentMethod.php index 60c13a6..09716e1 100644 --- a/lib/UserV1/CardPaymentMethod.php +++ b/lib/UserV1/CardPaymentMethod.php @@ -19,9 +19,14 @@ final class CardPaymentMethod implements \JsonSerializable, JsonUnserializable public string $brand; /** - * The expiration date of the card. + * The expiration year. */ - public null|CardPaymentMethodExpiration $expiration; + public int $expYear; + + /** + * The expiration month. + */ + public int $expMonth; /** * The last for digits of the card. @@ -35,12 +40,14 @@ final class CardPaymentMethod implements \JsonSerializable, JsonUnserializable public function __construct( null|string $brand = null, - null|CardPaymentMethodExpiration $expiration = null, + null|int $expYear = null, + null|int $expMonth = null, null|string $last4 = null, null|string $fundingType = null, ) { $this->brand = $brand ?? ''; - $this->expiration = $expiration ?? null; + $this->expYear = $expYear ?? 0; + $this->expMonth = $expMonth ?? 0; $this->last4 = $last4 ?? ''; $this->fundingType = $fundingType ?? ''; } @@ -49,7 +56,8 @@ public function jsonSerialize(): mixed { return (object) [ 'brand' => $this->brand ?? null, - 'expiration' => $this->expiration ?? null, + 'expYear' => $this->expYear ?? null, + 'expMonth' => $this->expMonth ?? null, 'last4' => $this->last4 ?? null, 'fundingType' => $this->fundingType ?? null, ]; @@ -63,7 +71,8 @@ public static function jsonUnserialize(mixed $data): static return new self( $data->{'brand'} ?? null, - isset($data->{'expiration'}) ? CardPaymentMethodExpiration::jsonUnserialize($data->{'expiration'}) : null, + $data->{'expYear'} ?? null, + $data->{'expMonth'} ?? null, $data->{'last4'} ?? null, $data->{'fundingType'} ?? null, ); diff --git a/lib/UserV1/JoinOrganizationFlow.php b/lib/UserV1/JoinOrganizationFlow.php index a2b83ff..f281d0c 100644 --- a/lib/UserV1/JoinOrganizationFlow.php +++ b/lib/UserV1/JoinOrganizationFlow.php @@ -26,12 +26,19 @@ final class JoinOrganizationFlow implements \JsonSerializable, JsonUnserializabl */ public null|string $email; + /** + * The role to be assigned to the invitee. + */ + public null|Role $role; + public function __construct( null|string $displayName = null, null|string $email = null, + null|Role $role = null, ) { $this->displayName = $displayName ?? null; $this->email = $email ?? null; + $this->role = $role ?? null; } public function jsonSerialize(): mixed @@ -39,6 +46,7 @@ public function jsonSerialize(): mixed return (object) [ 'displayName' => $this->displayName ?? null, 'email' => $this->email ?? null, + 'role' => $this->role ?? null, ]; } @@ -51,6 +59,7 @@ public static function jsonUnserialize(mixed $data): static return new self( $data->{'displayName'} ?? null, $data->{'email'} ?? null, + isset($data->{'role'}) ? Role::jsonUnserialize($data->{'role'}) : null, ); } } diff --git a/lib/UserV1/ListRolesResponse.php b/lib/UserV1/ListRolesResponse.php new file mode 100644 index 0000000..57590f8 --- /dev/null +++ b/lib/UserV1/ListRolesResponse.php @@ -0,0 +1,71 @@ +roles = $roles ?? []; + $this->nextPageToken = $nextPageToken ?? ''; + $this->previousPageToken = $previousPageToken ?? null; + } + + public function jsonSerialize(): mixed + { + return (object) [ + 'roles' => $this->roles ?? null, + 'nextPageToken' => $this->nextPageToken ?? null, + 'previousPageToken' => $this->previousPageToken ?? null, + ]; + } + + public static function jsonUnserialize(mixed $data): static + { + if (!\is_object($data)) { + throw new \TypeError('json data must be an object'); + } + + return new self( + isset($data->{'roles'}) ? Util::mapArray($data->{'roles'}, [Role::class, 'jsonUnserialize']) : null, + $data->{'nextPageToken'} ?? null, + $data->{'previousPageToken'} ?? null, + ); + } +} diff --git a/lib/UserV1/PaymentMethod.php b/lib/UserV1/PaymentMethod.php index faf17a8..f3c2fdb 100644 --- a/lib/UserV1/PaymentMethod.php +++ b/lib/UserV1/PaymentMethod.php @@ -6,6 +6,7 @@ namespace UserHub\UserV1; +use UserHub\ApiV1\Status; use UserHub\CommonV1\Address; use UserHub\Internal\JsonUnserializable; use UserHub\Internal\Util; @@ -48,6 +49,14 @@ final class PaymentMethod implements \JsonSerializable, JsonUnserializable */ public bool $default; + /** + * The last payment error. + * + * This will be unset if the payment method is updated + * or if a payment succeeds. + */ + public null|Status $lastPaymentError; + /** * The creation time of the payment method connection. */ @@ -70,6 +79,7 @@ public function __construct( null|string $fullName = null, null|Address $address = null, null|bool $default = null, + null|Status $lastPaymentError = null, null|\DateTimeInterface $createTime = null, null|\DateTimeInterface $updateTime = null, null|CardPaymentMethod $card = null, @@ -80,6 +90,7 @@ public function __construct( $this->fullName = $fullName ?? null; $this->address = $address ?? null; $this->default = $default ?? false; + $this->lastPaymentError = $lastPaymentError ?? null; $this->createTime = $createTime ?? Util::emptyDateTime(); $this->updateTime = $updateTime ?? Util::emptyDateTime(); $this->card = $card ?? null; @@ -94,6 +105,7 @@ public function jsonSerialize(): mixed 'fullName' => $this->fullName ?? null, 'address' => $this->address ?? null, 'default' => $this->default ?? null, + 'lastPaymentError' => $this->lastPaymentError ?? null, 'createTime' => isset($this->createTime) ? Util::encodeDateTime($this->createTime) : null, 'updateTime' => isset($this->updateTime) ? Util::encodeDateTime($this->updateTime) : null, 'card' => $this->card ?? null, @@ -113,6 +125,7 @@ public static function jsonUnserialize(mixed $data): static $data->{'fullName'} ?? null, isset($data->{'address'}) ? Address::jsonUnserialize($data->{'address'}) : null, $data->{'default'} ?? null, + isset($data->{'lastPaymentError'}) ? Status::jsonUnserialize($data->{'lastPaymentError'}) : null, isset($data->{'createTime'}) ? Util::decodeDateTime($data->{'createTime'}) : null, isset($data->{'updateTime'}) ? Util::decodeDateTime($data->{'updateTime'}) : null, isset($data->{'card'}) ? CardPaymentMethod::jsonUnserialize($data->{'card'}) : null, diff --git a/lib/UserV1/PaymentMethodInput.php b/lib/UserV1/PaymentMethodInput.php new file mode 100644 index 0000000..acdd16a --- /dev/null +++ b/lib/UserV1/PaymentMethodInput.php @@ -0,0 +1,72 @@ +fullName = $fullName ?? null; + $this->address = $address ?? null; + $this->expYear = $expYear ?? null; + $this->expMonth = $expMonth ?? null; + } + + public function jsonSerialize(): mixed + { + return (object) [ + 'fullName' => $this->fullName ?? null, + 'address' => $this->address ?? null, + 'expYear' => $this->expYear ?? null, + 'expMonth' => $this->expMonth ?? null, + ]; + } + + public static function jsonUnserialize(mixed $data): static + { + if (!\is_object($data)) { + throw new \TypeError('json data must be an object'); + } + + return new self( + $data->{'fullName'} ?? null, + isset($data->{'address'}) ? Address::jsonUnserialize($data->{'address'}) : null, + $data->{'expYear'} ?? null, + $data->{'expMonth'} ?? null, + ); + } +} diff --git a/lib/UserV1/Role.php b/lib/UserV1/Role.php index 5c9fe3f..c3f2284 100644 --- a/lib/UserV1/Role.php +++ b/lib/UserV1/Role.php @@ -53,6 +53,11 @@ final class Role implements \JsonSerializable, JsonUnserializable */ public array $permissionSets; + /** + * Whether the role is the default for the tenant. + */ + public bool $default; + /** * @param null|string[] $permissionSets */ @@ -63,6 +68,7 @@ public function __construct( null|string $type = null, null|string $description = null, null|array $permissionSets = null, + null|bool $default = null, ) { $this->id = $id ?? ''; $this->uniqueId = $uniqueId ?? ''; @@ -70,6 +76,7 @@ public function __construct( $this->type = $type ?? ''; $this->description = $description ?? null; $this->permissionSets = $permissionSets ?? []; + $this->default = $default ?? false; } public function jsonSerialize(): mixed @@ -81,6 +88,7 @@ public function jsonSerialize(): mixed 'type' => $this->type ?? null, 'description' => $this->description ?? null, 'permissionSets' => $this->permissionSets ?? null, + 'default' => $this->default ?? null, ]; } @@ -97,6 +105,7 @@ public static function jsonUnserialize(mixed $data): static $data->{'type'} ?? null, $data->{'description'} ?? null, $data->{'permissionSets'} ?? null, + $data->{'default'} ?? null, ); } } diff --git a/tests/AdminApi/FlowsTest.php b/tests/AdminApi/FlowsTest.php index 8c888d5..6b40e93 100644 --- a/tests/AdminApi/FlowsTest.php +++ b/tests/AdminApi/FlowsTest.php @@ -167,7 +167,19 @@ public function testCreateJoinOrganization(): void "updateTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true, + "archived": true, + "createTime": "2024-02-05T23:07:46.483Z", + "updateTime": "2024-02-05T23:07:46.483Z" + } }, "signup": { "email": "test@example.com", @@ -304,7 +316,19 @@ public function testCreateSignup(): void "updateTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true, + "archived": true, + "createTime": "2024-02-05T23:07:46.483Z", + "updateTime": "2024-02-05T23:07:46.483Z" + } }, "signup": { "email": "test@example.com", @@ -441,7 +465,19 @@ public function testGet(): void "updateTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true, + "archived": true, + "createTime": "2024-02-05T23:07:46.483Z", + "updateTime": "2024-02-05T23:07:46.483Z" + } }, "signup": { "email": "test@example.com", @@ -578,7 +614,19 @@ public function testCancel(): void "updateTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true, + "archived": true, + "createTime": "2024-02-05T23:07:46.483Z", + "updateTime": "2024-02-05T23:07:46.483Z" + } }, "signup": { "email": "test@example.com", diff --git a/tests/AdminApi/InvoicesTest.php b/tests/AdminApi/InvoicesTest.php index 0ea23ae..8c5cfa2 100644 --- a/tests/AdminApi/InvoicesTest.php +++ b/tests/AdminApi/InvoicesTest.php @@ -40,7 +40,7 @@ public function testList(): void "remainingDueAmount": "string", "dueTime": "2024-02-05T23:07:46.483Z", "paidAmount": "string", - "paymentState": "ACTION_REQUIRED", + "paymentState": "PAYMENT_METHOD_REQUIRED", "pullTime": "2024-02-05T23:07:46.483Z", "createTime": "2024-02-05T23:07:46.483Z", "updateTime": "2024-02-05T23:07:46.483Z" @@ -147,7 +147,7 @@ public function testGet(): void "remainingDueAmount": "string", "dueTime": "2024-02-05T23:07:46.483Z", "paidAmount": "string", - "paymentState": "ACTION_REQUIRED", + "paymentState": "PAYMENT_METHOD_REQUIRED", "paymentIntent": { "stripe": { "accountId": "string", diff --git a/tests/AdminApi/SubscriptionsTest.php b/tests/AdminApi/SubscriptionsTest.php index d43d047..89be998 100644 --- a/tests/AdminApi/SubscriptionsTest.php +++ b/tests/AdminApi/SubscriptionsTest.php @@ -152,13 +152,22 @@ public function testGet(): void "country": "US" }, "default": true, + "lastPaymentError": { + "code": "OK", + "message": "string", + "reason": "string", + "param": "string", + "metadata": {} + }, "pullTime": "2024-02-05T23:07:46.483Z", "createTime": "2024-02-05T23:07:46.483Z", "updateTime": "2024-02-05T23:07:46.483Z", "card": { "brand": "AMERICAN_EXPRESS", "last4": "string", - "fundingType": "CREDIT" + "fundingType": "CREDIT", + "expYear": 1, + "expMonth": 1 } }, "cancelPeriodEnd": true, diff --git a/tests/UserApi/FlowsTest.php b/tests/UserApi/FlowsTest.php index 148b786..7ecb377 100644 --- a/tests/UserApi/FlowsTest.php +++ b/tests/UserApi/FlowsTest.php @@ -85,7 +85,16 @@ public function testCreateJoinOrganization(): void "createTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true + } }, "signup": { "email": "test@example.com", @@ -144,7 +153,16 @@ public function testCreateSignup(): void "createTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true + } }, "signup": { "email": "test@example.com", @@ -203,7 +221,16 @@ public function testGet(): void "createTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true + } }, "signup": { "email": "test@example.com", @@ -262,7 +289,16 @@ public function testApprove(): void "createTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true + } }, "signup": { "email": "test@example.com", @@ -321,7 +357,16 @@ public function testConsume(): void "createTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true + } }, "signup": { "email": "test@example.com", @@ -380,7 +425,16 @@ public function testCancel(): void "createTime": "2024-02-05T23:07:46.483Z", "joinOrganization": { "displayName": "Test", - "email": "test@example.com" + "email": "test@example.com", + "role": { + "id": "string", + "uniqueId": "test", + "displayName": "Test", + "type": "OWNER", + "description": "string", + "permissionSets": [], + "default": true + } }, "signup": { "email": "test@example.com", diff --git a/tests/UserApi/InvoicesTest.php b/tests/UserApi/InvoicesTest.php index 638a49c..d37b1cc 100644 --- a/tests/UserApi/InvoicesTest.php +++ b/tests/UserApi/InvoicesTest.php @@ -38,7 +38,7 @@ public function testList(): void "remainingDueAmount": "string", "dueTime": "2024-02-05T23:07:46.483Z", "paidAmount": "string", - "paymentState": "ACTION_REQUIRED", + "paymentState": "PAYMENT_METHOD_REQUIRED", "createTime": "2024-02-05T23:07:46.483Z", "updateTime": "2024-02-05T23:07:46.483Z" } @@ -98,7 +98,7 @@ public function testGet(): void "remainingDueAmount": "string", "dueTime": "2024-02-05T23:07:46.483Z", "paidAmount": "string", - "paymentState": "ACTION_REQUIRED", + "paymentState": "PAYMENT_METHOD_REQUIRED", "paymentIntent": { "stripe": { "accountId": "string",