Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove create_list tracker function #315

Merged
merged 1 commit into from
Sep 23, 2024
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
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