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 @@ -436,6 +436,21 @@ class EndpointBilling extends _i1.EndpointRef {
436436 /// Returns `true` if a payment method is required, `false` otherwise.
437437 _i2.Future <bool > isPaymentMethodRequired () =>
438438 caller.callServerEndpoint <bool >('billing' , 'isPaymentMethodRequired' , {});
439+
440+ /// Sets the default payment method for the authenticated user.
441+ ///
442+ /// This endpoint sets the specified payment method as the default for the user's
443+ /// payment customer. The endpoint validates that:
444+ /// - The payment method belongs to the user
445+ ///
446+ /// [paymentMethodId] The ID of the payment method to set as default.
447+ ///
448+ /// Throws [NotFoundException] if the user is not found or has no payment customer.
449+ /// Throws [InvalidValueServerException] if the payment method doesn't belong to the user.
450+ _i2.Future <void > setDefaultPaymentMethod ({required String paymentMethodId}) =>
451+ caller.callServerEndpoint <void >('billing' , 'setDefaultPaymentMethod' , {
452+ 'paymentMethodId' : paymentMethodId,
453+ });
439454}
440455
441456/// {@category Endpoint}
You can’t perform that action at this time.
0 commit comments