diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 51acdaa4..8ea07c9a 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.37.0"
+ ".": "0.38.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 610d8317..da919d93 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-7b65f996788617c2d2f2e8e941d366edd1a2844f15eefec555e220b03bbc6d4c.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d4f03b16daf0bae33be634c959dafb0e21b0bcb156beb162f8235394dca88e7c.yml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3a380baa..1ba496a4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,26 @@
# Changelog
+## 0.38.0 (2025-02-27)
+
+Full Changelog: [v0.37.0...v0.38.0](https://github.com/orbcorp/orb-java/compare/v0.37.0...v0.38.0)
+
+### Features
+
+* **api:** api update ([#286](https://github.com/orbcorp/orb-java/issues/286)) ([a0ba171](https://github.com/orbcorp/orb-java/commit/a0ba171d068ac12040aa4081a3985db0e2f0f4e3))
+
+
+### Chores
+
+* **client:** use deep identity methods for primitive array types ([#283](https://github.com/orbcorp/orb-java/issues/283)) ([6e2862d](https://github.com/orbcorp/orb-java/commit/6e2862d364872246891f5b1f37a137f27edd3c39))
+* **internal:** add async service tests ([#281](https://github.com/orbcorp/orb-java/issues/281)) ([8171ba6](https://github.com/orbcorp/orb-java/commit/8171ba671b8a5fb9d55477984a765f7235d50c53))
+* **internal:** improve sync service tests ([8171ba6](https://github.com/orbcorp/orb-java/commit/8171ba671b8a5fb9d55477984a765f7235d50c53))
+* **internal:** refactor `ServiceParamsTest` ([#285](https://github.com/orbcorp/orb-java/issues/285)) ([7894edb](https://github.com/orbcorp/orb-java/commit/7894edb4bd1b2a0780d839c23e08861e10aa080e))
+
+
+### Documentation
+
+* readme parameter tweaks ([8171ba6](https://github.com/orbcorp/orb-java/commit/8171ba671b8a5fb9d55477984a765f7235d50c53))
+
## 0.37.0 (2025-02-26)
Full Changelog: [v0.36.0...v0.37.0](https://github.com/orbcorp/orb-java/compare/v0.36.0...v0.37.0)
diff --git a/README.md b/README.md
index 9c46e4f3..a3dc61b4 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-[](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.37.0)
+[](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.38.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.37.0")
+implementation("com.withorb.api:orb-java:0.38.0")
```
### Maven
@@ -28,7 +28,7 @@ implementation("com.withorb.api:orb-java:0.37.0")
com.withorb.api
orb-java
- 0.37.0
+ 0.38.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 6c2f472c..b86d7012 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,4 +1,4 @@
allprojects {
group = "com.withorb.api"
- version = "0.37.0" // x-release-please-version
+ version = "0.38.0" // x-release-please-version
}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/core/Utils.kt b/orb-java-core/src/main/kotlin/com/withorb/api/core/Utils.kt
index b1dbf27a..9cf3ba5a 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/core/Utils.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/core/Utils.kt
@@ -26,6 +26,42 @@ internal fun , V> SortedMap.toImmutable(): SortedMap value.contentHashCode()
- is String -> value
- is Boolean -> value
- is Long -> value
- is Double -> value
- else -> value?.hashCode()
- },
- )
- }
- return hashCode
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) return true
- if (other == null || this.javaClass != other.javaClass) return false
+ private val hashCode: Int by lazy { contentHash(name, value, contentType, filename) }
- other as MultipartFormValue<*>
+ override fun hashCode(): Int = hashCode
- if (name != other.name || contentType != other.contentType || filename != other.filename)
- return false
-
- return when {
- value is ByteArray && other.value is ByteArray -> value contentEquals other.value
- else -> value?.equals(other.value) ?: (other.value == null)
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
}
+
+ return other is MultipartFormValue<*> &&
+ name == other.name &&
+ value contentEquals other.value &&
+ contentType == other.contentType &&
+ filename == other.filename
}
override fun toString(): String =
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteByExternalIdParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteByExternalIdParams.kt
index 3b4fbf7d..02638f15 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteByExternalIdParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteByExternalIdParams.kt
@@ -12,7 +12,10 @@ import com.withorb.api.core.toImmutable
import java.util.Objects
import java.util.Optional
-/** Delete top-up by external ID */
+/**
+ * This deactivates the top-up and voids any invoices associated with pending credit blocks
+ * purchased through the top-up.
+ */
class CustomerCreditTopUpDeleteByExternalIdParams
private constructor(
private val externalCustomerId: String,
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteParams.kt
index 12a73212..bfac4066 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteParams.kt
@@ -12,7 +12,10 @@ import com.withorb.api.core.toImmutable
import java.util.Objects
import java.util.Optional
-/** Delete top-up */
+/**
+ * This deactivates the top-up and voids any invoices associated with pending credit blocks
+ * purchased through the top-up.
+ */
class CustomerCreditTopUpDeleteParams
private constructor(
private val customerId: String,
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 11be6ea4..9515f0ff 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
@@ -5766,6 +5766,9 @@ private constructor(
@JsonProperty("end_date")
@ExcludeMissing
private val endDate: JsonField = JsonMissing.of(),
+ @JsonProperty("filter")
+ @ExcludeMissing
+ private val filter: JsonField = JsonMissing.of(),
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
private val fixedFeeQuantityTransitions: JsonField> =
@@ -5776,6 +5779,9 @@ private constructor(
@JsonProperty("start_date")
@ExcludeMissing
private val startDate: JsonField = JsonMissing.of(),
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ private val usageCustomerIds: JsonField> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map = immutableEmptyMap(),
) {
@@ -5812,6 +5818,9 @@ private constructor(
fun endDate(): Optional =
Optional.ofNullable(endDate.getNullable("end_date"))
+ /** An additional filter to apply to usage queries. */
+ fun filter(): Optional = Optional.ofNullable(filter.getNullable("filter"))
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5841,6 +5850,13 @@ private constructor(
*/
fun startDate(): OffsetDateTime = startDate.getRequired("start_date")
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ fun usageCustomerIds(): Optional> =
+ Optional.ofNullable(usageCustomerIds.getNullable("usage_customer_ids"))
+
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
/** The day of the month that Orb bills for this price */
@@ -5875,6 +5891,9 @@ private constructor(
@ExcludeMissing
fun _endDate(): JsonField = endDate
+ /** An additional filter to apply to usage queries. */
+ @JsonProperty("filter") @ExcludeMissing fun _filter(): JsonField = filter
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5906,6 +5925,14 @@ private constructor(
@ExcludeMissing
fun _startDate(): JsonField = startDate
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ fun _usageCustomerIds(): JsonField> = usageCustomerIds
+
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
@@ -5922,9 +5949,11 @@ private constructor(
currentBillingPeriodEndDate()
currentBillingPeriodStartDate()
endDate()
+ filter()
fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } }
price().validate()
startDate()
+ usageCustomerIds()
validated = true
}
@@ -5943,11 +5972,13 @@ private constructor(
private var currentBillingPeriodEndDate: JsonField? = null
private var currentBillingPeriodStartDate: JsonField? = null
private var endDate: JsonField? = null
+ private var filter: JsonField? = null
private var fixedFeeQuantityTransitions:
JsonField>? =
null
private var price: JsonField? = null
private var startDate: JsonField? = null
+ private var usageCustomerIds: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -5957,10 +5988,12 @@ private constructor(
currentBillingPeriodEndDate = priceInterval.currentBillingPeriodEndDate
currentBillingPeriodStartDate = priceInterval.currentBillingPeriodStartDate
endDate = priceInterval.endDate
+ filter = priceInterval.filter
fixedFeeQuantityTransitions =
priceInterval.fixedFeeQuantityTransitions.map { it.toMutableList() }
price = priceInterval.price
startDate = priceInterval.startDate
+ usageCustomerIds = priceInterval.usageCustomerIds.map { it.toMutableList() }
additionalProperties = priceInterval.additionalProperties.toMutableMap()
}
@@ -6046,6 +6079,15 @@ private constructor(
*/
fun endDate(endDate: JsonField) = apply { this.endDate = endDate }
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: String?) = filter(JsonField.ofNullable(filter))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: Optional) = filter(filter.orElse(null))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: JsonField) = apply { this.filter = filter }
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -6546,6 +6588,45 @@ private constructor(
this.startDate = startDate
}
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: List?) =
+ usageCustomerIds(JsonField.ofNullable(usageCustomerIds))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: Optional>) =
+ usageCustomerIds(usageCustomerIds.orElse(null))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: JsonField>) = apply {
+ this.usageCustomerIds = usageCustomerIds.map { it.toMutableList() }
+ }
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun addUsageCustomerId(usageCustomerId: String) = apply {
+ usageCustomerIds =
+ (usageCustomerIds ?: JsonField.of(mutableListOf())).apply {
+ asKnown()
+ .orElseThrow {
+ IllegalStateException(
+ "Field was set to non-list type: ${javaClass.simpleName}"
+ )
+ }
+ .add(usageCustomerId)
+ }
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -6572,11 +6653,13 @@ private constructor(
checkRequired("currentBillingPeriodEndDate", currentBillingPeriodEndDate),
checkRequired("currentBillingPeriodStartDate", currentBillingPeriodStartDate),
checkRequired("endDate", endDate),
+ checkRequired("filter", filter),
checkRequired("fixedFeeQuantityTransitions", fixedFeeQuantityTransitions).map {
it.toImmutable()
},
checkRequired("price", price),
checkRequired("startDate", startDate),
+ checkRequired("usageCustomerIds", usageCustomerIds).map { it.toImmutable() },
additionalProperties.toImmutable(),
)
}
@@ -6722,17 +6805,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && filter == other.filter && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && usageCustomerIds == other.usageCustomerIds && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, fixedFeeQuantityTransitions, price, startDate, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, filter, fixedFeeQuantityTransitions, price, startDate, usageCustomerIds, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, additionalProperties=$additionalProperties}"
+ "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, filter=$filter, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, usageCustomerIds=$usageCustomerIds, additionalProperties=$additionalProperties}"
}
@NoAutoDetect
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 478ba10e..ea64fb83 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
@@ -5754,6 +5754,9 @@ private constructor(
@JsonProperty("end_date")
@ExcludeMissing
private val endDate: JsonField = JsonMissing.of(),
+ @JsonProperty("filter")
+ @ExcludeMissing
+ private val filter: JsonField = JsonMissing.of(),
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
private val fixedFeeQuantityTransitions: JsonField> =
@@ -5764,6 +5767,9 @@ private constructor(
@JsonProperty("start_date")
@ExcludeMissing
private val startDate: JsonField = JsonMissing.of(),
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ private val usageCustomerIds: JsonField> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map = immutableEmptyMap(),
) {
@@ -5800,6 +5806,9 @@ private constructor(
fun endDate(): Optional =
Optional.ofNullable(endDate.getNullable("end_date"))
+ /** An additional filter to apply to usage queries. */
+ fun filter(): Optional = Optional.ofNullable(filter.getNullable("filter"))
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5829,6 +5838,13 @@ private constructor(
*/
fun startDate(): OffsetDateTime = startDate.getRequired("start_date")
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ fun usageCustomerIds(): Optional> =
+ Optional.ofNullable(usageCustomerIds.getNullable("usage_customer_ids"))
+
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
/** The day of the month that Orb bills for this price */
@@ -5863,6 +5879,9 @@ private constructor(
@ExcludeMissing
fun _endDate(): JsonField = endDate
+ /** An additional filter to apply to usage queries. */
+ @JsonProperty("filter") @ExcludeMissing fun _filter(): JsonField = filter
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5894,6 +5913,14 @@ private constructor(
@ExcludeMissing
fun _startDate(): JsonField = startDate
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ fun _usageCustomerIds(): JsonField> = usageCustomerIds
+
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
@@ -5910,9 +5937,11 @@ private constructor(
currentBillingPeriodEndDate()
currentBillingPeriodStartDate()
endDate()
+ filter()
fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } }
price().validate()
startDate()
+ usageCustomerIds()
validated = true
}
@@ -5931,11 +5960,13 @@ private constructor(
private var currentBillingPeriodEndDate: JsonField? = null
private var currentBillingPeriodStartDate: JsonField? = null
private var endDate: JsonField? = null
+ private var filter: JsonField? = null
private var fixedFeeQuantityTransitions:
JsonField>? =
null
private var price: JsonField? = null
private var startDate: JsonField? = null
+ private var usageCustomerIds: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -5945,10 +5976,12 @@ private constructor(
currentBillingPeriodEndDate = priceInterval.currentBillingPeriodEndDate
currentBillingPeriodStartDate = priceInterval.currentBillingPeriodStartDate
endDate = priceInterval.endDate
+ filter = priceInterval.filter
fixedFeeQuantityTransitions =
priceInterval.fixedFeeQuantityTransitions.map { it.toMutableList() }
price = priceInterval.price
startDate = priceInterval.startDate
+ usageCustomerIds = priceInterval.usageCustomerIds.map { it.toMutableList() }
additionalProperties = priceInterval.additionalProperties.toMutableMap()
}
@@ -6034,6 +6067,15 @@ private constructor(
*/
fun endDate(endDate: JsonField) = apply { this.endDate = endDate }
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: String?) = filter(JsonField.ofNullable(filter))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: Optional) = filter(filter.orElse(null))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: JsonField) = apply { this.filter = filter }
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -6534,6 +6576,45 @@ private constructor(
this.startDate = startDate
}
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: List?) =
+ usageCustomerIds(JsonField.ofNullable(usageCustomerIds))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: Optional>) =
+ usageCustomerIds(usageCustomerIds.orElse(null))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: JsonField>) = apply {
+ this.usageCustomerIds = usageCustomerIds.map { it.toMutableList() }
+ }
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun addUsageCustomerId(usageCustomerId: String) = apply {
+ usageCustomerIds =
+ (usageCustomerIds ?: JsonField.of(mutableListOf())).apply {
+ asKnown()
+ .orElseThrow {
+ IllegalStateException(
+ "Field was set to non-list type: ${javaClass.simpleName}"
+ )
+ }
+ .add(usageCustomerId)
+ }
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -6560,11 +6641,13 @@ private constructor(
checkRequired("currentBillingPeriodEndDate", currentBillingPeriodEndDate),
checkRequired("currentBillingPeriodStartDate", currentBillingPeriodStartDate),
checkRequired("endDate", endDate),
+ checkRequired("filter", filter),
checkRequired("fixedFeeQuantityTransitions", fixedFeeQuantityTransitions).map {
it.toImmutable()
},
checkRequired("price", price),
checkRequired("startDate", startDate),
+ checkRequired("usageCustomerIds", usageCustomerIds).map { it.toImmutable() },
additionalProperties.toImmutable(),
)
}
@@ -6710,17 +6793,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && filter == other.filter && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && usageCustomerIds == other.usageCustomerIds && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, fixedFeeQuantityTransitions, price, startDate, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, filter, fixedFeeQuantityTransitions, price, startDate, usageCustomerIds, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, additionalProperties=$additionalProperties}"
+ "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, filter=$filter, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, usageCustomerIds=$usageCustomerIds, additionalProperties=$additionalProperties}"
}
@NoAutoDetect
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 677e17bf..37bc79ee 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
@@ -5754,6 +5754,9 @@ private constructor(
@JsonProperty("end_date")
@ExcludeMissing
private val endDate: JsonField = JsonMissing.of(),
+ @JsonProperty("filter")
+ @ExcludeMissing
+ private val filter: JsonField = JsonMissing.of(),
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
private val fixedFeeQuantityTransitions: JsonField> =
@@ -5764,6 +5767,9 @@ private constructor(
@JsonProperty("start_date")
@ExcludeMissing
private val startDate: JsonField = JsonMissing.of(),
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ private val usageCustomerIds: JsonField> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map = immutableEmptyMap(),
) {
@@ -5800,6 +5806,9 @@ private constructor(
fun endDate(): Optional =
Optional.ofNullable(endDate.getNullable("end_date"))
+ /** An additional filter to apply to usage queries. */
+ fun filter(): Optional = Optional.ofNullable(filter.getNullable("filter"))
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5829,6 +5838,13 @@ private constructor(
*/
fun startDate(): OffsetDateTime = startDate.getRequired("start_date")
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ fun usageCustomerIds(): Optional> =
+ Optional.ofNullable(usageCustomerIds.getNullable("usage_customer_ids"))
+
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
/** The day of the month that Orb bills for this price */
@@ -5863,6 +5879,9 @@ private constructor(
@ExcludeMissing
fun _endDate(): JsonField = endDate
+ /** An additional filter to apply to usage queries. */
+ @JsonProperty("filter") @ExcludeMissing fun _filter(): JsonField = filter
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5894,6 +5913,14 @@ private constructor(
@ExcludeMissing
fun _startDate(): JsonField = startDate
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ fun _usageCustomerIds(): JsonField> = usageCustomerIds
+
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
@@ -5910,9 +5937,11 @@ private constructor(
currentBillingPeriodEndDate()
currentBillingPeriodStartDate()
endDate()
+ filter()
fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } }
price().validate()
startDate()
+ usageCustomerIds()
validated = true
}
@@ -5931,11 +5960,13 @@ private constructor(
private var currentBillingPeriodEndDate: JsonField? = null
private var currentBillingPeriodStartDate: JsonField? = null
private var endDate: JsonField? = null
+ private var filter: JsonField? = null
private var fixedFeeQuantityTransitions:
JsonField>? =
null
private var price: JsonField? = null
private var startDate: JsonField? = null
+ private var usageCustomerIds: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -5945,10 +5976,12 @@ private constructor(
currentBillingPeriodEndDate = priceInterval.currentBillingPeriodEndDate
currentBillingPeriodStartDate = priceInterval.currentBillingPeriodStartDate
endDate = priceInterval.endDate
+ filter = priceInterval.filter
fixedFeeQuantityTransitions =
priceInterval.fixedFeeQuantityTransitions.map { it.toMutableList() }
price = priceInterval.price
startDate = priceInterval.startDate
+ usageCustomerIds = priceInterval.usageCustomerIds.map { it.toMutableList() }
additionalProperties = priceInterval.additionalProperties.toMutableMap()
}
@@ -6034,6 +6067,15 @@ private constructor(
*/
fun endDate(endDate: JsonField) = apply { this.endDate = endDate }
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: String?) = filter(JsonField.ofNullable(filter))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: Optional) = filter(filter.orElse(null))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: JsonField) = apply { this.filter = filter }
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -6534,6 +6576,45 @@ private constructor(
this.startDate = startDate
}
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: List?) =
+ usageCustomerIds(JsonField.ofNullable(usageCustomerIds))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: Optional>) =
+ usageCustomerIds(usageCustomerIds.orElse(null))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: JsonField>) = apply {
+ this.usageCustomerIds = usageCustomerIds.map { it.toMutableList() }
+ }
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun addUsageCustomerId(usageCustomerId: String) = apply {
+ usageCustomerIds =
+ (usageCustomerIds ?: JsonField.of(mutableListOf())).apply {
+ asKnown()
+ .orElseThrow {
+ IllegalStateException(
+ "Field was set to non-list type: ${javaClass.simpleName}"
+ )
+ }
+ .add(usageCustomerId)
+ }
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -6560,11 +6641,13 @@ private constructor(
checkRequired("currentBillingPeriodEndDate", currentBillingPeriodEndDate),
checkRequired("currentBillingPeriodStartDate", currentBillingPeriodStartDate),
checkRequired("endDate", endDate),
+ checkRequired("filter", filter),
checkRequired("fixedFeeQuantityTransitions", fixedFeeQuantityTransitions).map {
it.toImmutable()
},
checkRequired("price", price),
checkRequired("startDate", startDate),
+ checkRequired("usageCustomerIds", usageCustomerIds).map { it.toImmutable() },
additionalProperties.toImmutable(),
)
}
@@ -6710,17 +6793,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && filter == other.filter && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && usageCustomerIds == other.usageCustomerIds && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, fixedFeeQuantityTransitions, price, startDate, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, filter, fixedFeeQuantityTransitions, price, startDate, usageCustomerIds, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, additionalProperties=$additionalProperties}"
+ "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, filter=$filter, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, usageCustomerIds=$usageCustomerIds, additionalProperties=$additionalProperties}"
}
@NoAutoDetect
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParams.kt
index 47ea344b..3dcd1992 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParams.kt
@@ -710,6 +710,9 @@ private constructor(
@JsonProperty("external_price_id")
@ExcludeMissing
private val externalPriceId: JsonField = JsonMissing.of(),
+ @JsonProperty("filter")
+ @ExcludeMissing
+ private val filter: JsonField = JsonMissing.of(),
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
private val fixedFeeQuantityTransitions: JsonField> =
@@ -726,6 +729,9 @@ private constructor(
@JsonProperty("price_id")
@ExcludeMissing
private val priceId: JsonField = JsonMissing.of(),
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ private val usageCustomerIds: JsonField> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map = immutableEmptyMap(),
) {
@@ -754,6 +760,13 @@ private constructor(
fun externalPriceId(): Optional =
Optional.ofNullable(externalPriceId.getNullable("external_price_id"))
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ fun filter(): Optional = Optional.ofNullable(filter.getNullable("filter"))
+
/** A list of fixed fee quantity transitions to initialize on the price interval. */
fun fixedFeeQuantityTransitions(): Optional> =
Optional.ofNullable(
@@ -780,6 +793,16 @@ private constructor(
/** The id of the price to add to the subscription. */
fun priceId(): Optional = Optional.ofNullable(priceId.getNullable("price_id"))
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with its
+ * attached customer's customer_id. When usage_customer_ids is provided, the subscription
+ * includes usage events from the specified customers only. Provided usage_customer_ids must
+ * be either the customer for this subscription itself, or any of that customer's children.
+ */
+ fun usageCustomerIds(): Optional> =
+ Optional.ofNullable(usageCustomerIds.getNullable("usage_customer_ids"))
+
/**
* The start date of the price interval. This is the date that the price will start billing
* on the subscription.
@@ -809,6 +832,13 @@ private constructor(
@ExcludeMissing
fun _externalPriceId(): JsonField = externalPriceId
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ @JsonProperty("filter") @ExcludeMissing fun _filter(): JsonField = filter
+
/** A list of fixed fee quantity transitions to initialize on the price interval. */
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
@@ -837,6 +867,17 @@ private constructor(
/** The id of the price to add to the subscription. */
@JsonProperty("price_id") @ExcludeMissing fun _priceId(): JsonField = priceId
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with its
+ * attached customer's customer_id. When usage_customer_ids is provided, the subscription
+ * includes usage events from the specified customers only. Provided usage_customer_ids must
+ * be either the customer for this subscription itself, or any of that customer's children.
+ */
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ fun _usageCustomerIds(): JsonField> = usageCustomerIds
+
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
@@ -853,11 +894,13 @@ private constructor(
discounts().ifPresent { it.forEach { it.validate() } }
endDate().ifPresent { it.validate() }
externalPriceId()
+ filter()
fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } }
maximumAmount()
minimumAmount()
price().ifPresent { it.validate() }
priceId()
+ usageCustomerIds()
validated = true
}
@@ -876,6 +919,7 @@ private constructor(
private var discounts: JsonField>? = null
private var endDate: JsonField = JsonMissing.of()
private var externalPriceId: JsonField = JsonMissing.of()
+ private var filter: JsonField = JsonMissing.of()
private var fixedFeeQuantityTransitions:
JsonField>? =
null
@@ -883,6 +927,7 @@ private constructor(
private var minimumAmount: JsonField = JsonMissing.of()
private var price: JsonField = JsonMissing.of()
private var priceId: JsonField = JsonMissing.of()
+ private var usageCustomerIds: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -892,12 +937,14 @@ private constructor(
discounts = add.discounts.map { it.toMutableList() }
endDate = add.endDate
externalPriceId = add.externalPriceId
+ filter = add.filter
fixedFeeQuantityTransitions =
add.fixedFeeQuantityTransitions.map { it.toMutableList() }
maximumAmount = add.maximumAmount
minimumAmount = add.minimumAmount
price = add.price
priceId = add.priceId
+ usageCustomerIds = add.usageCustomerIds.map { it.toMutableList() }
additionalProperties = add.additionalProperties.toMutableMap()
}
@@ -1066,6 +1113,27 @@ private constructor(
this.externalPriceId = externalPriceId
}
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ fun filter(filter: String?) = filter(JsonField.ofNullable(filter))
+
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ fun filter(filter: Optional) = filter(filter.orElse(null))
+
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ fun filter(filter: JsonField) = apply { this.filter = filter }
+
/** A list of fixed fee quantity transitions to initialize on the price interval. */
fun fixedFeeQuantityTransitions(
fixedFeeQuantityTransitions: List?
@@ -1324,6 +1392,61 @@ private constructor(
/** The id of the price to add to the subscription. */
fun priceId(priceId: JsonField) = apply { this.priceId = priceId }
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with
+ * its attached customer's customer_id. When usage_customer_ids is provided, the
+ * subscription includes usage events from the specified customers only. Provided
+ * usage_customer_ids must be either the customer for this subscription itself, or any
+ * of that customer's children.
+ */
+ fun usageCustomerIds(usageCustomerIds: List?) =
+ usageCustomerIds(JsonField.ofNullable(usageCustomerIds))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with
+ * its attached customer's customer_id. When usage_customer_ids is provided, the
+ * subscription includes usage events from the specified customers only. Provided
+ * usage_customer_ids must be either the customer for this subscription itself, or any
+ * of that customer's children.
+ */
+ fun usageCustomerIds(usageCustomerIds: Optional>) =
+ usageCustomerIds(usageCustomerIds.orElse(null))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with
+ * its attached customer's customer_id. When usage_customer_ids is provided, the
+ * subscription includes usage events from the specified customers only. Provided
+ * usage_customer_ids must be either the customer for this subscription itself, or any
+ * of that customer's children.
+ */
+ fun usageCustomerIds(usageCustomerIds: JsonField>) = apply {
+ this.usageCustomerIds = usageCustomerIds.map { it.toMutableList() }
+ }
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with
+ * its attached customer's customer_id. When usage_customer_ids is provided, the
+ * subscription includes usage events from the specified customers only. Provided
+ * usage_customer_ids must be either the customer for this subscription itself, or any
+ * of that customer's children.
+ */
+ fun addUsageCustomerId(usageCustomerId: String) = apply {
+ usageCustomerIds =
+ (usageCustomerIds ?: JsonField.of(mutableListOf())).apply {
+ asKnown()
+ .orElseThrow {
+ IllegalStateException(
+ "Field was set to non-list type: ${javaClass.simpleName}"
+ )
+ }
+ .add(usageCustomerId)
+ }
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -1350,11 +1473,13 @@ private constructor(
(discounts ?: JsonMissing.of()).map { it.toImmutable() },
endDate,
externalPriceId,
+ filter,
(fixedFeeQuantityTransitions ?: JsonMissing.of()).map { it.toImmutable() },
maximumAmount,
minimumAmount,
price,
priceId,
+ (usageCustomerIds ?: JsonMissing.of()).map { it.toImmutable() },
additionalProperties.toImmutable(),
)
}
@@ -48415,17 +48540,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is Add && startDate == other.startDate && allocationPrice == other.allocationPrice && discounts == other.discounts && endDate == other.endDate && externalPriceId == other.externalPriceId && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && maximumAmount == other.maximumAmount && minimumAmount == other.minimumAmount && price == other.price && priceId == other.priceId && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is Add && startDate == other.startDate && allocationPrice == other.allocationPrice && discounts == other.discounts && endDate == other.endDate && externalPriceId == other.externalPriceId && filter == other.filter && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && maximumAmount == other.maximumAmount && minimumAmount == other.minimumAmount && price == other.price && priceId == other.priceId && usageCustomerIds == other.usageCustomerIds && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(startDate, allocationPrice, discounts, endDate, externalPriceId, fixedFeeQuantityTransitions, maximumAmount, minimumAmount, price, priceId, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(startDate, allocationPrice, discounts, endDate, externalPriceId, filter, fixedFeeQuantityTransitions, maximumAmount, minimumAmount, price, priceId, usageCustomerIds, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "Add{startDate=$startDate, allocationPrice=$allocationPrice, discounts=$discounts, endDate=$endDate, externalPriceId=$externalPriceId, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, maximumAmount=$maximumAmount, minimumAmount=$minimumAmount, price=$price, priceId=$priceId, additionalProperties=$additionalProperties}"
+ "Add{startDate=$startDate, allocationPrice=$allocationPrice, discounts=$discounts, endDate=$endDate, externalPriceId=$externalPriceId, filter=$filter, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, maximumAmount=$maximumAmount, minimumAmount=$minimumAmount, price=$price, priceId=$priceId, usageCustomerIds=$usageCustomerIds, additionalProperties=$additionalProperties}"
}
@NoAutoDetect
@@ -50744,6 +50869,9 @@ private constructor(
@JsonProperty("end_date")
@ExcludeMissing
private val endDate: JsonField = JsonMissing.of(),
+ @JsonProperty("filter")
+ @ExcludeMissing
+ private val filter: JsonField = JsonMissing.of(),
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
private val fixedFeeQuantityTransitions: JsonField> =
@@ -50751,6 +50879,9 @@ private constructor(
@JsonProperty("start_date")
@ExcludeMissing
private val startDate: JsonField = JsonMissing.of(),
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ private val usageCustomerIds: JsonField> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map = immutableEmptyMap(),
) {
@@ -50772,6 +50903,13 @@ private constructor(
*/
fun endDate(): Optional = Optional.ofNullable(endDate.getNullable("end_date"))
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ fun filter(): Optional = Optional.ofNullable(filter.getNullable("filter"))
+
/**
* A list of fixed fee quantity transitions to use for this price interval. Note that this
* list will overwrite all existing fixed fee quantity transitions on the price interval.
@@ -50788,6 +50926,16 @@ private constructor(
fun startDate(): Optional =
Optional.ofNullable(startDate.getNullable("start_date"))
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with its
+ * attached customer's customer_id. When usage_customer_ids is provided, the subscription
+ * includes usage events from the specified customers only. Provided usage_customer_ids must
+ * be either the customer for this subscription itself, or any of that customer's children.
+ */
+ fun usageCustomerIds(): Optional> =
+ Optional.ofNullable(usageCustomerIds.getNullable("usage_customer_ids"))
+
/** The id of the price interval to edit. */
@JsonProperty("price_interval_id")
@ExcludeMissing
@@ -50808,6 +50956,13 @@ private constructor(
*/
@JsonProperty("end_date") @ExcludeMissing fun _endDate(): JsonField = endDate
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ @JsonProperty("filter") @ExcludeMissing fun _filter(): JsonField = filter
+
/**
* A list of fixed fee quantity transitions to use for this price interval. Note that this
* list will overwrite all existing fixed fee quantity transitions on the price interval.
@@ -50825,6 +50980,17 @@ private constructor(
@ExcludeMissing
fun _startDate(): JsonField = startDate
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with its
+ * attached customer's customer_id. When usage_customer_ids is provided, the subscription
+ * includes usage events from the specified customers only. Provided usage_customer_ids must
+ * be either the customer for this subscription itself, or any of that customer's children.
+ */
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ fun _usageCustomerIds(): JsonField> = usageCustomerIds
+
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
@@ -50839,8 +51005,10 @@ private constructor(
priceIntervalId()
billingCycleDay()
endDate().ifPresent { it.validate() }
+ filter()
fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } }
startDate().ifPresent { it.validate() }
+ usageCustomerIds()
validated = true
}
@@ -50857,10 +51025,12 @@ private constructor(
private var priceIntervalId: JsonField? = null
private var billingCycleDay: JsonField = JsonMissing.of()
private var endDate: JsonField = JsonMissing.of()
+ private var filter: JsonField = JsonMissing.of()
private var fixedFeeQuantityTransitions:
JsonField>? =
null
private var startDate: JsonField = JsonMissing.of()
+ private var usageCustomerIds: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -50868,9 +51038,11 @@ private constructor(
priceIntervalId = edit.priceIntervalId
billingCycleDay = edit.billingCycleDay
endDate = edit.endDate
+ filter = edit.filter
fixedFeeQuantityTransitions =
edit.fixedFeeQuantityTransitions.map { it.toMutableList() }
startDate = edit.startDate
+ usageCustomerIds = edit.usageCustomerIds.map { it.toMutableList() }
additionalProperties = edit.additionalProperties.toMutableMap()
}
@@ -50947,6 +51119,27 @@ private constructor(
fun endDate(billingCycleRelative: BillingCycleRelativeDate) =
endDate(EndDate.ofBillingCycleRelative(billingCycleRelative))
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ fun filter(filter: String?) = filter(JsonField.ofNullable(filter))
+
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ fun filter(filter: Optional) = filter(filter.orElse(null))
+
+ /**
+ * An additional filter to apply to usage queries. This filter must be expressed as a
+ * boolean [computed property](/extensibility/advanced-metrics#computed-properties). If
+ * null, usage queries will not include any additional filter.
+ */
+ fun filter(filter: JsonField) = apply { this.filter = filter }
+
/**
* A list of fixed fee quantity transitions to use for this price interval. Note that
* this list will overwrite all existing fixed fee quantity transitions on the price
@@ -51022,6 +51215,61 @@ private constructor(
fun startDate(billingCycleRelative: BillingCycleRelativeDate) =
startDate(StartDate.ofBillingCycleRelative(billingCycleRelative))
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with
+ * its attached customer's customer_id. When usage_customer_ids is provided, the
+ * subscription includes usage events from the specified customers only. Provided
+ * usage_customer_ids must be either the customer for this subscription itself, or any
+ * of that customer's children.
+ */
+ fun usageCustomerIds(usageCustomerIds: List?) =
+ usageCustomerIds(JsonField.ofNullable(usageCustomerIds))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with
+ * its attached customer's customer_id. When usage_customer_ids is provided, the
+ * subscription includes usage events from the specified customers only. Provided
+ * usage_customer_ids must be either the customer for this subscription itself, or any
+ * of that customer's children.
+ */
+ fun usageCustomerIds(usageCustomerIds: Optional>) =
+ usageCustomerIds(usageCustomerIds.orElse(null))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with
+ * its attached customer's customer_id. When usage_customer_ids is provided, the
+ * subscription includes usage events from the specified customers only. Provided
+ * usage_customer_ids must be either the customer for this subscription itself, or any
+ * of that customer's children.
+ */
+ fun usageCustomerIds(usageCustomerIds: JsonField>) = apply {
+ this.usageCustomerIds = usageCustomerIds.map { it.toMutableList() }
+ }
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * subscription. By default, a subscription only considers usage events associated with
+ * its attached customer's customer_id. When usage_customer_ids is provided, the
+ * subscription includes usage events from the specified customers only. Provided
+ * usage_customer_ids must be either the customer for this subscription itself, or any
+ * of that customer's children.
+ */
+ fun addUsageCustomerId(usageCustomerId: String) = apply {
+ usageCustomerIds =
+ (usageCustomerIds ?: JsonField.of(mutableListOf())).apply {
+ asKnown()
+ .orElseThrow {
+ IllegalStateException(
+ "Field was set to non-list type: ${javaClass.simpleName}"
+ )
+ }
+ .add(usageCustomerId)
+ }
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -51046,8 +51294,10 @@ private constructor(
checkRequired("priceIntervalId", priceIntervalId),
billingCycleDay,
endDate,
+ filter,
(fixedFeeQuantityTransitions ?: JsonMissing.of()).map { it.toImmutable() },
startDate,
+ (usageCustomerIds ?: JsonMissing.of()).map { it.toImmutable() },
additionalProperties.toImmutable(),
)
}
@@ -51474,17 +51724,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is Edit && priceIntervalId == other.priceIntervalId && billingCycleDay == other.billingCycleDay && endDate == other.endDate && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && startDate == other.startDate && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is Edit && priceIntervalId == other.priceIntervalId && billingCycleDay == other.billingCycleDay && endDate == other.endDate && filter == other.filter && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && startDate == other.startDate && usageCustomerIds == other.usageCustomerIds && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(priceIntervalId, billingCycleDay, endDate, fixedFeeQuantityTransitions, startDate, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(priceIntervalId, billingCycleDay, endDate, filter, fixedFeeQuantityTransitions, startDate, usageCustomerIds, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "Edit{priceIntervalId=$priceIntervalId, billingCycleDay=$billingCycleDay, endDate=$endDate, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, startDate=$startDate, additionalProperties=$additionalProperties}"
+ "Edit{priceIntervalId=$priceIntervalId, billingCycleDay=$billingCycleDay, endDate=$endDate, filter=$filter, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, startDate=$startDate, usageCustomerIds=$usageCustomerIds, additionalProperties=$additionalProperties}"
}
@NoAutoDetect
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 d8427e44..836dbef2 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
@@ -5763,6 +5763,9 @@ private constructor(
@JsonProperty("end_date")
@ExcludeMissing
private val endDate: JsonField = JsonMissing.of(),
+ @JsonProperty("filter")
+ @ExcludeMissing
+ private val filter: JsonField = JsonMissing.of(),
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
private val fixedFeeQuantityTransitions: JsonField> =
@@ -5773,6 +5776,9 @@ private constructor(
@JsonProperty("start_date")
@ExcludeMissing
private val startDate: JsonField = JsonMissing.of(),
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ private val usageCustomerIds: JsonField> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map = immutableEmptyMap(),
) {
@@ -5809,6 +5815,9 @@ private constructor(
fun endDate(): Optional =
Optional.ofNullable(endDate.getNullable("end_date"))
+ /** An additional filter to apply to usage queries. */
+ fun filter(): Optional = Optional.ofNullable(filter.getNullable("filter"))
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5838,6 +5847,13 @@ private constructor(
*/
fun startDate(): OffsetDateTime = startDate.getRequired("start_date")
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ fun usageCustomerIds(): Optional> =
+ Optional.ofNullable(usageCustomerIds.getNullable("usage_customer_ids"))
+
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
/** The day of the month that Orb bills for this price */
@@ -5872,6 +5888,9 @@ private constructor(
@ExcludeMissing
fun _endDate(): JsonField = endDate
+ /** An additional filter to apply to usage queries. */
+ @JsonProperty("filter") @ExcludeMissing fun _filter(): JsonField = filter
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5903,6 +5922,14 @@ private constructor(
@ExcludeMissing
fun _startDate(): JsonField = startDate
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ fun _usageCustomerIds(): JsonField> = usageCustomerIds
+
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
@@ -5919,9 +5946,11 @@ private constructor(
currentBillingPeriodEndDate()
currentBillingPeriodStartDate()
endDate()
+ filter()
fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } }
price().validate()
startDate()
+ usageCustomerIds()
validated = true
}
@@ -5940,11 +5969,13 @@ private constructor(
private var currentBillingPeriodEndDate: JsonField? = null
private var currentBillingPeriodStartDate: JsonField? = null
private var endDate: JsonField? = null
+ private var filter: JsonField? = null
private var fixedFeeQuantityTransitions:
JsonField>? =
null
private var price: JsonField? = null
private var startDate: JsonField? = null
+ private var usageCustomerIds: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -5954,10 +5985,12 @@ private constructor(
currentBillingPeriodEndDate = priceInterval.currentBillingPeriodEndDate
currentBillingPeriodStartDate = priceInterval.currentBillingPeriodStartDate
endDate = priceInterval.endDate
+ filter = priceInterval.filter
fixedFeeQuantityTransitions =
priceInterval.fixedFeeQuantityTransitions.map { it.toMutableList() }
price = priceInterval.price
startDate = priceInterval.startDate
+ usageCustomerIds = priceInterval.usageCustomerIds.map { it.toMutableList() }
additionalProperties = priceInterval.additionalProperties.toMutableMap()
}
@@ -6043,6 +6076,15 @@ private constructor(
*/
fun endDate(endDate: JsonField) = apply { this.endDate = endDate }
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: String?) = filter(JsonField.ofNullable(filter))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: Optional) = filter(filter.orElse(null))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: JsonField) = apply { this.filter = filter }
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -6543,6 +6585,45 @@ private constructor(
this.startDate = startDate
}
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: List?) =
+ usageCustomerIds(JsonField.ofNullable(usageCustomerIds))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: Optional>) =
+ usageCustomerIds(usageCustomerIds.orElse(null))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: JsonField>) = apply {
+ this.usageCustomerIds = usageCustomerIds.map { it.toMutableList() }
+ }
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun addUsageCustomerId(usageCustomerId: String) = apply {
+ usageCustomerIds =
+ (usageCustomerIds ?: JsonField.of(mutableListOf())).apply {
+ asKnown()
+ .orElseThrow {
+ IllegalStateException(
+ "Field was set to non-list type: ${javaClass.simpleName}"
+ )
+ }
+ .add(usageCustomerId)
+ }
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -6569,11 +6650,13 @@ private constructor(
checkRequired("currentBillingPeriodEndDate", currentBillingPeriodEndDate),
checkRequired("currentBillingPeriodStartDate", currentBillingPeriodStartDate),
checkRequired("endDate", endDate),
+ checkRequired("filter", filter),
checkRequired("fixedFeeQuantityTransitions", fixedFeeQuantityTransitions).map {
it.toImmutable()
},
checkRequired("price", price),
checkRequired("startDate", startDate),
+ checkRequired("usageCustomerIds", usageCustomerIds).map { it.toImmutable() },
additionalProperties.toImmutable(),
)
}
@@ -6719,17 +6802,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && filter == other.filter && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && usageCustomerIds == other.usageCustomerIds && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, fixedFeeQuantityTransitions, price, startDate, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, filter, fixedFeeQuantityTransitions, price, startDate, usageCustomerIds, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, additionalProperties=$additionalProperties}"
+ "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, filter=$filter, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, usageCustomerIds=$usageCustomerIds, additionalProperties=$additionalProperties}"
}
@NoAutoDetect
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 b0131e78..39c24e8d 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
@@ -5764,6 +5764,9 @@ private constructor(
@JsonProperty("end_date")
@ExcludeMissing
private val endDate: JsonField = JsonMissing.of(),
+ @JsonProperty("filter")
+ @ExcludeMissing
+ private val filter: JsonField = JsonMissing.of(),
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
private val fixedFeeQuantityTransitions: JsonField> =
@@ -5774,6 +5777,9 @@ private constructor(
@JsonProperty("start_date")
@ExcludeMissing
private val startDate: JsonField = JsonMissing.of(),
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ private val usageCustomerIds: JsonField> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map = immutableEmptyMap(),
) {
@@ -5810,6 +5816,9 @@ private constructor(
fun endDate(): Optional =
Optional.ofNullable(endDate.getNullable("end_date"))
+ /** An additional filter to apply to usage queries. */
+ fun filter(): Optional = Optional.ofNullable(filter.getNullable("filter"))
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5839,6 +5848,13 @@ private constructor(
*/
fun startDate(): OffsetDateTime = startDate.getRequired("start_date")
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ fun usageCustomerIds(): Optional> =
+ Optional.ofNullable(usageCustomerIds.getNullable("usage_customer_ids"))
+
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
/** The day of the month that Orb bills for this price */
@@ -5873,6 +5889,9 @@ private constructor(
@ExcludeMissing
fun _endDate(): JsonField = endDate
+ /** An additional filter to apply to usage queries. */
+ @JsonProperty("filter") @ExcludeMissing fun _filter(): JsonField = filter
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5904,6 +5923,14 @@ private constructor(
@ExcludeMissing
fun _startDate(): JsonField = startDate
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ fun _usageCustomerIds(): JsonField> = usageCustomerIds
+
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
@@ -5920,9 +5947,11 @@ private constructor(
currentBillingPeriodEndDate()
currentBillingPeriodStartDate()
endDate()
+ filter()
fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } }
price().validate()
startDate()
+ usageCustomerIds()
validated = true
}
@@ -5941,11 +5970,13 @@ private constructor(
private var currentBillingPeriodEndDate: JsonField? = null
private var currentBillingPeriodStartDate: JsonField? = null
private var endDate: JsonField? = null
+ private var filter: JsonField? = null
private var fixedFeeQuantityTransitions:
JsonField>? =
null
private var price: JsonField? = null
private var startDate: JsonField? = null
+ private var usageCustomerIds: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -5955,10 +5986,12 @@ private constructor(
currentBillingPeriodEndDate = priceInterval.currentBillingPeriodEndDate
currentBillingPeriodStartDate = priceInterval.currentBillingPeriodStartDate
endDate = priceInterval.endDate
+ filter = priceInterval.filter
fixedFeeQuantityTransitions =
priceInterval.fixedFeeQuantityTransitions.map { it.toMutableList() }
price = priceInterval.price
startDate = priceInterval.startDate
+ usageCustomerIds = priceInterval.usageCustomerIds.map { it.toMutableList() }
additionalProperties = priceInterval.additionalProperties.toMutableMap()
}
@@ -6044,6 +6077,15 @@ private constructor(
*/
fun endDate(endDate: JsonField) = apply { this.endDate = endDate }
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: String?) = filter(JsonField.ofNullable(filter))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: Optional) = filter(filter.orElse(null))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: JsonField) = apply { this.filter = filter }
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -6544,6 +6586,45 @@ private constructor(
this.startDate = startDate
}
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: List?) =
+ usageCustomerIds(JsonField.ofNullable(usageCustomerIds))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: Optional>) =
+ usageCustomerIds(usageCustomerIds.orElse(null))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: JsonField>) = apply {
+ this.usageCustomerIds = usageCustomerIds.map { it.toMutableList() }
+ }
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun addUsageCustomerId(usageCustomerId: String) = apply {
+ usageCustomerIds =
+ (usageCustomerIds ?: JsonField.of(mutableListOf())).apply {
+ asKnown()
+ .orElseThrow {
+ IllegalStateException(
+ "Field was set to non-list type: ${javaClass.simpleName}"
+ )
+ }
+ .add(usageCustomerId)
+ }
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -6570,11 +6651,13 @@ private constructor(
checkRequired("currentBillingPeriodEndDate", currentBillingPeriodEndDate),
checkRequired("currentBillingPeriodStartDate", currentBillingPeriodStartDate),
checkRequired("endDate", endDate),
+ checkRequired("filter", filter),
checkRequired("fixedFeeQuantityTransitions", fixedFeeQuantityTransitions).map {
it.toImmutable()
},
checkRequired("price", price),
checkRequired("startDate", startDate),
+ checkRequired("usageCustomerIds", usageCustomerIds).map { it.toImmutable() },
additionalProperties.toImmutable(),
)
}
@@ -6720,17 +6803,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && filter == other.filter && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && usageCustomerIds == other.usageCustomerIds && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, fixedFeeQuantityTransitions, price, startDate, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, filter, fixedFeeQuantityTransitions, price, startDate, usageCustomerIds, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, additionalProperties=$additionalProperties}"
+ "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, filter=$filter, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, usageCustomerIds=$usageCustomerIds, additionalProperties=$additionalProperties}"
}
@NoAutoDetect
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 6953bd75..186ec4c4 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
@@ -5761,6 +5761,9 @@ private constructor(
@JsonProperty("end_date")
@ExcludeMissing
private val endDate: JsonField = JsonMissing.of(),
+ @JsonProperty("filter")
+ @ExcludeMissing
+ private val filter: JsonField = JsonMissing.of(),
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
private val fixedFeeQuantityTransitions: JsonField> =
@@ -5771,6 +5774,9 @@ private constructor(
@JsonProperty("start_date")
@ExcludeMissing
private val startDate: JsonField = JsonMissing.of(),
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ private val usageCustomerIds: JsonField> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map = immutableEmptyMap(),
) {
@@ -5807,6 +5813,9 @@ private constructor(
fun endDate(): Optional =
Optional.ofNullable(endDate.getNullable("end_date"))
+ /** An additional filter to apply to usage queries. */
+ fun filter(): Optional = Optional.ofNullable(filter.getNullable("filter"))
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5836,6 +5845,13 @@ private constructor(
*/
fun startDate(): OffsetDateTime = startDate.getRequired("start_date")
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ fun usageCustomerIds(): Optional> =
+ Optional.ofNullable(usageCustomerIds.getNullable("usage_customer_ids"))
+
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
/** The day of the month that Orb bills for this price */
@@ -5870,6 +5886,9 @@ private constructor(
@ExcludeMissing
fun _endDate(): JsonField = endDate
+ /** An additional filter to apply to usage queries. */
+ @JsonProperty("filter") @ExcludeMissing fun _filter(): JsonField = filter
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -5901,6 +5920,14 @@ private constructor(
@ExcludeMissing
fun _startDate(): JsonField = startDate
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this price
+ * interval.
+ */
+ @JsonProperty("usage_customer_ids")
+ @ExcludeMissing
+ fun _usageCustomerIds(): JsonField> = usageCustomerIds
+
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
@@ -5917,9 +5944,11 @@ private constructor(
currentBillingPeriodEndDate()
currentBillingPeriodStartDate()
endDate()
+ filter()
fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } }
price().validate()
startDate()
+ usageCustomerIds()
validated = true
}
@@ -5938,11 +5967,13 @@ private constructor(
private var currentBillingPeriodEndDate: JsonField? = null
private var currentBillingPeriodStartDate: JsonField? = null
private var endDate: JsonField? = null
+ private var filter: JsonField? = null
private var fixedFeeQuantityTransitions:
JsonField>? =
null
private var price: JsonField? = null
private var startDate: JsonField? = null
+ private var usageCustomerIds: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -5952,10 +5983,12 @@ private constructor(
currentBillingPeriodEndDate = priceInterval.currentBillingPeriodEndDate
currentBillingPeriodStartDate = priceInterval.currentBillingPeriodStartDate
endDate = priceInterval.endDate
+ filter = priceInterval.filter
fixedFeeQuantityTransitions =
priceInterval.fixedFeeQuantityTransitions.map { it.toMutableList() }
price = priceInterval.price
startDate = priceInterval.startDate
+ usageCustomerIds = priceInterval.usageCustomerIds.map { it.toMutableList() }
additionalProperties = priceInterval.additionalProperties.toMutableMap()
}
@@ -6041,6 +6074,15 @@ private constructor(
*/
fun endDate(endDate: JsonField) = apply { this.endDate = endDate }
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: String?) = filter(JsonField.ofNullable(filter))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: Optional) = filter(filter.orElse(null))
+
+ /** An additional filter to apply to usage queries. */
+ fun filter(filter: JsonField) = apply { this.filter = filter }
+
/**
* The fixed fee quantity transitions for this price interval. This is only relevant for
* fixed fees.
@@ -6541,6 +6583,45 @@ private constructor(
this.startDate = startDate
}
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: List?) =
+ usageCustomerIds(JsonField.ofNullable(usageCustomerIds))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: Optional>) =
+ usageCustomerIds(usageCustomerIds.orElse(null))
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun usageCustomerIds(usageCustomerIds: JsonField>) = apply {
+ this.usageCustomerIds = usageCustomerIds.map { it.toMutableList() }
+ }
+
+ /**
+ * A list of customer IDs whose usage events will be aggregated and billed under this
+ * price interval.
+ */
+ fun addUsageCustomerId(usageCustomerId: String) = apply {
+ usageCustomerIds =
+ (usageCustomerIds ?: JsonField.of(mutableListOf())).apply {
+ asKnown()
+ .orElseThrow {
+ IllegalStateException(
+ "Field was set to non-list type: ${javaClass.simpleName}"
+ )
+ }
+ .add(usageCustomerId)
+ }
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -6567,11 +6648,13 @@ private constructor(
checkRequired("currentBillingPeriodEndDate", currentBillingPeriodEndDate),
checkRequired("currentBillingPeriodStartDate", currentBillingPeriodStartDate),
checkRequired("endDate", endDate),
+ checkRequired("filter", filter),
checkRequired("fixedFeeQuantityTransitions", fixedFeeQuantityTransitions).map {
it.toImmutable()
},
checkRequired("price", price),
checkRequired("startDate", startDate),
+ checkRequired("usageCustomerIds", usageCustomerIds).map { it.toImmutable() },
additionalProperties.toImmutable(),
)
}
@@ -6717,17 +6800,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is PriceInterval && id == other.id && billingCycleDay == other.billingCycleDay && currentBillingPeriodEndDate == other.currentBillingPeriodEndDate && currentBillingPeriodStartDate == other.currentBillingPeriodStartDate && endDate == other.endDate && filter == other.filter && fixedFeeQuantityTransitions == other.fixedFeeQuantityTransitions && price == other.price && startDate == other.startDate && usageCustomerIds == other.usageCustomerIds && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, fixedFeeQuantityTransitions, price, startDate, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(id, billingCycleDay, currentBillingPeriodEndDate, currentBillingPeriodStartDate, endDate, filter, fixedFeeQuantityTransitions, price, startDate, usageCustomerIds, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, additionalProperties=$additionalProperties}"
+ "PriceInterval{id=$id, billingCycleDay=$billingCycleDay, currentBillingPeriodEndDate=$currentBillingPeriodEndDate, currentBillingPeriodStartDate=$currentBillingPeriodStartDate, endDate=$endDate, filter=$filter, fixedFeeQuantityTransitions=$fixedFeeQuantityTransitions, price=$price, startDate=$startDate, usageCustomerIds=$usageCustomerIds, additionalProperties=$additionalProperties}"
}
@NoAutoDetect
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 49068a7e..c0a1ec5c 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
@@ -5770,6 +5770,9 @@ private constructor(
@JsonProperty("end_date")
@ExcludeMissing
private val endDate: JsonField = JsonMissing.of(),
+ @JsonProperty("filter")
+ @ExcludeMissing
+ private val filter: JsonField = JsonMissing.of(),
@JsonProperty("fixed_fee_quantity_transitions")
@ExcludeMissing
private val fixedFeeQuantityTransitions: JsonField