Skip to content

Commit 9210c69

Browse files
author
serverpod_cloud
committed
feat: 312821e8bae5c1c6708fd3528fa23f02958a8e26
1 parent 9ab8c54 commit 9210c69

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

ground_control_client/lib/src/protocol/client.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,15 @@ class EndpointBilling extends _i1.EndpointRef {
427427
caller.callServerEndpoint<void>('billing', 'removePaymentMethod', {
428428
'paymentMethodId': paymentMethodId,
429429
});
430+
431+
/// Checks if a payment method is required for the authenticated user.
432+
///
433+
/// This endpoint returns `true` if the user has active (non-archived) projects,
434+
/// meaning they cannot delete their last payment method. Returns `false` otherwise.
435+
///
436+
/// Returns `true` if a payment method is required, `false` otherwise.
437+
_i2.Future<bool> isPaymentMethodRequired() =>
438+
caller.callServerEndpoint<bool>('billing', 'isPaymentMethodRequired', {});
430439
}
431440

432441
/// {@category Endpoint}

0 commit comments

Comments
 (0)