From 13fdf9a51883736c7d1a278b15a52827131f61f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=8B=E1=85=A7=E1=86=BC?= =?UTF-8?q?=E1=84=80=E1=85=AA=E1=86=BC?= Date: Wed, 1 Feb 2023 11:17:09 +0900 Subject: [PATCH 1/2] =?UTF-8?q?find=5Fby=5Fstatus=20=EC=82=AC=EC=9A=A9=20?= =?UTF-8?q?=EC=8B=9C=20query=20=ED=8C=8C=EB=9D=BC=EB=A9=94=ED=84=B0?= =?UTF-8?q?=EA=B0=80=20=EC=A0=84=EB=8B=AC=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iamport/client.py | 4 ++-- iamport/client.pyi | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iamport/client.py b/iamport/client.py index 2ec4048..af5fab0 100644 --- a/iamport/client.py +++ b/iamport/client.py @@ -73,9 +73,9 @@ def _delete(self, url): response = self.requests_session.delete(url, headers=headers) return self.get_response(response) - def find_by_status(self, status, **params): + def find_by_status(self, status, **kwargs): url = '{}payments/status/{}'.format(self.imp_url, status) - return self._get(url, params=params) + return self._get(url, kwargs) def find_by_merchant_uid(self, merchant_uid, status=None): url = '{}payments/find/{}'.format(self.imp_url, merchant_uid) diff --git a/iamport/client.pyi b/iamport/client.pyi index a26d76a..6efd477 100644 --- a/iamport/client.pyi +++ b/iamport/client.pyi @@ -33,7 +33,7 @@ class Iamport(object): def _delete(self, url: str) -> Dict: ... - def find_by_status(self, status: str, **params) -> Dict: ... + def find_by_status(self, status: str, **kwargs) -> Dict: ... def find_by_merchant_uid(self, merchant_uid: str) -> Dict: ... From 861952f7f82bd3b2de5b2ccb0a372eee939d54b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=8B=E1=85=A7=E1=86=BC?= =?UTF-8?q?=E1=84=80=E1=85=AA=E1=86=BC?= Date: Wed, 1 Feb 2023 11:21:08 +0900 Subject: [PATCH 2/2] =?UTF-8?q?customer=5Fdelete=20=EC=82=AC=EC=9A=A9=20?= =?UTF-8?q?=EC=8B=9C=20query=20=ED=8C=8C=EB=9D=BC=EB=A9=94=ED=84=B0=20?= =?UTF-8?q?=EC=A0=84=EB=8B=AC=20=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DELETE /subscribe/customers/{customer_uid} - reason : 삭제사유 - extra[requester] : 삭제 요청자(네이버페이에서만 사용) --- iamport/client.py | 10 ++++++---- iamport/client.pyi | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/iamport/client.py b/iamport/client.py index af5fab0..7b0087d 100644 --- a/iamport/client.py +++ b/iamport/client.py @@ -68,9 +68,11 @@ def _post(self, url, payload=None): ) return self.get_response(response) - def _delete(self, url): + def _delete(self, url, payload=None): headers = self.get_headers() - response = self.requests_session.delete(url, headers=headers) + response = self.requests_session.delete( + url, headers=headers, params=payload + ) return self.get_response(response) def find_by_status(self, status, **kwargs): @@ -132,9 +134,9 @@ def customer_get(self, customer_uid): url = '{}subscribe/customers/{}'.format(self.imp_url, customer_uid) return self._get(url) - def customer_delete(self, customer_uid): + def customer_delete(self, customer_uid, **kwargs): url = '{}subscribe/customers/{}'.format(self.imp_url, customer_uid) - return self._delete(url) + return self._delete(url, kwargs) def pay_foreign(self, **kwargs): url = '{}subscribe/payments/foreign'.format(self.imp_url) diff --git a/iamport/client.pyi b/iamport/client.pyi index 6efd477..de06596 100644 --- a/iamport/client.pyi +++ b/iamport/client.pyi @@ -31,7 +31,7 @@ class Iamport(object): def _post(self, url: str, payload: Optional[Dict[str, Any]] = ...) -> Dict: ... - def _delete(self, url: str) -> Dict: ... + def _delete(self, url: str, payload: Optional[Dict[str, Any]] = ...) -> Dict: ... def find_by_status(self, status: str, **kwargs) -> Dict: ... @@ -51,7 +51,7 @@ class Iamport(object): def customer_get(self, customer_uid: str) -> Dict: ... - def customer_delete(self, customer_uid: str) -> Dict: ... + def customer_delete(self, customer_uid: str, **kwargs) -> Dict: ... def pay_foreign(self, **kwargs) -> Dict: ...