File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ def add_resources(self) -> None:
7
7
from pywisetransfer .balance_statements import BalanceStatements
8
8
from pywisetransfer .balances import Balances
9
9
from pywisetransfer .borderless_account import BorderlessAccount
10
+ from pywisetransfer .multi_currency_account import MultiCurrencyAccount
10
11
from pywisetransfer .profile import Profile
11
12
from pywisetransfer .subscription import Subscription
12
13
from pywisetransfer .user import User
@@ -15,6 +16,7 @@ def add_resources(self) -> None:
15
16
self .balance_statements = BalanceStatements (client = self )
16
17
self .balances = Balances (client = self )
17
18
self .borderless_accounts = BorderlessAccount (client = self )
19
+ self .multi_currency_account = MultiCurrencyAccount (client = self )
18
20
self .profiles = Profile (client = self )
19
21
self .subscriptions = Subscription (client = self )
20
22
self .users = User (client = self )
Original file line number Diff line number Diff line change
1
+ from typing import Any
2
+
3
+ from apiron import JsonEndpoint
4
+ from munch import munchify
5
+
6
+ from pywisetransfer import Client
7
+ from pywisetransfer .base import Base
8
+
9
+
10
+ class MultiCurrencyAccountService (Base ):
11
+ available_currencies = JsonEndpoint (
12
+ path = "/v2/borderless-accounts-configuration/profiles/{profile_id}/available-currencies"
13
+ )
14
+ get = JsonEndpoint (path = "/v4/profiles/{profile_id}/multi-currency-account" )
15
+
16
+
17
+ class MultiCurrencyAccount :
18
+ def __init__ (self , client : Client ):
19
+ self .service = MultiCurrencyAccountService (client = client )
20
+
21
+ def available_currencies (self , profile_id : str ) -> Any :
22
+ return munchify (self .service .available_currencies (profile_id = profile_id ))
23
+
24
+ def get (self , profile_id : str ) -> Any :
25
+ return munchify (self .service .get (profile_id = profile_id ))
You can’t perform that action at this time.
0 commit comments