medusa icon indicating copy to clipboard operation
medusa copied to clipboard

fix: allow addresses to be AddressPayload or string on DraftOrder creation

Open kasperkristensen opened this issue 3 years ago • 2 comments

What

  • Allows shipping_addressand billing_addressbe either an AddressPayload or string as part of the create draft order endpoint props.

How

  • Implements the same patterns as used for the similar Cart endpoints.

Why The endpoint was using an old pattern for switching between addresses being either ids or payloads, which resulted in billing_address not being added during the creation process if it was not passed as an id.

Also

  • Fixes the wrong payload types being used in js/react clients.

kasperkristensen avatar Jul 25 '22 17:07 kasperkristensen

⚠️ No Changeset found

Latest commit: 87338b6ba5e985b52195cf8bf67853d3390966ca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jul 25 '22 17:07 changeset-bot[bot]

Can I get you to merge in latest from develop and resolve conflicts?

olivermrbl avatar Aug 08 '22 12:08 olivermrbl

LGTM! Pending @olivermrbl for final approval 👍

srindom avatar Oct 19 '22 15:10 srindom