1+ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2+
13import requests as requests_http
24from . import utils
3- from codat .models import operations
5+ from codat .models import operations , shared
46from typing import Optional
57
68class AccountBalances :
9+ r"""Balances for a bank account including end-of-day batch balance or running balances per transaction."""
710 _client : requests_http .Session
811 _security_client : requests_http .Session
912 _server_url : str
@@ -19,28 +22,27 @@ def __init__(self, client: requests_http.Session, security_client: requests_http
1922 self ._sdk_version = sdk_version
2023 self ._gen_version = gen_version
2124
22- def list_banking_account_balances (self , request : operations .ListBankingAccountBalancesRequest ) -> operations .ListBankingAccountBalancesResponse :
25+ def list_account_balances (self , request : operations .ListAccountBalancesRequest ) -> operations .ListAccountBalancesResponse :
2326 r"""List account balances
2427 Gets a list of balances for a bank account including end-of-day batch balance or running balances per transaction.
2528 """
26-
2729 base_url = self ._server_url
2830
29- url = utils .generate_url (operations .ListBankingAccountBalancesRequest , base_url , '/companies/{companyId}/connections/{connectionId}/data/banking-accountBalances' , request )
31+ url = utils .generate_url (operations .ListAccountBalancesRequest , base_url , '/companies/{companyId}/connections/{connectionId}/data/banking-accountBalances' , request )
3032
31- query_params = utils .get_query_params (operations .ListBankingAccountBalancesRequest , request )
33+ query_params = utils .get_query_params (operations .ListAccountBalancesRequest , request )
3234
3335 client = self ._security_client
3436
3537 http_res = client .request ('GET' , url , params = query_params )
3638 content_type = http_res .headers .get ('Content-Type' )
3739
38- res = operations .ListBankingAccountBalancesResponse (status_code = http_res .status_code , content_type = content_type , raw_response = http_res )
40+ res = operations .ListAccountBalancesResponse (status_code = http_res .status_code , content_type = content_type , raw_response = http_res )
3941
4042 if http_res .status_code == 200 :
4143 if utils .match_content_type (content_type , 'application/json' ):
42- out = utils .unmarshal_json (http_res .text , Optional [operations . ListBankingAccountBalancesLinks ])
43- res .links = out
44+ out = utils .unmarshal_json (http_res .text , Optional [shared . AccountBalances ])
45+ res .account_balances = out
4446
4547 return res
4648
0 commit comments