Skip to content

Commit b89c4a8

Browse files
feat(api): add CLOSED account state option and UNVERIFIED verification method
- You can now close Accounts via the API: https://docs.lithic.com/changelog - Add UNVERIFIED as a new Verification method option - Update CLOSED account state documentation to clarify manual setting capability
1 parent cce70a4 commit b89c4a8

4 files changed

Lines changed: 26 additions & 12 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 162
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-0c08d769e7a549e40ed9ab9b0298c687cc14e6c2fbe4fdd4544467906a05a613.yml
3-
openapi_spec_hash: 2ea548eacd1af68ec19e847250a65b7d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c178720e9b6fe1ff3917d4d96652b4c91a0e7f0795b6858256d250d8a203d3ac.yml
3+
openapi_spec_hash: 23a4716c6168e96f040ac8575582d075
44
config_hash: 227ad54062905d4ae964b24cef0505b0

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ private constructor(
102102
* - `PAUSED` - Account will not be able to transact or create new cards. It can be set back to
103103
* `ACTIVE`.
104104
* - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` accounts are
105-
* also unable to be transitioned to `ACTIVE` or `PAUSED` states. `CLOSED` accounts result
106-
* from failing to pass KYB/KYC or Lithic closing for risk/compliance reasons. Please contact
107-
* [support@lithic.com](mailto:support@lithic.com) if you believe this was in error.
105+
* unable to be transitioned to `ACTIVE` or `PAUSED` states. Accounts can be manually set to
106+
* `CLOSED`, or this can be done by Lithic due to failure to pass KYB/KYC or for
107+
* risk/compliance reasons. Please contact [support@lithic.com](mailto:support@lithic.com) if
108+
* you believe this was done by mistake.
108109
*
109110
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
110111
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -322,10 +323,10 @@ private constructor(
322323
* - `PAUSED` - Account will not be able to transact or create new cards. It can be set back
323324
* to `ACTIVE`.
324325
* - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` accounts
325-
* are also unable to be transitioned to `ACTIVE` or `PAUSED` states. `CLOSED` accounts
326-
* result from failing to pass KYB/KYC or Lithic closing for risk/compliance reasons.
327-
* Please contact [support@lithic.com](mailto:support@lithic.com) if you believe this was
328-
* in error.
326+
* are unable to be transitioned to `ACTIVE` or `PAUSED` states. Accounts can be manually
327+
* set to `CLOSED`, or this can be done by Lithic due to failure to pass KYB/KYC or for
328+
* risk/compliance reasons. Please contact [support@lithic.com](mailto:support@lithic.com)
329+
* if you believe this was done by mistake.
329330
*/
330331
fun state(state: State) = state(JsonField.of(state))
331332

@@ -750,9 +751,10 @@ private constructor(
750751
* - `PAUSED` - Account will not be able to transact or create new cards. It can be set back to
751752
* `ACTIVE`.
752753
* - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` accounts are
753-
* also unable to be transitioned to `ACTIVE` or `PAUSED` states. `CLOSED` accounts result
754-
* from failing to pass KYB/KYC or Lithic closing for risk/compliance reasons. Please contact
755-
* [support@lithic.com](mailto:support@lithic.com) if you believe this was in error.
754+
* unable to be transitioned to `ACTIVE` or `PAUSED` states. Accounts can be manually set to
755+
* `CLOSED`, or this can be done by Lithic due to failure to pass KYB/KYC or for
756+
* risk/compliance reasons. Please contact [support@lithic.com](mailto:support@lithic.com) if
757+
* you believe this was done by mistake.
756758
*/
757759
class State @JsonCreator private constructor(private val value: JsonField<String>) : Enum {
758760

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,13 +785,16 @@ private constructor(
785785

786786
@JvmField val PAUSED = of("PAUSED")
787787

788+
@JvmField val CLOSED = of("CLOSED")
789+
788790
@JvmStatic fun of(value: String) = State(JsonField.of(value))
789791
}
790792

791793
/** An enum containing [State]'s known values. */
792794
enum class Known {
793795
ACTIVE,
794796
PAUSED,
797+
CLOSED,
795798
}
796799

797800
/**
@@ -806,6 +809,7 @@ private constructor(
806809
enum class Value {
807810
ACTIVE,
808811
PAUSED,
812+
CLOSED,
809813
/** An enum member indicating that [State] was instantiated with an unknown value. */
810814
_UNKNOWN,
811815
}
@@ -821,6 +825,7 @@ private constructor(
821825
when (this) {
822826
ACTIVE -> Value.ACTIVE
823827
PAUSED -> Value.PAUSED
828+
CLOSED -> Value.CLOSED
824829
else -> Value._UNKNOWN
825830
}
826831

@@ -837,6 +842,7 @@ private constructor(
837842
when (this) {
838843
ACTIVE -> Known.ACTIVE
839844
PAUSED -> Known.PAUSED
845+
CLOSED -> Known.CLOSED
840846
else -> throw LithicInvalidDataException("Unknown State: $value")
841847
}
842848

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class VerificationMethod @JsonCreator private constructor(private val value: Jso
3131

3232
@JvmField val EXTERNALLY_VERIFIED = of("EXTERNALLY_VERIFIED")
3333

34+
@JvmField val UNVERIFIED = of("UNVERIFIED")
35+
3436
@JvmStatic fun of(value: String) = VerificationMethod(JsonField.of(value))
3537
}
3638

@@ -41,6 +43,7 @@ class VerificationMethod @JsonCreator private constructor(private val value: Jso
4143
PLAID,
4244
PRENOTE,
4345
EXTERNALLY_VERIFIED,
46+
UNVERIFIED,
4447
}
4548

4649
/**
@@ -58,6 +61,7 @@ class VerificationMethod @JsonCreator private constructor(private val value: Jso
5861
PLAID,
5962
PRENOTE,
6063
EXTERNALLY_VERIFIED,
64+
UNVERIFIED,
6165
/**
6266
* An enum member indicating that [VerificationMethod] was instantiated with an unknown
6367
* value.
@@ -79,6 +83,7 @@ class VerificationMethod @JsonCreator private constructor(private val value: Jso
7983
PLAID -> Value.PLAID
8084
PRENOTE -> Value.PRENOTE
8185
EXTERNALLY_VERIFIED -> Value.EXTERNALLY_VERIFIED
86+
UNVERIFIED -> Value.UNVERIFIED
8287
else -> Value._UNKNOWN
8388
}
8489

@@ -97,6 +102,7 @@ class VerificationMethod @JsonCreator private constructor(private val value: Jso
97102
PLAID -> Known.PLAID
98103
PRENOTE -> Known.PRENOTE
99104
EXTERNALLY_VERIFIED -> Known.EXTERNALLY_VERIFIED
105+
UNVERIFIED -> Known.UNVERIFIED
100106
else -> throw LithicInvalidDataException("Unknown VerificationMethod: $value")
101107
}
102108

0 commit comments

Comments
 (0)