From ed2c642000b0fc97602abc62b8b95c97de6de411 Mon Sep 17 00:00:00 2001
From: Justintime50 <39606064+Justintime50@users.noreply.github.com>
Date: Mon, 23 Sep 2024 11:59:35 -0600
Subject: [PATCH] chore: remove create_list tracker function
---
CHANGELOG.md | 4 ++
lib/easypost/services/tracker.rb | 9 ---
..._in_bulk_from_a_list_of_tracking_codes.yml | 68 -------------------
spec/tracker_spec.rb | 16 -----
4 files changed, 4 insertions(+), 93 deletions(-)
delete mode 100644 spec/cassettes/tracker/EasyPost_Services_Tracker_create_list_creates_trackers_in_bulk_from_a_list_of_tracking_codes.yml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 635ba959..105020f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/lib/easypost/services/tracker.rb b/lib/easypost/services/tracker.rb
index 925c0ccc..e9e2e714 100644
--- a/lib/easypost/services/tracker.rb
+++ b/lib/easypost/services/tracker.rb
@@ -29,15 +29,6 @@ def all(params = {})
get_all_helper('trackers', MODEL_CLASS, params, filters)
end
- # Create multiple Tracker objects in bulk.
- # DEPRECATED: Please use create 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)
diff --git a/spec/cassettes/tracker/EasyPost_Services_Tracker_create_list_creates_trackers_in_bulk_from_a_list_of_tracking_codes.yml b/spec/cassettes/tracker/EasyPost_Services_Tracker_create_list_creates_trackers_in_bulk_from_a_list_of_tracking_codes.yml
deleted file mode 100644
index 08e89087..00000000
--- a/spec/cassettes/tracker/EasyPost_Services_Tracker_create_list_creates_trackers_in_bulk_from_a_list_of_tracking_codes.yml
+++ /dev/null
@@ -1,68 +0,0 @@
----
-http_interactions:
-- request:
- method: post
- uri: https://api.easypost.com/v2/trackers/create_list
- body:
- encoding: UTF-8
- string: '{"trackers":{"0":{"tracking_code":"EZ1000000001"},"1":{"tracking_code":"EZ1000000002"},"2":{"tracking_code":"EZ1000000003"},"3":{"tracking_code":"EZ1000000004"}}}'
- headers:
- Accept-Encoding:
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
- Accept:
- - "*/*"
- User-Agent: ""
- Host:
- - api.easypost.com
- Content-Type:
- - application/json
- Authorization: ""
- response:
- status:
- code: 200
- message: OK
- headers:
- X-Frame-Options:
- - SAMEORIGIN
- X-Xss-Protection:
- - 1; mode=block
- X-Content-Type-Options:
- - nosniff
- X-Download-Options:
- - noopen
- X-Permitted-Cross-Domain-Policies:
- - none
- Referrer-Policy:
- - strict-origin-when-cross-origin
- X-Ep-Request-Uuid:
- - d044fa7966a7db30e799e540005a5c81
- Cache-Control:
- - private, no-cache, no-store
- Pragma:
- - no-cache
- Expires:
- - '0'
- Content-Type:
- - application/json; charset=utf-8
- X-Runtime:
- - '0.065431'
- Transfer-Encoding:
- - chunked
- X-Node:
- - bigweb43nuq
- X-Version-Label:
- - easypost-202407291746-57ea285141-master
- X-Backend:
- - easypost
- X-Canary:
- - direct
- X-Proxied:
- - extlb1nuq fa152d4755
- - intlb3nuq c0f5e722d1
- Strict-Transport-Security:
- - max-age=31536000; includeSubDomains; preload
- body:
- encoding: UTF-8
- string: "{}"
- recorded_at: Mon, 29 Jul 2024 18:10:56 GMT
-recorded_with: VCR 6.1.0
diff --git a/spec/tracker_spec.rb b/spec/tracker_spec.rb
index a116d1d4..cedf153c 100644
--- a/spec/tracker_spec.rb
+++ b/spec/tracker_spec.rb
@@ -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