Skip to content

Commit e149a7e

Browse files
authored
add get_batch_create_async_status (#20)
* add get_batch_create_async_status * prepare for v1.2.0
1 parent 73d32c4 commit e149a7e

6 files changed

Lines changed: 20 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
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).
66

77
## [Unreleased]
8+
## [1.2.0](https://github.com/onfleet/ruby-onfleet/releases/tag/v1.2.0) - 2024-10-29
9+
Added
10+
* Added `get_batch_create_async_status` endpoint to support `get_batch_create_async`
11+
812
## [1.1.0](https://github.com/onfleet/ruby-onfleet/releases/tag/v1.1.0) - 2025-10-16
913
Added
1014
* New CRUD operations for Route Plans
@@ -41,5 +45,6 @@ Added
4145
Added
4246
* Initial release on RubyGems
4347

44-
[Unreleased]: https://github.com/onfleet/ruby-onfleet/compare/v1.1.0...HEAD
45-
[1.0.0]: https://github.com/onfleet/ruby-onfleet/releases/tag/v1.1.0
48+
[Unreleased]: https://github.com/onfleet/ruby-onfleet/compare/v1.2.0...HEAD
49+
[1.2.0]: https://github.com/onfleet/ruby-onfleet/releases/tag/v1.2.0
50+
[1.1.0]: https://github.com/onfleet/ruby-onfleet/releases/tag/v1.1.0

README.es.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Estas son las operaciones disponibles para cada endpoint:
8787
|[organizations](https://docs.onfleet.com/reference/organizations)|get(delegateeId=nil)|x|insert_task(orgId, body={})|x|
8888
|[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|
8989
|[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) |
90-
|[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)|
90+
|[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)|
9191
|[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)|
9292
|[webhooks](https://docs.onfleet.com/reference/webhooks)|list()|create(body={})|X|delete(id)|
9393
|[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)|

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Here are the operations available for each entity:
8585
|[organizations](https://docs.onfleet.com/reference/organizations)|get(delegateeId=nil)|x|insert_task(orgId, body={})|x|
8686
|[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|
8787
|[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) |
88-
|[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)|
88+
|[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)|
8989
|[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)|
9090
|[webhooks](https://docs.onfleet.com/reference/webhooks)|list()|create(body={})|X|delete(id)|
9191
|[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)|

lib/resources/tasks.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ def batch_create_async(config, body)
2929
Onfleet.request(config, method.to_sym, path, body.to_json)
3030
end
3131

32+
def get_batch_create_async_status(config, id)
33+
method = 'get'
34+
path = "tasks/batch/#{id}"
35+
36+
Onfleet.request(config, method.to_sym, path)
37+
end
38+
3239
def list(config, query_parameters_hash)
3340
method = 'get'
3441
# NOTE: parameters included here must be a hash object that is translated to URL query parameters

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@onfleet/ruby-onfleet",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "Onfleet's Ruby API wrapper package",
55
"main": "onfleet.rb",
66
"scripts": {

ruby-onfleet.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Gem::Specification.new do |s|
22
s.name = 'ruby-onfleet'
3-
s.version = '1.1.0'
4-
s.date = '2025-10-16'
3+
s.version = '1.2.0'
4+
s.date = '2025-10-29'
55
s.summary = 'Onfleet Ruby API wrapper package'
66
s.description = 'The Onfleet Ruby library provides convenient access to the Onfleet API.'
7-
s.authors = ['Dan Menza']
7+
s.authors = ['Dan Menza', 'Shuai Tseng']
88
s.email = 'support@onfleet.com'
99
s.homepage = 'https://rubygems.org/gems/ruby-onfleet'
1010
s.license = 'MIT'

0 commit comments

Comments
 (0)