customerAddressDelete method

Future<void> customerAddressDelete({
  1. String? customerAccessToken,
  2. String? addressId,
})

Deletes the address associated with the addressId from the customer to which customerAccessToken belongs to.

A Customer may have more than 1 address, so the addresses have Id's.

Implementation

Future<void> customerAddressDelete({
  String? customerAccessToken,
  String? addressId,
}) async {
  final MutationOptions _options = MutationOptions(
      document: gql(customerAddressDeleteMutation),
      variables: {
        'customerAccessToken': customerAccessToken,
        'id': addressId
      });
  final QueryResult result = await _graphQLClient!.mutate(_options);
  checkForError(
    result,
    key: 'customerAddressDelete',
    errorKey: 'customerUserErrors',
  );
}