DeleteCustomerAddress
Implements DeleteCustomerAddress Unified Method.
Source
import { defineApi, getCurrentCustomer } from "@vsf-enterprise/unified-api-commercetools";
export const deleteCustomerAddress = defineApi.deleteCustomerAddress(async (context, args) => {
const { id } = args;
const { version } = await getCurrentCustomer(context);
const { api } = await context.getApiClient();
await api.deleteShippingAddress({
address: {
id,
},
user: { version },
});
});