Skip to content

Commit e96e04b

Browse files
feat(api): add day_of_period field to LoanTape models
1 parent 619c52a commit e96e04b

9 files changed

Lines changed: 170 additions & 5 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: 195
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-93254f6abf9fab9e687be2f48198b5126c298b634e2ad626abf413f560f1cbe1.yml
3-
openapi_spec_hash: 6aaac55fbf96d785ca3867adc3c7ca0e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-99f95bae0a9466a3c3032c867cae9878877c1602f2d68c2441813ce2c8dc8f87.yml
3+
openapi_spec_hash: 047fd5b9c00f6acddd3e4f5dc203a4ed
44
config_hash: a0a579b0564a5c18568a78f5ba2b6653

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

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ private constructor(
4444
private val updated: JsonField<OffsetDateTime>,
4545
private val version: JsonField<Long>,
4646
private val ytdTotals: JsonField<StatementTotals>,
47+
private val dayOfPeriod: JsonField<Long>,
4748
private val tier: JsonField<String>,
4849
private val additionalProperties: MutableMap<String, JsonValue>,
4950
) {
@@ -105,6 +106,9 @@ private constructor(
105106
@JsonProperty("ytd_totals")
106107
@ExcludeMissing
107108
ytdTotals: JsonField<StatementTotals> = JsonMissing.of(),
109+
@JsonProperty("day_of_period")
110+
@ExcludeMissing
111+
dayOfPeriod: JsonField<Long> = JsonMissing.of(),
108112
@JsonProperty("tier") @ExcludeMissing tier: JsonField<String> = JsonMissing.of(),
109113
) : this(
110114
token,
@@ -128,6 +132,7 @@ private constructor(
128132
updated,
129133
version,
130134
ytdTotals,
135+
dayOfPeriod,
131136
tier,
132137
mutableMapOf(),
133138
)
@@ -289,6 +294,14 @@ private constructor(
289294
*/
290295
fun ytdTotals(): StatementTotals = ytdTotals.getRequired("ytd_totals")
291296

297+
/**
298+
* Day of the billing period that this loan tape covers, starting at 1
299+
*
300+
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
301+
* server responded with an unexpected value).
302+
*/
303+
fun dayOfPeriod(): Optional<Long> = dayOfPeriod.getOptional("day_of_period")
304+
292305
/**
293306
* Interest tier to which this account belongs to
294307
*
@@ -477,6 +490,13 @@ private constructor(
477490
@ExcludeMissing
478491
fun _ytdTotals(): JsonField<StatementTotals> = ytdTotals
479492

493+
/**
494+
* Returns the raw JSON value of [dayOfPeriod].
495+
*
496+
* Unlike [dayOfPeriod], this method doesn't throw if the JSON field has an unexpected type.
497+
*/
498+
@JsonProperty("day_of_period") @ExcludeMissing fun _dayOfPeriod(): JsonField<Long> = dayOfPeriod
499+
480500
/**
481501
* Returns the raw JSON value of [tier].
482502
*
@@ -553,6 +573,7 @@ private constructor(
553573
private var updated: JsonField<OffsetDateTime>? = null
554574
private var version: JsonField<Long>? = null
555575
private var ytdTotals: JsonField<StatementTotals>? = null
576+
private var dayOfPeriod: JsonField<Long> = JsonMissing.of()
556577
private var tier: JsonField<String> = JsonMissing.of()
557578
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
558579

@@ -579,6 +600,7 @@ private constructor(
579600
updated = loanTape.updated
580601
version = loanTape.version
581602
ytdTotals = loanTape.ytdTotals
603+
dayOfPeriod = loanTape.dayOfPeriod
582604
tier = loanTape.tier
583605
additionalProperties = loanTape.additionalProperties.toMutableMap()
584606
}
@@ -865,6 +887,28 @@ private constructor(
865887
*/
866888
fun ytdTotals(ytdTotals: JsonField<StatementTotals>) = apply { this.ytdTotals = ytdTotals }
867889

890+
/** Day of the billing period that this loan tape covers, starting at 1 */
891+
fun dayOfPeriod(dayOfPeriod: Long?) = dayOfPeriod(JsonField.ofNullable(dayOfPeriod))
892+
893+
/**
894+
* Alias for [Builder.dayOfPeriod].
895+
*
896+
* This unboxed primitive overload exists for backwards compatibility.
897+
*/
898+
fun dayOfPeriod(dayOfPeriod: Long) = dayOfPeriod(dayOfPeriod as Long?)
899+
900+
/** Alias for calling [Builder.dayOfPeriod] with `dayOfPeriod.orElse(null)`. */
901+
fun dayOfPeriod(dayOfPeriod: Optional<Long>) = dayOfPeriod(dayOfPeriod.getOrNull())
902+
903+
/**
904+
* Sets [Builder.dayOfPeriod] to an arbitrary JSON value.
905+
*
906+
* You should usually call [Builder.dayOfPeriod] with a well-typed [Long] value instead.
907+
* This method is primarily for setting the field to an undocumented or not yet supported
908+
* value.
909+
*/
910+
fun dayOfPeriod(dayOfPeriod: JsonField<Long>) = apply { this.dayOfPeriod = dayOfPeriod }
911+
868912
/** Interest tier to which this account belongs to */
869913
fun tier(tier: String?) = tier(JsonField.ofNullable(tier))
870914

@@ -953,6 +997,7 @@ private constructor(
953997
checkRequired("updated", updated),
954998
checkRequired("version", version),
955999
checkRequired("ytdTotals", ytdTotals),
1000+
dayOfPeriod,
9561001
tier,
9571002
additionalProperties.toMutableMap(),
9581003
)
@@ -994,6 +1039,7 @@ private constructor(
9941039
updated()
9951040
version()
9961041
ytdTotals().validate()
1042+
dayOfPeriod()
9971043
tier()
9981044
validated = true
9991045
}
@@ -1034,6 +1080,7 @@ private constructor(
10341080
(if (updated.asKnown().isPresent) 1 else 0) +
10351081
(if (version.asKnown().isPresent) 1 else 0) +
10361082
(ytdTotals.asKnown().getOrNull()?.validity() ?: 0) +
1083+
(if (dayOfPeriod.asKnown().isPresent) 1 else 0) +
10371084
(if (tier.asKnown().isPresent) 1 else 0)
10381085

10391086
class AccountStanding
@@ -3830,6 +3877,7 @@ private constructor(
38303877
updated == other.updated &&
38313878
version == other.version &&
38323879
ytdTotals == other.ytdTotals &&
3880+
dayOfPeriod == other.dayOfPeriod &&
38333881
tier == other.tier &&
38343882
additionalProperties == other.additionalProperties
38353883
}
@@ -3857,6 +3905,7 @@ private constructor(
38573905
updated,
38583906
version,
38593907
ytdTotals,
3908+
dayOfPeriod,
38603909
tier,
38613910
additionalProperties,
38623911
)
@@ -3865,5 +3914,5 @@ private constructor(
38653914
override fun hashCode(): Int = hashCode
38663915

38673916
override fun toString() =
3868-
"LoanTape{token=$token, accountStanding=$accountStanding, availableCredit=$availableCredit, balances=$balances, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, date=$date, dayTotals=$dayTotals, endingBalance=$endingBalance, excessCredits=$excessCredits, financialAccountToken=$financialAccountToken, interestDetails=$interestDetails, minimumPaymentBalance=$minimumPaymentBalance, paymentAllocation=$paymentAllocation, periodTotals=$periodTotals, previousStatementBalance=$previousStatementBalance, startingBalance=$startingBalance, updated=$updated, version=$version, ytdTotals=$ytdTotals, tier=$tier, additionalProperties=$additionalProperties}"
3917+
"LoanTape{token=$token, accountStanding=$accountStanding, availableCredit=$availableCredit, balances=$balances, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, date=$date, dayTotals=$dayTotals, endingBalance=$endingBalance, excessCredits=$excessCredits, financialAccountToken=$financialAccountToken, interestDetails=$interestDetails, minimumPaymentBalance=$minimumPaymentBalance, paymentAllocation=$paymentAllocation, periodTotals=$periodTotals, previousStatementBalance=$previousStatementBalance, startingBalance=$startingBalance, updated=$updated, version=$version, ytdTotals=$ytdTotals, dayOfPeriod=$dayOfPeriod, tier=$tier, additionalProperties=$additionalProperties}"
38693918
}

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

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ private constructor(
4444
private val updated: JsonField<OffsetDateTime>,
4545
private val version: JsonField<Long>,
4646
private val ytdTotals: JsonField<StatementTotals>,
47+
private val dayOfPeriod: JsonField<Long>,
4748
private val tier: JsonField<String>,
4849
private val eventType: JsonField<EventType>,
4950
private val additionalProperties: MutableMap<String, JsonValue>,
@@ -108,6 +109,9 @@ private constructor(
108109
@JsonProperty("ytd_totals")
109110
@ExcludeMissing
110111
ytdTotals: JsonField<StatementTotals> = JsonMissing.of(),
112+
@JsonProperty("day_of_period")
113+
@ExcludeMissing
114+
dayOfPeriod: JsonField<Long> = JsonMissing.of(),
111115
@JsonProperty("tier") @ExcludeMissing tier: JsonField<String> = JsonMissing.of(),
112116
@JsonProperty("event_type")
113117
@ExcludeMissing
@@ -134,6 +138,7 @@ private constructor(
134138
updated,
135139
version,
136140
ytdTotals,
141+
dayOfPeriod,
137142
tier,
138143
eventType,
139144
mutableMapOf(),
@@ -162,6 +167,7 @@ private constructor(
162167
.updated(updated)
163168
.version(version)
164169
.ytdTotals(ytdTotals)
170+
.dayOfPeriod(dayOfPeriod)
165171
.tier(tier)
166172
.build()
167173

@@ -324,6 +330,14 @@ private constructor(
324330
*/
325331
fun ytdTotals(): StatementTotals = ytdTotals.getRequired("ytd_totals")
326332

333+
/**
334+
* Day of the billing period that this loan tape covers, starting at 1
335+
*
336+
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
337+
* server responded with an unexpected value).
338+
*/
339+
fun dayOfPeriod(): Optional<Long> = dayOfPeriod.getOptional("day_of_period")
340+
327341
/**
328342
* Interest tier to which this account belongs to
329343
*
@@ -522,6 +536,13 @@ private constructor(
522536
@ExcludeMissing
523537
fun _ytdTotals(): JsonField<StatementTotals> = ytdTotals
524538

539+
/**
540+
* Returns the raw JSON value of [dayOfPeriod].
541+
*
542+
* Unlike [dayOfPeriod], this method doesn't throw if the JSON field has an unexpected type.
543+
*/
544+
@JsonProperty("day_of_period") @ExcludeMissing fun _dayOfPeriod(): JsonField<Long> = dayOfPeriod
545+
525546
/**
526547
* Returns the raw JSON value of [tier].
527548
*
@@ -606,6 +627,7 @@ private constructor(
606627
private var updated: JsonField<OffsetDateTime>? = null
607628
private var version: JsonField<Long>? = null
608629
private var ytdTotals: JsonField<StatementTotals>? = null
630+
private var dayOfPeriod: JsonField<Long> = JsonMissing.of()
609631
private var tier: JsonField<String> = JsonMissing.of()
610632
private var eventType: JsonField<EventType>? = null
611633
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
@@ -633,6 +655,7 @@ private constructor(
633655
updated = loanTapeCreatedWebhookEvent.updated
634656
version = loanTapeCreatedWebhookEvent.version
635657
ytdTotals = loanTapeCreatedWebhookEvent.ytdTotals
658+
dayOfPeriod = loanTapeCreatedWebhookEvent.dayOfPeriod
636659
tier = loanTapeCreatedWebhookEvent.tier
637660
eventType = loanTapeCreatedWebhookEvent.eventType
638661
additionalProperties = loanTapeCreatedWebhookEvent.additionalProperties.toMutableMap()
@@ -922,6 +945,28 @@ private constructor(
922945
*/
923946
fun ytdTotals(ytdTotals: JsonField<StatementTotals>) = apply { this.ytdTotals = ytdTotals }
924947

948+
/** Day of the billing period that this loan tape covers, starting at 1 */
949+
fun dayOfPeriod(dayOfPeriod: Long?) = dayOfPeriod(JsonField.ofNullable(dayOfPeriod))
950+
951+
/**
952+
* Alias for [Builder.dayOfPeriod].
953+
*
954+
* This unboxed primitive overload exists for backwards compatibility.
955+
*/
956+
fun dayOfPeriod(dayOfPeriod: Long) = dayOfPeriod(dayOfPeriod as Long?)
957+
958+
/** Alias for calling [Builder.dayOfPeriod] with `dayOfPeriod.orElse(null)`. */
959+
fun dayOfPeriod(dayOfPeriod: Optional<Long>) = dayOfPeriod(dayOfPeriod.getOrNull())
960+
961+
/**
962+
* Sets [Builder.dayOfPeriod] to an arbitrary JSON value.
963+
*
964+
* You should usually call [Builder.dayOfPeriod] with a well-typed [Long] value instead.
965+
* This method is primarily for setting the field to an undocumented or not yet supported
966+
* value.
967+
*/
968+
fun dayOfPeriod(dayOfPeriod: JsonField<Long>) = apply { this.dayOfPeriod = dayOfPeriod }
969+
925970
/** Interest tier to which this account belongs to */
926971
fun tier(tier: String?) = tier(JsonField.ofNullable(tier))
927972

@@ -1023,6 +1068,7 @@ private constructor(
10231068
checkRequired("updated", updated),
10241069
checkRequired("version", version),
10251070
checkRequired("ytdTotals", ytdTotals),
1071+
dayOfPeriod,
10261072
tier,
10271073
checkRequired("eventType", eventType),
10281074
additionalProperties.toMutableMap(),
@@ -1065,6 +1111,7 @@ private constructor(
10651111
updated()
10661112
version()
10671113
ytdTotals().validate()
1114+
dayOfPeriod()
10681115
tier()
10691116
eventType().validate()
10701117
validated = true
@@ -1106,6 +1153,7 @@ private constructor(
11061153
(if (updated.asKnown().isPresent) 1 else 0) +
11071154
(if (version.asKnown().isPresent) 1 else 0) +
11081155
(ytdTotals.asKnown().getOrNull()?.validity() ?: 0) +
1156+
(if (dayOfPeriod.asKnown().isPresent) 1 else 0) +
11091157
(if (tier.asKnown().isPresent) 1 else 0) +
11101158
(eventType.asKnown().getOrNull()?.validity() ?: 0)
11111159

@@ -1267,6 +1315,7 @@ private constructor(
12671315
updated == other.updated &&
12681316
version == other.version &&
12691317
ytdTotals == other.ytdTotals &&
1318+
dayOfPeriod == other.dayOfPeriod &&
12701319
tier == other.tier &&
12711320
eventType == other.eventType &&
12721321
additionalProperties == other.additionalProperties
@@ -1295,6 +1344,7 @@ private constructor(
12951344
updated,
12961345
version,
12971346
ytdTotals,
1347+
dayOfPeriod,
12981348
tier,
12991349
eventType,
13001350
additionalProperties,
@@ -1304,5 +1354,5 @@ private constructor(
13041354
override fun hashCode(): Int = hashCode
13051355

13061356
override fun toString() =
1307-
"LoanTapeCreatedWebhookEvent{token=$token, accountStanding=$accountStanding, availableCredit=$availableCredit, balances=$balances, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, date=$date, dayTotals=$dayTotals, endingBalance=$endingBalance, excessCredits=$excessCredits, financialAccountToken=$financialAccountToken, interestDetails=$interestDetails, minimumPaymentBalance=$minimumPaymentBalance, paymentAllocation=$paymentAllocation, periodTotals=$periodTotals, previousStatementBalance=$previousStatementBalance, startingBalance=$startingBalance, updated=$updated, version=$version, ytdTotals=$ytdTotals, tier=$tier, eventType=$eventType, additionalProperties=$additionalProperties}"
1357+
"LoanTapeCreatedWebhookEvent{token=$token, accountStanding=$accountStanding, availableCredit=$availableCredit, balances=$balances, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, date=$date, dayTotals=$dayTotals, endingBalance=$endingBalance, excessCredits=$excessCredits, financialAccountToken=$financialAccountToken, interestDetails=$interestDetails, minimumPaymentBalance=$minimumPaymentBalance, paymentAllocation=$paymentAllocation, periodTotals=$periodTotals, previousStatementBalance=$previousStatementBalance, startingBalance=$startingBalance, updated=$updated, version=$version, ytdTotals=$ytdTotals, dayOfPeriod=$dayOfPeriod, tier=$tier, eventType=$eventType, additionalProperties=$additionalProperties}"
13081358
}

0 commit comments

Comments
 (0)