|
| 1 | +from typing import Any, Dict, Optional, Union |
| 2 | + |
| 3 | +import requests |
| 4 | + |
| 5 | +IAMPORT_API_URL: str = ... |
| 6 | +Amount = Union[int, float] |
| 7 | + |
| 8 | +class Iamport(object): |
| 9 | + requests_session: requests.Session |
| 10 | + |
| 11 | + def __init__(self, imp_key: str, imp_secret: str, imp_url: str = ...) -> None: ... |
| 12 | + |
| 13 | + class ResponseError(Exception): |
| 14 | + code: Any |
| 15 | + message: Any |
| 16 | + def __init__(self, code: Optional[Any] = ..., message: Optional[Any] = ...) -> None: ... |
| 17 | + |
| 18 | + class HttpError(Exception): |
| 19 | + code: Any |
| 20 | + message: Any |
| 21 | + def __init__(self, code: Optional[Any] = ..., message: Optional[Any] = ...) -> None: ... |
| 22 | + |
| 23 | + @staticmethod |
| 24 | + def get_response(response: requests.Response) -> Dict: ... |
| 25 | + |
| 26 | + def _get_token(self) -> str: ... |
| 27 | + |
| 28 | + def get_headers(self) -> Dict[str, str]: ... |
| 29 | + |
| 30 | + def _get(self, url: str, payload: Optional[Dict[str, Any]] = ...) -> Dict: ... |
| 31 | + |
| 32 | + def _post(self, url: str, payload: Optional[Dict[str, Any]] = ...) -> Dict: ... |
| 33 | + |
| 34 | + def find_by_merchant_uid(self, merchant_uid: str) -> Dict: ... |
| 35 | + |
| 36 | + def find_by_imp_uid(self, imp_uid: str) -> Dict: ... |
| 37 | + |
| 38 | + def find(self, **kwargs) -> Dict: ... |
| 39 | + |
| 40 | + def _cancel(self, payload: Dict[str, Any]) -> Dict: ... |
| 41 | + |
| 42 | + def pay_onetime(self, **kwargs) -> Dict: ... |
| 43 | + |
| 44 | + def pay_again(self, **kwargs) -> Dict: ... |
| 45 | + |
| 46 | + def customer_create(self, **kwargs) -> Dict: ... |
| 47 | + |
| 48 | + def customer_get(self, customer_uid: str) -> Dict: ... |
| 49 | + |
| 50 | + def pay_foreign(self, **kwargs) -> Dict: ... |
| 51 | + |
| 52 | + def pay_schedule(self, **kwargs) -> Dict: ... |
| 53 | + |
| 54 | + def pay_unschedule(self, **kwargs) -> Dict: ... |
| 55 | + |
| 56 | + def cancel_by_merchant_uid(self, merchant_uid: str, reason: str, **kwargs) -> Dict: ... |
| 57 | + |
| 58 | + def cancel_by_imp_uid(self, imp_uid: str, reason: str, **kwargs) -> Dict: ... |
| 59 | + |
| 60 | + def cancel(self, reason: str, **kwargs) -> Dict: ... |
| 61 | + |
| 62 | + def is_paid(self, amount: Amount, **kwargs) -> bool: ... |
| 63 | + |
| 64 | + def prepare(self, merchant_uid: str, amount: Amount) -> Dict: ... |
| 65 | + |
| 66 | + def prepare_validate(self, merchant_uid: str, amount: Amount) -> Dict: ... |
0 commit comments