Skip to content

Commit e2c3beb

Browse files
feat(api): api update
1 parent 18b0eaf commit e2c3beb

6 files changed

Lines changed: 127 additions & 14 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: 165
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-0598a3569ace333f5006a8174ff828a0f1a290f6dc9bbbdb5659d50318c31957.yml
3-
openapi_spec_hash: 09925ebceb9cfe47224f05a2ff9ce14f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1aaf1d9d9aea1bfa14a48559f01d539aa1449d65f252dc9c3b606c7bca300af1.yml
3+
openapi_spec_hash: 3327246caf3bcbd3504ce99c81062075
44
config_hash: a5d12cd64a37624cbe350cd7b2380693

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

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ private constructor(
2727
private val created: JsonField<OffsetDateTime>,
2828
private val currency: JsonField<String>,
2929
private val institutionId: JsonField<String>,
30+
private val isComplete: JsonField<Boolean>,
3031
private val network: JsonField<Network>,
3132
private val reportDate: JsonField<LocalDate>,
3233
private val settlementInstitutionId: JsonField<String>,
@@ -47,6 +48,9 @@ private constructor(
4748
@JsonProperty("institution_id")
4849
@ExcludeMissing
4950
institutionId: JsonField<String> = JsonMissing.of(),
51+
@JsonProperty("is_complete")
52+
@ExcludeMissing
53+
isComplete: JsonField<Boolean> = JsonMissing.of(),
5054
@JsonProperty("network") @ExcludeMissing network: JsonField<Network> = JsonMissing.of(),
5155
@JsonProperty("report_date")
5256
@ExcludeMissing
@@ -67,6 +71,7 @@ private constructor(
6771
created,
6872
currency,
6973
institutionId,
74+
isComplete,
7075
network,
7176
reportDate,
7277
settlementInstitutionId,
@@ -116,7 +121,16 @@ private constructor(
116121
fun institutionId(): String = institutionId.getRequired("institution_id")
117122

118123
/**
119-
* Card network where the transaction took place. VISA, MASTERCARD, MAESTRO, or INTERLINK.
124+
* Indicates that all settlement records related to this Network Total are available in the
125+
* details endpoint.
126+
*
127+
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
128+
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
129+
*/
130+
fun isComplete(): Boolean = isComplete.getRequired("is_complete")
131+
132+
/**
133+
* Card network where the transaction took place. AMEX, VISA, MASTERCARD, MAESTRO, or INTERLINK.
120134
*
121135
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
122136
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -202,6 +216,13 @@ private constructor(
202216
@ExcludeMissing
203217
fun _institutionId(): JsonField<String> = institutionId
204218

219+
/**
220+
* Returns the raw JSON value of [isComplete].
221+
*
222+
* Unlike [isComplete], this method doesn't throw if the JSON field has an unexpected type.
223+
*/
224+
@JsonProperty("is_complete") @ExcludeMissing fun _isComplete(): JsonField<Boolean> = isComplete
225+
205226
/**
206227
* Returns the raw JSON value of [network].
207228
*
@@ -276,6 +297,7 @@ private constructor(
276297
* .created()
277298
* .currency()
278299
* .institutionId()
300+
* .isComplete()
279301
* .network()
280302
* .reportDate()
281303
* .settlementInstitutionId()
@@ -294,6 +316,7 @@ private constructor(
294316
private var created: JsonField<OffsetDateTime>? = null
295317
private var currency: JsonField<String>? = null
296318
private var institutionId: JsonField<String>? = null
319+
private var isComplete: JsonField<Boolean>? = null
297320
private var network: JsonField<Network>? = null
298321
private var reportDate: JsonField<LocalDate>? = null
299322
private var settlementInstitutionId: JsonField<String>? = null
@@ -309,6 +332,7 @@ private constructor(
309332
created = networkTotalListResponse.created
310333
currency = networkTotalListResponse.currency
311334
institutionId = networkTotalListResponse.institutionId
335+
isComplete = networkTotalListResponse.isComplete
312336
network = networkTotalListResponse.network
313337
reportDate = networkTotalListResponse.reportDate
314338
settlementInstitutionId = networkTotalListResponse.settlementInstitutionId
@@ -381,7 +405,23 @@ private constructor(
381405
}
382406

383407
/**
384-
* Card network where the transaction took place. VISA, MASTERCARD, MAESTRO, or INTERLINK.
408+
* Indicates that all settlement records related to this Network Total are available in the
409+
* details endpoint.
410+
*/
411+
fun isComplete(isComplete: Boolean) = isComplete(JsonField.of(isComplete))
412+
413+
/**
414+
* Sets [Builder.isComplete] to an arbitrary JSON value.
415+
*
416+
* You should usually call [Builder.isComplete] with a well-typed [Boolean] value instead.
417+
* This method is primarily for setting the field to an undocumented or not yet supported
418+
* value.
419+
*/
420+
fun isComplete(isComplete: JsonField<Boolean>) = apply { this.isComplete = isComplete }
421+
422+
/**
423+
* Card network where the transaction took place. AMEX, VISA, MASTERCARD, MAESTRO, or
424+
* INTERLINK.
385425
*/
386426
fun network(network: Network) = network(JsonField.of(network))
387427

@@ -492,6 +532,7 @@ private constructor(
492532
* .created()
493533
* .currency()
494534
* .institutionId()
535+
* .isComplete()
495536
* .network()
496537
* .reportDate()
497538
* .settlementInstitutionId()
@@ -508,6 +549,7 @@ private constructor(
508549
checkRequired("created", created),
509550
checkRequired("currency", currency),
510551
checkRequired("institutionId", institutionId),
552+
checkRequired("isComplete", isComplete),
511553
checkRequired("network", network),
512554
checkRequired("reportDate", reportDate),
513555
checkRequired("settlementInstitutionId", settlementInstitutionId),
@@ -530,6 +572,7 @@ private constructor(
530572
created()
531573
currency()
532574
institutionId()
575+
isComplete()
533576
network().validate()
534577
reportDate()
535578
settlementInstitutionId()
@@ -559,6 +602,7 @@ private constructor(
559602
(if (created.asKnown().isPresent) 1 else 0) +
560603
(if (currency.asKnown().isPresent) 1 else 0) +
561604
(if (institutionId.asKnown().isPresent) 1 else 0) +
605+
(if (isComplete.asKnown().isPresent) 1 else 0) +
562606
(network.asKnown().getOrNull()?.validity() ?: 0) +
563607
(if (reportDate.asKnown().isPresent) 1 else 0) +
564608
(if (settlementInstitutionId.asKnown().isPresent) 1 else 0) +
@@ -863,7 +907,9 @@ private constructor(
863907
"Amounts{grossSettlement=$grossSettlement, interchangeFees=$interchangeFees, netSettlement=$netSettlement, visaCharges=$visaCharges, additionalProperties=$additionalProperties}"
864908
}
865909

866-
/** Card network where the transaction took place. VISA, MASTERCARD, MAESTRO, or INTERLINK. */
910+
/**
911+
* Card network where the transaction took place. AMEX, VISA, MASTERCARD, MAESTRO, or INTERLINK.
912+
*/
867913
class Network @JsonCreator private constructor(private val value: JsonField<String>) : Enum {
868914

869915
/**
@@ -878,6 +924,8 @@ private constructor(
878924

879925
companion object {
880926

927+
@JvmField val AMEX = of("AMEX")
928+
881929
@JvmField val VISA = of("VISA")
882930

883931
@JvmField val MASTERCARD = of("MASTERCARD")
@@ -891,6 +939,7 @@ private constructor(
891939

892940
/** An enum containing [Network]'s known values. */
893941
enum class Known {
942+
AMEX,
894943
VISA,
895944
MASTERCARD,
896945
MAESTRO,
@@ -907,6 +956,7 @@ private constructor(
907956
* - It was constructed with an arbitrary value using the [of] method.
908957
*/
909958
enum class Value {
959+
AMEX,
910960
VISA,
911961
MASTERCARD,
912962
MAESTRO,
@@ -924,6 +974,7 @@ private constructor(
924974
*/
925975
fun value(): Value =
926976
when (this) {
977+
AMEX -> Value.AMEX
927978
VISA -> Value.VISA
928979
MASTERCARD -> Value.MASTERCARD
929980
MAESTRO -> Value.MAESTRO
@@ -942,6 +993,7 @@ private constructor(
942993
*/
943994
fun known(): Known =
944995
when (this) {
996+
AMEX -> Known.AMEX
945997
VISA -> Known.VISA
946998
MASTERCARD -> Known.MASTERCARD
947999
MAESTRO -> Known.MAESTRO
@@ -1006,15 +1058,15 @@ private constructor(
10061058
return true
10071059
}
10081060

1009-
return /* spotless:off */ other is NetworkTotalListResponse && token == other.token && amounts == other.amounts && created == other.created && currency == other.currency && institutionId == other.institutionId && network == other.network && reportDate == other.reportDate && settlementInstitutionId == other.settlementInstitutionId && settlementService == other.settlementService && updated == other.updated && cycle == other.cycle && additionalProperties == other.additionalProperties /* spotless:on */
1061+
return /* spotless:off */ other is NetworkTotalListResponse && token == other.token && amounts == other.amounts && created == other.created && currency == other.currency && institutionId == other.institutionId && isComplete == other.isComplete && network == other.network && reportDate == other.reportDate && settlementInstitutionId == other.settlementInstitutionId && settlementService == other.settlementService && updated == other.updated && cycle == other.cycle && additionalProperties == other.additionalProperties /* spotless:on */
10101062
}
10111063

10121064
/* spotless:off */
1013-
private val hashCode: Int by lazy { Objects.hash(token, amounts, created, currency, institutionId, network, reportDate, settlementInstitutionId, settlementService, updated, cycle, additionalProperties) }
1065+
private val hashCode: Int by lazy { Objects.hash(token, amounts, created, currency, institutionId, isComplete, network, reportDate, settlementInstitutionId, settlementService, updated, cycle, additionalProperties) }
10141066
/* spotless:on */
10151067

10161068
override fun hashCode(): Int = hashCode
10171069

10181070
override fun toString() =
1019-
"NetworkTotalListResponse{token=$token, amounts=$amounts, created=$created, currency=$currency, institutionId=$institutionId, network=$network, reportDate=$reportDate, settlementInstitutionId=$settlementInstitutionId, settlementService=$settlementService, updated=$updated, cycle=$cycle, additionalProperties=$additionalProperties}"
1071+
"NetworkTotalListResponse{token=$token, amounts=$amounts, created=$created, currency=$currency, institutionId=$institutionId, isComplete=$isComplete, network=$network, reportDate=$reportDate, settlementInstitutionId=$settlementInstitutionId, settlementService=$settlementService, updated=$updated, cycle=$cycle, additionalProperties=$additionalProperties}"
10201072
}

0 commit comments

Comments
 (0)