Skip to content

Commit

Permalink
Merge pull request #58 from muddi900:add/put-method
Browse files Browse the repository at this point in the history
Added an edit method [Issue #50]
  • Loading branch information
muddi900 authored Sep 9, 2024
2 parents a753d67 + 7e14b47 commit 545f195
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions shopipy/shopify.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,19 @@ async def _delete_item(
)
return await self._request(url_json_path, RequestType.DELETE)

async def _edit_item(
self,
url_json_path: str,
json: dict[Any, Any],
*,
item_id: int | str | None = None,
**params,
) -> httpx.Response:
json_path = (
f"{url_json_path}/{item_id}.json" if item_id is not None else url_json_path
)
return await self._request(url_json_path, RequestType.EDIT, json=json)

async def get_orders(
self,
limit=50,
Expand Down

0 comments on commit 545f195

Please sign in to comment.