Total Complexity | 2 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 60% |
Changes | 0 |
1 | #!/usr/bin/python |
||
2 | # -*- coding: utf-8 -*- |
||
3 | 1 | from kuon.api_response import APIResponse |
|
4 | 1 | from kuon.bitskins import BitSkins |
|
5 | 1 | from kuon.bitskins.common import * |
|
6 | |||
7 | |||
8 | 1 | class ICashout(BitSkins): |
|
9 | """Implementation of the API methods related to the cashout on BitSkins""" |
||
10 | |||
11 | 1 | def __init__(self, *args, **kwargs) -> None: |
|
12 | """Initializing function |
||
13 | |||
14 | :type args: list |
||
15 | :type kwargs: dict |
||
16 | """ |
||
17 | super().__init__(*args, **kwargs) |
||
18 | |||
19 | 1 | def request_withdrawal(self, amount: float, withdrawal_method: str = Processor.PAYPAL) -> APIResponse: |
|
20 | """MoneyWithdrawal v1 implementation |
||
21 | https://bitskins.com/api/#request_withdrawal |
||
22 | |||
23 | :type amount: float |
||
24 | :type withdrawal_method: str |
||
25 | :return: |
||
26 | """ |
||
27 | api_url = "https://bitskins.com/api/v1/request_withdrawal/" |
||
28 | |||
29 | payload = { |
||
30 | 'amount': str(amount), |
||
31 | 'withdrawal_method': withdrawal_method |
||
32 | } |
||
33 | |||
34 | return self.api_request(api_url=api_url, params=payload) |
||
35 |