Skip to content

Commit 25f7891

Browse files
authored
Merge pull request #351 from EasyPost/remove_create_list
chore: remove create_list tracker endpoint function
2 parents 00de74f + 4336f28 commit 25f7891

File tree

4 files changed

+4
-121
lines changed

4 files changed

+4
-121
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## Next Release
4+
5+
- Removes the deprecated `create_list` tracker endpoint function as it is no longer available via API
6+
37
## v7.4.2 (2024-08-16)
48

59
- Fixes an issue with how query params were sent when using the `addCreditCard` function

lib/EasyPost/Service/TrackerService.php

-20
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,4 @@ public function create(mixed $params = null): mixed
6464

6565
return self::createResource(self::serviceModelClassName(self::class), $params);
6666
}
67-
68-
/**
69-
* Create a list of trackers.
70-
*
71-
* @param mixed $params
72-
* @return void
73-
* @deprecated
74-
*/
75-
public function createList(mixed $params = null): void
76-
{
77-
if (!isset($params['trackers']) || !is_array($params['trackers'])) {
78-
$clone = $params;
79-
unset($params);
80-
$params = ['trackers' => $clone];
81-
}
82-
83-
$url = self::classUrl(self::serviceModelClassName(self::class));
84-
85-
Requestor::request($this->client, 'post', $url . '/create_list', $params);
86-
}
8767
}

test/EasyPost/TrackerTest.php

-21
Original file line numberDiff line numberDiff line change
@@ -119,25 +119,4 @@ public function testGetNextPage(): void
119119
throw $error;
120120
}
121121
}
122-
123-
/**
124-
* Tests that we can create a list of bulk trackers with one request.
125-
*/
126-
public function testCreateList(): void
127-
{
128-
TestUtil::setupCassette('trackers/createList.yml');
129-
130-
try {
131-
// PHP is dumb and tries to make indexed arrays into a list instead of an object.
132-
// Naming the index for PHP is the workaround.
133-
self::$client->tracker->createList([
134-
'tracker0' => ['tracking_code' => 'EZ1000000001'],
135-
'tracker1' => ['tracking_code' => 'EZ1000000002'],
136-
'tracker2' => ['tracking_code' => 'EZ1000000003'],
137-
]);
138-
$this->assertTrue(true);
139-
} catch (\Exception $exception) {
140-
$this->fail('Exception thrown when we expected no error');
141-
}
142-
}
143122
}

test/cassettes/trackers/createList.yml

-80
This file was deleted.

0 commit comments

Comments
 (0)