Skip to content

Commit

Permalink
feat(api): updates (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 27, 2024
1 parent ce2607d commit 396c2a1
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SettlementReport
private constructor(
private val created: JsonField<OffsetDateTime>,
private val currency: JsonField<String>,
private val details: JsonField<List<SettlementSummaryDetails?>>,
private val details: JsonField<List<SettlementSummaryDetails>>,
private val disputesGrossAmount: JsonField<Long>,
private val interchangeGrossAmount: JsonField<Long>,
private val otherFeesGrossAmount: JsonField<Long>,
Expand All @@ -42,7 +42,7 @@ private constructor(
/** Three-digit alphabetic ISO 4217 code. */
fun currency(): String = currency.getRequired("currency")

fun details(): List<SettlementSummaryDetails?> = details.getRequired("details")
fun details(): List<SettlementSummaryDetails> = details.getRequired("details")

/** The total gross amount of disputes settlements. */
fun disputesGrossAmount(): Long = disputesGrossAmount.getRequired("disputes_gross_amount")
Expand Down Expand Up @@ -122,7 +122,7 @@ private constructor(
if (!validated) {
created()
currency()
details().forEach { it?.validate() }
details().forEach { it.validate() }
disputesGrossAmount()
interchangeGrossAmount()
otherFeesGrossAmount()
Expand Down Expand Up @@ -187,7 +187,7 @@ private constructor(

private var created: JsonField<OffsetDateTime> = JsonMissing.of()
private var currency: JsonField<String> = JsonMissing.of()
private var details: JsonField<List<SettlementSummaryDetails?>> = JsonMissing.of()
private var details: JsonField<List<SettlementSummaryDetails>> = JsonMissing.of()
private var disputesGrossAmount: JsonField<Long> = JsonMissing.of()
private var interchangeGrossAmount: JsonField<Long> = JsonMissing.of()
private var otherFeesGrossAmount: JsonField<Long> = JsonMissing.of()
Expand Down Expand Up @@ -227,11 +227,11 @@ private constructor(
@ExcludeMissing
fun currency(currency: JsonField<String>) = apply { this.currency = currency }

fun details(details: List<SettlementSummaryDetails?>) = details(JsonField.of(details))
fun details(details: List<SettlementSummaryDetails>) = details(JsonField.of(details))

@JsonProperty("details")
@ExcludeMissing
fun details(details: JsonField<List<SettlementSummaryDetails?>>) = apply {
fun details(details: JsonField<List<SettlementSummaryDetails>>) = apply {
this.details = details
}

Expand Down

0 comments on commit 396c2a1

Please sign in to comment.