tariochbctools 0.34.0__py2.py3-none-any.whl → 0.35__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,8 +27,10 @@ class Importer(importer.ImporterProtocol):
27
27
  return ""
28
28
 
29
29
  def __init__(self, *args, **kwargs):
30
+ if "profileId" in kwargs:
31
+ self.profileId = kwargs.pop("profileId")
30
32
  if "startDate" in kwargs:
31
- self.startDate = kwargs["startDate"]
33
+ self.startDate = kwargs.pop("startDate")
32
34
  else:
33
35
  self.startDate = datetime.combine(
34
36
  date.today() + relativedelta(months=-3),
@@ -36,7 +38,7 @@ class Importer(importer.ImporterProtocol):
36
38
  timezone.utc,
37
39
  ).isoformat()
38
40
  if "endDate" in kwargs:
39
- self.endDate = kwargs["endDate"]
41
+ self.endDate = kwargs.pop("endDate")
40
42
  else:
41
43
  self.endDate = datetime.combine(
42
44
  date.today(), datetime.max.time(), timezone.utc
@@ -121,9 +123,12 @@ class Importer(importer.ImporterProtocol):
121
123
  self.private_key_path = config["privateKeyPath"]
122
124
 
123
125
  headers = {"Authorization": "Bearer " + self.api_token}
124
- r = requests.get("https://api.transferwise.com/v1/profiles", headers=headers)
125
- profiles = r.json()
126
- self.profileId = profiles[0]["id"]
126
+ if not self.profileId:
127
+ r = requests.get(
128
+ "https://api.transferwise.com/v1/profiles", headers=headers
129
+ )
130
+ profiles = r.json()
131
+ self.profileId = profiles[0]["id"]
127
132
 
128
133
  r = requests.get(
129
134
  "https://api.transferwise.com/v1/borderless-accounts",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tariochbctools
3
- Version: 0.34.0
3
+ Version: 0.35
4
4
  Summary: Importers, plugins and price fetchers for Beancount
5
5
  Home-page: https://github.com/tarioch/beancounttools/
6
6
  Author: Patrick Ruckstuhl
@@ -31,7 +31,7 @@ tariochbctools/importers/schedule/importer.py,sha256=g1q7NwGzwkj25LknOguf3b7iJ0v
31
31
  tariochbctools/importers/swisscard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  tariochbctools/importers/swisscard/importer.py,sha256=hEmRv3ADr9A8akGMAdZTEriFKLPJTql8LQNkFE0ZyfA,1795
33
33
  tariochbctools/importers/transferwise/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- tariochbctools/importers/transferwise/importer.py,sha256=hYfJ0_6yyqutrIiiR_UEo6nqjQfsNGvbl1t6MYe1eKU,5921
34
+ tariochbctools/importers/transferwise/importer.py,sha256=czCUtcfOA9XlsP3HKN8DZ7wTDMTllitJXKdr019GJoI,6089
35
35
  tariochbctools/importers/truelayer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  tariochbctools/importers/truelayer/importer.py,sha256=3bNtN2wKg473whmRVH2JSOIim_0vUFA6omTC3P5EV2A,6938
37
37
  tariochbctools/importers/viseca/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -45,9 +45,9 @@ tariochbctools/plugins/check_portfolio_sum.py,sha256=bIAZRq7u0Up61siQVvfrBj8-ug7
45
45
  tariochbctools/plugins/generate_base_ccy_prices.py,sha256=CpT7A3UPZMHU6z-__uEueAMvzJcDO3LKyVEiYdyl1oI,1235
46
46
  tariochbctools/plugins/prices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  tariochbctools/plugins/prices/ibkr.py,sha256=9OwaZvI55bCj7H80K2iLZVsGLpuCyaoCnyuTS9e1_-c,1294
48
- tariochbctools-0.34.0.dist-info/LICENSE.txt,sha256=VR2hkz3p9Sw4hSXc7S5iZTOXGeV4h-i8AO_q0zEmtkE,1074
49
- tariochbctools-0.34.0.dist-info/METADATA,sha256=WKMBc2rgmni4ljwGQGtYxdlvYbVcFoAdEdzPpElYUTY,2105
50
- tariochbctools-0.34.0.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
51
- tariochbctools-0.34.0.dist-info/entry_points.txt,sha256=9xrCCY1wx2zCIsQUOWZelLHDmHw9Oc-ZBAKUIY9lKTA,88
52
- tariochbctools-0.34.0.dist-info/top_level.txt,sha256=CiA_NepCI6zDNsaORA55zmpuJFSnTvLESraIL13xiOQ,15
53
- tariochbctools-0.34.0.dist-info/RECORD,,
48
+ tariochbctools-0.35.dist-info/LICENSE.txt,sha256=VR2hkz3p9Sw4hSXc7S5iZTOXGeV4h-i8AO_q0zEmtkE,1074
49
+ tariochbctools-0.35.dist-info/METADATA,sha256=TcLqHPm29SiSYfIGP72tRGKa2Dha1MGDOOHtVdrA1J0,2103
50
+ tariochbctools-0.35.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
51
+ tariochbctools-0.35.dist-info/entry_points.txt,sha256=9xrCCY1wx2zCIsQUOWZelLHDmHw9Oc-ZBAKUIY9lKTA,88
52
+ tariochbctools-0.35.dist-info/top_level.txt,sha256=CiA_NepCI6zDNsaORA55zmpuJFSnTvLESraIL13xiOQ,15
53
+ tariochbctools-0.35.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any