Skip to content

Commit 264ddcb

Browse files
feat(api): disputes & mark url as a required param in lithic.events().subscriptions().update()
feat(api): disputes & mark url as a required param in `lithic.events().subscriptions().update()` - Add CLOSED enum member to account state - Update docs - Internally rename `event_types` param to `event_types[]`
1 parent 205e976 commit 264ddcb

67 files changed

Lines changed: 6202 additions & 267 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ interface LithicClient {
1818

1919
fun cards(): CardService
2020

21+
fun disputes(): DisputeService
22+
2123
fun events(): EventService
2224

2325
fun fundingSources(): FundingSourceService

lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ interface LithicClientAsync {
1919

2020
fun cards(): CardServiceAsync
2121

22+
fun disputes(): DisputeServiceAsync
23+
2224
fun events(): EventServiceAsync
2325

2426
fun fundingSources(): FundingSourceServiceAsync

lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ constructor(
3434

3535
private val cards: CardServiceAsync by lazy { CardServiceAsyncImpl(clientOptions) }
3636

37+
private val disputes: DisputeServiceAsync by lazy { DisputeServiceAsyncImpl(clientOptions) }
38+
3739
private val events: EventServiceAsync by lazy { EventServiceAsyncImpl(clientOptions) }
3840

3941
private val fundingSources: FundingSourceServiceAsync by lazy {
@@ -56,6 +58,8 @@ constructor(
5658

5759
override fun cards(): CardServiceAsync = cards
5860

61+
override fun disputes(): DisputeServiceAsync = disputes
62+
5963
override fun events(): EventServiceAsync = events
6064

6165
override fun fundingSources(): FundingSourceServiceAsync = fundingSources

lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ constructor(
3333

3434
private val cards: CardService by lazy { CardServiceImpl(clientOptions) }
3535

36+
private val disputes: DisputeService by lazy { DisputeServiceImpl(clientOptions) }
37+
3638
private val events: EventService by lazy { EventServiceImpl(clientOptions) }
3739

3840
private val fundingSources: FundingSourceService by lazy {
@@ -53,6 +55,8 @@ constructor(
5355

5456
override fun cards(): CardService = cards
5557

58+
override fun disputes(): DisputeService = disputes
59+
5660
override fun events(): EventService = events
5761

5862
override fun fundingSources(): FundingSourceService = fundingSources

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

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ private constructor(
4141
/**
4242
* Account state:
4343
*
44-
* - `ACTIVE` - Active, account is able to transact and create new cards.
45-
* - `PAUSED` - Paused, account will not be able to transact or create new cards.
44+
* - `ACTIVE` - Account is able to transact and create new cards.
45+
* - `PAUSED` - Account will not be able to transact or create new cards. It can be set back to
46+
* `ACTIVE`.
47+
* - `CLOSED` - Account will permanently not be able to transact or create new cards.
4648
*/
4749
fun state(): State = state.getRequired("state")
4850

@@ -67,8 +69,10 @@ private constructor(
6769
/**
6870
* Account state:
6971
*
70-
* - `ACTIVE` - Active, account is able to transact and create new cards.
71-
* - `PAUSED` - Paused, account will not be able to transact or create new cards.
72+
* - `ACTIVE` - Account is able to transact and create new cards.
73+
* - `PAUSED` - Account will not be able to transact or create new cards. It can be set back to
74+
* `ACTIVE`.
75+
* - `CLOSED` - Account will permanently not be able to transact or create new cards.
7276
*/
7377
@JsonProperty("state") @ExcludeMissing fun _state() = state
7478

@@ -170,16 +174,20 @@ private constructor(
170174
/**
171175
* Account state:
172176
*
173-
* - `ACTIVE` - Active, account is able to transact and create new cards.
174-
* - `PAUSED` - Paused, account will not be able to transact or create new cards.
177+
* - `ACTIVE` - Account is able to transact and create new cards.
178+
* - `PAUSED` - Account will not be able to transact or create new cards. It can be set back
179+
* to `ACTIVE`.
180+
* - `CLOSED` - Account will permanently not be able to transact or create new cards.
175181
*/
176182
fun state(state: State) = state(JsonField.of(state))
177183

178184
/**
179185
* Account state:
180186
*
181-
* - `ACTIVE` - Active, account is able to transact and create new cards.
182-
* - `PAUSED` - Paused, account will not be able to transact or create new cards.
187+
* - `ACTIVE` - Account is able to transact and create new cards.
188+
* - `PAUSED` - Account will not be able to transact or create new cards. It can be set back
189+
* to `ACTIVE`.
190+
* - `CLOSED` - Account will permanently not be able to transact or create new cards.
183191
*/
184192
@JsonProperty("state")
185193
@ExcludeMissing
@@ -409,31 +417,37 @@ private constructor(
409417

410418
@JvmField val PAUSED = State(JsonField.of("PAUSED"))
411419

420+
@JvmField val CLOSED = State(JsonField.of("CLOSED"))
421+
412422
@JvmStatic fun of(value: String) = State(JsonField.of(value))
413423
}
414424

415425
enum class Known {
416426
ACTIVE,
417427
PAUSED,
428+
CLOSED,
418429
}
419430

420431
enum class Value {
421432
ACTIVE,
422433
PAUSED,
434+
CLOSED,
423435
_UNKNOWN,
424436
}
425437

426438
fun value(): Value =
427439
when (this) {
428440
ACTIVE -> Value.ACTIVE
429441
PAUSED -> Value.PAUSED
442+
CLOSED -> Value.CLOSED
430443
else -> Value._UNKNOWN
431444
}
432445

433446
fun known(): Known =
434447
when (this) {
435448
ACTIVE -> Known.ACTIVE
436449
PAUSED -> Known.PAUSED
450+
CLOSED -> Known.CLOSED
437451
else -> throw LithicInvalidDataException("Unknown State: $value")
438452
}
439453

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ constructor(
353353
@JsonProperty("control_person") fun controlPerson(): Individual? = controlPerson
354354

355355
/**
356-
* An ISO 8601 timestamp indicating when precomputed KYC was completed on the business with
356+
* An RFC 3339 timestamp indicating when precomputed KYC was completed on the business with
357357
* a pass result.
358358
*
359359
* This field is required only if workflow type is `KYB_BYO`.
@@ -366,7 +366,7 @@ constructor(
366366
@JsonProperty("nature_of_business") fun natureOfBusiness(): String? = natureOfBusiness
367367

368368
/**
369-
* An ISO 8601 timestamp indicating when the account holder accepted the applicable legal
369+
* An RFC 3339 timestamp indicating when the account holder accepted the applicable legal
370370
* agreements (e.g., cardholder terms) as agreed upon during API customer's implementation
371371
* with Lithic.
372372
*/
@@ -508,7 +508,7 @@ constructor(
508508
}
509509

510510
/**
511-
* An ISO 8601 timestamp indicating when precomputed KYC was completed on the business
511+
* An RFC 3339 timestamp indicating when precomputed KYC was completed on the business
512512
* with a pass result.
513513
*
514514
* This field is required only if workflow type is `KYB_BYO`.
@@ -528,7 +528,7 @@ constructor(
528528
}
529529

530530
/**
531-
* An ISO 8601 timestamp indicating when the account holder accepted the applicable
531+
* An RFC 3339 timestamp indicating when the account holder accepted the applicable
532532
* legal agreements (e.g., cardholder terms) as agreed upon during API customer's
533533
* implementation with Lithic.
534534
*/
@@ -787,7 +787,7 @@ constructor(
787787
*/
788788
@JsonProperty("address") fun address(): Address? = address
789789

790-
/** Individual's date of birth, as an ISO 8601 date. */
790+
/** Individual's date of birth, as an RFC 3339 date. */
791791
@JsonProperty("dob") fun dob(): String? = dob
792792

793793
/**
@@ -890,7 +890,7 @@ constructor(
890890
@JsonProperty("address")
891891
fun address(address: Address) = apply { this.address = address }
892892

893-
/** Individual's date of birth, as an ISO 8601 date. */
893+
/** Individual's date of birth, as an RFC 3339 date. */
894894
@JsonProperty("dob") fun dob(dob: String) = apply { this.dob = dob }
895895

896896
/**
@@ -1028,15 +1028,15 @@ constructor(
10281028
@JsonProperty("individual") fun individual(): Individual? = individual
10291029

10301030
/**
1031-
* An ISO 8601 timestamp indicating when precomputed KYC was completed on the individual
1031+
* An RFC 3339 timestamp indicating when precomputed KYC was completed on the individual
10321032
* with a pass result.
10331033
*
10341034
* This field is required only if workflow type is `KYC_BYO`.
10351035
*/
10361036
@JsonProperty("kyc_passed_timestamp") fun kycPassedTimestamp(): String? = kycPassedTimestamp
10371037

10381038
/**
1039-
* An ISO 8601 timestamp indicating when the account holder accepted the applicable legal
1039+
* An RFC 3339 timestamp indicating when the account holder accepted the applicable legal
10401040
* agreements (e.g., cardholder terms) as agreed upon during API customer's implementation
10411041
* with Lithic.
10421042
*/
@@ -1110,7 +1110,7 @@ constructor(
11101110
fun individual(individual: Individual) = apply { this.individual = individual }
11111111

11121112
/**
1113-
* An ISO 8601 timestamp indicating when precomputed KYC was completed on the individual
1113+
* An RFC 3339 timestamp indicating when precomputed KYC was completed on the individual
11141114
* with a pass result.
11151115
*
11161116
* This field is required only if workflow type is `KYC_BYO`.
@@ -1121,7 +1121,7 @@ constructor(
11211121
}
11221122

11231123
/**
1124-
* An ISO 8601 timestamp indicating when the account holder accepted the applicable
1124+
* An RFC 3339 timestamp indicating when the account holder accepted the applicable
11251125
* legal agreements (e.g., cardholder terms) as agreed upon during API customer's
11261126
* implementation with Lithic.
11271127
*/
@@ -1179,7 +1179,7 @@ constructor(
11791179
*/
11801180
@JsonProperty("address") fun address(): Address? = address
11811181

1182-
/** Individual's date of birth, as an ISO 8601 date. */
1182+
/** Individual's date of birth, as an RFC 3339 date. */
11831183
@JsonProperty("dob") fun dob(): String? = dob
11841184

11851185
/**
@@ -1282,7 +1282,7 @@ constructor(
12821282
@JsonProperty("address")
12831283
fun address(address: Address) = apply { this.address = address }
12841284

1285-
/** Individual's date of birth, as an ISO 8601 date. */
1285+
/** Individual's date of birth, as an RFC 3339 date. */
12861286
@JsonProperty("dob") fun dob(dob: String) = apply { this.dob = dob }
12871287

12881288
/**

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ constructor(
6969
@JsonProperty("workflow") fun workflow(): Workflow? = workflow
7070

7171
/**
72-
* An ISO 8601 timestamp indicating when the account holder accepted the applicable legal
72+
* An RFC 3339 timestamp indicating when the account holder accepted the applicable legal
7373
* agreements (e.g., cardholder terms) as agreed upon during API customer's implementation
7474
* with Lithic.
7575
*/
@@ -138,7 +138,7 @@ constructor(
138138
fun workflow(workflow: Workflow) = apply { this.workflow = workflow }
139139

140140
/**
141-
* An ISO 8601 timestamp indicating when the account holder accepted the applicable
141+
* An RFC 3339 timestamp indicating when the account holder accepted the applicable
142142
* legal agreements (e.g., cardholder terms) as agreed upon during API customer's
143143
* implementation with Lithic.
144144
*/
@@ -248,7 +248,7 @@ constructor(
248248
fun workflow(workflow: Workflow) = apply { this.workflow = workflow }
249249

250250
/**
251-
* An ISO 8601 timestamp indicating when the account holder accepted the applicable legal
251+
* An RFC 3339 timestamp indicating when the account holder accepted the applicable legal
252252
* agreements (e.g., cardholder terms) as agreed upon during API customer's implementation
253253
* with Lithic.
254254
*/
@@ -401,7 +401,7 @@ constructor(
401401
*/
402402
@JsonProperty("address") fun address(): Address? = address
403403

404-
/** Individual's date of birth, as an ISO 8601 date. */
404+
/** Individual's date of birth, as an RFC 3339 date. */
405405
@JsonProperty("dob") fun dob(): String? = dob
406406

407407
/**
@@ -504,7 +504,7 @@ constructor(
504504
@JsonProperty("address")
505505
fun address(address: Address) = apply { this.address = address }
506506

507-
/** Individual's date of birth, as an ISO 8601 date. */
507+
/** Individual's date of birth, as an RFC 3339 date. */
508508
@JsonProperty("dob") fun dob(dob: String) = apply { this.dob = dob }
509509

510510
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ constructor(
9898
}
9999

100100
/**
101-
* Date string in 8601 format. Only entries created after the specified date will be
101+
* Date string in RFC 3339 format. Only entries created after the specified date will be
102102
* included. UTC time zone.
103103
*/
104104
fun begin(begin: OffsetDateTime) = apply { this.begin = begin }
105105

106106
/**
107-
* Date string in 8601 format. Only entries created before the specified date will be
107+
* Date string in RFC 3339 format. Only entries created before the specified date will be
108108
* included. UTC time zone.
109109
*/
110110
fun end(end: OffsetDateTime) = apply { this.end = end }

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private constructor(
4343

4444
private var hashCode: Int = 0
4545

46-
/** An ISO 8601 timestamp for when the card was created. UTC time zone. */
46+
/** An RFC 3339 timestamp for when the card was created. UTC time zone. */
4747
fun created(): OffsetDateTime = created.getRequired("created")
4848

4949
/** Three digit cvv printed on the back of the card. */
@@ -146,7 +146,7 @@ private constructor(
146146
fun digitalCardArtToken(): Optional<String> =
147147
Optional.ofNullable(digitalCardArtToken.getNullable("digital_card_art_token"))
148148

149-
/** An ISO 8601 timestamp for when the card was created. UTC time zone. */
149+
/** An RFC 3339 timestamp for when the card was created. UTC time zone. */
150150
@JsonProperty("created") @ExcludeMissing fun _created() = created
151151

152152
/** Three digit cvv printed on the back of the card. */
@@ -378,10 +378,10 @@ private constructor(
378378
additionalProperties(card.additionalProperties)
379379
}
380380

381-
/** An ISO 8601 timestamp for when the card was created. UTC time zone. */
381+
/** An RFC 3339 timestamp for when the card was created. UTC time zone. */
382382
fun created(created: OffsetDateTime) = created(JsonField.of(created))
383383

384-
/** An ISO 8601 timestamp for when the card was created. UTC time zone. */
384+
/** An RFC 3339 timestamp for when the card was created. UTC time zone. */
385385
@JsonProperty("created")
386386
@ExcludeMissing
387387
fun created(created: JsonField<OffsetDateTime>) = apply { this.created = created }

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ constructor(
118118
private var hashCode: Int = 0
119119

120120
/**
121-
* Only required for multi-account users. Token identifying the account the card will be
122-
* associated with. Only applicable if using account holder enrollment. See
123-
* [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for more
124-
* information.
121+
* Globally unique identifier for the account that the card will be associated with.
122+
* Required for programs enrolling users using the
123+
* [/account_holders endpoint](https://docs.lithic.com/docs/account-holders-kyc). See
124+
* [Managing Your Program](doc:managing-your-program) for more information.
125125
*/
126126
@JsonProperty("account_token") fun accountToken(): String? = accountToken
127127

@@ -342,10 +342,10 @@ constructor(
342342
}
343343

344344
/**
345-
* Only required for multi-account users. Token identifying the account the card will be
346-
* associated with. Only applicable if using account holder enrollment. See
347-
* [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for more
348-
* information.
345+
* Globally unique identifier for the account that the card will be associated with.
346+
* Required for programs enrolling users using the
347+
* [/account_holders endpoint](https://docs.lithic.com/docs/account-holders-kyc). See
348+
* [Managing Your Program](doc:managing-your-program) for more information.
349349
*/
350350
@JsonProperty("account_token")
351351
fun accountToken(accountToken: String) = apply { this.accountToken = accountToken }
@@ -632,10 +632,10 @@ constructor(
632632
}
633633

634634
/**
635-
* Only required for multi-account users. Token identifying the account the card will be
636-
* associated with. Only applicable if using account holder enrollment. See
637-
* [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for more
638-
* information.
635+
* Globally unique identifier for the account that the card will be associated with.
636+
* Required for programs enrolling users using the
637+
* [/account_holders endpoint](https://docs.lithic.com/docs/account-holders-kyc). See
638+
* [Managing Your Program](doc:managing-your-program) for more information.
639639
*/
640640
fun accountToken(accountToken: String) = apply { this.accountToken = accountToken }
641641

0 commit comments

Comments
 (0)