cancelPlan method

Future<void> cancelPlan({
  1. required String userEmail,
  2. String? subscriptionId,
  3. String? cloudProjectId,
  4. bool? terminateImmediately,
})

Cancels a subscription of the user at the end of its current term. Either subscriptionId or cloudProjectId must be provided.

If terminateImmediately is true, the subscription is terminated immediately. If the user still has any active resource products, a ProcurementCancellationException will be thrown.

Throws a NoSubscriptionException if the user has no subscription. Throws a ProcurementCancellationException if the subscription has already been cancelled or ended.

Implementation

_i2.Future<void> cancelPlan({
  required String userEmail,
  String? subscriptionId,
  String? cloudProjectId,
  bool? terminateImmediately,
}) => caller.callServerEndpoint<void>('adminProcurement', 'cancelPlan', {
  'userEmail': userEmail,
  'subscriptionId': subscriptionId,
  'cloudProjectId': cloudProjectId,
  'terminateImmediately': terminateImmediately,
});