Skip to content

Commit 03ee177

Browse files
feat(api): api update
1 parent ab5d43a commit 03ee177

File tree

10 files changed

+243
-9
lines changed

10 files changed

+243
-9
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 227
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-63db8a5872b6a112abfc879f75a53bc6975994025752e86b27ab327884d94655.yml
3-
openapi_spec_hash: b7ffb71e0102fcd040a575bf917656e3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4e978c9426fb846c81f3169f5c1bc7aad137577c13e52ac48fcc756e613a1557.yml
3+
openapi_spec_hash: b44f228e3feac325305cd744c072ebc9
44
config_hash: ca52ca9a2968f330339fd50c1a386e05

increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDispute.kt

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11416,6 +11416,7 @@ private constructor(
1141611416
private val category: JsonField<Category>,
1141711417
private val chargeback: JsonField<Chargeback>,
1141811418
private val createdAt: JsonField<OffsetDateTime>,
11419+
private val explanation: JsonField<String>,
1141911420
private val furtherInformationRequestedAt: JsonField<OffsetDateTime>,
1142011421
private val furtherInformationRequestedReason: JsonField<String>,
1142111422
private val merchantPrearbitrationDecline: JsonField<MerchantPrearbitrationDecline>,
@@ -11443,6 +11444,9 @@ private constructor(
1144311444
@JsonProperty("created_at")
1144411445
@ExcludeMissing
1144511446
createdAt: JsonField<OffsetDateTime> = JsonMissing.of(),
11447+
@JsonProperty("explanation")
11448+
@ExcludeMissing
11449+
explanation: JsonField<String> = JsonMissing.of(),
1144611450
@JsonProperty("further_information_requested_at")
1144711451
@ExcludeMissing
1144811452
furtherInformationRequestedAt: JsonField<OffsetDateTime> = JsonMissing.of(),
@@ -11469,6 +11473,7 @@ private constructor(
1146911473
category,
1147011474
chargeback,
1147111475
createdAt,
11476+
explanation,
1147211477
furtherInformationRequestedAt,
1147311478
furtherInformationRequestedReason,
1147411479
merchantPrearbitrationDecline,
@@ -11537,6 +11542,15 @@ private constructor(
1153711542
*/
1153811543
fun createdAt(): OffsetDateTime = createdAt.getRequired("created_at")
1153911544

11545+
/**
11546+
* The free-form explanation provided to Increase to provide more context for the user
11547+
* submission. This field is not sent directly to the card networks.
11548+
*
11549+
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
11550+
* if the server responded with an unexpected value).
11551+
*/
11552+
fun explanation(): Optional<String> = explanation.getOptional("explanation")
11553+
1154011554
/**
1154111555
* The date and time at which Increase requested further information from the user for
1154211556
* the Visa Card Dispute.
@@ -11659,6 +11673,16 @@ private constructor(
1165911673
@ExcludeMissing
1166011674
fun _createdAt(): JsonField<OffsetDateTime> = createdAt
1166111675

11676+
/**
11677+
* Returns the raw JSON value of [explanation].
11678+
*
11679+
* Unlike [explanation], this method doesn't throw if the JSON field has an unexpected
11680+
* type.
11681+
*/
11682+
@JsonProperty("explanation")
11683+
@ExcludeMissing
11684+
fun _explanation(): JsonField<String> = explanation
11685+
1166211686
/**
1166311687
* Returns the raw JSON value of [furtherInformationRequestedAt].
1166411688
*
@@ -11744,6 +11768,7 @@ private constructor(
1174411768
* .category()
1174511769
* .chargeback()
1174611770
* .createdAt()
11771+
* .explanation()
1174711772
* .furtherInformationRequestedAt()
1174811773
* .furtherInformationRequestedReason()
1174911774
* .merchantPrearbitrationDecline()
@@ -11764,6 +11789,7 @@ private constructor(
1176411789
private var category: JsonField<Category>? = null
1176511790
private var chargeback: JsonField<Chargeback>? = null
1176611791
private var createdAt: JsonField<OffsetDateTime>? = null
11792+
private var explanation: JsonField<String>? = null
1176711793
private var furtherInformationRequestedAt: JsonField<OffsetDateTime>? = null
1176811794
private var furtherInformationRequestedReason: JsonField<String>? = null
1176911795
private var merchantPrearbitrationDecline:
@@ -11782,6 +11808,7 @@ private constructor(
1178211808
category = userSubmission.category
1178311809
chargeback = userSubmission.chargeback
1178411810
createdAt = userSubmission.createdAt
11811+
explanation = userSubmission.explanation
1178511812
furtherInformationRequestedAt = userSubmission.furtherInformationRequestedAt
1178611813
furtherInformationRequestedReason =
1178711814
userSubmission.furtherInformationRequestedReason
@@ -11923,6 +11950,28 @@ private constructor(
1192311950
this.createdAt = createdAt
1192411951
}
1192511952

11953+
/**
11954+
* The free-form explanation provided to Increase to provide more context for the
11955+
* user submission. This field is not sent directly to the card networks.
11956+
*/
11957+
fun explanation(explanation: String?) =
11958+
explanation(JsonField.ofNullable(explanation))
11959+
11960+
/** Alias for calling [Builder.explanation] with `explanation.orElse(null)`. */
11961+
fun explanation(explanation: Optional<String>) =
11962+
explanation(explanation.getOrNull())
11963+
11964+
/**
11965+
* Sets [Builder.explanation] to an arbitrary JSON value.
11966+
*
11967+
* You should usually call [Builder.explanation] with a well-typed [String] value
11968+
* instead. This method is primarily for setting the field to an undocumented or not
11969+
* yet supported value.
11970+
*/
11971+
fun explanation(explanation: JsonField<String>) = apply {
11972+
this.explanation = explanation
11973+
}
11974+
1192611975
/**
1192711976
* The date and time at which Increase requested further information from the user
1192811977
* for the Visa Card Dispute.
@@ -12104,6 +12153,7 @@ private constructor(
1210412153
* .category()
1210512154
* .chargeback()
1210612155
* .createdAt()
12156+
* .explanation()
1210712157
* .furtherInformationRequestedAt()
1210812158
* .furtherInformationRequestedReason()
1210912159
* .merchantPrearbitrationDecline()
@@ -12122,6 +12172,7 @@ private constructor(
1212212172
checkRequired("category", category),
1212312173
checkRequired("chargeback", chargeback),
1212412174
checkRequired("createdAt", createdAt),
12175+
checkRequired("explanation", explanation),
1212512176
checkRequired(
1212612177
"furtherInformationRequestedAt",
1212712178
furtherInformationRequestedAt,
@@ -12154,6 +12205,7 @@ private constructor(
1215412205
category().validate()
1215512206
chargeback().ifPresent { it.validate() }
1215612207
createdAt()
12208+
explanation()
1215712209
furtherInformationRequestedAt()
1215812210
furtherInformationRequestedReason()
1215912211
merchantPrearbitrationDecline().ifPresent { it.validate() }
@@ -12185,6 +12237,7 @@ private constructor(
1218512237
(category.asKnown().getOrNull()?.validity() ?: 0) +
1218612238
(chargeback.asKnown().getOrNull()?.validity() ?: 0) +
1218712239
(if (createdAt.asKnown().isPresent) 1 else 0) +
12240+
(if (explanation.asKnown().isPresent) 1 else 0) +
1218812241
(if (furtherInformationRequestedAt.asKnown().isPresent) 1 else 0) +
1218912242
(if (furtherInformationRequestedReason.asKnown().isPresent) 1 else 0) +
1219012243
(merchantPrearbitrationDecline.asKnown().getOrNull()?.validity() ?: 0) +
@@ -41052,6 +41105,7 @@ private constructor(
4105241105
category == other.category &&
4105341106
chargeback == other.chargeback &&
4105441107
createdAt == other.createdAt &&
41108+
explanation == other.explanation &&
4105541109
furtherInformationRequestedAt == other.furtherInformationRequestedAt &&
4105641110
furtherInformationRequestedReason == other.furtherInformationRequestedReason &&
4105741111
merchantPrearbitrationDecline == other.merchantPrearbitrationDecline &&
@@ -41069,6 +41123,7 @@ private constructor(
4106941123
category,
4107041124
chargeback,
4107141125
createdAt,
41126+
explanation,
4107241127
furtherInformationRequestedAt,
4107341128
furtherInformationRequestedReason,
4107441129
merchantPrearbitrationDecline,
@@ -41082,7 +41137,7 @@ private constructor(
4108241137
override fun hashCode(): Int = hashCode
4108341138

4108441139
override fun toString() =
41085-
"UserSubmission{acceptedAt=$acceptedAt, amount=$amount, attachmentFiles=$attachmentFiles, category=$category, chargeback=$chargeback, createdAt=$createdAt, furtherInformationRequestedAt=$furtherInformationRequestedAt, furtherInformationRequestedReason=$furtherInformationRequestedReason, merchantPrearbitrationDecline=$merchantPrearbitrationDecline, status=$status, updatedAt=$updatedAt, userPrearbitration=$userPrearbitration, additionalProperties=$additionalProperties}"
41140+
"UserSubmission{acceptedAt=$acceptedAt, amount=$amount, attachmentFiles=$attachmentFiles, category=$category, chargeback=$chargeback, createdAt=$createdAt, explanation=$explanation, furtherInformationRequestedAt=$furtherInformationRequestedAt, furtherInformationRequestedReason=$furtherInformationRequestedReason, merchantPrearbitrationDecline=$merchantPrearbitrationDecline, status=$status, updatedAt=$updatedAt, userPrearbitration=$userPrearbitration, additionalProperties=$additionalProperties}"
4108641141
}
4108741142

4108841143
override fun equals(other: Any?): Boolean {

increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeCreateParams.kt

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ private constructor(
6868
*/
6969
fun attachmentFiles(): Optional<List<AttachmentFile>> = body.attachmentFiles()
7070

71+
/**
72+
* The free-form explanation provided to Increase to provide more context for the user
73+
* submission. This field is not sent directly to the card networks.
74+
*
75+
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
76+
* server responded with an unexpected value).
77+
*/
78+
fun explanation(): Optional<String> = body.explanation()
79+
7180
/**
7281
* The Visa-specific parameters for the dispute. Required if and only if `network` is `visa`.
7382
*
@@ -105,6 +114,13 @@ private constructor(
105114
*/
106115
fun _attachmentFiles(): JsonField<List<AttachmentFile>> = body._attachmentFiles()
107116

117+
/**
118+
* Returns the raw JSON value of [explanation].
119+
*
120+
* Unlike [explanation], this method doesn't throw if the JSON field has an unexpected type.
121+
*/
122+
fun _explanation(): JsonField<String> = body._explanation()
123+
108124
/**
109125
* Returns the raw JSON value of [visa].
110126
*
@@ -159,7 +175,7 @@ private constructor(
159175
* - [network]
160176
* - [amount]
161177
* - [attachmentFiles]
162-
* - [visa]
178+
* - [explanation]
163179
* - etc.
164180
*/
165181
fun body(body: Body) = apply { this.body = body.toBuilder() }
@@ -237,6 +253,21 @@ private constructor(
237253
body.addAttachmentFile(attachmentFile)
238254
}
239255

256+
/**
257+
* The free-form explanation provided to Increase to provide more context for the user
258+
* submission. This field is not sent directly to the card networks.
259+
*/
260+
fun explanation(explanation: String) = apply { body.explanation(explanation) }
261+
262+
/**
263+
* Sets [Builder.explanation] to an arbitrary JSON value.
264+
*
265+
* You should usually call [Builder.explanation] with a well-typed [String] value instead.
266+
* This method is primarily for setting the field to an undocumented or not yet supported
267+
* value.
268+
*/
269+
fun explanation(explanation: JsonField<String>) = apply { body.explanation(explanation) }
270+
240271
/**
241272
* The Visa-specific parameters for the dispute. Required if and only if `network` is
242273
* `visa`.
@@ -402,6 +433,7 @@ private constructor(
402433
private val network: JsonField<Network>,
403434
private val amount: JsonField<Long>,
404435
private val attachmentFiles: JsonField<List<AttachmentFile>>,
436+
private val explanation: JsonField<String>,
405437
private val visa: JsonField<Visa>,
406438
private val additionalProperties: MutableMap<String, JsonValue>,
407439
) {
@@ -416,8 +448,19 @@ private constructor(
416448
@JsonProperty("attachment_files")
417449
@ExcludeMissing
418450
attachmentFiles: JsonField<List<AttachmentFile>> = JsonMissing.of(),
451+
@JsonProperty("explanation")
452+
@ExcludeMissing
453+
explanation: JsonField<String> = JsonMissing.of(),
419454
@JsonProperty("visa") @ExcludeMissing visa: JsonField<Visa> = JsonMissing.of(),
420-
) : this(disputedTransactionId, network, amount, attachmentFiles, visa, mutableMapOf())
455+
) : this(
456+
disputedTransactionId,
457+
network,
458+
amount,
459+
attachmentFiles,
460+
explanation,
461+
visa,
462+
mutableMapOf(),
463+
)
421464

422465
/**
423466
* The Transaction you wish to dispute. This Transaction must have a `source_type` of
@@ -457,6 +500,15 @@ private constructor(
457500
fun attachmentFiles(): Optional<List<AttachmentFile>> =
458501
attachmentFiles.getOptional("attachment_files")
459502

503+
/**
504+
* The free-form explanation provided to Increase to provide more context for the user
505+
* submission. This field is not sent directly to the card networks.
506+
*
507+
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
508+
* the server responded with an unexpected value).
509+
*/
510+
fun explanation(): Optional<String> = explanation.getOptional("explanation")
511+
460512
/**
461513
* The Visa-specific parameters for the dispute. Required if and only if `network` is
462514
* `visa`.
@@ -500,6 +552,15 @@ private constructor(
500552
@ExcludeMissing
501553
fun _attachmentFiles(): JsonField<List<AttachmentFile>> = attachmentFiles
502554

555+
/**
556+
* Returns the raw JSON value of [explanation].
557+
*
558+
* Unlike [explanation], this method doesn't throw if the JSON field has an unexpected type.
559+
*/
560+
@JsonProperty("explanation")
561+
@ExcludeMissing
562+
fun _explanation(): JsonField<String> = explanation
563+
503564
/**
504565
* Returns the raw JSON value of [visa].
505566
*
@@ -540,6 +601,7 @@ private constructor(
540601
private var network: JsonField<Network>? = null
541602
private var amount: JsonField<Long> = JsonMissing.of()
542603
private var attachmentFiles: JsonField<MutableList<AttachmentFile>>? = null
604+
private var explanation: JsonField<String> = JsonMissing.of()
543605
private var visa: JsonField<Visa> = JsonMissing.of()
544606
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
545607

@@ -549,6 +611,7 @@ private constructor(
549611
network = body.network
550612
amount = body.amount
551613
attachmentFiles = body.attachmentFiles.map { it.toMutableList() }
614+
explanation = body.explanation
552615
visa = body.visa
553616
additionalProperties = body.additionalProperties.toMutableMap()
554617
}
@@ -629,6 +692,23 @@ private constructor(
629692
}
630693
}
631694

695+
/**
696+
* The free-form explanation provided to Increase to provide more context for the user
697+
* submission. This field is not sent directly to the card networks.
698+
*/
699+
fun explanation(explanation: String) = explanation(JsonField.of(explanation))
700+
701+
/**
702+
* Sets [Builder.explanation] to an arbitrary JSON value.
703+
*
704+
* You should usually call [Builder.explanation] with a well-typed [String] value
705+
* instead. This method is primarily for setting the field to an undocumented or not yet
706+
* supported value.
707+
*/
708+
fun explanation(explanation: JsonField<String>) = apply {
709+
this.explanation = explanation
710+
}
711+
632712
/**
633713
* The Visa-specific parameters for the dispute. Required if and only if `network` is
634714
* `visa`.
@@ -682,6 +762,7 @@ private constructor(
682762
checkRequired("network", network),
683763
amount,
684764
(attachmentFiles ?: JsonMissing.of()).map { it.toImmutable() },
765+
explanation,
685766
visa,
686767
additionalProperties.toMutableMap(),
687768
)
@@ -698,6 +779,7 @@ private constructor(
698779
network().validate()
699780
amount()
700781
attachmentFiles().ifPresent { it.forEach { it.validate() } }
782+
explanation()
701783
visa().ifPresent { it.validate() }
702784
validated = true
703785
}
@@ -722,6 +804,7 @@ private constructor(
722804
(network.asKnown().getOrNull()?.validity() ?: 0) +
723805
(if (amount.asKnown().isPresent) 1 else 0) +
724806
(attachmentFiles.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
807+
(if (explanation.asKnown().isPresent) 1 else 0) +
725808
(visa.asKnown().getOrNull()?.validity() ?: 0)
726809

727810
override fun equals(other: Any?): Boolean {
@@ -734,6 +817,7 @@ private constructor(
734817
network == other.network &&
735818
amount == other.amount &&
736819
attachmentFiles == other.attachmentFiles &&
820+
explanation == other.explanation &&
737821
visa == other.visa &&
738822
additionalProperties == other.additionalProperties
739823
}
@@ -744,6 +828,7 @@ private constructor(
744828
network,
745829
amount,
746830
attachmentFiles,
831+
explanation,
747832
visa,
748833
additionalProperties,
749834
)
@@ -752,7 +837,7 @@ private constructor(
752837
override fun hashCode(): Int = hashCode
753838

754839
override fun toString() =
755-
"Body{disputedTransactionId=$disputedTransactionId, network=$network, amount=$amount, attachmentFiles=$attachmentFiles, visa=$visa, additionalProperties=$additionalProperties}"
840+
"Body{disputedTransactionId=$disputedTransactionId, network=$network, amount=$amount, attachmentFiles=$attachmentFiles, explanation=$explanation, visa=$visa, additionalProperties=$additionalProperties}"
756841
}
757842

758843
/**

0 commit comments

Comments
 (0)