From 95b682ff6bd97f893febf5c38d70391d5203373b Mon Sep 17 00:00:00 2001 From: Shuai Tseng Date: Wed, 11 Mar 2026 12:26:39 -0700 Subject: [PATCH] add teams endpoint and update readme --- README.es.md | 2 +- README.md | 2 +- lib/resources/teams.rb | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.es.md b/README.es.md index 1642fff..87a47d0 100644 --- a/README.es.md +++ b/README.es.md @@ -88,7 +88,7 @@ Estas son las operaciones disponibles para cada endpoint: |[recipients](https://docs.onfleet.com/reference/recipients)|get(id)
get_by_name(name)
get_by_phone(phone)|create(body={})
match_metadata(body={})|update(id, body={})|x| |[routeplans](https://docs.onfleet.com/reference/routeplan#/) | get(id)
get(body={}) | create(body={}) | update(id, body={})
add_tasks_to_routeplan(id, body={}) | delete_one(id) | |[tasks](https://docs.onfleet.com/reference/tasks)|get(id)
list(queryParameters={})
get_by_short_id(shortId)
get_batch_create_async_status(id)|create(body={})
batch_create(body={})
batch_create_async(body={})
complete(id, body={})
clone(id)
auto_assign(body={})
match_metadata(body={})|update(id, body={})|delete(id)| -|[teams](https://docs.onfleet.com/reference/teams)|get(id)
list()
driver_time_estimate(workerId, queryParameters={})
get_unassigned_tasks(id)|create(body={})
auto_dispatch(id, body={})|update(id, body={})
insert_task(teamId, body={})|delete(id)| +|[teams](https://docs.onfleet.com/reference/teams)|get(id)
list()
driver_time_estimate(workerId, queryParameters={})
get_unassigned_tasks(id)|create(body={})
auto_dispatch(id, body={})
match_metadata(body={})|update(id, body={})
insert_task(teamId, body={})|delete(id)| |[webhooks](https://docs.onfleet.com/reference/webhooks)|list()|create(body={})|X|delete(id)| |[workers](https://docs.onfleet.com/reference/workers)|get(id=nil, queryParameters={})
get_tasks(id)
get_by_location(longitude, latitude, radius)
get_schedule(id)|create(body={})
set_schedule(id, body={})
match_metadata(body={})
get_delivery_manifest(body={}, googleApiKey, queryParameters={})|update(id, body={})
insert_task(id, body={})|delete(id)| diff --git a/README.md b/README.md index 700f7c4..43c9d1d 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Here are the operations available for each entity: |[recipients](https://docs.onfleet.com/reference/recipients)|get(id)
get_by_name(name)
get_by_phone(phone)|create(body={})
match_metadata(body={})|update(id, body={})|x| |[routeplans](https://docs.onfleet.com/reference/routeplan#/) | get(id)
get(body={}) | create(body={}) | update(id, body={})
add_tasks_to_routeplan(id, body={}) | delete_one(id) | |[tasks](https://docs.onfleet.com/reference/tasks)|get(id)
list(queryParameters={})
get_by_short_id(shortId)
get_batch_create_async_status(id)|create(body={})
batch_create(body={})
batch_create_async(body={})
complete(id, body={})
clone(id)
auto_assign(body={})
match_metadata(body={})|update(id, body={})|delete(id)| -|[teams](https://docs.onfleet.com/reference/teams)|get(id)
list()
driver_time_estimate(workerId, queryParameters={})
get_unassigned_tasks(id)|create(body={})
auto_dispatch(id, body={})|update(id, body={})
insert_task(teamId, body={})|delete(id)| +|[teams](https://docs.onfleet.com/reference/teams)|get(id)
list()
driver_time_estimate(workerId, queryParameters={})
get_unassigned_tasks(id)|create(body={})
auto_dispatch(id, body={})
match_metadata(body={})|update(id, body={})
insert_task(teamId, body={})|delete(id)| |[webhooks](https://docs.onfleet.com/reference/webhooks)|list()|create(body={})|X|delete(id)| |[workers](https://docs.onfleet.com/reference/workers)|get(id=nil, queryParameters={})
get_tasks(id)
get_by_location(longitude, latitude, radius)
get_schedule(id)|create(body={})
set_schedule(id, body={})
match_metadata(body={})
get_delivery_manifest(body={}, googleApiKey, queryParameters={})|update(id, body={})
insert_task(id, body={})|delete(id)| diff --git a/lib/resources/teams.rb b/lib/resources/teams.rb index cf999cb..8a16d4c 100644 --- a/lib/resources/teams.rb +++ b/lib/resources/teams.rb @@ -82,5 +82,12 @@ def insert_task(config, team_id, body) Onfleet.request(config, method.to_sym, path, body.to_json) end + + def match_metadata(config, body) + method = 'post' + path = 'teams/metadata' + + Onfleet.request(config, method.to_sym, path, body.to_json) + end end end