Skip to content

Commit 78edb92

Browse files
feat(api): Add transaction monitoring spec
1 parent 83e39b6 commit 78edb92

119 files changed

Lines changed: 22678 additions & 293 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.

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 195
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-99f95bae0a9466a3c3032c867cae9878877c1602f2d68c2441813ce2c8dc8f87.yml
3-
openapi_spec_hash: 047fd5b9c00f6acddd3e4f5dc203a4ed
4-
config_hash: a0a579b0564a5c18568a78f5ba2b6653
1+
configured_endpoints: 213
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-65a6644277529a38afcac424d99d87cbfa4d8294423ad618dbbd875634ec1d3c.yml
3+
openapi_spec_hash: 6f3c1bb6a70830afb8af1dacd6352a97
4+
config_hash: 126e04f676f61e5871a82889336dbf9d

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import com.lithic.api.services.blocking.ResponderEndpointService
3939
import com.lithic.api.services.blocking.ThreeDSService
4040
import com.lithic.api.services.blocking.TokenizationDecisioningService
4141
import com.lithic.api.services.blocking.TokenizationService
42+
import com.lithic.api.services.blocking.TransactionMonitoringService
4243
import com.lithic.api.services.blocking.TransactionService
4344
import com.lithic.api.services.blocking.TransferLimitService
4445
import com.lithic.api.services.blocking.TransferService
@@ -87,6 +88,8 @@ interface LithicClient {
8788

8889
fun authRules(): AuthRuleService
8990

91+
fun transactionMonitoring(): TransactionMonitoringService
92+
9093
fun authStreamEnrollment(): AuthStreamEnrollmentService
9194

9295
fun tokenizationDecisioning(): TokenizationDecisioningService
@@ -197,6 +200,8 @@ interface LithicClient {
197200

198201
fun authRules(): AuthRuleService.WithRawResponse
199202

203+
fun transactionMonitoring(): TransactionMonitoringService.WithRawResponse
204+
200205
fun authStreamEnrollment(): AuthStreamEnrollmentService.WithRawResponse
201206

202207
fun tokenizationDecisioning(): TokenizationDecisioningService.WithRawResponse

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import com.lithic.api.services.async.ResponderEndpointServiceAsync
3838
import com.lithic.api.services.async.ThreeDSServiceAsync
3939
import com.lithic.api.services.async.TokenizationDecisioningServiceAsync
4040
import com.lithic.api.services.async.TokenizationServiceAsync
41+
import com.lithic.api.services.async.TransactionMonitoringServiceAsync
4142
import com.lithic.api.services.async.TransactionServiceAsync
4243
import com.lithic.api.services.async.TransferLimitServiceAsync
4344
import com.lithic.api.services.async.TransferServiceAsync
@@ -87,6 +88,8 @@ interface LithicClientAsync {
8788

8889
fun authRules(): AuthRuleServiceAsync
8990

91+
fun transactionMonitoring(): TransactionMonitoringServiceAsync
92+
9093
fun authStreamEnrollment(): AuthStreamEnrollmentServiceAsync
9194

9295
fun tokenizationDecisioning(): TokenizationDecisioningServiceAsync
@@ -200,6 +203,8 @@ interface LithicClientAsync {
200203

201204
fun authRules(): AuthRuleServiceAsync.WithRawResponse
202205

206+
fun transactionMonitoring(): TransactionMonitoringServiceAsync.WithRawResponse
207+
203208
fun authStreamEnrollment(): AuthStreamEnrollmentServiceAsync.WithRawResponse
204209

205210
fun tokenizationDecisioning(): TokenizationDecisioningServiceAsync.WithRawResponse

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ import com.lithic.api.services.async.TokenizationDecisioningServiceAsync
7979
import com.lithic.api.services.async.TokenizationDecisioningServiceAsyncImpl
8080
import com.lithic.api.services.async.TokenizationServiceAsync
8181
import com.lithic.api.services.async.TokenizationServiceAsyncImpl
82+
import com.lithic.api.services.async.TransactionMonitoringServiceAsync
83+
import com.lithic.api.services.async.TransactionMonitoringServiceAsyncImpl
8284
import com.lithic.api.services.async.TransactionServiceAsync
8385
import com.lithic.api.services.async.TransactionServiceAsyncImpl
8486
import com.lithic.api.services.async.TransferLimitServiceAsync
@@ -119,6 +121,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
119121
AuthRuleServiceAsyncImpl(clientOptionsWithUserAgent)
120122
}
121123

124+
private val transactionMonitoring: TransactionMonitoringServiceAsync by lazy {
125+
TransactionMonitoringServiceAsyncImpl(clientOptionsWithUserAgent)
126+
}
127+
122128
private val authStreamEnrollment: AuthStreamEnrollmentServiceAsync by lazy {
123129
AuthStreamEnrollmentServiceAsyncImpl(clientOptionsWithUserAgent)
124130
}
@@ -256,6 +262,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
256262

257263
override fun authRules(): AuthRuleServiceAsync = authRules
258264

265+
override fun transactionMonitoring(): TransactionMonitoringServiceAsync = transactionMonitoring
266+
259267
override fun authStreamEnrollment(): AuthStreamEnrollmentServiceAsync = authStreamEnrollment
260268

261269
override fun tokenizationDecisioning(): TokenizationDecisioningServiceAsync =
@@ -348,6 +356,11 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
348356
AuthRuleServiceAsyncImpl.WithRawResponseImpl(clientOptions)
349357
}
350358

359+
private val transactionMonitoring:
360+
TransactionMonitoringServiceAsync.WithRawResponse by lazy {
361+
TransactionMonitoringServiceAsyncImpl.WithRawResponseImpl(clientOptions)
362+
}
363+
351364
private val authStreamEnrollment: AuthStreamEnrollmentServiceAsync.WithRawResponse by lazy {
352365
AuthStreamEnrollmentServiceAsyncImpl.WithRawResponseImpl(clientOptions)
353366
}
@@ -490,6 +503,9 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
490503

491504
override fun authRules(): AuthRuleServiceAsync.WithRawResponse = authRules
492505

506+
override fun transactionMonitoring(): TransactionMonitoringServiceAsync.WithRawResponse =
507+
transactionMonitoring
508+
493509
override fun authStreamEnrollment(): AuthStreamEnrollmentServiceAsync.WithRawResponse =
494510
authStreamEnrollment
495511

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ import com.lithic.api.services.blocking.TokenizationDecisioningService
7979
import com.lithic.api.services.blocking.TokenizationDecisioningServiceImpl
8080
import com.lithic.api.services.blocking.TokenizationService
8181
import com.lithic.api.services.blocking.TokenizationServiceImpl
82+
import com.lithic.api.services.blocking.TransactionMonitoringService
83+
import com.lithic.api.services.blocking.TransactionMonitoringServiceImpl
8284
import com.lithic.api.services.blocking.TransactionService
8385
import com.lithic.api.services.blocking.TransactionServiceImpl
8486
import com.lithic.api.services.blocking.TransferLimitService
@@ -116,6 +118,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
116118
AuthRuleServiceImpl(clientOptionsWithUserAgent)
117119
}
118120

121+
private val transactionMonitoring: TransactionMonitoringService by lazy {
122+
TransactionMonitoringServiceImpl(clientOptionsWithUserAgent)
123+
}
124+
119125
private val authStreamEnrollment: AuthStreamEnrollmentService by lazy {
120126
AuthStreamEnrollmentServiceImpl(clientOptionsWithUserAgent)
121127
}
@@ -237,6 +243,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
237243

238244
override fun authRules(): AuthRuleService = authRules
239245

246+
override fun transactionMonitoring(): TransactionMonitoringService = transactionMonitoring
247+
240248
override fun authStreamEnrollment(): AuthStreamEnrollmentService = authStreamEnrollment
241249

242250
override fun tokenizationDecisioning(): TokenizationDecisioningService = tokenizationDecisioning
@@ -328,6 +336,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
328336
AuthRuleServiceImpl.WithRawResponseImpl(clientOptions)
329337
}
330338

