deleteBillingGroup method

Future<void> deleteBillingGroup({
  1. required String billingGroupName,
  2. int? expectedVersion,
})

Deletes the billing group.

May throw InvalidRequestException. May throw VersionConflictException. May throw ThrottlingException. May throw InternalFailureException.

Parameter billingGroupName : The name of the billing group.

Parameter expectedVersion : The expected version of the billing group. If the version of the billing group does not match the expected version specified in the request, the DeleteBillingGroup request is rejected with a VersionConflictException.

Implementation

Future<void> deleteBillingGroup({
  required String billingGroupName,
  int? expectedVersion,
}) async {
  ArgumentError.checkNotNull(billingGroupName, 'billingGroupName');
  _s.validateStringLength(
    'billingGroupName',
    billingGroupName,
    1,
    128,
    isRequired: true,
  );
  final $query = <String, List<String>>{
    if (expectedVersion != null)
      'expectedVersion': [expectedVersion.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/billing-groups/${Uri.encodeComponent(billingGroupName)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}