@@ -55,7 +55,7 @@ class NokoClient(BaseClient):
55
55
56
56
# Entry related methods
57
57
58
- def list_entries (self , ** kwargs : dict ) -> list [dict ]:
58
+ def list_entries (self , ** kwargs ) -> list [dict ]:
59
59
"""List all entries.
60
60
61
61
By default, retrieves all entries. The entries to retrieve can be filtered based on accepted Keyword Arguments.
@@ -103,7 +103,7 @@ def get_single_entry(self, entry_id: str | int) -> list[dict]:
103
103
"""
104
104
return self .fetch_json (f"entries/{ entry_id } " , http_method = "GET" )
105
105
106
- def create_entry (self , ** kwargs : dict ) -> list [dict ]:
106
+ def create_entry (self , ** kwargs ) -> list [dict ]:
107
107
"""Create new entry in Noko.
108
108
109
109
Keyword Args:
@@ -127,7 +127,7 @@ def create_entry(self, **kwargs: dict) -> list[dict]:
127
127
data = CreateNokoEntryParameters (** kwargs ).model_dump ()
128
128
return self .fetch_json ("entries" , post_args = data , http_method = "POST" )
129
129
130
- def edit_entry (self , entry_id : int | str , ** kwargs : dict ) -> list [dict ]:
130
+ def edit_entry (self , entry_id : int | str , ** kwargs ) -> list [dict ]:
131
131
"""Edit an existing entry.
132
132
133
133
Args:
@@ -252,7 +252,7 @@ def delete_entry(self, entry_id: str | int) -> None:
252
252
253
253
# Tag related methods
254
254
255
- def list_tags (self , ** kwargs : dict ) -> list [dict ]:
255
+ def list_tags (self , ** kwargs ) -> list [dict ]:
256
256
"""List all tags.
257
257
258
258
By default, retrieves all tags. The tags to retrieve can be filtered based on accepted Keyword Arguments.
@@ -292,7 +292,7 @@ def get_single_tag(self, tag_id: int | str) -> list[dict]:
292
292
"""
293
293
return self .fetch_json (f"tags/{ tag_id } " , http_method = "GET" )
294
294
295
- def get_all_entries_for_tag (self , tag_id : str | int , ** kwargs : dict ) -> list [dict ]:
295
+ def get_all_entries_for_tag (self , tag_id : str | int , ** kwargs ) -> list [dict ]:
296
296
"""Retrieve all time entries associated with a tag.
297
297
298
298
Results can be filtered using the same keyword arguments as the ones used for the list entries endpoint.
@@ -408,7 +408,7 @@ def delete_tags(self, tag_ids: list[str | int]) -> None:
408
408
409
409
# Project related methods
410
410
411
- def list_projects (self , ** kwargs : dict ) -> list [dict ]:
411
+ def list_projects (self , ** kwargs ) -> list [dict ]:
412
412
"""List all projects from Noko.
413
413
414
414
By default, retrieves all projects. Projects to retrieve can be filtered based on accepted Keyword Arguments.
@@ -439,7 +439,7 @@ def get_single_project(self, project_id: str | int) -> list[dict]:
439
439
"""
440
440
return self .fetch_json (f"projects/{ project_id } " , http_method = "GET" )
441
441
442
- def create_project (self , ** kwargs : dict ) -> list [dict ]:
442
+ def create_project (self , ** kwargs ) -> list [dict ]:
443
443
"""Create new project in Noko.
444
444
445
445
Keyword Args:
@@ -459,7 +459,7 @@ def create_project(self, **kwargs: dict) -> list[dict]:
459
459
return self .fetch_json ("projects" , post_args = data , http_method = "POST" )
460
460
461
461
def get_all_entries_for_project (
462
- self , project_id : str | int , ** kwargs : dict
462
+ self , project_id : str | int , ** kwargs
463
463
) -> list [dict ]:
464
464
"""Retrieve all time entries associated with a project.
465
465
@@ -503,9 +503,7 @@ def get_all_entries_for_project(
503
503
f"projects/{ project_id } /entries" , query_params = params , http_method = "GET"
504
504
)
505
505
506
- def get_expenses_for_project (
507
- self , project_id : str | int , ** kwargs : dict
508
- ) -> list [dict ]:
506
+ def get_expenses_for_project (self , project_id : str | int , ** kwargs ) -> list [dict ]:
509
507
"""Get all expenses associated with a project.
510
508
511
509
Results can be filtered using the same keyword arguments as the ones used for the list expenses endpoint.
@@ -541,7 +539,7 @@ def get_expenses_for_project(
541
539
f"projects/{ project_id } /expenses" , query_params = params , http_method = "GET"
542
540
)
543
541
544
- def edit_project (self , project_id : str | int , ** kwargs : dict ) -> list [dict ]:
542
+ def edit_project (self , project_id : str | int , ** kwargs ) -> list [dict ]:
545
543
"""Edit an existing project.
546
544
547
545
Args:
@@ -671,7 +669,7 @@ def delete_projects(self, project_ids: list[int | str]) -> None:
671
669
672
670
# Project group related methods
673
671
674
- def list_project_groups (self , ** kwargs : dict ) -> list [dict ]:
672
+ def list_project_groups (self , ** kwargs ) -> list [dict ]:
675
673
"""List all project groups from Noko.
676
674
677
675
Keyword Args:
@@ -685,7 +683,7 @@ def list_project_groups(self, **kwargs: dict) -> list[dict]:
685
683
params = GetNokoProjectGroupsParameters (** kwargs ).model_dump ()
686
684
return self .fetch_json ("project_groups" , query_params = params , http_method = "GET" )
687
685
688
- def create_project_group (self , ** kwargs : dict ) -> list [dict ]:
686
+ def create_project_group (self , ** kwargs ) -> list [dict ]:
689
687
"""Create a new project group.
690
688
691
689
Keyword Args:
@@ -728,7 +726,7 @@ def edit_project_group(self, project_group_id: str | int, name: str) -> list[dic
728
726
)
729
727
730
728
def get_all_entries_for_project_in_project_group (
731
- self , project_group_id : str | int , ** kwargs : dict
729
+ self , project_group_id : str | int , ** kwargs
732
730
) -> list [dict ]:
733
731
"""Retrieve all time entries associated with the projects in a project group.
734
732
@@ -775,7 +773,7 @@ def get_all_entries_for_project_in_project_group(
775
773
)
776
774
777
775
def get_all_projects_in_project_group (
778
- self , project_group_id : str | int , ** kwargs : dict
776
+ self , project_group_id : str | int , ** kwargs
779
777
) -> list [dict ]:
780
778
"""Retrieve all projects in a project group.
781
779
@@ -876,7 +874,7 @@ def delete_project_group(self, project_group_id: str | int) -> None:
876
874
877
875
# Invoice related methods
878
876
879
- def list_invoices (self , ** kwargs : dict ) -> list [dict ]:
877
+ def list_invoices (self , ** kwargs ) -> list [dict ]:
880
878
"""List Noko invoices.
881
879
882
880
Keyword Args:
@@ -953,7 +951,7 @@ def get_single_invoice(self, invoice_id: str | int) -> list[dict]:
953
951
"""
954
952
return self .fetch_json (f"invoices/{ invoice_id } " , http_method = "GET" )
955
953
956
- def create_invoice (self , ** kwargs : dict ) -> list [dict ]:
954
+ def create_invoice (self , ** kwargs ) -> list [dict ]:
957
955
"""Create a new invoice in Noko.
958
956
959
957
For additional information on options available for rate_calculation, taxes and customisation, refer to the
@@ -1004,7 +1002,7 @@ def create_invoice(self, **kwargs: dict) -> list[dict]:
1004
1002
data = CreateNokoInvoiceParameters (** kwargs ).model_dump ()
1005
1003
return self .fetch_json ("invoices" , post_args = data , http_method = "POST" )
1006
1004
1007
- def edit_invoice (self , invoice_id : str | int , ** kwargs : dict ) -> list [dict ]:
1005
+ def edit_invoice (self , invoice_id : str | int , ** kwargs ) -> list [dict ]:
1008
1006
"""Edit a Noko invoice.
1009
1007
1010
1008
Args:
@@ -1079,7 +1077,7 @@ def mark_invoice_as_unpaid(self, invoice_id: str | int) -> None:
1079
1077
"""
1080
1078
self .fetch_json (f"invoices/{ invoice_id } /unpaid" , http_method = "PUT" )
1081
1079
1082
- def get_invoice_entries (self , invoice_id : str | int , ** kwargs : dict ) -> list [dict ]:
1080
+ def get_invoice_entries (self , invoice_id : str | int , ** kwargs ) -> list [dict ]:
1083
1081
"""Retrieve all time entries associated with an invoice.
1084
1082
1085
1083
Results can be filtered using the same keyword arguments as the ones used for the list entries endpoint.
@@ -1122,7 +1120,7 @@ def get_invoice_entries(self, invoice_id: str | int, **kwargs: dict) -> list[dic
1122
1120
f"invoices/{ invoice_id } /entries" , query_params = params , http_method = "GET"
1123
1121
)
1124
1122
1125
- def get_invoice_expenses (self , invoice_id : str | int , ** kwargs : dict ) -> list [dict ]:
1123
+ def get_invoice_expenses (self , invoice_id : str | int , ** kwargs ) -> list [dict ]:
1126
1124
"""Retrieve all expenses associated with an invoice.
1127
1125
1128
1126
Results can be filtered using the same keyword arguments as the ones used for the list expenses endpoint.
@@ -1319,7 +1317,7 @@ def delete_invoice(self, invoice_id: int | str) -> None:
1319
1317
1320
1318
# Expenses related methods
1321
1319
1322
- def list_expenses (self , ** kwargs : dict ) -> list [dict ]:
1320
+ def list_expenses (self , ** kwargs ) -> list [dict ]:
1323
1321
"""List expenses from Noko.
1324
1322
1325
1323
Keyword Args:
@@ -1358,7 +1356,7 @@ def get_single_expense(self, expense_id: str | int) -> list[dict]:
1358
1356
"""
1359
1357
return self .fetch_json (f"expenses/{ expense_id } " , http_method = "GET" )
1360
1358
1361
- def create_expense (self , ** kwargs : dict ) -> list [dict ]:
1359
+ def create_expense (self , ** kwargs ) -> list [dict ]:
1362
1360
"""Create a new expense in Noko.
1363
1361
1364
1362
Keyword Args:
@@ -1379,7 +1377,7 @@ def create_expense(self, **kwargs: dict) -> list[dict]:
1379
1377
data = CreateNokoExpenseParameters (** kwargs ).model_dump ()
1380
1378
return self .fetch_json ("expenses" , post_args = data , http_method = "POST" )
1381
1379
1382
- def edit_expense (self , expense_id : str | int , ** kwargs : dict ) -> list [dict ]:
1380
+ def edit_expense (self , expense_id : str | int , ** kwargs ) -> list [dict ]:
1383
1381
"""Edit an expense in Noko.
1384
1382
1385
1383
Args:
@@ -1427,7 +1425,7 @@ def get_account_details(self) -> list[dict]:
1427
1425
1428
1426
# User related methods
1429
1427
1430
- def list_users (self , ** kwargs : dict ) -> list [dict ]:
1428
+ def list_users (self , ** kwargs ) -> list [dict ]:
1431
1429
"""List all Noko users in the account.
1432
1430
1433
1431
Keyword Args:
@@ -1455,7 +1453,7 @@ def get_single_user(self, user_id: int | str) -> list[dict]:
1455
1453
"""
1456
1454
return self .fetch_json (f"users/{ user_id } " , http_method = "GET" )
1457
1455
1458
- def get_user_entries (self , user_id : int | str , ** kwargs : dict ) -> list [dict ]:
1456
+ def get_user_entries (self , user_id : int | str , ** kwargs ) -> list [dict ]:
1459
1457
"""Get all entries associated with a user.
1460
1458
1461
1459
Results can be filtered using the same keyword arguments as the ones used for the list entries endpoint.
@@ -1498,7 +1496,7 @@ def get_user_entries(self, user_id: int | str, **kwargs: dict) -> list[dict]:
1498
1496
f"users/{ user_id } /entries" , query_params = params , http_method = "GET"
1499
1497
)
1500
1498
1501
- def get_user_expenses (self , user_id : str | int , ** kwargs : dict ) -> list [dict ]:
1499
+ def get_user_expenses (self , user_id : str | int , ** kwargs ) -> list [dict ]:
1502
1500
"""Retrieve all expenses associated with a user.
1503
1501
1504
1502
Results can be filtered using the same keyword arguments as the ones used for the list expenses endpoint.
@@ -1534,7 +1532,7 @@ def get_user_expenses(self, user_id: str | int, **kwargs: dict) -> list[dict]:
1534
1532
f"users/{ user_id } /expenses" , query_params = params , http_method = "GET"
1535
1533
)
1536
1534
1537
- def create_user (self , ** kwargs : dict ) -> list [dict ]:
1535
+ def create_user (self , ** kwargs ) -> list [dict ]:
1538
1536
"""Create a new Noko user.
1539
1537
1540
1538
If your account has per-user billing, adding a new user will affect the total of your next invoice.
@@ -1552,7 +1550,7 @@ def create_user(self, **kwargs: dict) -> list[dict]:
1552
1550
data = CreateNokoUserParameters (** kwargs ).model_dump ()
1553
1551
return self .fetch_json ("users" , post_args = data , http_method = "POST" )
1554
1552
1555
- def edit_user (self , user_id : str | int , ** kwargs : dict ) -> list [dict ]:
1553
+ def edit_user (self , user_id : str | int , ** kwargs ) -> list [dict ]:
1556
1554
"""Edit a Noko user's details.
1557
1555
1558
1556
Args:
@@ -1686,7 +1684,7 @@ def deactivate_user(self, user_id: str | int) -> None:
1686
1684
1687
1685
# Team related methods
1688
1686
1689
- def list_teams (self , ** kwargs : dict ) -> list [dict ]:
1687
+ def list_teams (self , ** kwargs ) -> list [dict ]:
1690
1688
"""List all teams in Noko.
1691
1689
1692
1690
Keyword Args:
@@ -1711,7 +1709,7 @@ def get_single_team(self, team_id: str | int) -> list[dict]:
1711
1709
"""
1712
1710
return self .fetch_json (f"teams/{ team_id } " , http_method = "GET" )
1713
1711
1714
- def create_team (self , ** kwargs : dict ) -> list [dict ]:
1712
+ def create_team (self , ** kwargs ) -> list [dict ]:
1715
1713
"""Create a new team in Noko.
1716
1714
1717
1715
Keyword Args:
@@ -1740,9 +1738,7 @@ def edit_team(self, team_id: str | int, name: str) -> list[dict]:
1740
1738
f"teams/{ team_id } " , post_args = post_args , http_method = "PUT"
1741
1739
)
1742
1740
1743
- def get_entries_for_users_in_team (
1744
- self , team_id : str | int , ** kwargs : dict
1745
- ) -> list [dict ]:
1741
+ def get_entries_for_users_in_team (self , team_id : str | int , ** kwargs ) -> list [dict ]:
1746
1742
"""Get all entries associated with a team.
1747
1743
1748
1744
Results can be filtered using the same keyword arguments as the ones used for the list entries endpoint.
@@ -1785,7 +1781,7 @@ def get_entries_for_users_in_team(
1785
1781
f"teams/{ team_id } /entries" , post_args = data , http_method = "GET"
1786
1782
)
1787
1783
1788
- def get_users_in_team (self , team_id : str | int , ** kwargs : dict ) -> list [dict ]:
1784
+ def get_users_in_team (self , team_id : str | int , ** kwargs ) -> list [dict ]:
1789
1785
"""Get all users in a team.
1790
1786
1791
1787
Results can be filtered using the same keyword arguments as the ones used for the users entries endpoint.
0 commit comments