Skip to content

Commit a659738

Browse files
committed
- Remove cancel claim function
1 parent 68619b4 commit a659738

File tree

5 files changed

+13
-738
lines changed

5 files changed

+13
-738
lines changed

easypost/services/base_service.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def _create_resource(self, class_name: str, beta: bool = False, **params) -> Any
5151

5252
return convert_to_easypost_object(response=response)
5353

54-
def _all_resources(self, class_name: str, filters: Optional[Dict[str, Any]] = None, beta: bool = False, **params) -> Any:
54+
def _all_resources(
55+
self, class_name: str, filters: Optional[Dict[str, Any]] = None, beta: bool = False, **params
56+
) -> Any:
5557
"""Retrieve a list of EasyPostObjects from the EasyPost API."""
5658
url = self._class_url(class_name)
5759
response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=params, beta=beta)
@@ -69,7 +71,9 @@ def _retrieve_resource(self, class_name: str, id: str, beta: bool = False) -> An
6971

7072
return convert_to_easypost_object(response=response)
7173

72-
def _update_resource(self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, beta: bool = False, **params) -> Any:
74+
def _update_resource(
75+
self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, beta: bool = False, **params
76+
) -> Any:
7377
"""Update an EasyPost object via the EasyPost API."""
7478
url = self._instance_url(class_name, id)
7579
wrapped_params = {self._snakecase_name(class_name): params}

easypost/services/claim_service.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,3 @@ def get_next_page(
5656
params.update(optional_params)
5757

5858
return self.all(**params)
59-
60-
def cancel(self, id: str) -> Claim:
61-
"""Cancel a Claim."""
62-
url = f"/claims/{id}/cancel"
63-
64-
response = Requestor(self._client).request(
65-
method=RequestMethod.POST,
66-
url=url,
67-
beta=True,
68-
)
69-
70-
return convert_to_easypost_object(response=response)

0 commit comments

Comments
 (0)