Update worker

Update worker

Note that it is not possible to programmatically update a worker's phone. The request to update a worker's phone number will not trigger an error.

curl -X PUT "https://onfleet.com/api/v2/workers/sFtvhYK2l26zS0imptJJdC2q" \
       -u "cd3b3de84cc1ee040bf06512d233719c:" \
       -d '{"name":"Laura P","teams":["lHCUJFvh6v0YDURKjokZbvau"]}'
onfleet.workers.update(id="sFtvhYK2l26zS0imptJJdC2q", 
                       body={
                         "name":"Laura P",
                         "teams":["lHCUJFvh6v0YDURKjokZbvau"]
                       })
onfleet.workers.update("sFtvhYK2l26zS0imptJJdC2q", 
                       {"name":"Laura P",
                        "teams":["lHCUJFvh6v0YDURKjokZbvau"]
                       });
$onfleet->workers->update("sFtvhYK2l26zS0imptJJdC2q", 
                          ["name"=>"Laura P",
                           "teams"=>["lHCUJFvh6v0YDURKjokZbvau"]
                          ])
{
  "id": "sFtvhYK2l26zS0imptJJdC2q",
  "timeCreated": 1455156653000,
  "timeLastModified": 1455156654558,
  "organization": "yAM*fDkztrT3gUcz9mNDgNOL",
  "name": "Laura P",
  "phone": "+16173428853",
  "activeTask": null,
  "tasks": [],
  "onDuty": false,
  "timeLastSeen": null,
  "delayTime": null,
  "teams": [
    "lHCUJFvh6v0YDURKjokZbvau"
  ],
  "metadata": [],
  "vehicle": {
    "id": "tN1HjcvygQWvz5FRR1JAxwL8",
    "type": "CAR",
    "description": "Tesla Model 3",
    "licensePlate": "FKNS9A",
    "color": "purple"
  }
}