diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index fe87cd91..cc51f6f8 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.43.0"
+ ".": "0.44.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 715ea230..b21f5baa 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
configured_endpoints: 103
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-48084a007f009b4358484f09a3a7b74a990c402669f9d15adfbb60e4f835f951.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-a2c1aa029d1e72a5fc7d3c6cd431479888ebd9a379683a2c8630da48437baa4f.yml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 24354e71..4242f0f7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 0.44.0 (2025-03-06)
+
+Full Changelog: [v0.43.0...v0.44.0](https://github.com/orbcorp/orb-java/compare/v0.43.0...v0.44.0)
+
+### Features
+
+* **api:** api update ([#313](https://github.com/orbcorp/orb-java/issues/313)) ([6121464](https://github.com/orbcorp/orb-java/commit/6121464c0d089981492bf90573d1c11590780def))
+* **client:** accept `InputStream` and `Path` for file params ([#311](https://github.com/orbcorp/orb-java/issues/311)) ([11ca664](https://github.com/orbcorp/orb-java/commit/11ca66491b29b9996bbffa2b599aed9c22d32ee8))
+
## 0.43.0 (2025-03-05)
Full Changelog: [v0.42.0...v0.43.0](https://github.com/orbcorp/orb-java/compare/v0.42.0...v0.43.0)
diff --git a/README.md b/README.md
index 3216d07a..54ca1a67 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-[](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.43.0)
+[](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.44.0)
@@ -19,7 +19,7 @@ The REST API documentation can be found on [docs.withorb.com](https://docs.witho
### Gradle
```kotlin
-implementation("com.withorb.api:orb-java:0.43.0")
+implementation("com.withorb.api:orb-java:0.44.0")
```
### Maven
@@ -28,7 +28,7 @@ implementation("com.withorb.api:orb-java:0.43.0")
com.withorb.api
orb-java
- 0.43.0
+ 0.44.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 93332ba8..f6397730 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,4 +1,4 @@
allprojects {
group = "com.withorb.api"
- version = "0.43.0" // x-release-please-version
+ version = "0.44.0" // x-release-please-version
}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/core/ObjectMappers.kt b/orb-java-core/src/main/kotlin/com/withorb/api/core/ObjectMappers.kt
index cb94b6a8..814b479f 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/core/ObjectMappers.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/core/ObjectMappers.kt
@@ -3,19 +3,24 @@
package com.withorb.api.core
import com.fasterxml.jackson.annotation.JsonInclude
+import com.fasterxml.jackson.core.JsonGenerator
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.SerializationFeature
+import com.fasterxml.jackson.databind.SerializerProvider
import com.fasterxml.jackson.databind.cfg.CoercionAction.Fail
import com.fasterxml.jackson.databind.cfg.CoercionInputShape.Integer
import com.fasterxml.jackson.databind.json.JsonMapper
+import com.fasterxml.jackson.databind.module.SimpleModule
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
import com.fasterxml.jackson.module.kotlin.jacksonMapperBuilder
+import java.io.InputStream
fun jsonMapper(): JsonMapper =
jacksonMapperBuilder()
.addModule(Jdk8Module())
.addModule(JavaTimeModule())
+ .addModule(SimpleModule().addSerializer(InputStreamJsonSerializer))
.serializationInclusion(JsonInclude.Include.NON_ABSENT)
.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)
.disable(SerializationFeature.FLUSH_AFTER_WRITE_VALUE)
@@ -23,3 +28,18 @@ fun jsonMapper(): JsonMapper =
.disable(SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS)
.withCoercionConfig(String::class.java) { it.setCoercion(Integer, Fail) }
.build()
+
+private object InputStreamJsonSerializer : BaseSerializer(InputStream::class) {
+
+ override fun serialize(
+ value: InputStream?,
+ gen: JsonGenerator?,
+ serializers: SerializerProvider?,
+ ) {
+ if (value == null) {
+ gen?.writeNull()
+ } else {
+ value.use { gen?.writeBinary(it.readBytes()) }
+ }
+ }
+}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/core/Values.kt b/orb-java-core/src/main/kotlin/com/withorb/api/core/Values.kt
index 79149391..e4d17630 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/core/Values.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/core/Values.kt
@@ -27,6 +27,7 @@ import com.fasterxml.jackson.databind.node.JsonNodeType.POJO
import com.fasterxml.jackson.databind.node.JsonNodeType.STRING
import com.fasterxml.jackson.databind.ser.std.NullSerializer
import com.withorb.api.errors.OrbInvalidDataException
+import java.io.InputStream
import java.util.Objects
import java.util.Optional
@@ -508,7 +509,10 @@ private constructor(
return MultipartField(
value,
contentType
- ?: if (value is KnownValue && value.value is ByteArray)
+ ?: if (
+ value is KnownValue &&
+ (value.value is InputStream || value.value is ByteArray)
+ )
"application/octet-stream"
else "text/plain; charset=utf-8",
filename,
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/core/http/HttpRequestBodies.kt b/orb-java-core/src/main/kotlin/com/withorb/api/core/http/HttpRequestBodies.kt
index e49836bd..d0a1330b 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/core/http/HttpRequestBodies.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/core/http/HttpRequestBodies.kt
@@ -9,6 +9,8 @@ import com.fasterxml.jackson.databind.json.JsonMapper
import com.fasterxml.jackson.databind.node.JsonNodeType
import com.withorb.api.core.MultipartField
import com.withorb.api.errors.OrbInvalidDataException
+import java.io.ByteArrayInputStream
+import java.io.InputStream
import java.io.OutputStream
import kotlin.jvm.optionals.getOrNull
import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder
@@ -41,8 +43,18 @@ internal fun multipartFormData(
MultipartEntityBuilder.create()
.apply {
fields.forEach { (name, field) ->
- val node = jsonMapper.valueToTree(field.value)
- serializePart(name, node).forEach { (name, bytes) ->
+ val knownValue = field.value.asKnown().getOrNull()
+ val parts =
+ if (knownValue is InputStream) {
+ // Read directly from the `InputStream` instead of reading it all
+ // into memory due to the `jsonMapper` serialization below.
+ sequenceOf(name to knownValue)
+ } else {
+ val node = jsonMapper.valueToTree(field.value)
+ serializePart(name, node)
+ }
+
+ parts.forEach { (name, bytes) ->
addBinaryBody(
name,
bytes,
@@ -55,16 +67,19 @@ internal fun multipartFormData(
.build()
}
- private fun serializePart(name: String, node: JsonNode): Sequence> =
+ private fun serializePart(
+ name: String,
+ node: JsonNode,
+ ): Sequence> =
when (node.nodeType) {
JsonNodeType.MISSING,
JsonNodeType.NULL -> emptySequence()
- JsonNodeType.BINARY -> sequenceOf(name to node.binaryValue())
- JsonNodeType.STRING -> sequenceOf(name to node.textValue().toByteArray())
+ JsonNodeType.BINARY -> sequenceOf(name to ByteArrayInputStream(node.binaryValue()))
+ JsonNodeType.STRING -> sequenceOf(name to node.textValue().toInputStream())
JsonNodeType.BOOLEAN ->
- sequenceOf(name to node.booleanValue().toString().toByteArray())
+ sequenceOf(name to node.booleanValue().toString().toInputStream())
JsonNodeType.NUMBER ->
- sequenceOf(name to node.numberValue().toString().toByteArray())
+ sequenceOf(name to node.numberValue().toString().toInputStream())
JsonNodeType.ARRAY ->
node.elements().asSequence().flatMap { element ->
serializePart("$name[]", element)
@@ -77,6 +92,8 @@ internal fun multipartFormData(
null -> throw OrbInvalidDataException("Unexpected JsonNode type: ${node.nodeType}")
}
+ private fun String.toInputStream(): InputStream = ByteArrayInputStream(toByteArray())
+
override fun writeTo(outputStream: OutputStream) = entity.writeTo(outputStream)
override fun contentType(): String = entity.contentType
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt
index 832d74b7..9851afcc 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt
@@ -4974,7 +4974,11 @@ private constructor(
*/
fun adjustedSubtotal(): String = adjustedSubtotal.getRequired("adjusted_subtotal")
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun adjustments(): List = adjustments.getRequired("adjustments")
/**
@@ -5076,7 +5080,11 @@ private constructor(
@ExcludeMissing
fun _adjustedSubtotal(): JsonField = adjustedSubtotal
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
@JsonProperty("adjustments")
@ExcludeMissing
fun _adjustments(): JsonField> = adjustments
@@ -5334,15 +5342,27 @@ private constructor(
this.adjustedSubtotal = adjustedSubtotal
}
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun adjustments(adjustments: List) = adjustments(JsonField.of(adjustments))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun adjustments(adjustments: JsonField>) = apply {
this.adjustments = adjustments.map { it.toMutableList() }
}
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(adjustment: Adjustment) = apply {
adjustments =
(adjustments ?: JsonField.of(mutableListOf())).also {
@@ -5350,24 +5370,44 @@ private constructor(
}
}
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(monetaryUsageDiscount: Adjustment.MonetaryUsageDiscountAdjustment) =
addAdjustment(Adjustment.ofMonetaryUsageDiscount(monetaryUsageDiscount))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(monetaryAmountDiscount: Adjustment.MonetaryAmountDiscountAdjustment) =
addAdjustment(Adjustment.ofMonetaryAmountDiscount(monetaryAmountDiscount))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(
monetaryPercentageDiscount: Adjustment.MonetaryPercentageDiscountAdjustment
) = addAdjustment(Adjustment.ofMonetaryPercentageDiscount(monetaryPercentageDiscount))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(monetaryMinimum: Adjustment.MonetaryMinimumAdjustment) =
addAdjustment(Adjustment.ofMonetaryMinimum(monetaryMinimum))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(monetaryMaximum: Adjustment.MonetaryMaximumAdjustment) =
addAdjustment(Adjustment.ofMonetaryMaximum(monetaryMaximum))
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponse.kt
index d388c414..462dde29 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponse.kt
@@ -4967,7 +4967,11 @@ private constructor(
*/
fun adjustedSubtotal(): String = adjustedSubtotal.getRequired("adjusted_subtotal")
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun adjustments(): List = adjustments.getRequired("adjustments")
/**
@@ -5069,7 +5073,11 @@ private constructor(
@ExcludeMissing
fun _adjustedSubtotal(): JsonField = adjustedSubtotal
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
@JsonProperty("adjustments")
@ExcludeMissing
fun _adjustments(): JsonField> = adjustments
@@ -5327,15 +5335,27 @@ private constructor(
this.adjustedSubtotal = adjustedSubtotal
}
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun adjustments(adjustments: List) = adjustments(JsonField.of(adjustments))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun adjustments(adjustments: JsonField>) = apply {
this.adjustments = adjustments.map { it.toMutableList() }
}
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(adjustment: Adjustment) = apply {
adjustments =
(adjustments ?: JsonField.of(mutableListOf())).also {
@@ -5343,24 +5363,44 @@ private constructor(
}
}
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(monetaryUsageDiscount: Adjustment.MonetaryUsageDiscountAdjustment) =
addAdjustment(Adjustment.ofMonetaryUsageDiscount(monetaryUsageDiscount))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(monetaryAmountDiscount: Adjustment.MonetaryAmountDiscountAdjustment) =
addAdjustment(Adjustment.ofMonetaryAmountDiscount(monetaryAmountDiscount))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(
monetaryPercentageDiscount: Adjustment.MonetaryPercentageDiscountAdjustment
) = addAdjustment(Adjustment.ofMonetaryPercentageDiscount(monetaryPercentageDiscount))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(monetaryMinimum: Adjustment.MonetaryMinimumAdjustment) =
addAdjustment(Adjustment.ofMonetaryMinimum(monetaryMinimum))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on
+ * invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts
+ * -> minimums -> maximums).
+ */
fun addAdjustment(monetaryMaximum: Adjustment.MonetaryMaximumAdjustment) =
addAdjustment(Adjustment.ofMonetaryMaximum(monetaryMaximum))
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponse.kt
index 83780b3f..a8da894d 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponse.kt
@@ -108,7 +108,11 @@ private constructor(
*/
fun adjustedSubtotal(): String = adjustedSubtotal.getRequired("adjusted_subtotal")
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums ->
+ * maximums).
+ */
fun adjustments(): List = adjustments.getRequired("adjustments")
/**
@@ -209,7 +213,11 @@ private constructor(
@ExcludeMissing
fun _adjustedSubtotal(): JsonField = adjustedSubtotal
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums ->
+ * maximums).
+ */
@JsonProperty("adjustments")
@ExcludeMissing
fun _adjustments(): JsonField> = adjustments
@@ -466,15 +474,27 @@ private constructor(
this.adjustedSubtotal = adjustedSubtotal
}
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun adjustments(adjustments: List) = adjustments(JsonField.of(adjustments))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun adjustments(adjustments: JsonField>) = apply {
this.adjustments = adjustments.map { it.toMutableList() }
}
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun addAdjustment(adjustment: Adjustment) = apply {
adjustments =
(adjustments ?: JsonField.of(mutableListOf())).also {
@@ -482,24 +502,44 @@ private constructor(
}
}
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun addAdjustment(monetaryUsageDiscount: Adjustment.MonetaryUsageDiscountAdjustment) =
addAdjustment(Adjustment.ofMonetaryUsageDiscount(monetaryUsageDiscount))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun addAdjustment(monetaryAmountDiscount: Adjustment.MonetaryAmountDiscountAdjustment) =
addAdjustment(Adjustment.ofMonetaryAmountDiscount(monetaryAmountDiscount))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun addAdjustment(
monetaryPercentageDiscount: Adjustment.MonetaryPercentageDiscountAdjustment
) = addAdjustment(Adjustment.ofMonetaryPercentageDiscount(monetaryPercentageDiscount))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun addAdjustment(monetaryMinimum: Adjustment.MonetaryMinimumAdjustment) =
addAdjustment(Adjustment.ofMonetaryMinimum(monetaryMinimum))
- /** All adjustments (ie. maximums, minimums, discounts) applied to the line item. */
+ /**
+ * All adjustments applied to the line item in the order they were applied based on invoice
+ * calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums
+ * -> maximums).
+ */
fun addAdjustment(monetaryMaximum: Adjustment.MonetaryMaximumAdjustment) =
addAdjustment(Adjustment.ofMonetaryMaximum(monetaryMaximum))
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/Subscription.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/Subscription.kt
index 9670e2d0..a0c8c1bc 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/Subscription.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/Subscription.kt
@@ -135,7 +135,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -206,7 +209,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -219,7 +222,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -230,7 +233,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -268,7 +271,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -363,7 +369,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -375,7 +381,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -575,16 +581,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -768,16 +783,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField>) = apply {
this.discountIntervals = discountIntervals.map { it.toMutableList() }
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(discountInterval: DiscountInterval) = apply {
discountIntervals =
(discountIntervals ?: JsonField.of(mutableListOf())).also {
@@ -785,15 +800,15 @@ private constructor(
}
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) =
addDiscountInterval(DiscountInterval.ofAmount(amount))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofPercentage(percentage))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofUsage(usage))
@@ -833,16 +848,16 @@ private constructor(
this.invoicingThreshold = invoicingThreshold
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: List) =
maximumIntervals(JsonField.of(maximumIntervals))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: JsonField>) = apply {
this.maximumIntervals = maximumIntervals.map { it.toMutableList() }
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun addMaximumInterval(maximumInterval: MaximumInterval) = apply {
maximumIntervals =
(maximumIntervals ?: JsonField.of(mutableListOf())).also {
@@ -864,16 +879,16 @@ private constructor(
*/
fun metadata(metadata: JsonField) = apply { this.metadata = metadata }
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: List) =
minimumIntervals(JsonField.of(minimumIntervals))
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: JsonField>) = apply {
this.minimumIntervals = minimumIntervals.map { it.toMutableList() }
}
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun addMinimumInterval(minimumInterval: MinimumInterval) = apply {
minimumIntervals =
(minimumIntervals ?: JsonField.of(mutableListOf())).also {
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCancelResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCancelResponse.kt
index d95365d0..c18285f2 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCancelResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCancelResponse.kt
@@ -118,7 +118,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -189,7 +192,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -202,7 +205,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -213,7 +216,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -251,7 +254,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -329,7 +335,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -358,7 +364,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -563,16 +569,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -756,16 +771,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField>) = apply {
this.discountIntervals = discountIntervals.map { it.toMutableList() }
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(discountInterval: DiscountInterval) = apply {
discountIntervals =
(discountIntervals ?: JsonField.of(mutableListOf())).also {
@@ -773,15 +788,15 @@ private constructor(
}
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) =
addDiscountInterval(DiscountInterval.ofAmount(amount))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofPercentage(percentage))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofUsage(usage))
@@ -821,16 +836,16 @@ private constructor(
this.invoicingThreshold = invoicingThreshold
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: List) =
maximumIntervals(JsonField.of(maximumIntervals))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: JsonField>) = apply {
this.maximumIntervals = maximumIntervals.map { it.toMutableList() }
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun addMaximumInterval(maximumInterval: MaximumInterval) = apply {
maximumIntervals =
(maximumIntervals ?: JsonField.of(mutableListOf())).also {
@@ -852,16 +867,16 @@ private constructor(
*/
fun metadata(metadata: JsonField) = apply { this.metadata = metadata }
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: List) =
minimumIntervals(JsonField.of(minimumIntervals))
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: JsonField>) = apply {
this.minimumIntervals = minimumIntervals.map { it.toMutableList() }
}
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun addMinimumInterval(minimumInterval: MinimumInterval) = apply {
minimumIntervals =
(minimumIntervals ?: JsonField.of(mutableListOf())).also {
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCreateResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCreateResponse.kt
index bdafd231..367e0f62 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCreateResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCreateResponse.kt
@@ -118,7 +118,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -189,7 +192,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -202,7 +205,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -213,7 +216,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -251,7 +254,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -329,7 +335,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -358,7 +364,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -563,16 +569,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -756,16 +771,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField>) = apply {
this.discountIntervals = discountIntervals.map { it.toMutableList() }
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(discountInterval: DiscountInterval) = apply {
discountIntervals =
(discountIntervals ?: JsonField.of(mutableListOf())).also {
@@ -773,15 +788,15 @@ private constructor(
}
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) =
addDiscountInterval(DiscountInterval.ofAmount(amount))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofPercentage(percentage))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofUsage(usage))
@@ -821,16 +836,16 @@ private constructor(
this.invoicingThreshold = invoicingThreshold
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: List) =
maximumIntervals(JsonField.of(maximumIntervals))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: JsonField>) = apply {
this.maximumIntervals = maximumIntervals.map { it.toMutableList() }
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun addMaximumInterval(maximumInterval: MaximumInterval) = apply {
maximumIntervals =
(maximumIntervals ?: JsonField.of(mutableListOf())).also {
@@ -852,16 +867,16 @@ private constructor(
*/
fun metadata(metadata: JsonField) = apply { this.metadata = metadata }
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: List) =
minimumIntervals(JsonField.of(minimumIntervals))
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: JsonField>) = apply {
this.minimumIntervals = minimumIntervals.map { it.toMutableList() }
}
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun addMinimumInterval(minimumInterval: MinimumInterval) = apply {
minimumIntervals =
(minimumIntervals ?: JsonField.of(mutableListOf())).also {
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsResponse.kt
index f98761e4..7a3e8a78 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsResponse.kt
@@ -118,7 +118,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -189,7 +192,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -202,7 +205,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -213,7 +216,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -251,7 +254,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -329,7 +335,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -358,7 +364,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -573,16 +579,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -766,16 +781,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField>) = apply {
this.discountIntervals = discountIntervals.map { it.toMutableList() }
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(discountInterval: DiscountInterval) = apply {
discountIntervals =
(discountIntervals ?: JsonField.of(mutableListOf())).also {
@@ -783,15 +798,15 @@ private constructor(
}
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) =
addDiscountInterval(DiscountInterval.ofAmount(amount))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofPercentage(percentage))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofUsage(usage))
@@ -831,16 +846,16 @@ private constructor(
this.invoicingThreshold = invoicingThreshold
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: List) =
maximumIntervals(JsonField.of(maximumIntervals))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: JsonField>) = apply {
this.maximumIntervals = maximumIntervals.map { it.toMutableList() }
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun addMaximumInterval(maximumInterval: MaximumInterval) = apply {
maximumIntervals =
(maximumIntervals ?: JsonField.of(mutableListOf())).also {
@@ -862,16 +877,16 @@ private constructor(
*/
fun metadata(metadata: JsonField) = apply { this.metadata = metadata }
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: List) =
minimumIntervals(JsonField.of(minimumIntervals))
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: JsonField>) = apply {
this.minimumIntervals = minimumIntervals.map { it.toMutableList() }
}
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun addMinimumInterval(minimumInterval: MinimumInterval) = apply {
minimumIntervals =
(minimumIntervals ?: JsonField.of(mutableListOf())).also {
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeResponse.kt
index 29459136..387ec142 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeResponse.kt
@@ -118,7 +118,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -189,7 +192,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -202,7 +205,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -213,7 +216,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -251,7 +254,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -329,7 +335,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -358,7 +364,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -574,16 +580,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -767,16 +782,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField>) = apply {
this.discountIntervals = discountIntervals.map { it.toMutableList() }
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(discountInterval: DiscountInterval) = apply {
discountIntervals =
(discountIntervals ?: JsonField.of(mutableListOf())).also {
@@ -784,15 +799,15 @@ private constructor(
}
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) =
addDiscountInterval(DiscountInterval.ofAmount(amount))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofPercentage(percentage))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofUsage(usage))
@@ -832,16 +847,16 @@ private constructor(
this.invoicingThreshold = invoicingThreshold
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: List) =
maximumIntervals(JsonField.of(maximumIntervals))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: JsonField>) = apply {
this.maximumIntervals = maximumIntervals.map { it.toMutableList() }
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun addMaximumInterval(maximumInterval: MaximumInterval) = apply {
maximumIntervals =
(maximumIntervals ?: JsonField.of(mutableListOf())).also {
@@ -863,16 +878,16 @@ private constructor(
*/
fun metadata(metadata: JsonField) = apply { this.metadata = metadata }
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: List) =
minimumIntervals(JsonField.of(minimumIntervals))
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: JsonField>) = apply {
this.minimumIntervals = minimumIntervals.map { it.toMutableList() }
}
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun addMinimumInterval(minimumInterval: MinimumInterval) = apply {
minimumIntervals =
(minimumIntervals ?: JsonField.of(mutableListOf())).also {
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseResponse.kt
index 5e51faa9..f52ffc25 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseResponse.kt
@@ -118,7 +118,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -189,7 +192,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -202,7 +205,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -213,7 +216,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -251,7 +254,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -329,7 +335,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -358,7 +364,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -571,16 +577,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -764,16 +779,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField>) = apply {
this.discountIntervals = discountIntervals.map { it.toMutableList() }
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(discountInterval: DiscountInterval) = apply {
discountIntervals =
(discountIntervals ?: JsonField.of(mutableListOf())).also {
@@ -781,15 +796,15 @@ private constructor(
}
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) =
addDiscountInterval(DiscountInterval.ofAmount(amount))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofPercentage(percentage))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofUsage(usage))
@@ -829,16 +844,16 @@ private constructor(
this.invoicingThreshold = invoicingThreshold
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: List) =
maximumIntervals(JsonField.of(maximumIntervals))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: JsonField>) = apply {
this.maximumIntervals = maximumIntervals.map { it.toMutableList() }
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun addMaximumInterval(maximumInterval: MaximumInterval) = apply {
maximumIntervals =
(maximumIntervals ?: JsonField.of(mutableListOf())).also {
@@ -860,16 +875,16 @@ private constructor(
*/
fun metadata(metadata: JsonField) = apply { this.metadata = metadata }
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: List) =
minimumIntervals(JsonField.of(minimumIntervals))
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: JsonField>) = apply {
this.minimumIntervals = minimumIntervals.map { it.toMutableList() }
}
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun addMinimumInterval(minimumInterval: MinimumInterval) = apply {
minimumIntervals =
(minimumIntervals ?: JsonField.of(mutableListOf())).also {
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationResponse.kt
index 82528f7e..8004e95c 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationResponse.kt
@@ -118,7 +118,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -189,7 +192,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -202,7 +205,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -213,7 +216,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -251,7 +254,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -329,7 +335,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -358,7 +364,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -580,16 +586,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -773,16 +788,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField>) = apply {
this.discountIntervals = discountIntervals.map { it.toMutableList() }
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(discountInterval: DiscountInterval) = apply {
discountIntervals =
(discountIntervals ?: JsonField.of(mutableListOf())).also {
@@ -790,15 +805,15 @@ private constructor(
}
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) =
addDiscountInterval(DiscountInterval.ofAmount(amount))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofPercentage(percentage))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofUsage(usage))
@@ -838,16 +853,16 @@ private constructor(
this.invoicingThreshold = invoicingThreshold
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: List) =
maximumIntervals(JsonField.of(maximumIntervals))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: JsonField>) = apply {
this.maximumIntervals = maximumIntervals.map { it.toMutableList() }
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun addMaximumInterval(maximumInterval: MaximumInterval) = apply {
maximumIntervals =
(maximumIntervals ?: JsonField.of(mutableListOf())).also {
@@ -869,16 +884,16 @@ private constructor(
*/
fun metadata(metadata: JsonField) = apply { this.metadata = metadata }
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: List) =
minimumIntervals(JsonField.of(minimumIntervals))
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: JsonField>) = apply {
this.minimumIntervals = minimumIntervals.map { it.toMutableList() }
}
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun addMinimumInterval(minimumInterval: MinimumInterval) = apply {
minimumIntervals =
(minimumIntervals ?: JsonField.of(mutableListOf())).also {
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.kt
index 31f14505..0fbf6fa9 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.kt
@@ -118,7 +118,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -189,7 +192,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -202,7 +205,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -213,7 +216,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -251,7 +254,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -329,7 +335,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -358,7 +364,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -588,16 +594,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -781,16 +796,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField>) = apply {
this.discountIntervals = discountIntervals.map { it.toMutableList() }
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(discountInterval: DiscountInterval) = apply {
discountIntervals =
(discountIntervals ?: JsonField.of(mutableListOf())).also {
@@ -798,15 +813,15 @@ private constructor(
}
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) =
addDiscountInterval(DiscountInterval.ofAmount(amount))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofPercentage(percentage))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofUsage(usage))
@@ -846,16 +861,16 @@ private constructor(
this.invoicingThreshold = invoicingThreshold
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: List) =
maximumIntervals(JsonField.of(maximumIntervals))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: JsonField>) = apply {
this.maximumIntervals = maximumIntervals.map { it.toMutableList() }
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun addMaximumInterval(maximumInterval: MaximumInterval) = apply {
maximumIntervals =
(maximumIntervals ?: JsonField.of(mutableListOf())).also {
@@ -877,16 +892,16 @@ private constructor(
*/
fun metadata(metadata: JsonField) = apply { this.metadata = metadata }
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: List) =
minimumIntervals(JsonField.of(minimumIntervals))
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: JsonField>) = apply {
this.minimumIntervals = minimumIntervals.map { it.toMutableList() }
}
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun addMinimumInterval(minimumInterval: MinimumInterval) = apply {
minimumIntervals =
(minimumIntervals ?: JsonField.of(mutableListOf())).also {
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesResponse.kt
index 1443009b..0e518af9 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesResponse.kt
@@ -118,7 +118,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -189,7 +192,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -202,7 +205,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -213,7 +216,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -251,7 +254,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -329,7 +335,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -358,7 +364,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -584,16 +590,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -777,16 +792,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField>) = apply {
this.discountIntervals = discountIntervals.map { it.toMutableList() }
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(discountInterval: DiscountInterval) = apply {
discountIntervals =
(discountIntervals ?: JsonField.of(mutableListOf())).also {
@@ -794,15 +809,15 @@ private constructor(
}
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) =
addDiscountInterval(DiscountInterval.ofAmount(amount))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofPercentage(percentage))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) =
addDiscountInterval(DiscountInterval.ofUsage(usage))
@@ -842,16 +857,16 @@ private constructor(
this.invoicingThreshold = invoicingThreshold
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: List) =
maximumIntervals(JsonField.of(maximumIntervals))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(maximumIntervals: JsonField>) = apply {
this.maximumIntervals = maximumIntervals.map { it.toMutableList() }
}
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun addMaximumInterval(maximumInterval: MaximumInterval) = apply {
maximumIntervals =
(maximumIntervals ?: JsonField.of(mutableListOf())).also {
@@ -873,16 +888,16 @@ private constructor(
*/
fun metadata(metadata: JsonField) = apply { this.metadata = metadata }
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: List) =
minimumIntervals(JsonField.of(minimumIntervals))
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(minimumIntervals: JsonField>) = apply {
this.minimumIntervals = minimumIntervals.map { it.toMutableList() }
}
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun addMinimumInterval(minimumInterval: MinimumInterval) = apply {
minimumIntervals =
(minimumIntervals ?: JsonField.of(mutableListOf())).also {
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityResponse.kt
index 08c22fde..50d600e5 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityResponse.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityResponse.kt
@@ -118,7 +118,10 @@ private constructor(
fun activePlanPhaseOrder(): Optional =
Optional.ofNullable(activePlanPhaseOrder.getNullable("active_plan_phase_order"))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(): List =
adjustmentIntervals.getRequired("adjustment_intervals")
@@ -189,7 +192,7 @@ private constructor(
fun defaultInvoiceMemo(): Optional =
Optional.ofNullable(defaultInvoiceMemo.getNullable("default_invoice_memo"))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(): List =
discountIntervals.getRequired("discount_intervals")
@@ -202,7 +205,7 @@ private constructor(
fun invoicingThreshold(): Optional =
Optional.ofNullable(invoicingThreshold.getNullable("invoicing_threshold"))
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
fun maximumIntervals(): List =
maximumIntervals.getRequired("maximum_intervals")
@@ -213,7 +216,7 @@ private constructor(
*/
fun metadata(): Metadata = metadata.getRequired("metadata")
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
fun minimumIntervals(): List =
minimumIntervals.getRequired("minimum_intervals")
@@ -251,7 +254,10 @@ private constructor(
@ExcludeMissing
fun _activePlanPhaseOrder(): JsonField = activePlanPhaseOrder
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
@JsonProperty("adjustment_intervals")
@ExcludeMissing
fun _adjustmentIntervals(): JsonField> = adjustmentIntervals
@@ -329,7 +335,7 @@ private constructor(
@ExcludeMissing
fun _defaultInvoiceMemo(): JsonField = defaultInvoiceMemo
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
@JsonProperty("discount_intervals")
@ExcludeMissing
fun _discountIntervals(): JsonField> = discountIntervals
@@ -346,7 +352,7 @@ private constructor(
@ExcludeMissing
fun _invoicingThreshold(): JsonField = invoicingThreshold
- /** The maximum intervals for this subscription. */
+ /** The maximum intervals for this subscription sorted by the start_date. */
@JsonProperty("maximum_intervals")
@ExcludeMissing
fun _maximumIntervals(): JsonField> = maximumIntervals
@@ -358,7 +364,7 @@ private constructor(
*/
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField = metadata
- /** The minimum intervals for this subscription. */
+ /** The minimum intervals for this subscription sorted by the start_date. */
@JsonProperty("minimum_intervals")
@ExcludeMissing
fun _minimumIntervals(): JsonField> = minimumIntervals
@@ -580,16 +586,25 @@ private constructor(
this.activePlanPhaseOrder = activePlanPhaseOrder
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: List) =
adjustmentIntervals(JsonField.of(adjustmentIntervals))
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun adjustmentIntervals(adjustmentIntervals: JsonField>) = apply {
this.adjustmentIntervals = adjustmentIntervals.map { it.toMutableList() }
}
- /** The adjustment intervals for this subscription. */
+ /**
+ * The adjustment intervals for this subscription sorted by the start_date of the adjustment
+ * interval.
+ */
fun addAdjustmentInterval(adjustmentInterval: AdjustmentInterval) = apply {
adjustmentIntervals =
(adjustmentIntervals ?: JsonField.of(mutableListOf())).also {
@@ -773,16 +788,16 @@ private constructor(
this.defaultInvoiceMemo = defaultInvoiceMemo
}
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: List) =
discountIntervals(JsonField.of(discountIntervals))
- /** The discount intervals for this subscription. */
+ /** The discount intervals for this subscription sorted by the start_date. */
fun discountIntervals(discountIntervals: JsonField