Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ variables:
customer_name: ""
customer_password: ""
customer_phone: ""
created_customer_phone: ""
verification_code: ""
push_token: ""
# Deliberately NOT declaring driver_identity / driver_password / driver_phone:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ scripts:
if (json_response && json_response.id) {
cv.set("customer_id", json_response.id);
cv.set("customer_name", json_response.name);
// The number this account was created with. Update Authenticated Customer sends it back,
// because changing to another number needs a code sent to that number.
cv.set("created_customer_phone", json_response.phone);
if (json_response.token) {
cv.set("customer_token", json_response.token);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ fields:
type: string
required: false
description: New phone (E.164 recommended). Mirrored to the linked user.
- name: phone_code
type: string
required: false
description: Required when `phone` differs from the current number. The code sent by SMS to the new number. The change is refused when another account holds that number.
- name: photo
type: string
required: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$kind: http-request
name: "Update Authenticated Customer"
description: "Updates the authenticated customer's profile. Changes to `name`, `email`, and `phone` are mirrored onto the linked user so subsequent logins work."
description: "Updates the authenticated customer's profile. Changes to `name`, `email`, and `phone` are mirrored onto the linked user so subsequent logins work. Changing to a different phone number needs `phone_code`, the code sent to that number, and is refused when another account holds it."
url: "{{base_url}}/{{namespace}}/customers/me"
method: PUT
headers:
Expand All @@ -11,7 +11,7 @@ body:
content: |-
{
"name": "{{customer_name}}",
"phone": "{{customer_phone}}",
"phone": "{{created_customer_phone}}",
"email": "{{customer_email}}"
}

Expand Down
Loading