How to use the address.change function in address

To help you get started, we’ve selected a few address examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Microservice-API-Patterns / LakesideMutual / customer-self-service-frontend / src / api / customerselfservice.js View on Github external
export function changeAddress(
  token: string,
  customer: Customer,
  address: Address
): Promise<address> {
  // Instead of assembling the URL to change the address ourselves,
  // we use the one provided in the customer response.
  const url = customer._links["address.change"].href
  return putAuthenticatedJson(url, token, address)
}
</address>