macxred / cashctrl_api

Python client for the CashCtrl REST API
MIT License
0 stars 0 forks source link

Implement Type-Consistent `list_currencies` Method #29

Open lasuk opened 2 months ago

lasuk commented 2 months ago

Goal

Align list_currencies() with the other list_xy methods.

Current State

The CashCtrlClient class currently provides type-consistent list_xy methods, as shown below:

list_categories(self, resource: str, include_system: bool = False) -> pd.DataFrame
list_files(self) -> pd.DataFrame
list_tax_rates(self) -> pd.DataFrame
list_accounts(self) -> pd.DataFrame
list_journal_entries(self) -> pd.DataFrame

The CachedCashCtrlClient class inherits from CashCtrlClient and overrides the above methods with cached versions. Additionally, it adds a list_currencies method, which does not exist in the ancestor class:

list_currencies(self) -> pd.DataFrame

Tasks

  1. Implement a type-consistent CashCtrlClient.list_currencies() method.

  2. Adapt CachedCashCtrlClient.list_currencies() to invoke the newly implemented CashCtrlClient.list_currencies() method.