@@ -20,6 +20,7 @@ class BalanceListParams
2020constructor (
2121 private val accountToken: String? ,
2222 private val balanceDate: OffsetDateTime ? ,
23+ private val businessAccountToken: String? ,
2324 private val financialAccountType: FinancialAccountType ? ,
2425 private val additionalHeaders: Headers ,
2526 private val additionalQueryParams: QueryParams ,
@@ -29,6 +30,8 @@ constructor(
2930
3031 fun balanceDate (): Optional <OffsetDateTime > = Optional .ofNullable(balanceDate)
3132
33+ fun businessAccountToken (): Optional <String > = Optional .ofNullable(businessAccountToken)
34+
3235 fun financialAccountType (): Optional <FinancialAccountType > =
3336 Optional .ofNullable(financialAccountType)
3437
@@ -44,6 +47,9 @@ constructor(
4447 listOf (DateTimeFormatter .ISO_OFFSET_DATE_TIME .format(it))
4548 )
4649 }
50+ this .businessAccountToken?.let {
51+ queryParams.put(" business_account_token" , listOf (it.toString()))
52+ }
4753 this .financialAccountType?.let {
4854 queryParams.put(" financial_account_type" , listOf (it.toString()))
4955 }
@@ -60,15 +66,15 @@ constructor(
6066 return true
6167 }
6268
63- return /* spotless:off */ other is BalanceListParams && this .accountToken == other.accountToken && this .balanceDate == other.balanceDate && this .financialAccountType == other.financialAccountType && this .additionalHeaders == other.additionalHeaders && this .additionalQueryParams == other.additionalQueryParams /* spotless:on */
69+ return /* spotless:off */ other is BalanceListParams && this .accountToken == other.accountToken && this .balanceDate == other.balanceDate && this .businessAccountToken == other.businessAccountToken && this . financialAccountType == other.financialAccountType && this .additionalHeaders == other.additionalHeaders && this .additionalQueryParams == other.additionalQueryParams /* spotless:on */
6470 }
6571
6672 override fun hashCode (): Int {
67- return /* spotless:off */ Objects .hash(accountToken, balanceDate, financialAccountType, additionalHeaders, additionalQueryParams) /* spotless:on */
73+ return /* spotless:off */ Objects .hash(accountToken, balanceDate, businessAccountToken, financialAccountType, additionalHeaders, additionalQueryParams) /* spotless:on */
6874 }
6975
7076 override fun toString () =
71- " BalanceListParams{accountToken=$accountToken , balanceDate=$balanceDate , financialAccountType=$financialAccountType , additionalHeaders=$additionalHeaders , additionalQueryParams=$additionalQueryParams }"
77+ " BalanceListParams{accountToken=$accountToken , balanceDate=$balanceDate , businessAccountToken= $businessAccountToken , financialAccountType=$financialAccountType , additionalHeaders=$additionalHeaders , additionalQueryParams=$additionalQueryParams }"
7278
7379 fun toBuilder () = Builder ().from(this )
7480
@@ -82,6 +88,7 @@ constructor(
8288
8389 private var accountToken: String? = null
8490 private var balanceDate: OffsetDateTime ? = null
91+ private var businessAccountToken: String? = null
8592 private var financialAccountType: FinancialAccountType ? = null
8693 private var additionalHeaders: Headers .Builder = Headers .builder()
8794 private var additionalQueryParams: QueryParams .Builder = QueryParams .builder()
@@ -90,6 +97,7 @@ constructor(
9097 internal fun from (balanceListParams : BalanceListParams ) = apply {
9198 this .accountToken = balanceListParams.accountToken
9299 this .balanceDate = balanceListParams.balanceDate
100+ this .businessAccountToken = balanceListParams.businessAccountToken
93101 this .financialAccountType = balanceListParams.financialAccountType
94102 additionalHeaders(balanceListParams.additionalHeaders)
95103 additionalQueryParams(balanceListParams.additionalQueryParams)
@@ -101,6 +109,11 @@ constructor(
101109 /* * UTC date and time of the balances to retrieve. Defaults to latest available balances */
102110 fun balanceDate (balanceDate : OffsetDateTime ) = apply { this .balanceDate = balanceDate }
103111
112+ /* * List balances for all financial accounts of a given business_account_token. */
113+ fun businessAccountToken (businessAccountToken : String ) = apply {
114+ this .businessAccountToken = businessAccountToken
115+ }
116+
104117 /* * List balances for a given Financial Account type. */
105118 fun financialAccountType (financialAccountType : FinancialAccountType ) = apply {
106119 this .financialAccountType = financialAccountType
@@ -208,6 +221,7 @@ constructor(
208221 BalanceListParams (
209222 accountToken,
210223 balanceDate,
224+ businessAccountToken,
211225 financialAccountType,
212226 additionalHeaders.build(),
213227 additionalQueryParams.build(),
0 commit comments