| Total Complexity | 2 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 3 |
| 1 | #!/usr/bin/python |
||
| 8 | class ICashout(BitSkins): |
||
| 9 | """Implementation of the API methods related to the cashout on BitSkins""" |
||
| 10 | |||
| 11 | def __init__(self, *args, **kwargs): |
||
| 12 | """Initializing function""" |
||
| 13 | super().__init__(*args, **kwargs) |
||
| 14 | |||
| 15 | def request_withdrawal(self, amount: float, withdrawal_method=Processor.PAYPAL) -> APIResponse: |
||
| 16 | """MoneyWithdrawal v1 implementation |
||
| 17 | https://bitskins.com/api/#request_withdrawal |
||
| 18 | |||
| 19 | :param amount: |
||
| 20 | :param withdrawal_method: |
||
| 21 | :return: |
||
| 22 | """ |
||
| 23 | api_url = "https://bitskins.com/api/v1/request_withdrawal/" |
||
| 24 | |||
| 25 | payload = { |
||
| 26 | 'amount': str(amount), |
||
| 27 | 'withdrawal_method': withdrawal_method |
||
| 28 | } |
||
| 29 | |||
| 30 | return self.api_request(api_url=api_url, params=payload) |
||
| 31 |