Skip to content
Merged
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
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.2.0](https://github.com/onfleet/ruby-onfleet/releases/tag/v1.2.0) - 2024-10-29
Added
* Added `get_batch_create_async_status` endpoint to support `get_batch_create_async`

## [1.1.0](https://github.com/onfleet/ruby-onfleet/releases/tag/v1.1.0) - 2025-10-16
Added
* New CRUD operations for Route Plans
Expand Down Expand Up @@ -41,5 +45,6 @@ Added
Added
* Initial release on RubyGems

[Unreleased]: https://github.com/onfleet/ruby-onfleet/compare/v1.1.0...HEAD
[1.0.0]: https://github.com/onfleet/ruby-onfleet/releases/tag/v1.1.0
[Unreleased]: https://github.com/onfleet/ruby-onfleet/compare/v1.2.0...HEAD
[1.2.0]: https://github.com/onfleet/ruby-onfleet/releases/tag/v1.2.0
[1.1.0]: https://github.com/onfleet/ruby-onfleet/releases/tag/v1.1.0
2 changes: 1 addition & 1 deletion README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Estas son las operaciones disponibles para cada endpoint:
|[organizations](https://docs.onfleet.com/reference/organizations)|get(delegateeId=nil)|x|insert_task(orgId, body={})|x|
|[recipients](https://docs.onfleet.com/reference/recipients)|get(id)<br />get_by_name(name)<br />get_by_phone(phone)|create(body={})<br />match_metadata(body={})|update(id, body={})|x|
|[routeplans](https://docs.onfleet.com/reference/routeplan#/) | get(id)<br />get(body={}) | create(body={}) | update(id, body={})<br />add_tasks_to_routeplan(id, body={}) | delete_one(id) |
|[tasks](https://docs.onfleet.com/reference/tasks)|get(id)<br />list(queryParameters={})<br />get_by_short_id(shortId)|create(body={})<br />batch_create(body={})<br />batch_create_async(body={})<br />complete(id, body={})<br />clone(id)<br />auto_assign(body={})<br />match_metadata(body={})|update(id, body={})|delete(id)|
|[tasks](https://docs.onfleet.com/reference/tasks)|get(id)<br />list(queryParameters={})<br />get_by_short_id(shortId)<br />get_batch_create_async_status(id)|create(body={})<br />batch_create(body={})<br />batch_create_async(body={})<br />complete(id, body={})<br />clone(id)<br />auto_assign(body={})<br />match_metadata(body={})|update(id, body={})|delete(id)|
|[teams](https://docs.onfleet.com/reference/teams)|get(id)<br />list()<br />driver_time_estimate(workerId, queryParameters={})<br />get_unassigned_tasks(id)|create(body={})<br />auto_dispatch(id, body={})|update(id, body={})<br />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={})<br />get_tasks(id)<br />get_by_location(longitude, latitude, radius)<br />get_schedule(id)|create(body={})<br />set_schedule(id, body={})<br />match_metadata(body={})<br />get_delivery_manifest(body={}, googleApiKey, queryParameters={})|update(id, body={})<br />insert_task(id, body={})|delete(id)|
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Here are the operations available for each entity:
|[organizations](https://docs.onfleet.com/reference/organizations)|get(delegateeId=nil)|x|insert_task(orgId, body={})|x|
|[recipients](https://docs.onfleet.com/reference/recipients)|get(id)<br />get_by_name(name)<br />get_by_phone(phone)|create(body={})<br />match_metadata(body={})|update(id, body={})|x|
|[routeplans](https://docs.onfleet.com/reference/routeplan#/) | get(id)<br />get(body={}) | create(body={}) | update(id, body={})<br />add_tasks_to_routeplan(id, body={}) | delete_one(id) |
|[tasks](https://docs.onfleet.com/reference/tasks)|get(id)<br />list(queryParameters={})<br />get_by_short_id(shortId)|create(body={})<br />batch_create(body={})<br />batch_create_async(body={})<br />complete(id, body={})<br />clone(id)<br />auto_assign(body={})<br />match_metadata(body={})|update(id, body={})|delete(id)|
|[tasks](https://docs.onfleet.com/reference/tasks)|get(id)<br />list(queryParameters={})<br />get_by_short_id(shortId)<br />get_batch_create_async_status(id)|create(body={})<br />batch_create(body={})<br />batch_create_async(body={})<br />complete(id, body={})<br />clone(id)<br />auto_assign(body={})<br />match_metadata(body={})|update(id, body={})|delete(id)|
|[teams](https://docs.onfleet.com/reference/teams)|get(id)<br />list()<br />driver_time_estimate(workerId, queryParameters={})<br />get_unassigned_tasks(id)|create(body={})<br />auto_dispatch(id, body={})|update(id, body={})<br />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={})<br />get_tasks(id)<br />get_by_location(longitude, latitude, radius)<br />get_schedule(id)|create(body={})<br />set_schedule(id, body={})<br />match_metadata(body={})<br />get_delivery_manifest(body={}, googleApiKey, queryParameters={})|update(id, body={})<br />insert_task(id, body={})|delete(id)|
Expand Down
7 changes: 7 additions & 0 deletions lib/resources/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ def batch_create_async(config, body)
Onfleet.request(config, method.to_sym, path, body.to_json)
end

def get_batch_create_async_status(config, id)
method = 'get'
path = "tasks/batch/#{id}"

Onfleet.request(config, method.to_sym, path)
end

def list(config, query_parameters_hash)
method = 'get'
# NOTE: parameters included here must be a hash object that is translated to URL query parameters
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onfleet/ruby-onfleet",
"version": "1.1.0",
"version": "1.2.0",
"description": "Onfleet's Ruby API wrapper package",
"main": "onfleet.rb",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions ruby-onfleet.gemspec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Gem::Specification.new do |s|
s.name = 'ruby-onfleet'
s.version = '1.1.0'
s.date = '2025-10-16'
s.version = '1.2.0'
s.date = '2025-10-29'
s.summary = 'Onfleet Ruby API wrapper package'
s.description = 'The Onfleet Ruby library provides convenient access to the Onfleet API.'
s.authors = ['Dan Menza']
s.authors = ['Dan Menza', 'Shuai Tseng']
s.email = 'support@onfleet.com'
s.homepage = 'https://rubygems.org/gems/ruby-onfleet'
s.license = 'MIT'
Expand Down