Repository navigation
Conversation
Update Authenticated Customer sent {{customer_phone}}, the seeded customer's number,
from a session for the customer Create a Customer made with a random number. Fleet-Ops
0.7.0 refuses to move a number that another account holds, and needs a code sent to
the new number for any change, so the request answered 422.
Create a Customer now keeps the number it created the account with, and the update
sends that back. The params and description document `phone_code`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Customers / Update Authenticated Customersent"phone": "{{customer_phone}}". That's+15555550123, the number of the customer the contract seeds. The session, though, belongs to the customerCreate a Customermakes with{{$randomPhoneNumber}}.Fleet-Ops 0.7.0 (fleetbase/fleetops#420) refuses to move a number another account holds, and needs a code sent to the new number for any change. So the request answered 422
Changing your phone number needs a valid verification code.The API is right, and the request was asking to take another account's number.Create a Customerkeeps the number it created the account with, increated_customer_phone.Update Authenticated Customersends that back, so it stays a profile update.phone_code, which is required when the number changes, and the refusal for a number another account holds.customer_phoneitself is unchanged, becauseRequest Customer Login SMSandRequest Customer Creation Codeuse it for the seeded customer.Related Issue
Found by a local contract run of the Laravel 12 release train.
Type of Change
Implementation Notes
Fleet-Ops 0.7.0 also adds
POST /customers/me/phone-codeto send that code. This collection doesn't cover it yet. Adding a request means regenerating the fleetbase-php contract manifest and SDK examples, so it's a separate change.Validation
The "after" run reused the earlier run's database. Its other failures (
Create a Vehicle500 and its cascade) come from a uniqueengine_numbersent twice, and pass on a fresh database.Documentation Impact
fleetbase/fleetbase.ioNo request is added or removed, so
expected_requestsin fleetbase-php'scontract-lock.jsonand the fleetbase.io catalog are unaffected. The generated reference picks up the newphone_codeparam and the changed body on its next regeneration.