File tree Expand file tree Collapse file tree
ground_control_client/lib/src/protocol Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -409,6 +409,24 @@ class EndpointBilling extends _i1.EndpointRef {
409409 'listPaymentMethods' ,
410410 {},
411411 );
412+
413+ /// Removes a payment method for the authenticated user.
414+ ///
415+ /// This endpoint removes a payment method from the user's payment customer.
416+ /// The endpoint validates that:
417+ /// - The payment method belongs to the user
418+ /// - If payment method is required (user has active projects), the user must
419+ /// have at least one other payment method
420+ ///
421+ /// [paymentMethodId] The ID of the payment method to remove.
422+ ///
423+ /// Throws [NotFoundException] if the user is not found or has no payment customer.
424+ /// Throws [InvalidValueServerException] if the payment method doesn't belong to the user.
425+ /// Throws [InvalidValueServerException] if payment method is required and this is the last payment method.
426+ _i2.Future <void > removePaymentMethod ({required String paymentMethodId}) =>
427+ caller.callServerEndpoint <void >('billing' , 'removePaymentMethod' , {
428+ 'paymentMethodId' : paymentMethodId,
429+ });
412430}
413431
414432/// {@category Endpoint}
You can’t perform that action at this time.
0 commit comments