Allow a temporary (non-persisted) address in the checkout API
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 5.3k
- Forks
- 1.4k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 62
Description
Steps to reproduce
Add an address to an order via the API.
Expected behavior
Be able to use a temporary address in checkout similar to the frontend. It would be nice for there to be a boolean that could be sent with the shipping address to tell it to persist or not.
Actual behavior
The API always persists the address to a user's address book if there's a user and a bill_address_id and the state is transitioning out of the address step. So there's no way to add a temporary address under these conditions and it means that if the user goes back and edits the address info to add a new one, the new address won't be added to the address book unlike the first.
System configuration
Solidus 2.6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked logic in core/app/models/spree/order.rb around line 740 and core/app/models/spree/order/checkout.rb around line 96. Trace how the checkout API persists addresses when leaving the address step, then determine how a request option could preserve temporary-address behavior while retaining the expected address-book behavior. Done means the API supports both persistence choices without changing the existing default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100