339+
private val transactionMonitoring: TransactionMonitoringService.WithRawResponse by lazy {
340+
TransactionMonitoringServiceImpl.WithRawResponseImpl(clientOptions)
341+
}
342+
331343
private val authStreamEnrollment: AuthStreamEnrollmentService.WithRawResponse by lazy {
332344
AuthStreamEnrollmentServiceImpl.WithRawResponseImpl(clientOptions)
333345
}
@@ -470,6 +482,9 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
470482

471483
override fun authRules(): AuthRuleService.WithRawResponse = authRules
472484

485+
override fun transactionMonitoring(): TransactionMonitoringService.WithRawResponse =
486+
transactionMonitoring
487+
473488
override fun authStreamEnrollment(): AuthStreamEnrollmentService.WithRawResponse =
474489
authStreamEnrollment
475490

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

Lines changed: 0 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,143 +1050,6 @@ private constructor(
10501050
override fun toString() = value.toString()
10511051
}
10521052

1053-
/** The type of entity */
1054-
class EntityType @JsonCreator private constructor(private val value: JsonField<String>) : Enum {
1055-
1056-
/**
1057-
* Returns this class instance's raw value.
1058-
*
1059-
* This is usually only useful if this instance was deserialized from data that doesn't
1060-
* match any known member, and you want to know that value. For example, if the SDK is on an
1061-
* older version than the API, then the API may respond with new members that the SDK is
1062-
* unaware of.
1063-
*/
1064-
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value
1065-
1066-
companion object {
1067-
1068-
@JvmField val BENEFICIAL_OWNER_INDIVIDUAL = of("BENEFICIAL_OWNER_INDIVIDUAL")
1069-
1070-
@JvmField val CONTROL_PERSON = of("CONTROL_PERSON")
1071-
1072-
@JvmStatic fun of(value: String) = EntityType(JsonField.of(value))
1073-
}
1074-
1075-
/** An enum containing [EntityType]'s known values. */
1076-
enum class Known {
1077-
BENEFICIAL_OWNER_INDIVIDUAL,
1078-
CONTROL_PERSON,
1079-
}
1080-
1081-
/**
1082-
* An enum containing [EntityType]'s known values, as well as an [_UNKNOWN] member.
1083-
*
1084-
* An instance of [EntityType] can contain an unknown value in a couple of cases:
1085-
* - It was deserialized from data that doesn't match any known member. For example, if the
1086-
* SDK is on an older version than the API, then the API may respond with new members that
1087-
* the SDK is unaware of.
1088-
* - It was constructed with an arbitrary value using the [of] method.
1089-
*/
1090-
enum class Value {
1091-
BENEFICIAL_OWNER_INDIVIDUAL,
1092-
CONTROL_PERSON,
1093-
/**
1094-
* An enum member indicating that [EntityType] was instantiated with an unknown value.
1095-
*/
1096-
_UNKNOWN,
1097-
}
1098-
1099-
/**
1100-
* Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
1101-
* if the class was instantiated with an unknown value.
1102-
*
1103-
* Use the [known] method instead if you're certain the value is always known or if you want
1104-
* to throw for the unknown case.
1105-
*/
1106-
fun value(): Value =
1107-
when (this) {
1108-
BENEFICIAL_OWNER_INDIVIDUAL -> Value.BENEFICIAL_OWNER_INDIVIDUAL
1109-
CONTROL_PERSON -> Value.CONTROL_PERSON
1110-
else -> Value._UNKNOWN
1111-
}
1112-
1113-
/**
1114-
* Returns an enum member corresponding to this class instance's value.
1115-
*
1116-
* Use the [value] method instead if you're uncertain the value is always known and don't
1117-
* want to throw for the unknown case.
1118-
*
1119-
* @throws LithicInvalidDataException if this class instance's value is a not a known
1120-
* member.
1121-
*/
1122-
fun known(): Known =
1123-
when (this) {
1124-
BENEFICIAL_OWNER_INDIVIDUAL -> Known.BENEFICIAL_OWNER_INDIVIDUAL
1125-
CONTROL_PERSON -> Known.CONTROL_PERSON
1126-
else -> throw LithicInvalidDataException("Unknown EntityType: $value")
1127-
}
1128-
1129-
/**
1130-
* Returns this class instance's primitive wire representation.
1131-
*
1132-
* This differs from the [toString] method because that method is primarily for debugging
1133-
* and generally doesn't throw.
1134-
*
1135-
* @throws LithicInvalidDataException if this class instance's value does not have the
1136-
* expected primitive type.
1137-
*/
1138-
fun asString(): String =
1139-
_value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
1140-
1141-
private var validated: Boolean = false
1142-
1143-
/**
1144-
* Validates that the types of all values in this object match their expected types
1145-
* recursively.
1146-
*
1147-
* This method is _not_ forwards compatible with new types from the API for existing fields.
1148-
*
1149-
* @throws LithicInvalidDataException if any value type in this object doesn't match its
1150-
* expected type.
1151-
*/
1152-
fun validate(): EntityType = apply {
1153-
if (validated) {
1154-
return@apply
1155-
}
1156-
1157-
known()
1158-
validated = true
1159-
}
1160-
1161-
fun isValid(): Boolean =
1162-
try {
1163-
validate()
1164-
true
1165-
} catch (e: LithicInvalidDataException) {
1166-
false
1167-
}
1168-
1169-
/**
1170-
* Returns a score indicating how many valid values are contained in this object
1171-
* recursively.
1172-
*
1173-
* Used for best match union deserialization.
1174-
*/
1175-
@JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
1176-
1177-
override fun equals(other: Any?): Boolean {
1178-
if (this === other) {
1179-
return true
1180-
}
1181-
1182-
return other is EntityType && value == other.value
1183-
}
1184-
1185-
override fun hashCode() = value.hashCode()
1186-
1187-
override fun toString() = value.toString()
1188-
}
1189-
11901053
override fun equals(other: Any?): Boolean {
11911054
if (this === other) {
11921055
return true

0 commit comments

Comments
 (0)