Skip to content

Commit 91c85d4

Browse files
feat(api): api update
1 parent 5576ea4 commit 91c85d4

File tree

52 files changed

+2530
-124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2530
-124
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: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-9d6e0a988df83c0e2baa559ef57ec96981669a7a294de2188adb2cd6bbc0be8a.yml
3-
openapi_spec_hash: 7f5e7221872d7ee799141f546c394f48
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ff68c7ee2669d61716781d01b93f34186fb7a19ff4ad6fc2c0b8f9f4d9c4a588.yml
3+
openapi_spec_hash: 17bdc6b1ca2531dc884c6d156f404f0c
44
config_hash: 3c3524be9607afb24d2139ce26ce5389

orb-java-core/src/main/kotlin/com/withorb/api/models/MonetaryAmountDiscountAdjustment.kt

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ private constructor(
3030
private val filters: JsonField<List<TransformPriceFilter>>,
3131
private val isInvoiceLevel: JsonField<Boolean>,
3232
private val reason: JsonField<String>,
33+
private val replacesAdjustmentId: JsonField<String>,
3334
private val additionalProperties: MutableMap<String, JsonValue>,
3435
) {
3536

@@ -53,6 +54,9 @@ private constructor(
5354
@ExcludeMissing
5455
isInvoiceLevel: JsonField<Boolean> = JsonMissing.of(),
5556
@JsonProperty("reason") @ExcludeMissing reason: JsonField<String> = JsonMissing.of(),
57+
@JsonProperty("replaces_adjustment_id")
58+
@ExcludeMissing
59+
replacesAdjustmentId: JsonField<String> = JsonMissing.of(),
5660
) : this(
5761
id,
5862
adjustmentType,
@@ -62,6 +66,7 @@ private constructor(
6266
filters,
6367
isInvoiceLevel,
6468
reason,
69+
replacesAdjustmentId,
6570
mutableMapOf(),
6671
)
6772

@@ -128,6 +133,16 @@ private constructor(
128133
*/
129134
fun reason(): Optional<String> = reason.getOptional("reason")
130135

136+
/**
137+
* The adjustment id this adjustment replaces. This adjustment will take the place of the
138+
* replaced adjustment in plan version migrations.
139+
*
140+
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
141+
* responded with an unexpected value).
142+
*/
143+
fun replacesAdjustmentId(): Optional<String> =
144+
replacesAdjustmentId.getOptional("replaces_adjustment_id")
145+
131146
/**
132147
* Returns the raw JSON value of [id].
133148
*
@@ -196,6 +211,16 @@ private constructor(
196211
*/
197212
@JsonProperty("reason") @ExcludeMissing fun _reason(): JsonField<String> = reason
198213

214+
/**
215+
* Returns the raw JSON value of [replacesAdjustmentId].
216+
*
217+
* Unlike [replacesAdjustmentId], this method doesn't throw if the JSON field has an unexpected
218+
* type.
219+
*/
220+
@JsonProperty("replaces_adjustment_id")
221+
@ExcludeMissing
222+
fun _replacesAdjustmentId(): JsonField<String> = replacesAdjustmentId
223+
199224
@JsonAnySetter
200225
private fun putAdditionalProperty(key: String, value: JsonValue) {
201226
additionalProperties.put(key, value)
@@ -224,6 +249,7 @@ private constructor(
224249
* .filters()
225250
* .isInvoiceLevel()
226251
* .reason()
252+
* .replacesAdjustmentId()
227253
* ```
228254
*/
229255
@JvmStatic fun builder() = Builder()
@@ -240,6 +266,7 @@ private constructor(
240266
private var filters: JsonField<MutableList<TransformPriceFilter>>? = null
241267
private var isInvoiceLevel: JsonField<Boolean>? = null
242268
private var reason: JsonField<String>? = null
269+
private var replacesAdjustmentId: JsonField<String>? = null
243270
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
244271

245272
@JvmSynthetic
@@ -254,6 +281,7 @@ private constructor(
254281
filters = monetaryAmountDiscountAdjustment.filters.map { it.toMutableList() }
255282
isInvoiceLevel = monetaryAmountDiscountAdjustment.isInvoiceLevel
256283
reason = monetaryAmountDiscountAdjustment.reason
284+
replacesAdjustmentId = monetaryAmountDiscountAdjustment.replacesAdjustmentId
257285
additionalProperties =
258286
monetaryAmountDiscountAdjustment.additionalProperties.toMutableMap()
259287
}
@@ -397,6 +425,31 @@ private constructor(
397425
*/
398426
fun reason(reason: JsonField<String>) = apply { this.reason = reason }
399427

428+
/**
429+
* The adjustment id this adjustment replaces. This adjustment will take the place of the
430+
* replaced adjustment in plan version migrations.
431+
*/
432+
fun replacesAdjustmentId(replacesAdjustmentId: String?) =
433+
replacesAdjustmentId(JsonField.ofNullable(replacesAdjustmentId))
434+
435+
/**
436+
* Alias for calling [Builder.replacesAdjustmentId] with
437+
* `replacesAdjustmentId.orElse(null)`.
438+
*/
439+
fun replacesAdjustmentId(replacesAdjustmentId: Optional<String>) =
440+
replacesAdjustmentId(replacesAdjustmentId.getOrNull())
441+
442+
/**
443+
* Sets [Builder.replacesAdjustmentId] to an arbitrary JSON value.
444+
*
445+
* You should usually call [Builder.replacesAdjustmentId] with a well-typed [String] value
446+
* instead. This method is primarily for setting the field to an undocumented or not yet
447+
* supported value.
448+
*/
449+
fun replacesAdjustmentId(replacesAdjustmentId: JsonField<String>) = apply {
450+
this.replacesAdjustmentId = replacesAdjustmentId
451+
}
452+
400453
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
401454
this.additionalProperties.clear()
402455
putAllAdditionalProperties(additionalProperties)
@@ -431,6 +484,7 @@ private constructor(
431484
* .filters()
432485
* .isInvoiceLevel()
433486
* .reason()
487+
* .replacesAdjustmentId()
434488
* ```
435489
*
436490
* @throws IllegalStateException if any required field is unset.
@@ -445,6 +499,7 @@ private constructor(
445499
checkRequired("filters", filters).map { it.toImmutable() },
446500
checkRequired("isInvoiceLevel", isInvoiceLevel),
447501
checkRequired("reason", reason),
502+
checkRequired("replacesAdjustmentId", replacesAdjustmentId),
448503
additionalProperties.toMutableMap(),
449504
)
450505
}
@@ -464,6 +519,7 @@ private constructor(
464519
filters().forEach { it.validate() }
465520
isInvoiceLevel()
466521
reason()
522+
replacesAdjustmentId()
467523
validated = true
468524
}
469525

@@ -489,7 +545,8 @@ private constructor(
489545
(appliesToPriceIds.asKnown().getOrNull()?.size ?: 0) +
490546
(filters.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
491547
(if (isInvoiceLevel.asKnown().isPresent) 1 else 0) +
492-
(if (reason.asKnown().isPresent) 1 else 0)
548+
(if (reason.asKnown().isPresent) 1 else 0) +
549+
(if (replacesAdjustmentId.asKnown().isPresent) 1 else 0)
493550

494551
class AdjustmentType @JsonCreator private constructor(private val value: JsonField<String>) :
495552
Enum {
@@ -618,15 +675,15 @@ private constructor(
618675
return true
619676
}
620677

621-
return /* spotless:off */ other is MonetaryAmountDiscountAdjustment && id == other.id && adjustmentType == other.adjustmentType && amount == other.amount && amountDiscount == other.amountDiscount && appliesToPriceIds == other.appliesToPriceIds && filters == other.filters && isInvoiceLevel == other.isInvoiceLevel && reason == other.reason && additionalProperties == other.additionalProperties /* spotless:on */
678+
return /* spotless:off */ other is MonetaryAmountDiscountAdjustment && id == other.id && adjustmentType == other.adjustmentType && amount == other.amount && amountDiscount == other.amountDiscount && appliesToPriceIds == other.appliesToPriceIds && filters == other.filters && isInvoiceLevel == other.isInvoiceLevel && reason == other.reason && replacesAdjustmentId == other.replacesAdjustmentId && additionalProperties == other.additionalProperties /* spotless:on */
622679
}
623680

624681
/* spotless:off */
625-
private val hashCode: Int by lazy { Objects.hash(id, adjustmentType, amount, amountDiscount, appliesToPriceIds, filters, isInvoiceLevel, reason, additionalProperties) }
682+
private val hashCode: Int by lazy { Objects.hash(id, adjustmentType, amount, amountDiscount, appliesToPriceIds, filters, isInvoiceLevel, reason, replacesAdjustmentId, additionalProperties) }
626683
/* spotless:on */
627684

628685
override fun hashCode(): Int = hashCode
629686

630687
override fun toString() =
631-
"MonetaryAmountDiscountAdjustment{id=$id, adjustmentType=$adjustmentType, amount=$amount, amountDiscount=$amountDiscount, appliesToPriceIds=$appliesToPriceIds, filters=$filters, isInvoiceLevel=$isInvoiceLevel, reason=$reason, additionalProperties=$additionalProperties}"
688+
"MonetaryAmountDiscountAdjustment{id=$id, adjustmentType=$adjustmentType, amount=$amount, amountDiscount=$amountDiscount, appliesToPriceIds=$appliesToPriceIds, filters=$filters, isInvoiceLevel=$isInvoiceLevel, reason=$reason, replacesAdjustmentId=$replacesAdjustmentId, additionalProperties=$additionalProperties}"
632689
}

orb-java-core/src/main/kotlin/com/withorb/api/models/MonetaryMaximumAdjustment.kt

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ private constructor(
3030
private val isInvoiceLevel: JsonField<Boolean>,
3131
private val maximumAmount: JsonField<String>,
3232
private val reason: JsonField<String>,
33+
private val replacesAdjustmentId: JsonField<String>,
3334
private val additionalProperties: MutableMap<String, JsonValue>,
3435
) {
3536

@@ -53,6 +54,9 @@ private constructor(
5354
@ExcludeMissing
5455
maximumAmount: JsonField<String> = JsonMissing.of(),
5556
@JsonProperty("reason") @ExcludeMissing reason: JsonField<String> = JsonMissing.of(),
57+
@JsonProperty("replaces_adjustment_id")
58+
@ExcludeMissing
59+
replacesAdjustmentId: JsonField<String> = JsonMissing.of(),
5660
) : this(
5761
id,
5862
adjustmentType,
@@ -62,6 +66,7 @@ private constructor(
6266
isInvoiceLevel,
6367
maximumAmount,
6468
reason,
69+
replacesAdjustmentId,
6570
mutableMapOf(),
6671
)
6772

@@ -128,6 +133,16 @@ private constructor(
128133
*/
129134
fun reason(): Optional<String> = reason.getOptional("reason")
130135

136+
/**
137+
* The adjustment id this adjustment replaces. This adjustment will take the place of the
138+
* replaced adjustment in plan version migrations.
139+
*
140+
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
141+
* responded with an unexpected value).
142+
*/
143+
fun replacesAdjustmentId(): Optional<String> =
144+
replacesAdjustmentId.getOptional("replaces_adjustment_id")
145+
131146
/**
132147
* Returns the raw JSON value of [id].
133148
*
@@ -196,6 +211,16 @@ private constructor(
196211
*/
197212
@JsonProperty("reason") @ExcludeMissing fun _reason(): JsonField<String> = reason
198213

214+
/**
215+
* Returns the raw JSON value of [replacesAdjustmentId].
216+
*
217+
* Unlike [replacesAdjustmentId], this method doesn't throw if the JSON field has an unexpected
218+
* type.
219+
*/
220+
@JsonProperty("replaces_adjustment_id")
221+
@ExcludeMissing
222+
fun _replacesAdjustmentId(): JsonField<String> = replacesAdjustmentId
223+
199224
@JsonAnySetter
200225
private fun putAdditionalProperty(key: String, value: JsonValue) {
201226
additionalProperties.put(key, value)
@@ -223,6 +248,7 @@ private constructor(
223248
* .isInvoiceLevel()
224249
* .maximumAmount()
225250
* .reason()
251+
* .replacesAdjustmentId()
226252
* ```
227253
*/
228254
@JvmStatic fun builder() = Builder()
@@ -239,6 +265,7 @@ private constructor(
239265
private var isInvoiceLevel: JsonField<Boolean>? = null
240266
private var maximumAmount: JsonField<String>? = null
241267
private var reason: JsonField<String>? = null
268+
private var replacesAdjustmentId: JsonField<String>? = null
242269
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
243270

244271
@JvmSynthetic
@@ -252,6 +279,7 @@ private constructor(
252279
isInvoiceLevel = monetaryMaximumAdjustment.isInvoiceLevel
253280
maximumAmount = monetaryMaximumAdjustment.maximumAmount
254281
reason = monetaryMaximumAdjustment.reason
282+
replacesAdjustmentId = monetaryMaximumAdjustment.replacesAdjustmentId
255283
additionalProperties = monetaryMaximumAdjustment.additionalProperties.toMutableMap()
256284
}
257285

@@ -394,6 +422,31 @@ private constructor(
394422
*/
395423
fun reason(reason: JsonField<String>) = apply { this.reason = reason }
396424

425+
/**
426+
* The adjustment id this adjustment replaces. This adjustment will take the place of the
427+
* replaced adjustment in plan version migrations.
428+
*/
429+
fun replacesAdjustmentId(replacesAdjustmentId: String?) =
430+
replacesAdjustmentId(JsonField.ofNullable(replacesAdjustmentId))
431+
432+
/**
433+
* Alias for calling [Builder.replacesAdjustmentId] with
434+
* `replacesAdjustmentId.orElse(null)`.
435+
*/
436+
fun replacesAdjustmentId(replacesAdjustmentId: Optional<String>) =
437+
replacesAdjustmentId(replacesAdjustmentId.getOrNull())
438+
439+
/**
440+
* Sets [Builder.replacesAdjustmentId] to an arbitrary JSON value.
441+
*
442+
* You should usually call [Builder.replacesAdjustmentId] with a well-typed [String] value
443+
* instead. This method is primarily for setting the field to an undocumented or not yet
444+
* supported value.
445+
*/
446+
fun replacesAdjustmentId(replacesAdjustmentId: JsonField<String>) = apply {
447+
this.replacesAdjustmentId = replacesAdjustmentId
448+
}
449+
397450
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
398451
this.additionalProperties.clear()
399452
putAllAdditionalProperties(additionalProperties)
@@ -428,6 +481,7 @@ private constructor(
428481
* .isInvoiceLevel()
429482
* .maximumAmount()
430483
* .reason()
484+
* .replacesAdjustmentId()
431485
* ```
432486
*
433487
* @throws IllegalStateException if any required field is unset.
@@ -442,6 +496,7 @@ private constructor(
442496
checkRequired("isInvoiceLevel", isInvoiceLevel),
443497
checkRequired("maximumAmount", maximumAmount),
444498
checkRequired("reason", reason),
499+
checkRequired("replacesAdjustmentId", replacesAdjustmentId),
445500
additionalProperties.toMutableMap(),
446501
)
447502
}
@@ -461,6 +516,7 @@ private constructor(
461516
isInvoiceLevel()
462517
maximumAmount()
463518
reason()
519+
replacesAdjustmentId()
464520
validated = true
465521
}
466522

@@ -486,7 +542,8 @@ private constructor(
486542
(filters.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
487543
(if (isInvoiceLevel.asKnown().isPresent) 1 else 0) +
488544
(if (maximumAmount.asKnown().isPresent) 1 else 0) +
489-
(if (reason.asKnown().isPresent) 1 else 0)
545+
(if (reason.asKnown().isPresent) 1 else 0) +
546+
(if (replacesAdjustmentId.asKnown().isPresent) 1 else 0)
490547

491548
class AdjustmentType @JsonCreator private constructor(private val value: JsonField<String>) :
492549
Enum {
@@ -615,15 +672,15 @@ private constructor(
615672
return true
616673
}
617674

618-
return /* spotless:off */ other is MonetaryMaximumAdjustment && id == other.id && adjustmentType == other.adjustmentType && amount == other.amount && appliesToPriceIds == other.appliesToPriceIds && filters == other.filters && isInvoiceLevel == other.isInvoiceLevel && maximumAmount == other.maximumAmount && reason == other.reason && additionalProperties == other.additionalProperties /* spotless:on */
675+
return /* spotless:off */ other is MonetaryMaximumAdjustment && id == other.id && adjustmentType == other.adjustmentType && amount == other.amount && appliesToPriceIds == other.appliesToPriceIds && filters == other.filters && isInvoiceLevel == other.isInvoiceLevel && maximumAmount == other.maximumAmount && reason == other.reason && replacesAdjustmentId == other.replacesAdjustmentId && additionalProperties == other.additionalProperties /* spotless:on */
619676
}
620677

621678
/* spotless:off */
622-
private val hashCode: Int by lazy { Objects.hash(id, adjustmentType, amount, appliesToPriceIds, filters, isInvoiceLevel, maximumAmount, reason, additionalProperties) }
679+
private val hashCode: Int by lazy { Objects.hash(id, adjustmentType, amount, appliesToPriceIds, filters, isInvoiceLevel, maximumAmount, reason, replacesAdjustmentId, additionalProperties) }
623680
/* spotless:on */
624681

625682
override fun hashCode(): Int = hashCode
626683

627684
override fun toString() =
628-
"MonetaryMaximumAdjustment{id=$id, adjustmentType=$adjustmentType, amount=$amount, appliesToPriceIds=$appliesToPriceIds, filters=$filters, isInvoiceLevel=$isInvoiceLevel, maximumAmount=$maximumAmount, reason=$reason, additionalProperties=$additionalProperties}"
685+
"MonetaryMaximumAdjustment{id=$id, adjustmentType=$adjustmentType, amount=$amount, appliesToPriceIds=$appliesToPriceIds, filters=$filters, isInvoiceLevel=$isInvoiceLevel, maximumAmount=$maximumAmount, reason=$reason, replacesAdjustmentId=$replacesAdjustmentId, additionalProperties=$additionalProperties}"
629686
}

0 commit comments

Comments
 (0)