diff --git a/iamport/client.py b/iamport/client.py index 2ec4048..7b0087d 100644 --- a/iamport/client.py +++ b/iamport/client.py @@ -68,14 +68,16 @@ 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, **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) @@ -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 a26d76a..de06596 100644 --- a/iamport/client.pyi +++ b/iamport/client.pyi @@ -31,9 +31,9 @@ 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, **params) -> Dict: ... + def find_by_status(self, status: str, **kwargs) -> Dict: ... def find_by_merchant_uid(self, merchant_uid: str) -> 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: ...