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/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> = @@ -5780,6 +5783,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(), ) { @@ -5816,6 +5822,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. @@ -5845,6 +5854,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 */ @@ -5879,6 +5895,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. @@ -5910,6 +5929,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 @@ -5926,9 +5953,11 @@ private constructor( currentBillingPeriodEndDate() currentBillingPeriodStartDate() endDate() + filter() fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } } price().validate() startDate() + usageCustomerIds() validated = true } @@ -5947,11 +5976,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 @@ -5961,10 +5992,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() } @@ -6050,6 +6083,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. @@ -6550,6 +6592,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) @@ -6576,11 +6657,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(), ) } @@ -6726,17 +6809,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/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.kt index a586a244..8bf84b4c 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 @@ -5778,6 +5778,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> = @@ -5788,6 +5791,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(), ) { @@ -5824,6 +5830,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. @@ -5853,6 +5862,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 */ @@ -5887,6 +5903,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. @@ -5918,6 +5937,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 @@ -5934,9 +5961,11 @@ private constructor( currentBillingPeriodEndDate() currentBillingPeriodStartDate() endDate() + filter() fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } } price().validate() startDate() + usageCustomerIds() validated = true } @@ -5955,11 +5984,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 @@ -5969,10 +6000,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() } @@ -6058,6 +6091,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. @@ -6558,6 +6600,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) @@ -6584,11 +6665,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(), ) } @@ -6734,17 +6817,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/SubscriptionUnschedulePendingPlanChangesResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesResponse.kt index e9cd0d1a..19852f26 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 @@ -5774,6 +5774,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> = @@ -5784,6 +5787,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(), ) { @@ -5820,6 +5826,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. @@ -5849,6 +5858,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 */ @@ -5883,6 +5899,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. @@ -5914,6 +5933,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 @@ -5930,9 +5957,11 @@ private constructor( currentBillingPeriodEndDate() currentBillingPeriodStartDate() endDate() + filter() fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } } price().validate() startDate() + usageCustomerIds() validated = true } @@ -5951,11 +5980,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 @@ -5965,10 +5996,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() } @@ -6054,6 +6087,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. @@ -6554,6 +6596,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) @@ -6580,11 +6661,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(), ) } @@ -6730,17 +6813,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/SubscriptionUpdateFixedFeeQuantityResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityResponse.kt index d7b65822..c94cbe3f 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 @@ -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> = @@ -5780,6 +5783,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(), ) { @@ -5816,6 +5822,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. @@ -5845,6 +5854,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 */ @@ -5879,6 +5895,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. @@ -5910,6 +5929,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 @@ -5926,9 +5953,11 @@ private constructor( currentBillingPeriodEndDate() currentBillingPeriodStartDate() endDate() + filter() fixedFeeQuantityTransitions().ifPresent { it.forEach { it.validate() } } price().validate() startDate() + usageCustomerIds() validated = true } @@ -5947,11 +5976,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 @@ -5961,10 +5992,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() } @@ -6050,6 +6083,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. @@ -6550,6 +6592,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) @@ -6576,11 +6657,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(), ) } @@ -6726,17 +6809,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/SubscriptionUpdateTrialResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUpdateTrialResponse.kt index 54b418b7..63cff8c7 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUpdateTrialResponse.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUpdateTrialResponse.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/services/async/customers/credits/TopUpServiceAsync.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsync.kt index d3ba0a7b..0595a1de 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsync.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsync.kt @@ -40,7 +40,10 @@ interface TopUpServiceAsync { requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** Delete top-up */ + /** + * This deactivates the top-up and voids any invoices associated with pending credit blocks + * purchased through the top-up. + */ @JvmOverloads fun delete( params: CustomerCreditTopUpDeleteParams, @@ -61,7 +64,10 @@ interface TopUpServiceAsync { requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** 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. + */ @JvmOverloads fun deleteByExternalId( params: CustomerCreditTopUpDeleteByExternalIdParams, diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsyncImpl.kt index 2356bff1..d4552def 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsyncImpl.kt @@ -98,7 +98,10 @@ class TopUpServiceAsyncImpl internal constructor(private val clientOptions: Clie private val deleteHandler: Handler = emptyHandler().withErrorHandler(errorHandler) - /** Delete top-up */ + /** + * This deactivates the top-up and voids any invoices associated with pending credit blocks + * purchased through the top-up. + */ override fun delete( params: CustomerCreditTopUpDeleteParams, requestOptions: RequestOptions, @@ -166,7 +169,10 @@ class TopUpServiceAsyncImpl internal constructor(private val clientOptions: Clie private val deleteByExternalIdHandler: Handler = emptyHandler().withErrorHandler(errorHandler) - /** 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. + */ override fun deleteByExternalId( params: CustomerCreditTopUpDeleteByExternalIdParams, requestOptions: RequestOptions, diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpService.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpService.kt index 2ad8dc55..efdb4d59 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpService.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpService.kt @@ -39,7 +39,10 @@ interface TopUpService { requestOptions: RequestOptions = RequestOptions.none(), ): CustomerCreditTopUpListPage - /** Delete top-up */ + /** + * This deactivates the top-up and voids any invoices associated with pending credit blocks + * purchased through the top-up. + */ @JvmOverloads fun delete( params: CustomerCreditTopUpDeleteParams, @@ -60,7 +63,10 @@ interface TopUpService { requestOptions: RequestOptions = RequestOptions.none(), ): CustomerCreditTopUpCreateByExternalIdResponse - /** 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. + */ @JvmOverloads fun deleteByExternalId( params: CustomerCreditTopUpDeleteByExternalIdParams, diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceImpl.kt index 0ca6a7bd..275ae5f1 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceImpl.kt @@ -91,7 +91,10 @@ class TopUpServiceImpl internal constructor(private val clientOptions: ClientOpt private val deleteHandler: Handler = emptyHandler().withErrorHandler(errorHandler) - /** Delete top-up */ + /** + * This deactivates the top-up and voids any invoices associated with pending credit blocks + * purchased through the top-up. + */ override fun delete(params: CustomerCreditTopUpDeleteParams, requestOptions: RequestOptions) { val request = HttpRequest.builder() @@ -152,7 +155,10 @@ class TopUpServiceImpl internal constructor(private val clientOptions: ClientOpt private val deleteByExternalIdHandler: Handler = emptyHandler().withErrorHandler(errorHandler) - /** 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. + */ override fun deleteByExternalId( params: CustomerCreditTopUpDeleteByExternalIdParams, requestOptions: RequestOptions, diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCancelResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCancelResponseTest.kt index d72b4b63..0472d181 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCancelResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCancelResponseTest.kt @@ -392,6 +392,7 @@ class SubscriptionCancelResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionCancelResponse.PriceInterval.FixedFeeQuantityTransition .builder() @@ -483,6 +484,7 @@ class SubscriptionCancelResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -889,6 +891,7 @@ class SubscriptionCancelResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionCancelResponse.PriceInterval.FixedFeeQuantityTransition .builder() @@ -978,6 +981,7 @@ class SubscriptionCancelResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionCancelResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCreateResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCreateResponseTest.kt index a2b0dc76..c78dc3ab 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCreateResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCreateResponseTest.kt @@ -392,6 +392,7 @@ class SubscriptionCreateResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionCreateResponse.PriceInterval.FixedFeeQuantityTransition .builder() @@ -483,6 +484,7 @@ class SubscriptionCreateResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -889,6 +891,7 @@ class SubscriptionCreateResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionCreateResponse.PriceInterval.FixedFeeQuantityTransition .builder() @@ -978,6 +981,7 @@ class SubscriptionCreateResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionCreateResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParamsTest.kt index cad51d62..17ef7804 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParamsTest.kt @@ -31,6 +31,7 @@ class SubscriptionPriceIntervalsParamsTest { .addAmountDiscountCreationParamsDiscount(0.0) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .externalPriceId("external_price_id") + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Add.FixedFeeQuantityTransition.builder() .effectiveDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) @@ -105,6 +106,7 @@ class SubscriptionPriceIntervalsParamsTest { .build() ) .priceId("h74gfhdjvn7ujokd") + .addUsageCustomerId("string") .build() ) .addAddAdjustment( @@ -135,6 +137,7 @@ class SubscriptionPriceIntervalsParamsTest { .priceIntervalId("sdfs6wdjvn7ujokd") .billingCycleDay(0L) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Edit.FixedFeeQuantityTransition.builder() .effectiveDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) @@ -142,6 +145,7 @@ class SubscriptionPriceIntervalsParamsTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .addEditAdjustment( @@ -176,6 +180,7 @@ class SubscriptionPriceIntervalsParamsTest { .addAmountDiscountCreationParamsDiscount(0.0) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .externalPriceId("external_price_id") + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Add.FixedFeeQuantityTransition .builder() @@ -252,6 +257,7 @@ class SubscriptionPriceIntervalsParamsTest { .build() ) .priceId("h74gfhdjvn7ujokd") + .addUsageCustomerId("string") .build() ) .addAddAdjustment( @@ -282,6 +288,7 @@ class SubscriptionPriceIntervalsParamsTest { .priceIntervalId("sdfs6wdjvn7ujokd") .billingCycleDay(0L) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Edit.FixedFeeQuantityTransition .builder() @@ -290,6 +297,7 @@ class SubscriptionPriceIntervalsParamsTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .addEditAdjustment( @@ -323,6 +331,7 @@ class SubscriptionPriceIntervalsParamsTest { .addAmountDiscountCreationParamsDiscount(0.0) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .externalPriceId("external_price_id") + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Add.FixedFeeQuantityTransition .builder() @@ -399,6 +408,7 @@ class SubscriptionPriceIntervalsParamsTest { .build() ) .priceId("h74gfhdjvn7ujokd") + .addUsageCustomerId("string") .build() ) ) @@ -435,6 +445,7 @@ class SubscriptionPriceIntervalsParamsTest { .priceIntervalId("sdfs6wdjvn7ujokd") .billingCycleDay(0L) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Edit.FixedFeeQuantityTransition .builder() @@ -443,6 +454,7 @@ class SubscriptionPriceIntervalsParamsTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) ) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsResponseTest.kt index 567ee880..efa99c31 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsResponseTest.kt @@ -394,6 +394,7 @@ class SubscriptionPriceIntervalsResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsResponse.PriceInterval .FixedFeeQuantityTransition @@ -486,6 +487,7 @@ class SubscriptionPriceIntervalsResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -896,6 +898,7 @@ class SubscriptionPriceIntervalsResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsResponse.PriceInterval.FixedFeeQuantityTransition .builder() @@ -985,6 +988,7 @@ class SubscriptionPriceIntervalsResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionPriceIntervalsResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeResponseTest.kt index 43b747c1..51f81281 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeResponseTest.kt @@ -395,6 +395,7 @@ class SubscriptionSchedulePlanChangeResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionSchedulePlanChangeResponse.PriceInterval .FixedFeeQuantityTransition @@ -487,6 +488,7 @@ class SubscriptionSchedulePlanChangeResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -897,6 +899,7 @@ class SubscriptionSchedulePlanChangeResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionSchedulePlanChangeResponse.PriceInterval .FixedFeeQuantityTransition @@ -987,6 +990,7 @@ class SubscriptionSchedulePlanChangeResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionSchedulePlanChangeResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTest.kt index ee7ce10d..c09503dc 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTest.kt @@ -390,6 +390,7 @@ class SubscriptionTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( Subscription.PriceInterval.FixedFeeQuantityTransition.builder() .effectiveDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) @@ -480,6 +481,7 @@ class SubscriptionTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -883,6 +885,7 @@ class SubscriptionTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( Subscription.PriceInterval.FixedFeeQuantityTransition.builder() .effectiveDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) @@ -971,6 +974,7 @@ class SubscriptionTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscription.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseResponseTest.kt index 7a4ce183..d1b4a26b 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseResponseTest.kt @@ -393,6 +393,7 @@ class SubscriptionTriggerPhaseResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionTriggerPhaseResponse.PriceInterval .FixedFeeQuantityTransition @@ -485,6 +486,7 @@ class SubscriptionTriggerPhaseResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -894,6 +896,7 @@ class SubscriptionTriggerPhaseResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionTriggerPhaseResponse.PriceInterval.FixedFeeQuantityTransition .builder() @@ -983,6 +986,7 @@ class SubscriptionTriggerPhaseResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionTriggerPhaseResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationResponseTest.kt index ee2d0abe..5489206a 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationResponseTest.kt @@ -397,6 +397,7 @@ class SubscriptionUnscheduleCancellationResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUnscheduleCancellationResponse.PriceInterval .FixedFeeQuantityTransition @@ -489,6 +490,7 @@ class SubscriptionUnscheduleCancellationResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -901,6 +903,7 @@ class SubscriptionUnscheduleCancellationResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUnscheduleCancellationResponse.PriceInterval .FixedFeeQuantityTransition @@ -991,6 +994,7 @@ class SubscriptionUnscheduleCancellationResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionUnscheduleCancellationResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponseTest.kt index a52cedae..d35cf6ec 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesResponseTest.kt @@ -402,6 +402,7 @@ class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.PriceInterval .FixedFeeQuantityTransition @@ -494,6 +495,7 @@ class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -922,6 +924,7 @@ class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.PriceInterval .FixedFeeQuantityTransition @@ -1012,6 +1015,7 @@ class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionUnscheduleFixedFeeQuantityUpdatesResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesResponseTest.kt index ff7dd50a..36304519 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesResponseTest.kt @@ -400,6 +400,7 @@ class SubscriptionUnschedulePendingPlanChangesResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUnschedulePendingPlanChangesResponse.PriceInterval .FixedFeeQuantityTransition @@ -492,6 +493,7 @@ class SubscriptionUnschedulePendingPlanChangesResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -909,6 +911,7 @@ class SubscriptionUnschedulePendingPlanChangesResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUnschedulePendingPlanChangesResponse.PriceInterval .FixedFeeQuantityTransition @@ -999,6 +1002,7 @@ class SubscriptionUnschedulePendingPlanChangesResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionUnschedulePendingPlanChangesResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityResponseTest.kt index 087d07ca..3ddd5ffa 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityResponseTest.kt @@ -397,6 +397,7 @@ class SubscriptionUpdateFixedFeeQuantityResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUpdateFixedFeeQuantityResponse.PriceInterval .FixedFeeQuantityTransition @@ -489,6 +490,7 @@ class SubscriptionUpdateFixedFeeQuantityResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -901,6 +903,7 @@ class SubscriptionUpdateFixedFeeQuantityResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUpdateFixedFeeQuantityResponse.PriceInterval .FixedFeeQuantityTransition @@ -991,6 +994,7 @@ class SubscriptionUpdateFixedFeeQuantityResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionUpdateFixedFeeQuantityResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateTrialResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateTrialResponseTest.kt index 8541e40c..78283d4a 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateTrialResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateTrialResponseTest.kt @@ -393,6 +393,7 @@ class SubscriptionUpdateTrialResponseTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUpdateTrialResponse.PriceInterval.FixedFeeQuantityTransition .builder() @@ -484,6 +485,7 @@ class SubscriptionUpdateTrialResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -893,6 +895,7 @@ class SubscriptionUpdateTrialResponseTest { .currentBillingPeriodEndDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currentBillingPeriodStartDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( SubscriptionUpdateTrialResponse.PriceInterval.FixedFeeQuantityTransition .builder() @@ -982,6 +985,7 @@ class SubscriptionUpdateTrialResponseTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) assertThat(subscriptionUpdateTrialResponse.redeemedCoupon()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionsTest.kt index 4bb4d048..e628922b 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionsTest.kt @@ -418,6 +418,7 @@ class SubscriptionsTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( Subscription.PriceInterval.FixedFeeQuantityTransition.builder() .effectiveDate( @@ -526,6 +527,7 @@ class SubscriptionsTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( @@ -940,6 +942,7 @@ class SubscriptionsTest { OffsetDateTime.parse("2019-12-27T18:11:19.117Z") ) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("filter") .addFixedFeeQuantityTransition( Subscription.PriceInterval.FixedFeeQuantityTransition.builder() .effectiveDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) @@ -1036,6 +1039,7 @@ class SubscriptionsTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .redeemedCoupon( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/services/async/SubscriptionServiceAsyncTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/services/async/SubscriptionServiceAsyncTest.kt index 195a42e6..43dd1480 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/services/async/SubscriptionServiceAsyncTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/services/async/SubscriptionServiceAsyncTest.kt @@ -539,6 +539,7 @@ class SubscriptionServiceAsyncTest { .addAmountDiscountCreationParamsDiscount(0.0) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .externalPriceId("external_price_id") + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Add.FixedFeeQuantityTransition .builder() @@ -621,6 +622,7 @@ class SubscriptionServiceAsyncTest { .build() ) .priceId("h74gfhdjvn7ujokd") + .addUsageCustomerId("string") .build() ) .addAddAdjustment( @@ -651,6 +653,7 @@ class SubscriptionServiceAsyncTest { .priceIntervalId("sdfs6wdjvn7ujokd") .billingCycleDay(0L) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Edit.FixedFeeQuantityTransition .builder() @@ -659,6 +662,7 @@ class SubscriptionServiceAsyncTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .addEditAdjustment( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/SubscriptionServiceTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/SubscriptionServiceTest.kt index 2e237d2e..e92fdc67 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/SubscriptionServiceTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/SubscriptionServiceTest.kt @@ -531,6 +531,7 @@ class SubscriptionServiceTest { .addAmountDiscountCreationParamsDiscount(0.0) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .externalPriceId("external_price_id") + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Add.FixedFeeQuantityTransition .builder() @@ -613,6 +614,7 @@ class SubscriptionServiceTest { .build() ) .priceId("h74gfhdjvn7ujokd") + .addUsageCustomerId("string") .build() ) .addAddAdjustment( @@ -643,6 +645,7 @@ class SubscriptionServiceTest { .priceIntervalId("sdfs6wdjvn7ujokd") .billingCycleDay(0L) .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .filter("my_property > 100 AND my_other_property = 'bar'") .addFixedFeeQuantityTransition( SubscriptionPriceIntervalsParams.Edit.FixedFeeQuantityTransition .builder() @@ -651,6 +654,7 @@ class SubscriptionServiceTest { .build() ) .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .addUsageCustomerId("string") .build() ) .addEditAdjustment(