"""Account based helpers methods.""" from moneyhub.utils.owsclient import get SERVICE_NAME = 'ows-royalties' def get_contracts_for_account(account_id: int) -> list: """Get contracts associated with an account. Args: account_id (int): Account to get contracts for Returns: list: List of contracts """ endpoint = f'/contracts/account/{account_id}' response = get(SERVICE_NAME, endpoint) return response.json()['items']