Skip to content

Commit

Permalink
Merge pull request #315 from EasyPost/remove_create_list
Browse files Browse the repository at this point in the history
chore: remove create_list tracker function
  • Loading branch information
Justintime50 authored Sep 23, 2024
2 parents 264527d + ed2c642 commit 924f4d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 93 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## Next Release

- Removes the deprecated `create_list` tracker endpoint function as it is no longer available via API

## v6.4.1 (2024-08-09)

- Send GET requests as query parameters instead of JSON body parameters
Expand Down
9 changes: 0 additions & 9 deletions lib/easypost/services/tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ def all(params = {})
get_all_helper('trackers', MODEL_CLASS, params, filters)
end

# Create multiple Tracker objects in bulk.
# <b>DEPRECATED:</b> Please use <tt>create</tt> instead. This function will be removed in a future release.
def create_list(params = {})
wrapped_params = { 'trackers' => params }

@client.make_request(:post, 'trackers/create_list', wrapped_params)
true # This endpoint does not return a response so we return true here instead
end

# Get the next page of trackers.
def get_next_page(collection, page_size = nil)
raise EasyPost::Errors::EndOfPaginationError.new unless more_pages?(collection)
Expand Down

This file was deleted.

16 changes: 0 additions & 16 deletions spec/tracker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,4 @@
end
end
end

describe '.create_list' do
it 'creates trackers in bulk from a list of tracking codes' do
# This endpoint/method does not return anything, just make sure the request doesn't fail
expect {
client.tracker.create_list(
{
'0' => { tracking_code: 'EZ1000000001' },
'1' => { tracking_code: 'EZ1000000002' },
'2' => { tracking_code: 'EZ1000000003' },
'3' => { tracking_code: 'EZ1000000004' },
},
)
}.not_to raise_error
end
end
end

0 comments on commit 924f4d5

Please sign in to comment.