Skip to content

Commit 520922c

Browse files
feat(api): adds Event types for additional API resources
1 parent a974607 commit 520922c

26 files changed

Lines changed: 16293 additions & 8687 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 169
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-aca56b6e4da5b97e586e66392dd3cf433208cb964e25081a661dd41cf456a88a.yml
3-
openapi_spec_hash: 297b9f330d31db8e5832463a0ce455ba
4-
config_hash: 99dad20b4a7d4a1390670762b9da4231
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-e16df7d65a6ababc8e0ca1f2a65070893d82d3b2b046394ab708d56fe717b3ad.yml
3+
openapi_spec_hash: ee82cf8fd5bb6b86abbae304f6c43934
4+
config_hash: c6d56596249e319c59d49d8e49a190b1

lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import kotlin.jvm.optionals.getOrNull
1919
/** Retrieve a list of transactions across all public accounts. */
2020
class AccountActivityListParams
2121
private constructor(
22+
private val accountToken: String?,
2223
private val begin: OffsetDateTime?,
2324
private val businessAccountToken: String?,
2425
private val category: TransactionCategory?,
@@ -33,6 +34,9 @@ private constructor(
3334
private val additionalQueryParams: QueryParams,
3435
) : Params {
3536

37+
/** Filter by account token */
38+
fun accountToken(): Optional<String> = Optional.ofNullable(accountToken)
39+
3640
/**
3741
* Date string in RFC 3339 format. Only entries created after the specified time will be
3842
* included. UTC time zone.
@@ -96,6 +100,7 @@ private constructor(
96100
/** A builder for [AccountActivityListParams]. */
97101
class Builder internal constructor() {
98102

103+
private var accountToken: String? = null
99104
private var begin: OffsetDateTime? = null
100105
private var businessAccountToken: String? = null
101106
private var category: TransactionCategory? = null
@@ -111,6 +116,7 @@ private constructor(
111116

112117
@JvmSynthetic
113118
internal fun from(accountActivityListParams: AccountActivityListParams) = apply {
119+
accountToken = accountActivityListParams.accountToken
114120
begin = accountActivityListParams.begin
115121
businessAccountToken = accountActivityListParams.businessAccountToken
116122
category = accountActivityListParams.category
@@ -125,6 +131,12 @@ private constructor(
125131
additionalQueryParams = accountActivityListParams.additionalQueryParams.toBuilder()
126132
}
127133

134+
/** Filter by account token */
135+
fun accountToken(accountToken: String?) = apply { this.accountToken = accountToken }
136+
137+
/** Alias for calling [Builder.accountToken] with `accountToken.orElse(null)`. */
138+
fun accountToken(accountToken: Optional<String>) = accountToken(accountToken.getOrNull())
139+
128140
/**
129141
* Date string in RFC 3339 format. Only entries created after the specified time will be
130142
* included. UTC time zone.
@@ -340,6 +352,7 @@ private constructor(
340352
*/
341353
fun build(): AccountActivityListParams =
342354
AccountActivityListParams(
355+
accountToken,
343356
begin,
344357
businessAccountToken,
345358
category,
@@ -360,6 +373,7 @@ private constructor(
360373
override fun _queryParams(): QueryParams =
361374
QueryParams.builder()
362375
.apply {
376+
accountToken?.let { put("account_token", it) }
363377
begin?.let { put("begin", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(it)) }
364378
businessAccountToken?.let { put("business_account_token", it) }
365379
category?.let { put("category", it.toString()) }
@@ -857,6 +871,7 @@ private constructor(
857871
}
858872

859873
return other is AccountActivityListParams &&
874+
accountToken == other.accountToken &&
860875
begin == other.begin &&
861876
businessAccountToken == other.businessAccountToken &&
862877
category == other.category &&
@@ -873,6 +888,7 @@ private constructor(
873888

874889
override fun hashCode(): Int =
875890
Objects.hash(
891+
accountToken,
876892
begin,
877893
businessAccountToken,
878894
category,
@@ -888,5 +904,5 @@ private constructor(
888904
)
889905

890906
override fun toString() =
891-
"AccountActivityListParams{begin=$begin, businessAccountToken=$businessAccountToken, category=$category, end=$end, endingBefore=$endingBefore, financialAccountToken=$financialAccountToken, pageSize=$pageSize, result=$result, startingAfter=$startingAfter, status=$status, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
907+
"AccountActivityListParams{accountToken=$accountToken, begin=$begin, businessAccountToken=$businessAccountToken, category=$category, end=$end, endingBefore=$endingBefore, financialAccountToken=$financialAccountToken, pageSize=$pageSize, result=$result, startingAfter=$startingAfter, status=$status, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
892908
}

0 commit comments

Comments
 (0)