diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a36746b8..caf5ca3f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.25.0" + ".": "0.26.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index ae0299a7..0c16dd10 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-326205df28a52e9ad57c34d7ed1ec85fadd67f9a041df2882ebaa65f6de09930.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-8663e8fc543041d9694eddcd2f7e9784611369606700f99340e6dc80607b2dfa.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f119b5d..42d16fdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 0.26.0 (2025-01-30) + +Full Changelog: [v0.25.0...v0.26.0](https://github.com/orbcorp/orb-java/compare/v0.25.0...v0.26.0) + +### Features + +* **api:** api update ([#222](https://github.com/orbcorp/orb-java/issues/222)) ([91cf3b9](https://github.com/orbcorp/orb-java/commit/91cf3b98866b16ce93da2db1381631b01f8eb865)) + + +### Chores + +* **internal:** codegen related update ([#217](https://github.com/orbcorp/orb-java/issues/217)) ([648708a](https://github.com/orbcorp/orb-java/commit/648708a1c05f37147b1dfefcb1a9f9e6774296b6)) +* **internal:** codegen related update ([#220](https://github.com/orbcorp/orb-java/issues/220)) ([6975f2c](https://github.com/orbcorp/orb-java/commit/6975f2c9cfa3661ee487a8941d1fc22c0de7e5d7)) +* **internal:** codegen related update ([#221](https://github.com/orbcorp/orb-java/issues/221)) ([61fa6a7](https://github.com/orbcorp/orb-java/commit/61fa6a7956a5849b58d4210f73debcc823c9d43e)) +* **internal:** swap `checkNotNull` to `checkRequired` ([#219](https://github.com/orbcorp/orb-java/issues/219)) ([c77af54](https://github.com/orbcorp/orb-java/commit/c77af5465b01148fb1c84c0612e11fef5e0433c5)) + ## 0.25.0 (2025-01-23) Full Changelog: [v0.24.0...v0.25.0](https://github.com/orbcorp/orb-java/compare/v0.24.0...v0.25.0) diff --git a/README.md b/README.md index 125bf5db..a5549cf6 100644 --- a/README.md +++ b/README.md @@ -2,44 +2,44 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.25.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.26.0) -The Orb Java SDK provides convenient access to the Orb REST API from applications written in Java. It includes helper classes with helpful types and documentation for every request and response property. +The Orb Java SDK provides convenient access to the Orb REST API from applications written in Java. The Orb Java SDK is similar to the Orb Kotlin SDK but with minor differences that make it more ergonomic for use in Java, such as `Optional` instead of nullable values, `Stream` instead of `Sequence`, and `CompletableFuture` instead of suspend functions. -## Documentation +The REST API documentation can be found on [docs.withorb.com](https://docs.withorb.com/reference/api-reference). -The REST API documentation can be foundĀ on [docs.withorb.com](https://docs.withorb.com/reference/api-reference). - ---- - -## Getting started - -### Install dependencies - -#### Gradle +## Installation +### Gradle + ```kotlin -implementation("com.withorb.api:orb-java:0.25.0") +implementation("com.withorb.api:orb-java:0.26.0") ``` -#### Maven +### Maven ```xml com.withorb.api orb-java - 0.25.0 + 0.26.0 ``` +## Requirements + +This library requires Java 8 or later. + +## Usage + ### Configure the client Use `OrbOkHttpClient.builder()` to configure the client. At a minimum you need to set `.apiKey()`: @@ -383,7 +383,3 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. We are keen for your feedback; please open an [issue](https://www.github.com/orbcorp/orb-java/issues) with questions, bugs, or suggestions. - -## Requirements - -This library requires Java 8 or later. diff --git a/build.gradle.kts b/build.gradle.kts index 5960c3bb..25877df7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,4 @@ allprojects { group = "com.withorb.api" - version = "0.25.0" // x-release-please-version + version = "0.26.0" // x-release-please-version } diff --git a/orb-java-client-okhttp/src/main/kotlin/com/withorb/api/client/okhttp/OkHttpClient.kt b/orb-java-client-okhttp/src/main/kotlin/com/withorb/api/client/okhttp/OkHttpClient.kt index 1e01314f..3484d4e1 100644 --- a/orb-java-client-okhttp/src/main/kotlin/com/withorb/api/client/okhttp/OkHttpClient.kt +++ b/orb-java-client-okhttp/src/main/kotlin/com/withorb/api/client/okhttp/OkHttpClient.kt @@ -1,6 +1,7 @@ package com.withorb.api.client.okhttp import com.withorb.api.core.RequestOptions +import com.withorb.api.core.checkRequired import com.withorb.api.core.http.Headers import com.withorb.api.core.http.HttpClient import com.withorb.api.core.http.HttpMethod @@ -192,7 +193,7 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val .callTimeout(if (timeout.seconds == 0L) timeout else timeout.plusSeconds(30)) .proxy(proxy) .build(), - checkNotNull(baseUrl) { "`baseUrl` is required but was not set" }, + checkRequired("baseUrl", baseUrl), ) } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/core/Check.kt b/orb-java-core/src/main/kotlin/com/withorb/api/core/Check.kt index ceec0152..561abe1d 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/core/Check.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/core/Check.kt @@ -2,8 +2,7 @@ package com.withorb.api.core -@JvmSynthetic -internal fun checkRequired(name: String, value: T?): T = +fun checkRequired(name: String, value: T?): T = checkNotNull(value) { "`$name` is required, but was not set" } @JvmSynthetic diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/core/http/HttpRequest.kt b/orb-java-core/src/main/kotlin/com/withorb/api/core/http/HttpRequest.kt index 72285efa..5aed352c 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/core/http/HttpRequest.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/core/http/HttpRequest.kt @@ -1,5 +1,6 @@ package com.withorb.api.core.http +import com.withorb.api.core.checkRequired import com.withorb.api.core.toImmutable class HttpRequest @@ -134,7 +135,7 @@ private constructor( fun build(): HttpRequest = HttpRequest( - checkNotNull(method) { "`method` is required but was not set" }, + checkRequired("method", method), url, pathSegments.toImmutable(), headers.build(), diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/core/http/RetryingHttpClient.kt b/orb-java-core/src/main/kotlin/com/withorb/api/core/http/RetryingHttpClient.kt index 820dc233..a31f46fa 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/core/http/RetryingHttpClient.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/core/http/RetryingHttpClient.kt @@ -1,6 +1,7 @@ package com.withorb.api.core.http import com.withorb.api.core.RequestOptions +import com.withorb.api.core.checkRequired import com.withorb.api.errors.OrbIoException import java.io.IOException import java.time.Clock @@ -259,7 +260,7 @@ private constructor( fun build(): HttpClient = RetryingHttpClient( - checkNotNull(httpClient) { "`httpClient` is required but was not set" }, + checkRequired("httpClient", httpClient), clock, maxRetries, idempotencyHeader, diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/Coupon.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/Coupon.kt index d0f6e58f..0252efa9 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/Coupon.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/Coupon.kt @@ -214,11 +214,9 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = discount(Discount.ofPercentage(percentage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) /** * This allows for a coupon's discount to apply for a limited time (determined in months); a @@ -330,31 +328,29 @@ private constructor( @JsonSerialize(using = Discount.Serializer::class) class Discount private constructor( - private val percentageDiscount: PercentageDiscount? = null, - private val amountDiscount: AmountDiscount? = null, + private val percentage: PercentageDiscount? = null, + private val amount: AmountDiscount? = null, private val _json: JsonValue? = null, ) { - fun percentageDiscount(): Optional = - Optional.ofNullable(percentageDiscount) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun amountDiscount(): Optional = Optional.ofNullable(amountDiscount) + fun amount(): Optional = Optional.ofNullable(amount) - fun isPercentageDiscount(): Boolean = percentageDiscount != null + fun isPercentage(): Boolean = percentage != null - fun isAmountDiscount(): Boolean = amountDiscount != null + fun isAmount(): Boolean = amount != null - fun asPercentageDiscount(): PercentageDiscount = - percentageDiscount.getOrThrow("percentageDiscount") + fun asPercentage(): PercentageDiscount = percentage.getOrThrow("percentage") - fun asAmountDiscount(): AmountDiscount = amountDiscount.getOrThrow("amountDiscount") + fun asAmount(): AmountDiscount = amount.getOrThrow("amount") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - percentageDiscount != null -> visitor.visitPercentageDiscount(percentageDiscount) - amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentage != null -> visitor.visitPercentage(percentage) + amount != null -> visitor.visitAmount(amount) else -> visitor.unknown(_json) } } @@ -368,12 +364,12 @@ private constructor( accept( object : Visitor { - override fun visitPercentageDiscount(percentageDiscount: PercentageDiscount) { - percentageDiscount.validate() + override fun visitPercentage(percentage: PercentageDiscount) { + percentage.validate() } - override fun visitAmountDiscount(amountDiscount: AmountDiscount) { - amountDiscount.validate() + override fun visitAmount(amount: AmountDiscount) { + amount.validate() } } ) @@ -385,15 +381,15 @@ private constructor( return true } - return /* spotless:off */ other is Discount && percentageDiscount == other.percentageDiscount && amountDiscount == other.amountDiscount /* spotless:on */ + return /* spotless:off */ other is Discount && percentage == other.percentage && amount == other.amount /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(percentageDiscount, amountDiscount) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(percentage, amount) /* spotless:on */ override fun toString(): String = when { - percentageDiscount != null -> "Discount{percentageDiscount=$percentageDiscount}" - amountDiscount != null -> "Discount{amountDiscount=$amountDiscount}" + percentage != null -> "Discount{percentage=$percentage}" + amount != null -> "Discount{amount=$amount}" _json != null -> "Discount{_unknown=$_json}" else -> throw IllegalStateException("Invalid Discount") } @@ -401,19 +397,16 @@ private constructor( companion object { @JvmStatic - fun ofPercentageDiscount(percentageDiscount: PercentageDiscount) = - Discount(percentageDiscount = percentageDiscount) + fun ofPercentage(percentage: PercentageDiscount) = Discount(percentage = percentage) - @JvmStatic - fun ofAmountDiscount(amountDiscount: AmountDiscount) = - Discount(amountDiscount = amountDiscount) + @JvmStatic fun ofAmount(amount: AmountDiscount) = Discount(amount = amount) } interface Visitor { - fun visitPercentageDiscount(percentageDiscount: PercentageDiscount): T + fun visitPercentage(percentage: PercentageDiscount): T - fun visitAmountDiscount(amountDiscount: AmountDiscount): T + fun visitAmount(amount: AmountDiscount): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Discount: $json") @@ -431,13 +424,13 @@ private constructor( "percentage" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Discount(percentageDiscount = it, _json = json) + return Discount(percentage = it, _json = json) } } "amount" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Discount(amountDiscount = it, _json = json) + return Discount(amount = it, _json = json) } } } @@ -454,9 +447,8 @@ private constructor( provider: SerializerProvider ) { when { - value.percentageDiscount != null -> - generator.writeObject(value.percentageDiscount) - value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentage != null -> generator.writeObject(value.percentage) + value.amount != null -> generator.writeObject(value.amount) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Discount") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CouponCreateParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CouponCreateParams.kt index e9d73d61..850787da 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CouponCreateParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CouponCreateParams.kt @@ -197,11 +197,11 @@ constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(newCouponPercentageDiscount: Discount.NewCouponPercentageDiscount) = - discount(Discount.ofNewCouponPercentageDiscount(newCouponPercentageDiscount)) + fun discount(newCouponPercentage: Discount.NewCouponPercentageDiscount) = + discount(Discount.ofNewCouponPercentage(newCouponPercentage)) - fun discount(newCouponAmountDiscount: Discount.NewCouponAmountDiscount) = - discount(Discount.ofNewCouponAmountDiscount(newCouponAmountDiscount)) + fun discount(newCouponAmount: Discount.NewCouponAmountDiscount) = + discount(Discount.ofNewCouponAmount(newCouponAmount)) /** This string can be used to redeem this coupon for a given subscription. */ fun redemptionCode(redemptionCode: String) = @@ -343,12 +343,12 @@ constructor( fun discount(discount: JsonField) = apply { body.discount(discount) } - fun discount(newCouponPercentageDiscount: Discount.NewCouponPercentageDiscount) = apply { - body.discount(newCouponPercentageDiscount) + fun discount(newCouponPercentage: Discount.NewCouponPercentageDiscount) = apply { + body.discount(newCouponPercentage) } - fun discount(newCouponAmountDiscount: Discount.NewCouponAmountDiscount) = apply { - body.discount(newCouponAmountDiscount) + fun discount(newCouponAmount: Discount.NewCouponAmountDiscount) = apply { + body.discount(newCouponAmount) } /** This string can be used to redeem this coupon for a given subscription. */ @@ -546,35 +546,33 @@ constructor( @JsonSerialize(using = Discount.Serializer::class) class Discount private constructor( - private val newCouponPercentageDiscount: NewCouponPercentageDiscount? = null, - private val newCouponAmountDiscount: NewCouponAmountDiscount? = null, + private val newCouponPercentage: NewCouponPercentageDiscount? = null, + private val newCouponAmount: NewCouponAmountDiscount? = null, private val _json: JsonValue? = null, ) { - fun newCouponPercentageDiscount(): Optional = - Optional.ofNullable(newCouponPercentageDiscount) + fun newCouponPercentage(): Optional = + Optional.ofNullable(newCouponPercentage) - fun newCouponAmountDiscount(): Optional = - Optional.ofNullable(newCouponAmountDiscount) + fun newCouponAmount(): Optional = + Optional.ofNullable(newCouponAmount) - fun isNewCouponPercentageDiscount(): Boolean = newCouponPercentageDiscount != null + fun isNewCouponPercentage(): Boolean = newCouponPercentage != null - fun isNewCouponAmountDiscount(): Boolean = newCouponAmountDiscount != null + fun isNewCouponAmount(): Boolean = newCouponAmount != null - fun asNewCouponPercentageDiscount(): NewCouponPercentageDiscount = - newCouponPercentageDiscount.getOrThrow("newCouponPercentageDiscount") + fun asNewCouponPercentage(): NewCouponPercentageDiscount = + newCouponPercentage.getOrThrow("newCouponPercentage") - fun asNewCouponAmountDiscount(): NewCouponAmountDiscount = - newCouponAmountDiscount.getOrThrow("newCouponAmountDiscount") + fun asNewCouponAmount(): NewCouponAmountDiscount = + newCouponAmount.getOrThrow("newCouponAmount") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newCouponPercentageDiscount != null -> - visitor.visitNewCouponPercentageDiscount(newCouponPercentageDiscount) - newCouponAmountDiscount != null -> - visitor.visitNewCouponAmountDiscount(newCouponAmountDiscount) + newCouponPercentage != null -> visitor.visitNewCouponPercentage(newCouponPercentage) + newCouponAmount != null -> visitor.visitNewCouponAmount(newCouponAmount) else -> visitor.unknown(_json) } } @@ -588,16 +586,14 @@ constructor( accept( object : Visitor { - override fun visitNewCouponPercentageDiscount( - newCouponPercentageDiscount: NewCouponPercentageDiscount + override fun visitNewCouponPercentage( + newCouponPercentage: NewCouponPercentageDiscount ) { - newCouponPercentageDiscount.validate() + newCouponPercentage.validate() } - override fun visitNewCouponAmountDiscount( - newCouponAmountDiscount: NewCouponAmountDiscount - ) { - newCouponAmountDiscount.validate() + override fun visitNewCouponAmount(newCouponAmount: NewCouponAmountDiscount) { + newCouponAmount.validate() } } ) @@ -609,17 +605,15 @@ constructor( return true } - return /* spotless:off */ other is Discount && newCouponPercentageDiscount == other.newCouponPercentageDiscount && newCouponAmountDiscount == other.newCouponAmountDiscount /* spotless:on */ + return /* spotless:off */ other is Discount && newCouponPercentage == other.newCouponPercentage && newCouponAmount == other.newCouponAmount /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newCouponPercentageDiscount, newCouponAmountDiscount) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newCouponPercentage, newCouponAmount) /* spotless:on */ override fun toString(): String = when { - newCouponPercentageDiscount != null -> - "Discount{newCouponPercentageDiscount=$newCouponPercentageDiscount}" - newCouponAmountDiscount != null -> - "Discount{newCouponAmountDiscount=$newCouponAmountDiscount}" + newCouponPercentage != null -> "Discount{newCouponPercentage=$newCouponPercentage}" + newCouponAmount != null -> "Discount{newCouponAmount=$newCouponAmount}" _json != null -> "Discount{_unknown=$_json}" else -> throw IllegalStateException("Invalid Discount") } @@ -627,22 +621,19 @@ constructor( companion object { @JvmStatic - fun ofNewCouponPercentageDiscount( - newCouponPercentageDiscount: NewCouponPercentageDiscount - ) = Discount(newCouponPercentageDiscount = newCouponPercentageDiscount) + fun ofNewCouponPercentage(newCouponPercentage: NewCouponPercentageDiscount) = + Discount(newCouponPercentage = newCouponPercentage) @JvmStatic - fun ofNewCouponAmountDiscount(newCouponAmountDiscount: NewCouponAmountDiscount) = - Discount(newCouponAmountDiscount = newCouponAmountDiscount) + fun ofNewCouponAmount(newCouponAmount: NewCouponAmountDiscount) = + Discount(newCouponAmount = newCouponAmount) } interface Visitor { - fun visitNewCouponPercentageDiscount( - newCouponPercentageDiscount: NewCouponPercentageDiscount - ): T + fun visitNewCouponPercentage(newCouponPercentage: NewCouponPercentageDiscount): T - fun visitNewCouponAmountDiscount(newCouponAmountDiscount: NewCouponAmountDiscount): T + fun visitNewCouponAmount(newCouponAmount: NewCouponAmountDiscount): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Discount: $json") @@ -662,7 +653,7 @@ constructor( it.validate() } ?.let { - return Discount(newCouponPercentageDiscount = it, _json = json) + return Discount(newCouponPercentage = it, _json = json) } } "amount" -> { @@ -670,7 +661,7 @@ constructor( it.validate() } ?.let { - return Discount(newCouponAmountDiscount = it, _json = json) + return Discount(newCouponAmount = it, _json = json) } } } @@ -687,10 +678,9 @@ constructor( provider: SerializerProvider ) { when { - value.newCouponPercentageDiscount != null -> - generator.writeObject(value.newCouponPercentageDiscount) - value.newCouponAmountDiscount != null -> - generator.writeObject(value.newCouponAmountDiscount) + value.newCouponPercentage != null -> + generator.writeObject(value.newCouponPercentage) + value.newCouponAmount != null -> generator.writeObject(value.newCouponAmount) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Discount") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListByExternalIdResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListByExternalIdResponse.kt index 3083c1f0..b5774a8a 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListByExternalIdResponse.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListByExternalIdResponse.kt @@ -435,7 +435,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, @@ -464,7 +464,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, @@ -478,7 +478,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, @@ -492,8 +492,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, @@ -507,7 +506,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, @@ -521,8 +520,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = - price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, @@ -536,7 +534,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, @@ -550,8 +548,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, @@ -565,8 +563,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, @@ -580,8 +578,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, @@ -595,8 +593,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -610,8 +608,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -625,8 +623,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, @@ -640,8 +638,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, @@ -655,8 +653,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, @@ -670,8 +668,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, @@ -685,8 +683,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, @@ -700,8 +698,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, @@ -715,8 +713,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -730,8 +728,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -745,8 +743,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, @@ -760,8 +758,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, @@ -775,8 +773,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, @@ -790,8 +788,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * Price's contributions for the timeframe, excluding any minimums and discounts. diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListResponse.kt index 73da1212..a41dc68f 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListResponse.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListResponse.kt @@ -432,7 +432,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, @@ -461,7 +461,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, @@ -475,7 +475,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, @@ -489,8 +489,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, @@ -504,7 +503,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, @@ -518,8 +517,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = - price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, @@ -533,7 +531,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, @@ -547,8 +545,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, @@ -562,8 +560,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, @@ -577,8 +575,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, @@ -592,8 +590,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -607,8 +605,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -622,8 +620,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, @@ -637,8 +635,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, @@ -652,8 +650,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, @@ -667,8 +665,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, @@ -682,8 +680,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, @@ -697,8 +695,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, @@ -712,8 +710,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -727,8 +725,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -742,8 +740,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, @@ -757,8 +755,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, @@ -772,8 +770,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, @@ -787,8 +785,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * Price's contributions for the timeframe, excluding any minimums and discounts. diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreateParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreateParams.kt index 582d7f11..adf40b86 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreateParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreateParams.kt @@ -1234,15 +1234,11 @@ constructor( this.taxConfiguration = taxConfiguration } - fun taxConfiguration( - newAvalaraTaxConfiguration: TaxConfiguration.NewAvalaraTaxConfiguration - ) = - taxConfiguration( - TaxConfiguration.ofNewAvalaraTaxConfiguration(newAvalaraTaxConfiguration) - ) + fun taxConfiguration(newAvalara: TaxConfiguration.NewAvalaraTaxConfiguration) = + taxConfiguration(TaxConfiguration.ofNewAvalara(newAvalara)) - fun taxConfiguration(newTaxJarConfiguration: TaxConfiguration.NewTaxJarConfiguration) = - taxConfiguration(TaxConfiguration.ofNewTaxJarConfiguration(newTaxJarConfiguration)) + fun taxConfiguration(newTaxJar: TaxConfiguration.NewTaxJarConfiguration) = + taxConfiguration(TaxConfiguration.ofNewTaxJar(newTaxJar)) /** * Tax IDs are commonly required to be displayed on customer invoices, which are added @@ -1932,14 +1928,13 @@ constructor( body.taxConfiguration(taxConfiguration) } - fun taxConfiguration( - newAvalaraTaxConfiguration: TaxConfiguration.NewAvalaraTaxConfiguration - ) = apply { body.taxConfiguration(newAvalaraTaxConfiguration) } + fun taxConfiguration(newAvalara: TaxConfiguration.NewAvalaraTaxConfiguration) = apply { + body.taxConfiguration(newAvalara) + } - fun taxConfiguration(newTaxJarConfiguration: TaxConfiguration.NewTaxJarConfiguration) = - apply { - body.taxConfiguration(newTaxJarConfiguration) - } + fun taxConfiguration(newTaxJar: TaxConfiguration.NewTaxJarConfiguration) = apply { + body.taxConfiguration(newTaxJar) + } /** * Tax IDs are commonly required to be displayed on customer invoices, which are added to @@ -3309,35 +3304,29 @@ constructor( @JsonSerialize(using = TaxConfiguration.Serializer::class) class TaxConfiguration private constructor( - private val newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration? = null, - private val newTaxJarConfiguration: NewTaxJarConfiguration? = null, + private val newAvalara: NewAvalaraTaxConfiguration? = null, + private val newTaxJar: NewTaxJarConfiguration? = null, private val _json: JsonValue? = null, ) { - fun newAvalaraTaxConfiguration(): Optional = - Optional.ofNullable(newAvalaraTaxConfiguration) + fun newAvalara(): Optional = Optional.ofNullable(newAvalara) - fun newTaxJarConfiguration(): Optional = - Optional.ofNullable(newTaxJarConfiguration) + fun newTaxJar(): Optional = Optional.ofNullable(newTaxJar) - fun isNewAvalaraTaxConfiguration(): Boolean = newAvalaraTaxConfiguration != null + fun isNewAvalara(): Boolean = newAvalara != null - fun isNewTaxJarConfiguration(): Boolean = newTaxJarConfiguration != null + fun isNewTaxJar(): Boolean = newTaxJar != null - fun asNewAvalaraTaxConfiguration(): NewAvalaraTaxConfiguration = - newAvalaraTaxConfiguration.getOrThrow("newAvalaraTaxConfiguration") + fun asNewAvalara(): NewAvalaraTaxConfiguration = newAvalara.getOrThrow("newAvalara") - fun asNewTaxJarConfiguration(): NewTaxJarConfiguration = - newTaxJarConfiguration.getOrThrow("newTaxJarConfiguration") + fun asNewTaxJar(): NewTaxJarConfiguration = newTaxJar.getOrThrow("newTaxJar") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newAvalaraTaxConfiguration != null -> - visitor.visitNewAvalaraTaxConfiguration(newAvalaraTaxConfiguration) - newTaxJarConfiguration != null -> - visitor.visitNewTaxJarConfiguration(newTaxJarConfiguration) + newAvalara != null -> visitor.visitNewAvalara(newAvalara) + newTaxJar != null -> visitor.visitNewTaxJar(newTaxJar) else -> visitor.unknown(_json) } } @@ -3351,16 +3340,12 @@ constructor( accept( object : Visitor { - override fun visitNewAvalaraTaxConfiguration( - newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration - ) { - newAvalaraTaxConfiguration.validate() + override fun visitNewAvalara(newAvalara: NewAvalaraTaxConfiguration) { + newAvalara.validate() } - override fun visitNewTaxJarConfiguration( - newTaxJarConfiguration: NewTaxJarConfiguration - ) { - newTaxJarConfiguration.validate() + override fun visitNewTaxJar(newTaxJar: NewTaxJarConfiguration) { + newTaxJar.validate() } } ) @@ -3372,17 +3357,15 @@ constructor( return true } - return /* spotless:off */ other is TaxConfiguration && newAvalaraTaxConfiguration == other.newAvalaraTaxConfiguration && newTaxJarConfiguration == other.newTaxJarConfiguration /* spotless:on */ + return /* spotless:off */ other is TaxConfiguration && newAvalara == other.newAvalara && newTaxJar == other.newTaxJar /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newAvalaraTaxConfiguration, newTaxJarConfiguration) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newAvalara, newTaxJar) /* spotless:on */ override fun toString(): String = when { - newAvalaraTaxConfiguration != null -> - "TaxConfiguration{newAvalaraTaxConfiguration=$newAvalaraTaxConfiguration}" - newTaxJarConfiguration != null -> - "TaxConfiguration{newTaxJarConfiguration=$newTaxJarConfiguration}" + newAvalara != null -> "TaxConfiguration{newAvalara=$newAvalara}" + newTaxJar != null -> "TaxConfiguration{newTaxJar=$newTaxJar}" _json != null -> "TaxConfiguration{_unknown=$_json}" else -> throw IllegalStateException("Invalid TaxConfiguration") } @@ -3390,22 +3373,19 @@ constructor( companion object { @JvmStatic - fun ofNewAvalaraTaxConfiguration( - newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration - ) = TaxConfiguration(newAvalaraTaxConfiguration = newAvalaraTaxConfiguration) + fun ofNewAvalara(newAvalara: NewAvalaraTaxConfiguration) = + TaxConfiguration(newAvalara = newAvalara) @JvmStatic - fun ofNewTaxJarConfiguration(newTaxJarConfiguration: NewTaxJarConfiguration) = - TaxConfiguration(newTaxJarConfiguration = newTaxJarConfiguration) + fun ofNewTaxJar(newTaxJar: NewTaxJarConfiguration) = + TaxConfiguration(newTaxJar = newTaxJar) } interface Visitor { - fun visitNewAvalaraTaxConfiguration( - newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration - ): T + fun visitNewAvalara(newAvalara: NewAvalaraTaxConfiguration): T - fun visitNewTaxJarConfiguration(newTaxJarConfiguration: NewTaxJarConfiguration): T + fun visitNewTaxJar(newTaxJar: NewTaxJarConfiguration): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown TaxConfiguration: $json") @@ -3425,10 +3405,7 @@ constructor( it.validate() } ?.let { - return TaxConfiguration( - newAvalaraTaxConfiguration = it, - _json = json - ) + return TaxConfiguration(newAvalara = it, _json = json) } } "taxjar" -> { @@ -3436,7 +3413,7 @@ constructor( it.validate() } ?.let { - return TaxConfiguration(newTaxJarConfiguration = it, _json = json) + return TaxConfiguration(newTaxJar = it, _json = json) } } } @@ -3453,10 +3430,8 @@ constructor( provider: SerializerProvider ) { when { - value.newAvalaraTaxConfiguration != null -> - generator.writeObject(value.newAvalaraTaxConfiguration) - value.newTaxJarConfiguration != null -> - generator.writeObject(value.newTaxJarConfiguration) + value.newAvalara != null -> generator.writeObject(value.newAvalara) + value.newTaxJar != null -> generator.writeObject(value.newTaxJar) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid TaxConfiguration") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParams.kt index 135e7817..8ee4de61 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParams.kt @@ -1210,15 +1210,11 @@ constructor( this.taxConfiguration = taxConfiguration } - fun taxConfiguration( - newAvalaraTaxConfiguration: TaxConfiguration.NewAvalaraTaxConfiguration - ) = - taxConfiguration( - TaxConfiguration.ofNewAvalaraTaxConfiguration(newAvalaraTaxConfiguration) - ) + fun taxConfiguration(newAvalara: TaxConfiguration.NewAvalaraTaxConfiguration) = + taxConfiguration(TaxConfiguration.ofNewAvalara(newAvalara)) - fun taxConfiguration(newTaxJarConfiguration: TaxConfiguration.NewTaxJarConfiguration) = - taxConfiguration(TaxConfiguration.ofNewTaxJarConfiguration(newTaxJarConfiguration)) + fun taxConfiguration(newTaxJar: TaxConfiguration.NewTaxJarConfiguration) = + taxConfiguration(TaxConfiguration.ofNewTaxJar(newTaxJar)) /** * Tax IDs are commonly required to be displayed on customer invoices, which are added @@ -1899,14 +1895,13 @@ constructor( body.taxConfiguration(taxConfiguration) } - fun taxConfiguration( - newAvalaraTaxConfiguration: TaxConfiguration.NewAvalaraTaxConfiguration - ) = apply { body.taxConfiguration(newAvalaraTaxConfiguration) } + fun taxConfiguration(newAvalara: TaxConfiguration.NewAvalaraTaxConfiguration) = apply { + body.taxConfiguration(newAvalara) + } - fun taxConfiguration(newTaxJarConfiguration: TaxConfiguration.NewTaxJarConfiguration) = - apply { - body.taxConfiguration(newTaxJarConfiguration) - } + fun taxConfiguration(newTaxJar: TaxConfiguration.NewTaxJarConfiguration) = apply { + body.taxConfiguration(newTaxJar) + } /** * Tax IDs are commonly required to be displayed on customer invoices, which are added to @@ -3259,35 +3254,29 @@ constructor( @JsonSerialize(using = TaxConfiguration.Serializer::class) class TaxConfiguration private constructor( - private val newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration? = null, - private val newTaxJarConfiguration: NewTaxJarConfiguration? = null, + private val newAvalara: NewAvalaraTaxConfiguration? = null, + private val newTaxJar: NewTaxJarConfiguration? = null, private val _json: JsonValue? = null, ) { - fun newAvalaraTaxConfiguration(): Optional = - Optional.ofNullable(newAvalaraTaxConfiguration) + fun newAvalara(): Optional = Optional.ofNullable(newAvalara) - fun newTaxJarConfiguration(): Optional = - Optional.ofNullable(newTaxJarConfiguration) + fun newTaxJar(): Optional = Optional.ofNullable(newTaxJar) - fun isNewAvalaraTaxConfiguration(): Boolean = newAvalaraTaxConfiguration != null + fun isNewAvalara(): Boolean = newAvalara != null - fun isNewTaxJarConfiguration(): Boolean = newTaxJarConfiguration != null + fun isNewTaxJar(): Boolean = newTaxJar != null - fun asNewAvalaraTaxConfiguration(): NewAvalaraTaxConfiguration = - newAvalaraTaxConfiguration.getOrThrow("newAvalaraTaxConfiguration") + fun asNewAvalara(): NewAvalaraTaxConfiguration = newAvalara.getOrThrow("newAvalara") - fun asNewTaxJarConfiguration(): NewTaxJarConfiguration = - newTaxJarConfiguration.getOrThrow("newTaxJarConfiguration") + fun asNewTaxJar(): NewTaxJarConfiguration = newTaxJar.getOrThrow("newTaxJar") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newAvalaraTaxConfiguration != null -> - visitor.visitNewAvalaraTaxConfiguration(newAvalaraTaxConfiguration) - newTaxJarConfiguration != null -> - visitor.visitNewTaxJarConfiguration(newTaxJarConfiguration) + newAvalara != null -> visitor.visitNewAvalara(newAvalara) + newTaxJar != null -> visitor.visitNewTaxJar(newTaxJar) else -> visitor.unknown(_json) } } @@ -3301,16 +3290,12 @@ constructor( accept( object : Visitor { - override fun visitNewAvalaraTaxConfiguration( - newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration - ) { - newAvalaraTaxConfiguration.validate() + override fun visitNewAvalara(newAvalara: NewAvalaraTaxConfiguration) { + newAvalara.validate() } - override fun visitNewTaxJarConfiguration( - newTaxJarConfiguration: NewTaxJarConfiguration - ) { - newTaxJarConfiguration.validate() + override fun visitNewTaxJar(newTaxJar: NewTaxJarConfiguration) { + newTaxJar.validate() } } ) @@ -3322,17 +3307,15 @@ constructor( return true } - return /* spotless:off */ other is TaxConfiguration && newAvalaraTaxConfiguration == other.newAvalaraTaxConfiguration && newTaxJarConfiguration == other.newTaxJarConfiguration /* spotless:on */ + return /* spotless:off */ other is TaxConfiguration && newAvalara == other.newAvalara && newTaxJar == other.newTaxJar /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newAvalaraTaxConfiguration, newTaxJarConfiguration) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newAvalara, newTaxJar) /* spotless:on */ override fun toString(): String = when { - newAvalaraTaxConfiguration != null -> - "TaxConfiguration{newAvalaraTaxConfiguration=$newAvalaraTaxConfiguration}" - newTaxJarConfiguration != null -> - "TaxConfiguration{newTaxJarConfiguration=$newTaxJarConfiguration}" + newAvalara != null -> "TaxConfiguration{newAvalara=$newAvalara}" + newTaxJar != null -> "TaxConfiguration{newTaxJar=$newTaxJar}" _json != null -> "TaxConfiguration{_unknown=$_json}" else -> throw IllegalStateException("Invalid TaxConfiguration") } @@ -3340,22 +3323,19 @@ constructor( companion object { @JvmStatic - fun ofNewAvalaraTaxConfiguration( - newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration - ) = TaxConfiguration(newAvalaraTaxConfiguration = newAvalaraTaxConfiguration) + fun ofNewAvalara(newAvalara: NewAvalaraTaxConfiguration) = + TaxConfiguration(newAvalara = newAvalara) @JvmStatic - fun ofNewTaxJarConfiguration(newTaxJarConfiguration: NewTaxJarConfiguration) = - TaxConfiguration(newTaxJarConfiguration = newTaxJarConfiguration) + fun ofNewTaxJar(newTaxJar: NewTaxJarConfiguration) = + TaxConfiguration(newTaxJar = newTaxJar) } interface Visitor { - fun visitNewAvalaraTaxConfiguration( - newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration - ): T + fun visitNewAvalara(newAvalara: NewAvalaraTaxConfiguration): T - fun visitNewTaxJarConfiguration(newTaxJarConfiguration: NewTaxJarConfiguration): T + fun visitNewTaxJar(newTaxJar: NewTaxJarConfiguration): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown TaxConfiguration: $json") @@ -3375,10 +3355,7 @@ constructor( it.validate() } ?.let { - return TaxConfiguration( - newAvalaraTaxConfiguration = it, - _json = json - ) + return TaxConfiguration(newAvalara = it, _json = json) } } "taxjar" -> { @@ -3386,7 +3363,7 @@ constructor( it.validate() } ?.let { - return TaxConfiguration(newTaxJarConfiguration = it, _json = json) + return TaxConfiguration(newTaxJar = it, _json = json) } } } @@ -3403,10 +3380,8 @@ constructor( provider: SerializerProvider ) { when { - value.newAvalaraTaxConfiguration != null -> - generator.writeObject(value.newAvalaraTaxConfiguration) - value.newTaxJarConfiguration != null -> - generator.writeObject(value.newTaxJarConfiguration) + value.newAvalara != null -> generator.writeObject(value.newAvalara) + value.newTaxJar != null -> generator.writeObject(value.newTaxJar) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid TaxConfiguration") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateParams.kt index 10ff446e..015b20b1 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateParams.kt @@ -1207,15 +1207,11 @@ constructor( this.taxConfiguration = taxConfiguration } - fun taxConfiguration( - newAvalaraTaxConfiguration: TaxConfiguration.NewAvalaraTaxConfiguration - ) = - taxConfiguration( - TaxConfiguration.ofNewAvalaraTaxConfiguration(newAvalaraTaxConfiguration) - ) + fun taxConfiguration(newAvalara: TaxConfiguration.NewAvalaraTaxConfiguration) = + taxConfiguration(TaxConfiguration.ofNewAvalara(newAvalara)) - fun taxConfiguration(newTaxJarConfiguration: TaxConfiguration.NewTaxJarConfiguration) = - taxConfiguration(TaxConfiguration.ofNewTaxJarConfiguration(newTaxJarConfiguration)) + fun taxConfiguration(newTaxJar: TaxConfiguration.NewTaxJarConfiguration) = + taxConfiguration(TaxConfiguration.ofNewTaxJar(newTaxJar)) /** * Tax IDs are commonly required to be displayed on customer invoices, which are added @@ -1893,14 +1889,13 @@ constructor( body.taxConfiguration(taxConfiguration) } - fun taxConfiguration( - newAvalaraTaxConfiguration: TaxConfiguration.NewAvalaraTaxConfiguration - ) = apply { body.taxConfiguration(newAvalaraTaxConfiguration) } + fun taxConfiguration(newAvalara: TaxConfiguration.NewAvalaraTaxConfiguration) = apply { + body.taxConfiguration(newAvalara) + } - fun taxConfiguration(newTaxJarConfiguration: TaxConfiguration.NewTaxJarConfiguration) = - apply { - body.taxConfiguration(newTaxJarConfiguration) - } + fun taxConfiguration(newTaxJar: TaxConfiguration.NewTaxJarConfiguration) = apply { + body.taxConfiguration(newTaxJar) + } /** * Tax IDs are commonly required to be displayed on customer invoices, which are added to @@ -3253,35 +3248,29 @@ constructor( @JsonSerialize(using = TaxConfiguration.Serializer::class) class TaxConfiguration private constructor( - private val newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration? = null, - private val newTaxJarConfiguration: NewTaxJarConfiguration? = null, + private val newAvalara: NewAvalaraTaxConfiguration? = null, + private val newTaxJar: NewTaxJarConfiguration? = null, private val _json: JsonValue? = null, ) { - fun newAvalaraTaxConfiguration(): Optional = - Optional.ofNullable(newAvalaraTaxConfiguration) + fun newAvalara(): Optional = Optional.ofNullable(newAvalara) - fun newTaxJarConfiguration(): Optional = - Optional.ofNullable(newTaxJarConfiguration) + fun newTaxJar(): Optional = Optional.ofNullable(newTaxJar) - fun isNewAvalaraTaxConfiguration(): Boolean = newAvalaraTaxConfiguration != null + fun isNewAvalara(): Boolean = newAvalara != null - fun isNewTaxJarConfiguration(): Boolean = newTaxJarConfiguration != null + fun isNewTaxJar(): Boolean = newTaxJar != null - fun asNewAvalaraTaxConfiguration(): NewAvalaraTaxConfiguration = - newAvalaraTaxConfiguration.getOrThrow("newAvalaraTaxConfiguration") + fun asNewAvalara(): NewAvalaraTaxConfiguration = newAvalara.getOrThrow("newAvalara") - fun asNewTaxJarConfiguration(): NewTaxJarConfiguration = - newTaxJarConfiguration.getOrThrow("newTaxJarConfiguration") + fun asNewTaxJar(): NewTaxJarConfiguration = newTaxJar.getOrThrow("newTaxJar") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newAvalaraTaxConfiguration != null -> - visitor.visitNewAvalaraTaxConfiguration(newAvalaraTaxConfiguration) - newTaxJarConfiguration != null -> - visitor.visitNewTaxJarConfiguration(newTaxJarConfiguration) + newAvalara != null -> visitor.visitNewAvalara(newAvalara) + newTaxJar != null -> visitor.visitNewTaxJar(newTaxJar) else -> visitor.unknown(_json) } } @@ -3295,16 +3284,12 @@ constructor( accept( object : Visitor { - override fun visitNewAvalaraTaxConfiguration( - newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration - ) { - newAvalaraTaxConfiguration.validate() + override fun visitNewAvalara(newAvalara: NewAvalaraTaxConfiguration) { + newAvalara.validate() } - override fun visitNewTaxJarConfiguration( - newTaxJarConfiguration: NewTaxJarConfiguration - ) { - newTaxJarConfiguration.validate() + override fun visitNewTaxJar(newTaxJar: NewTaxJarConfiguration) { + newTaxJar.validate() } } ) @@ -3316,17 +3301,15 @@ constructor( return true } - return /* spotless:off */ other is TaxConfiguration && newAvalaraTaxConfiguration == other.newAvalaraTaxConfiguration && newTaxJarConfiguration == other.newTaxJarConfiguration /* spotless:on */ + return /* spotless:off */ other is TaxConfiguration && newAvalara == other.newAvalara && newTaxJar == other.newTaxJar /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newAvalaraTaxConfiguration, newTaxJarConfiguration) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newAvalara, newTaxJar) /* spotless:on */ override fun toString(): String = when { - newAvalaraTaxConfiguration != null -> - "TaxConfiguration{newAvalaraTaxConfiguration=$newAvalaraTaxConfiguration}" - newTaxJarConfiguration != null -> - "TaxConfiguration{newTaxJarConfiguration=$newTaxJarConfiguration}" + newAvalara != null -> "TaxConfiguration{newAvalara=$newAvalara}" + newTaxJar != null -> "TaxConfiguration{newTaxJar=$newTaxJar}" _json != null -> "TaxConfiguration{_unknown=$_json}" else -> throw IllegalStateException("Invalid TaxConfiguration") } @@ -3334,22 +3317,19 @@ constructor( companion object { @JvmStatic - fun ofNewAvalaraTaxConfiguration( - newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration - ) = TaxConfiguration(newAvalaraTaxConfiguration = newAvalaraTaxConfiguration) + fun ofNewAvalara(newAvalara: NewAvalaraTaxConfiguration) = + TaxConfiguration(newAvalara = newAvalara) @JvmStatic - fun ofNewTaxJarConfiguration(newTaxJarConfiguration: NewTaxJarConfiguration) = - TaxConfiguration(newTaxJarConfiguration = newTaxJarConfiguration) + fun ofNewTaxJar(newTaxJar: NewTaxJarConfiguration) = + TaxConfiguration(newTaxJar = newTaxJar) } interface Visitor { - fun visitNewAvalaraTaxConfiguration( - newAvalaraTaxConfiguration: NewAvalaraTaxConfiguration - ): T + fun visitNewAvalara(newAvalara: NewAvalaraTaxConfiguration): T - fun visitNewTaxJarConfiguration(newTaxJarConfiguration: NewTaxJarConfiguration): T + fun visitNewTaxJar(newTaxJar: NewTaxJarConfiguration): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown TaxConfiguration: $json") @@ -3369,10 +3349,7 @@ constructor( it.validate() } ?.let { - return TaxConfiguration( - newAvalaraTaxConfiguration = it, - _json = json - ) + return TaxConfiguration(newAvalara = it, _json = json) } } "taxjar" -> { @@ -3380,7 +3357,7 @@ constructor( it.validate() } ?.let { - return TaxConfiguration(newTaxJarConfiguration = it, _json = json) + return TaxConfiguration(newTaxJar = it, _json = json) } } } @@ -3397,10 +3374,8 @@ constructor( provider: SerializerProvider ) { when { - value.newAvalaraTaxConfiguration != null -> - generator.writeObject(value.newAvalaraTaxConfiguration) - value.newTaxJarConfiguration != null -> - generator.writeObject(value.newTaxJarConfiguration) + value.newAvalara != null -> generator.writeObject(value.newAvalara) + value.newTaxJar != null -> generator.writeObject(value.newTaxJar) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid TaxConfiguration") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/Discount.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/Discount.kt index 7bc8dbee..1fe7434d 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/Discount.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/Discount.kt @@ -34,46 +34,45 @@ import kotlin.jvm.optionals.getOrNull @JsonSerialize(using = Discount.Serializer::class) class Discount private constructor( - private val percentageDiscount: PercentageDiscount? = null, - private val trialDiscount: TrialDiscount? = null, - private val usageDiscount: UsageDiscount? = null, - private val amountDiscount: AmountDiscount? = null, + private val percentage: PercentageDiscount? = null, + private val trial: TrialDiscount? = null, + private val usage: UsageDiscount? = null, + private val amount: AmountDiscount? = null, private val _json: JsonValue? = null, ) { - fun percentageDiscount(): Optional = Optional.ofNullable(percentageDiscount) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun trialDiscount(): Optional = Optional.ofNullable(trialDiscount) + fun trial(): Optional = Optional.ofNullable(trial) - fun usageDiscount(): Optional = Optional.ofNullable(usageDiscount) + fun usage(): Optional = Optional.ofNullable(usage) - fun amountDiscount(): Optional = Optional.ofNullable(amountDiscount) + fun amount(): Optional = Optional.ofNullable(amount) - fun isPercentageDiscount(): Boolean = percentageDiscount != null + fun isPercentage(): Boolean = percentage != null - fun isTrialDiscount(): Boolean = trialDiscount != null + fun isTrial(): Boolean = trial != null - fun isUsageDiscount(): Boolean = usageDiscount != null + fun isUsage(): Boolean = usage != null - fun isAmountDiscount(): Boolean = amountDiscount != null + fun isAmount(): Boolean = amount != null - fun asPercentageDiscount(): PercentageDiscount = - percentageDiscount.getOrThrow("percentageDiscount") + fun asPercentage(): PercentageDiscount = percentage.getOrThrow("percentage") - fun asTrialDiscount(): TrialDiscount = trialDiscount.getOrThrow("trialDiscount") + fun asTrial(): TrialDiscount = trial.getOrThrow("trial") - fun asUsageDiscount(): UsageDiscount = usageDiscount.getOrThrow("usageDiscount") + fun asUsage(): UsageDiscount = usage.getOrThrow("usage") - fun asAmountDiscount(): AmountDiscount = amountDiscount.getOrThrow("amountDiscount") + fun asAmount(): AmountDiscount = amount.getOrThrow("amount") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - percentageDiscount != null -> visitor.visitPercentageDiscount(percentageDiscount) - trialDiscount != null -> visitor.visitTrialDiscount(trialDiscount) - usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) - amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentage != null -> visitor.visitPercentage(percentage) + trial != null -> visitor.visitTrial(trial) + usage != null -> visitor.visitUsage(usage) + amount != null -> visitor.visitAmount(amount) else -> visitor.unknown(_json) } } @@ -87,20 +86,20 @@ private constructor( accept( object : Visitor { - override fun visitPercentageDiscount(percentageDiscount: PercentageDiscount) { - percentageDiscount.validate() + override fun visitPercentage(percentage: PercentageDiscount) { + percentage.validate() } - override fun visitTrialDiscount(trialDiscount: TrialDiscount) { - trialDiscount.validate() + override fun visitTrial(trial: TrialDiscount) { + trial.validate() } - override fun visitUsageDiscount(usageDiscount: UsageDiscount) { - usageDiscount.validate() + override fun visitUsage(usage: UsageDiscount) { + usage.validate() } - override fun visitAmountDiscount(amountDiscount: AmountDiscount) { - amountDiscount.validate() + override fun visitAmount(amount: AmountDiscount) { + amount.validate() } } ) @@ -112,17 +111,17 @@ private constructor( return true } - return /* spotless:off */ other is Discount && percentageDiscount == other.percentageDiscount && trialDiscount == other.trialDiscount && usageDiscount == other.usageDiscount && amountDiscount == other.amountDiscount /* spotless:on */ + return /* spotless:off */ other is Discount && percentage == other.percentage && trial == other.trial && usage == other.usage && amount == other.amount /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(percentageDiscount, trialDiscount, usageDiscount, amountDiscount) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(percentage, trial, usage, amount) /* spotless:on */ override fun toString(): String = when { - percentageDiscount != null -> "Discount{percentageDiscount=$percentageDiscount}" - trialDiscount != null -> "Discount{trialDiscount=$trialDiscount}" - usageDiscount != null -> "Discount{usageDiscount=$usageDiscount}" - amountDiscount != null -> "Discount{amountDiscount=$amountDiscount}" + percentage != null -> "Discount{percentage=$percentage}" + trial != null -> "Discount{trial=$trial}" + usage != null -> "Discount{usage=$usage}" + amount != null -> "Discount{amount=$amount}" _json != null -> "Discount{_unknown=$_json}" else -> throw IllegalStateException("Invalid Discount") } @@ -130,29 +129,24 @@ private constructor( companion object { @JvmStatic - fun ofPercentageDiscount(percentageDiscount: PercentageDiscount) = - Discount(percentageDiscount = percentageDiscount) + fun ofPercentage(percentage: PercentageDiscount) = Discount(percentage = percentage) - @JvmStatic - fun ofTrialDiscount(trialDiscount: TrialDiscount) = Discount(trialDiscount = trialDiscount) + @JvmStatic fun ofTrial(trial: TrialDiscount) = Discount(trial = trial) - @JvmStatic - fun ofUsageDiscount(usageDiscount: UsageDiscount) = Discount(usageDiscount = usageDiscount) + @JvmStatic fun ofUsage(usage: UsageDiscount) = Discount(usage = usage) - @JvmStatic - fun ofAmountDiscount(amountDiscount: AmountDiscount) = - Discount(amountDiscount = amountDiscount) + @JvmStatic fun ofAmount(amount: AmountDiscount) = Discount(amount = amount) } interface Visitor { - fun visitPercentageDiscount(percentageDiscount: PercentageDiscount): T + fun visitPercentage(percentage: PercentageDiscount): T - fun visitTrialDiscount(trialDiscount: TrialDiscount): T + fun visitTrial(trial: TrialDiscount): T - fun visitUsageDiscount(usageDiscount: UsageDiscount): T + fun visitUsage(usage: UsageDiscount): T - fun visitAmountDiscount(amountDiscount: AmountDiscount): T + fun visitAmount(amount: AmountDiscount): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Discount: $json") @@ -170,25 +164,25 @@ private constructor( "percentage" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Discount(percentageDiscount = it, _json = json) + return Discount(percentage = it, _json = json) } } "trial" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Discount(trialDiscount = it, _json = json) + return Discount(trial = it, _json = json) } } "usage" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Discount(usageDiscount = it, _json = json) + return Discount(usage = it, _json = json) } } "amount" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Discount(amountDiscount = it, _json = json) + return Discount(amount = it, _json = json) } } } @@ -205,10 +199,10 @@ private constructor( provider: SerializerProvider ) { when { - value.percentageDiscount != null -> generator.writeObject(value.percentageDiscount) - value.trialDiscount != null -> generator.writeObject(value.trialDiscount) - value.usageDiscount != null -> generator.writeObject(value.usageDiscount) - value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentage != null -> generator.writeObject(value.percentage) + value.trial != null -> generator.writeObject(value.trial) + value.usage != null -> generator.writeObject(value.usage) + value.amount != null -> generator.writeObject(value.amount) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Discount") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt index 6552c9e1..36b0a777 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt @@ -1347,14 +1347,12 @@ private constructor( } } - fun addDiscount(percentageDiscount: PercentageDiscount) = - addDiscount(InvoiceLevelDiscount.ofPercentageDiscount(percentageDiscount)) + fun addDiscount(percentage: PercentageDiscount) = + addDiscount(InvoiceLevelDiscount.ofPercentage(percentage)) - fun addDiscount(amountDiscount: AmountDiscount) = - addDiscount(InvoiceLevelDiscount.ofAmountDiscount(amountDiscount)) + fun addDiscount(amount: AmountDiscount) = addDiscount(InvoiceLevelDiscount.ofAmount(amount)) - fun addDiscount(trialDiscount: TrialDiscount) = - addDiscount(InvoiceLevelDiscount.ofTrialDiscount(trialDiscount)) + fun addDiscount(trial: TrialDiscount) = addDiscount(InvoiceLevelDiscount.ofTrial(trial)) /** * When the invoice payment is due. The due date is null if the invoice is not yet @@ -2640,7 +2638,7 @@ private constructor( private val endingBalance: JsonField = JsonMissing.of(), @JsonProperty("invoice") @ExcludeMissing - private val invoice: JsonField = JsonMissing.of(), + private val invoice: JsonField = JsonMissing.of(), @JsonProperty("starting_balance") @ExcludeMissing private val startingBalance: JsonField = JsonMissing.of(), @@ -2673,7 +2671,7 @@ private constructor( */ fun endingBalance(): String = endingBalance.getRequired("ending_balance") - fun invoice(): Optional = Optional.ofNullable(invoice.getNullable("invoice")) + fun invoice(): Optional = Optional.ofNullable(invoice.getNullable("invoice")) /** * The original value of the customer's balance prior to the transaction, in the customer's @@ -2713,7 +2711,7 @@ private constructor( @ExcludeMissing fun _endingBalance(): JsonField = endingBalance - @JsonProperty("invoice") @ExcludeMissing fun _invoice(): JsonField = invoice + @JsonProperty("invoice") @ExcludeMissing fun _invoice(): JsonField = invoice /** * The original value of the customer's balance prior to the transaction, in the customer's @@ -2765,7 +2763,7 @@ private constructor( private var creditNote: JsonField? = null private var description: JsonField? = null private var endingBalance: JsonField? = null - private var invoice: JsonField? = null + private var invoice: JsonField? = null private var startingBalance: JsonField? = null private var type: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @@ -2843,11 +2841,11 @@ private constructor( this.endingBalance = endingBalance } - fun invoice(invoice: Invoice?) = invoice(JsonField.ofNullable(invoice)) + fun invoice(invoice: InnerInvoice?) = invoice(JsonField.ofNullable(invoice)) - fun invoice(invoice: Optional) = invoice(invoice.orElse(null)) + fun invoice(invoice: Optional) = invoice(invoice.orElse(null)) - fun invoice(invoice: JsonField) = apply { this.invoice = invoice } + fun invoice(invoice: JsonField) = apply { this.invoice = invoice } /** * The original value of the customer's balance prior to the transaction, in the @@ -3097,7 +3095,7 @@ private constructor( } @NoAutoDetect - class Invoice + class InnerInvoice @JsonCreator private constructor( @JsonProperty("id") @@ -3119,7 +3117,7 @@ private constructor( private var validated: Boolean = false - fun validate(): Invoice = apply { + fun validate(): InnerInvoice = apply { if (validated) { return@apply } @@ -3141,9 +3139,9 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(invoice: Invoice) = apply { - id = invoice.id - additionalProperties = invoice.additionalProperties.toMutableMap() + internal fun from(innerInvoice: InnerInvoice) = apply { + id = innerInvoice.id + additionalProperties = innerInvoice.additionalProperties.toMutableMap() } /** The Invoice id */ @@ -3174,8 +3172,8 @@ private constructor( keys.forEach(::removeAdditionalProperty) } - fun build(): Invoice = - Invoice(checkRequired("id", id), additionalProperties.toImmutable()) + fun build(): InnerInvoice = + InnerInvoice(checkRequired("id", id), additionalProperties.toImmutable()) } override fun equals(other: Any?): Boolean { @@ -3183,7 +3181,7 @@ private constructor( return true } - return /* spotless:off */ other is Invoice && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is InnerInvoice && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ @@ -3192,7 +3190,8 @@ private constructor( override fun hashCode(): Int = hashCode - override fun toString() = "Invoice{id=$id, additionalProperties=$additionalProperties}" + override fun toString() = + "InnerInvoice{id=$id, additionalProperties=$additionalProperties}" } class Type @@ -4837,17 +4836,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) /** The end date of the range of time applied for this line item's price. */ fun endDate(endDate: OffsetDateTime) = endDate(JsonField.of(endDate)) @@ -4968,7 +4964,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -4996,7 +4992,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5010,7 +5006,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5024,8 +5020,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5039,7 +5034,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5053,7 +5048,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5067,7 +5062,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5081,8 +5076,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5096,8 +5091,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5111,8 +5106,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5126,8 +5121,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5141,8 +5136,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5156,8 +5151,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5171,8 +5166,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5186,8 +5181,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5201,8 +5196,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5216,8 +5211,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5231,8 +5226,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5246,8 +5241,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5261,8 +5256,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5276,8 +5271,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5291,8 +5286,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5306,8 +5301,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5321,8 +5316,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) fun quantity(quantity: Double) = quantity(JsonField.of(quantity)) @@ -5372,22 +5367,22 @@ private constructor( * For complex pricing structures, the line item can be broken down further in * `sub_line_items`. */ - fun addSubLineItem(matrixSubLineItem: SubLineItem.MatrixSubLineItem) = - addSubLineItem(SubLineItem.ofMatrixSubLineItem(matrixSubLineItem)) + fun addSubLineItem(matrix: SubLineItem.MatrixSubLineItem) = + addSubLineItem(SubLineItem.ofMatrix(matrix)) /** * For complex pricing structures, the line item can be broken down further in * `sub_line_items`. */ - fun addSubLineItem(tierSubLineItem: SubLineItem.TierSubLineItem) = - addSubLineItem(SubLineItem.ofTierSubLineItem(tierSubLineItem)) + fun addSubLineItem(tier: SubLineItem.TierSubLineItem) = + addSubLineItem(SubLineItem.ofTier(tier)) /** * For complex pricing structures, the line item can be broken down further in * `sub_line_items`. */ - fun addSubLineItem(otherSubLineItem: SubLineItem.OtherSubLineItem) = - addSubLineItem(SubLineItem.ofOtherSubLineItem(otherSubLineItem)) + fun addSubLineItem(other: SubLineItem.OtherSubLineItem) = + addSubLineItem(SubLineItem.ofOther(other)) /** The line amount before any line item-specific discounts or minimums. */ fun subtotal(subtotal: String) = subtotal(JsonField.of(subtotal)) @@ -5799,41 +5794,37 @@ private constructor( @JsonSerialize(using = SubLineItem.Serializer::class) class SubLineItem private constructor( - private val matrixSubLineItem: MatrixSubLineItem? = null, - private val tierSubLineItem: TierSubLineItem? = null, - private val otherSubLineItem: OtherSubLineItem? = null, + private val matrix: MatrixSubLineItem? = null, + private val tier: TierSubLineItem? = null, + private val other: OtherSubLineItem? = null, private val _json: JsonValue? = null, ) { - fun matrixSubLineItem(): Optional = - Optional.ofNullable(matrixSubLineItem) + fun matrix(): Optional = Optional.ofNullable(matrix) - fun tierSubLineItem(): Optional = Optional.ofNullable(tierSubLineItem) + fun tier(): Optional = Optional.ofNullable(tier) - fun otherSubLineItem(): Optional = - Optional.ofNullable(otherSubLineItem) + fun other(): Optional = Optional.ofNullable(other) - fun isMatrixSubLineItem(): Boolean = matrixSubLineItem != null + fun isMatrix(): Boolean = matrix != null - fun isTierSubLineItem(): Boolean = tierSubLineItem != null + fun isTier(): Boolean = tier != null - fun isOtherSubLineItem(): Boolean = otherSubLineItem != null + fun isOther(): Boolean = other != null - fun asMatrixSubLineItem(): MatrixSubLineItem = - matrixSubLineItem.getOrThrow("matrixSubLineItem") + fun asMatrix(): MatrixSubLineItem = matrix.getOrThrow("matrix") - fun asTierSubLineItem(): TierSubLineItem = tierSubLineItem.getOrThrow("tierSubLineItem") + fun asTier(): TierSubLineItem = tier.getOrThrow("tier") - fun asOtherSubLineItem(): OtherSubLineItem = - otherSubLineItem.getOrThrow("otherSubLineItem") + fun asOther(): OtherSubLineItem = other.getOrThrow("other") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - matrixSubLineItem != null -> visitor.visitMatrixSubLineItem(matrixSubLineItem) - tierSubLineItem != null -> visitor.visitTierSubLineItem(tierSubLineItem) - otherSubLineItem != null -> visitor.visitOtherSubLineItem(otherSubLineItem) + matrix != null -> visitor.visitMatrix(matrix) + tier != null -> visitor.visitTier(tier) + other != null -> visitor.visitOther(other) else -> visitor.unknown(_json) } } @@ -5847,16 +5838,16 @@ private constructor( accept( object : Visitor { - override fun visitMatrixSubLineItem(matrixSubLineItem: MatrixSubLineItem) { - matrixSubLineItem.validate() + override fun visitMatrix(matrix: MatrixSubLineItem) { + matrix.validate() } - override fun visitTierSubLineItem(tierSubLineItem: TierSubLineItem) { - tierSubLineItem.validate() + override fun visitTier(tier: TierSubLineItem) { + tier.validate() } - override fun visitOtherSubLineItem(otherSubLineItem: OtherSubLineItem) { - otherSubLineItem.validate() + override fun visitOther(other: OtherSubLineItem) { + other.validate() } } ) @@ -5868,42 +5859,36 @@ private constructor( return true } - return /* spotless:off */ other is SubLineItem && matrixSubLineItem == other.matrixSubLineItem && tierSubLineItem == other.tierSubLineItem && otherSubLineItem == other.otherSubLineItem /* spotless:on */ + return /* spotless:off */ other is SubLineItem && matrix == other.matrix && tier == other.tier && this.other == other.other /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(matrixSubLineItem, tierSubLineItem, otherSubLineItem) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(matrix, tier, other) /* spotless:on */ override fun toString(): String = when { - matrixSubLineItem != null -> "SubLineItem{matrixSubLineItem=$matrixSubLineItem}" - tierSubLineItem != null -> "SubLineItem{tierSubLineItem=$tierSubLineItem}" - otherSubLineItem != null -> "SubLineItem{otherSubLineItem=$otherSubLineItem}" + matrix != null -> "SubLineItem{matrix=$matrix}" + tier != null -> "SubLineItem{tier=$tier}" + other != null -> "SubLineItem{other=$other}" _json != null -> "SubLineItem{_unknown=$_json}" else -> throw IllegalStateException("Invalid SubLineItem") } companion object { - @JvmStatic - fun ofMatrixSubLineItem(matrixSubLineItem: MatrixSubLineItem) = - SubLineItem(matrixSubLineItem = matrixSubLineItem) + @JvmStatic fun ofMatrix(matrix: MatrixSubLineItem) = SubLineItem(matrix = matrix) - @JvmStatic - fun ofTierSubLineItem(tierSubLineItem: TierSubLineItem) = - SubLineItem(tierSubLineItem = tierSubLineItem) + @JvmStatic fun ofTier(tier: TierSubLineItem) = SubLineItem(tier = tier) - @JvmStatic - fun ofOtherSubLineItem(otherSubLineItem: OtherSubLineItem) = - SubLineItem(otherSubLineItem = otherSubLineItem) + @JvmStatic fun ofOther(other: OtherSubLineItem) = SubLineItem(other = other) } interface Visitor { - fun visitMatrixSubLineItem(matrixSubLineItem: MatrixSubLineItem): T + fun visitMatrix(matrix: MatrixSubLineItem): T - fun visitTierSubLineItem(tierSubLineItem: TierSubLineItem): T + fun visitTier(tier: TierSubLineItem): T - fun visitOtherSubLineItem(otherSubLineItem: OtherSubLineItem): T + fun visitOther(other: OtherSubLineItem): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown SubLineItem: $json") @@ -5922,7 +5907,7 @@ private constructor( it.validate() } ?.let { - return SubLineItem(matrixSubLineItem = it, _json = json) + return SubLineItem(matrix = it, _json = json) } } "tier" -> { @@ -5930,7 +5915,7 @@ private constructor( it.validate() } ?.let { - return SubLineItem(tierSubLineItem = it, _json = json) + return SubLineItem(tier = it, _json = json) } } "'null'" -> { @@ -5938,7 +5923,7 @@ private constructor( it.validate() } ?.let { - return SubLineItem(otherSubLineItem = it, _json = json) + return SubLineItem(other = it, _json = json) } } } @@ -5955,12 +5940,9 @@ private constructor( provider: SerializerProvider ) { when { - value.matrixSubLineItem != null -> - generator.writeObject(value.matrixSubLineItem) - value.tierSubLineItem != null -> - generator.writeObject(value.tierSubLineItem) - value.otherSubLineItem != null -> - generator.writeObject(value.otherSubLineItem) + value.matrix != null -> generator.writeObject(value.matrix) + value.tier != null -> generator.writeObject(value.tier) + value.other != null -> generator.writeObject(value.other) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid SubLineItem") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceCreateParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceCreateParams.kt index 62454375..e08b2082 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceCreateParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceCreateParams.kt @@ -443,20 +443,17 @@ constructor( fun discount(discount: JsonField) = apply { this.discount = discount } /** An optional discount to attach to the invoice. */ - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) /** An optional discount to attach to the invoice. */ - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) /** An optional discount to attach to the invoice. */ - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) /** An optional discount to attach to the invoice. */ - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) /** * The `external_customer_id` of the `Customer` to create this invoice for. One of @@ -670,18 +667,16 @@ constructor( fun discount(discount: JsonField) = apply { body.discount(discount) } /** An optional discount to attach to the invoice. */ - fun discount(percentageDiscount: PercentageDiscount) = apply { - body.discount(percentageDiscount) - } + fun discount(percentage: PercentageDiscount) = apply { body.discount(percentage) } /** An optional discount to attach to the invoice. */ - fun discount(trialDiscount: TrialDiscount) = apply { body.discount(trialDiscount) } + fun discount(trial: TrialDiscount) = apply { body.discount(trial) } /** An optional discount to attach to the invoice. */ - fun discount(usageDiscount: Discount.UsageDiscount) = apply { body.discount(usageDiscount) } + fun discount(usage: Discount.UsageDiscount) = apply { body.discount(usage) } /** An optional discount to attach to the invoice. */ - fun discount(amountDiscount: AmountDiscount) = apply { body.discount(amountDiscount) } + fun discount(amount: AmountDiscount) = apply { body.discount(amount) } /** * The `external_customer_id` of the `Customer` to create this invoice for. One of diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponse.kt index 0b3a19d0..9b25cff7 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponse.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponse.kt @@ -1341,14 +1341,12 @@ private constructor( } } - fun addDiscount(percentageDiscount: PercentageDiscount) = - addDiscount(InvoiceLevelDiscount.ofPercentageDiscount(percentageDiscount)) + fun addDiscount(percentage: PercentageDiscount) = + addDiscount(InvoiceLevelDiscount.ofPercentage(percentage)) - fun addDiscount(amountDiscount: AmountDiscount) = - addDiscount(InvoiceLevelDiscount.ofAmountDiscount(amountDiscount)) + fun addDiscount(amount: AmountDiscount) = addDiscount(InvoiceLevelDiscount.ofAmount(amount)) - fun addDiscount(trialDiscount: TrialDiscount) = - addDiscount(InvoiceLevelDiscount.ofTrialDiscount(trialDiscount)) + fun addDiscount(trial: TrialDiscount) = addDiscount(InvoiceLevelDiscount.ofTrial(trial)) /** * When the invoice payment is due. The due date is null if the invoice is not yet @@ -4831,17 +4829,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) /** The end date of the range of time applied for this line item's price. */ fun endDate(endDate: OffsetDateTime) = endDate(JsonField.of(endDate)) @@ -4962,7 +4957,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -4990,7 +4985,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5004,7 +4999,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5018,8 +5013,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5033,7 +5027,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5047,7 +5041,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5061,7 +5055,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5075,8 +5069,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5090,8 +5084,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5105,8 +5099,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5120,8 +5114,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5135,8 +5129,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5150,8 +5144,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5165,8 +5159,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5180,8 +5174,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5195,8 +5189,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5210,8 +5204,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5225,8 +5219,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5240,8 +5234,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5255,8 +5249,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5270,8 +5264,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5285,8 +5279,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5300,8 +5294,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5315,8 +5309,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) fun quantity(quantity: Double) = quantity(JsonField.of(quantity)) @@ -5366,22 +5360,22 @@ private constructor( * For complex pricing structures, the line item can be broken down further in * `sub_line_items`. */ - fun addSubLineItem(matrixSubLineItem: SubLineItem.MatrixSubLineItem) = - addSubLineItem(SubLineItem.ofMatrixSubLineItem(matrixSubLineItem)) + fun addSubLineItem(matrix: SubLineItem.MatrixSubLineItem) = + addSubLineItem(SubLineItem.ofMatrix(matrix)) /** * For complex pricing structures, the line item can be broken down further in * `sub_line_items`. */ - fun addSubLineItem(tierSubLineItem: SubLineItem.TierSubLineItem) = - addSubLineItem(SubLineItem.ofTierSubLineItem(tierSubLineItem)) + fun addSubLineItem(tier: SubLineItem.TierSubLineItem) = + addSubLineItem(SubLineItem.ofTier(tier)) /** * For complex pricing structures, the line item can be broken down further in * `sub_line_items`. */ - fun addSubLineItem(otherSubLineItem: SubLineItem.OtherSubLineItem) = - addSubLineItem(SubLineItem.ofOtherSubLineItem(otherSubLineItem)) + fun addSubLineItem(other: SubLineItem.OtherSubLineItem) = + addSubLineItem(SubLineItem.ofOther(other)) /** The line amount before any line item-specific discounts or minimums. */ fun subtotal(subtotal: String) = subtotal(JsonField.of(subtotal)) @@ -5793,41 +5787,37 @@ private constructor( @JsonSerialize(using = SubLineItem.Serializer::class) class SubLineItem private constructor( - private val matrixSubLineItem: MatrixSubLineItem? = null, - private val tierSubLineItem: TierSubLineItem? = null, - private val otherSubLineItem: OtherSubLineItem? = null, + private val matrix: MatrixSubLineItem? = null, + private val tier: TierSubLineItem? = null, + private val other: OtherSubLineItem? = null, private val _json: JsonValue? = null, ) { - fun matrixSubLineItem(): Optional = - Optional.ofNullable(matrixSubLineItem) + fun matrix(): Optional = Optional.ofNullable(matrix) - fun tierSubLineItem(): Optional = Optional.ofNullable(tierSubLineItem) + fun tier(): Optional = Optional.ofNullable(tier) - fun otherSubLineItem(): Optional = - Optional.ofNullable(otherSubLineItem) + fun other(): Optional = Optional.ofNullable(other) - fun isMatrixSubLineItem(): Boolean = matrixSubLineItem != null + fun isMatrix(): Boolean = matrix != null - fun isTierSubLineItem(): Boolean = tierSubLineItem != null + fun isTier(): Boolean = tier != null - fun isOtherSubLineItem(): Boolean = otherSubLineItem != null + fun isOther(): Boolean = other != null - fun asMatrixSubLineItem(): MatrixSubLineItem = - matrixSubLineItem.getOrThrow("matrixSubLineItem") + fun asMatrix(): MatrixSubLineItem = matrix.getOrThrow("matrix") - fun asTierSubLineItem(): TierSubLineItem = tierSubLineItem.getOrThrow("tierSubLineItem") + fun asTier(): TierSubLineItem = tier.getOrThrow("tier") - fun asOtherSubLineItem(): OtherSubLineItem = - otherSubLineItem.getOrThrow("otherSubLineItem") + fun asOther(): OtherSubLineItem = other.getOrThrow("other") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - matrixSubLineItem != null -> visitor.visitMatrixSubLineItem(matrixSubLineItem) - tierSubLineItem != null -> visitor.visitTierSubLineItem(tierSubLineItem) - otherSubLineItem != null -> visitor.visitOtherSubLineItem(otherSubLineItem) + matrix != null -> visitor.visitMatrix(matrix) + tier != null -> visitor.visitTier(tier) + other != null -> visitor.visitOther(other) else -> visitor.unknown(_json) } } @@ -5841,16 +5831,16 @@ private constructor( accept( object : Visitor { - override fun visitMatrixSubLineItem(matrixSubLineItem: MatrixSubLineItem) { - matrixSubLineItem.validate() + override fun visitMatrix(matrix: MatrixSubLineItem) { + matrix.validate() } - override fun visitTierSubLineItem(tierSubLineItem: TierSubLineItem) { - tierSubLineItem.validate() + override fun visitTier(tier: TierSubLineItem) { + tier.validate() } - override fun visitOtherSubLineItem(otherSubLineItem: OtherSubLineItem) { - otherSubLineItem.validate() + override fun visitOther(other: OtherSubLineItem) { + other.validate() } } ) @@ -5862,42 +5852,36 @@ private constructor( return true } - return /* spotless:off */ other is SubLineItem && matrixSubLineItem == other.matrixSubLineItem && tierSubLineItem == other.tierSubLineItem && otherSubLineItem == other.otherSubLineItem /* spotless:on */ + return /* spotless:off */ other is SubLineItem && matrix == other.matrix && tier == other.tier && this.other == other.other /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(matrixSubLineItem, tierSubLineItem, otherSubLineItem) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(matrix, tier, other) /* spotless:on */ override fun toString(): String = when { - matrixSubLineItem != null -> "SubLineItem{matrixSubLineItem=$matrixSubLineItem}" - tierSubLineItem != null -> "SubLineItem{tierSubLineItem=$tierSubLineItem}" - otherSubLineItem != null -> "SubLineItem{otherSubLineItem=$otherSubLineItem}" + matrix != null -> "SubLineItem{matrix=$matrix}" + tier != null -> "SubLineItem{tier=$tier}" + other != null -> "SubLineItem{other=$other}" _json != null -> "SubLineItem{_unknown=$_json}" else -> throw IllegalStateException("Invalid SubLineItem") } companion object { - @JvmStatic - fun ofMatrixSubLineItem(matrixSubLineItem: MatrixSubLineItem) = - SubLineItem(matrixSubLineItem = matrixSubLineItem) + @JvmStatic fun ofMatrix(matrix: MatrixSubLineItem) = SubLineItem(matrix = matrix) - @JvmStatic - fun ofTierSubLineItem(tierSubLineItem: TierSubLineItem) = - SubLineItem(tierSubLineItem = tierSubLineItem) + @JvmStatic fun ofTier(tier: TierSubLineItem) = SubLineItem(tier = tier) - @JvmStatic - fun ofOtherSubLineItem(otherSubLineItem: OtherSubLineItem) = - SubLineItem(otherSubLineItem = otherSubLineItem) + @JvmStatic fun ofOther(other: OtherSubLineItem) = SubLineItem(other = other) } interface Visitor { - fun visitMatrixSubLineItem(matrixSubLineItem: MatrixSubLineItem): T + fun visitMatrix(matrix: MatrixSubLineItem): T - fun visitTierSubLineItem(tierSubLineItem: TierSubLineItem): T + fun visitTier(tier: TierSubLineItem): T - fun visitOtherSubLineItem(otherSubLineItem: OtherSubLineItem): T + fun visitOther(other: OtherSubLineItem): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown SubLineItem: $json") @@ -5916,7 +5900,7 @@ private constructor( it.validate() } ?.let { - return SubLineItem(matrixSubLineItem = it, _json = json) + return SubLineItem(matrix = it, _json = json) } } "tier" -> { @@ -5924,7 +5908,7 @@ private constructor( it.validate() } ?.let { - return SubLineItem(tierSubLineItem = it, _json = json) + return SubLineItem(tier = it, _json = json) } } "'null'" -> { @@ -5932,7 +5916,7 @@ private constructor( it.validate() } ?.let { - return SubLineItem(otherSubLineItem = it, _json = json) + return SubLineItem(other = it, _json = json) } } } @@ -5949,12 +5933,9 @@ private constructor( provider: SerializerProvider ) { when { - value.matrixSubLineItem != null -> - generator.writeObject(value.matrixSubLineItem) - value.tierSubLineItem != null -> - generator.writeObject(value.tierSubLineItem) - value.otherSubLineItem != null -> - generator.writeObject(value.otherSubLineItem) + value.matrix != null -> generator.writeObject(value.matrix) + value.tier != null -> generator.writeObject(value.tier) + value.other != null -> generator.writeObject(value.other) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid SubLineItem") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceIssueParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceIssueParams.kt index 4d3f0847..09b44e41 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceIssueParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceIssueParams.kt @@ -38,7 +38,7 @@ constructor( /** * If true, the invoice will be issued synchronously. If false, the invoice will be issued - * asynchronously. The synchronous option is only available for invoices containin no usage + * asynchronously. The synchronous option is only available for invoices that have no usage * fees. If the invoice is configured to sync to an external provider, a successful response * from this endpoint guarantees the invoice is present in the provider. */ @@ -46,7 +46,7 @@ constructor( /** * If true, the invoice will be issued synchronously. If false, the invoice will be issued - * asynchronously. The synchronous option is only available for invoices containin no usage + * asynchronously. The synchronous option is only available for invoices that have no usage * fees. If the invoice is configured to sync to an external provider, a successful response * from this endpoint guarantees the invoice is present in the provider. */ @@ -84,7 +84,7 @@ constructor( /** * If true, the invoice will be issued synchronously. If false, the invoice will be issued - * asynchronously. The synchronous option is only available for invoices containin no usage + * asynchronously. The synchronous option is only available for invoices that have no usage * fees. If the invoice is configured to sync to an external provider, a successful response * from this endpoint guarantees the invoice is present in the provider. */ @@ -93,7 +93,7 @@ constructor( /** * If true, the invoice will be issued synchronously. If false, the invoice will be issued - * asynchronously. The synchronous option is only available for invoices containin no usage + * asynchronously. The synchronous option is only available for invoices that have no usage * fees. If the invoice is configured to sync to an external provider, a successful response * from this endpoint guarantees the invoice is present in the provider. */ @@ -136,19 +136,19 @@ constructor( /** * If true, the invoice will be issued synchronously. If false, the invoice will be - * issued asynchronously. The synchronous option is only available for invoices - * containin no usage fees. If the invoice is configured to sync to an external - * provider, a successful response from this endpoint guarantees the invoice is present - * in the provider. + * issued asynchronously. The synchronous option is only available for invoices that + * have no usage fees. If the invoice is configured to sync to an external provider, a + * successful response from this endpoint guarantees the invoice is present in the + * provider. */ fun synchronous(synchronous: Boolean) = synchronous(JsonField.of(synchronous)) /** * If true, the invoice will be issued synchronously. If false, the invoice will be - * issued asynchronously. The synchronous option is only available for invoices - * containin no usage fees. If the invoice is configured to sync to an external - * provider, a successful response from this endpoint guarantees the invoice is present - * in the provider. + * issued asynchronously. The synchronous option is only available for invoices that + * have no usage fees. If the invoice is configured to sync to an external provider, a + * successful response from this endpoint guarantees the invoice is present in the + * provider. */ fun synchronous(synchronous: JsonField) = apply { this.synchronous = synchronous @@ -222,7 +222,7 @@ constructor( /** * If true, the invoice will be issued synchronously. If false, the invoice will be issued - * asynchronously. The synchronous option is only available for invoices containin no usage + * asynchronously. The synchronous option is only available for invoices that have no usage * fees. If the invoice is configured to sync to an external provider, a successful response * from this endpoint guarantees the invoice is present in the provider. */ @@ -230,7 +230,7 @@ constructor( /** * If true, the invoice will be issued synchronously. If false, the invoice will be issued - * asynchronously. The synchronous option is only available for invoices containin no usage + * asynchronously. The synchronous option is only available for invoices that have no usage * fees. If the invoice is configured to sync to an external provider, a successful response * from this endpoint guarantees the invoice is present in the provider. */ diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLevelDiscount.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLevelDiscount.kt index b5e1c8a5..1a430929 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLevelDiscount.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLevelDiscount.kt @@ -22,38 +22,37 @@ import kotlin.jvm.optionals.getOrNull @JsonSerialize(using = InvoiceLevelDiscount.Serializer::class) class InvoiceLevelDiscount private constructor( - private val percentageDiscount: PercentageDiscount? = null, - private val amountDiscount: AmountDiscount? = null, - private val trialDiscount: TrialDiscount? = null, + private val percentage: PercentageDiscount? = null, + private val amount: AmountDiscount? = null, + private val trial: TrialDiscount? = null, private val _json: JsonValue? = null, ) { - fun percentageDiscount(): Optional = Optional.ofNullable(percentageDiscount) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun amountDiscount(): Optional = Optional.ofNullable(amountDiscount) + fun amount(): Optional = Optional.ofNullable(amount) - fun trialDiscount(): Optional = Optional.ofNullable(trialDiscount) + fun trial(): Optional = Optional.ofNullable(trial) - fun isPercentageDiscount(): Boolean = percentageDiscount != null + fun isPercentage(): Boolean = percentage != null - fun isAmountDiscount(): Boolean = amountDiscount != null + fun isAmount(): Boolean = amount != null - fun isTrialDiscount(): Boolean = trialDiscount != null + fun isTrial(): Boolean = trial != null - fun asPercentageDiscount(): PercentageDiscount = - percentageDiscount.getOrThrow("percentageDiscount") + fun asPercentage(): PercentageDiscount = percentage.getOrThrow("percentage") - fun asAmountDiscount(): AmountDiscount = amountDiscount.getOrThrow("amountDiscount") + fun asAmount(): AmountDiscount = amount.getOrThrow("amount") - fun asTrialDiscount(): TrialDiscount = trialDiscount.getOrThrow("trialDiscount") + fun asTrial(): TrialDiscount = trial.getOrThrow("trial") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - percentageDiscount != null -> visitor.visitPercentageDiscount(percentageDiscount) - amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) - trialDiscount != null -> visitor.visitTrialDiscount(trialDiscount) + percentage != null -> visitor.visitPercentage(percentage) + amount != null -> visitor.visitAmount(amount) + trial != null -> visitor.visitTrial(trial) else -> visitor.unknown(_json) } } @@ -67,16 +66,16 @@ private constructor( accept( object : Visitor { - override fun visitPercentageDiscount(percentageDiscount: PercentageDiscount) { - percentageDiscount.validate() + override fun visitPercentage(percentage: PercentageDiscount) { + percentage.validate() } - override fun visitAmountDiscount(amountDiscount: AmountDiscount) { - amountDiscount.validate() + override fun visitAmount(amount: AmountDiscount) { + amount.validate() } - override fun visitTrialDiscount(trialDiscount: TrialDiscount) { - trialDiscount.validate() + override fun visitTrial(trial: TrialDiscount) { + trial.validate() } } ) @@ -88,17 +87,16 @@ private constructor( return true } - return /* spotless:off */ other is InvoiceLevelDiscount && percentageDiscount == other.percentageDiscount && amountDiscount == other.amountDiscount && trialDiscount == other.trialDiscount /* spotless:on */ + return /* spotless:off */ other is InvoiceLevelDiscount && percentage == other.percentage && amount == other.amount && trial == other.trial /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(percentageDiscount, amountDiscount, trialDiscount) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(percentage, amount, trial) /* spotless:on */ override fun toString(): String = when { - percentageDiscount != null -> - "InvoiceLevelDiscount{percentageDiscount=$percentageDiscount}" - amountDiscount != null -> "InvoiceLevelDiscount{amountDiscount=$amountDiscount}" - trialDiscount != null -> "InvoiceLevelDiscount{trialDiscount=$trialDiscount}" + percentage != null -> "InvoiceLevelDiscount{percentage=$percentage}" + amount != null -> "InvoiceLevelDiscount{amount=$amount}" + trial != null -> "InvoiceLevelDiscount{trial=$trial}" _json != null -> "InvoiceLevelDiscount{_unknown=$_json}" else -> throw IllegalStateException("Invalid InvoiceLevelDiscount") } @@ -106,25 +104,21 @@ private constructor( companion object { @JvmStatic - fun ofPercentageDiscount(percentageDiscount: PercentageDiscount) = - InvoiceLevelDiscount(percentageDiscount = percentageDiscount) + fun ofPercentage(percentage: PercentageDiscount) = + InvoiceLevelDiscount(percentage = percentage) - @JvmStatic - fun ofAmountDiscount(amountDiscount: AmountDiscount) = - InvoiceLevelDiscount(amountDiscount = amountDiscount) + @JvmStatic fun ofAmount(amount: AmountDiscount) = InvoiceLevelDiscount(amount = amount) - @JvmStatic - fun ofTrialDiscount(trialDiscount: TrialDiscount) = - InvoiceLevelDiscount(trialDiscount = trialDiscount) + @JvmStatic fun ofTrial(trial: TrialDiscount) = InvoiceLevelDiscount(trial = trial) } interface Visitor { - fun visitPercentageDiscount(percentageDiscount: PercentageDiscount): T + fun visitPercentage(percentage: PercentageDiscount): T - fun visitAmountDiscount(amountDiscount: AmountDiscount): T + fun visitAmount(amount: AmountDiscount): T - fun visitTrialDiscount(trialDiscount: TrialDiscount): T + fun visitTrial(trial: TrialDiscount): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown InvoiceLevelDiscount: $json") @@ -142,19 +136,19 @@ private constructor( "percentage" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return InvoiceLevelDiscount(percentageDiscount = it, _json = json) + return InvoiceLevelDiscount(percentage = it, _json = json) } } "amount" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return InvoiceLevelDiscount(amountDiscount = it, _json = json) + return InvoiceLevelDiscount(amount = it, _json = json) } } "trial" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return InvoiceLevelDiscount(trialDiscount = it, _json = json) + return InvoiceLevelDiscount(trial = it, _json = json) } } } @@ -171,9 +165,9 @@ private constructor( provider: SerializerProvider ) { when { - value.percentageDiscount != null -> generator.writeObject(value.percentageDiscount) - value.amountDiscount != null -> generator.writeObject(value.amountDiscount) - value.trialDiscount != null -> generator.writeObject(value.trialDiscount) + value.percentage != null -> generator.writeObject(value.percentage) + value.amount != null -> generator.writeObject(value.amount) + value.trial != null -> generator.writeObject(value.trial) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid InvoiceLevelDiscount") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponse.kt index 5731aea3..1074c6bc 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponse.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponse.kt @@ -312,17 +312,13 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) /** The end date of the range of time applied for this line item's price. */ fun endDate(endDate: OffsetDateTime) = endDate(JsonField.of(endDate)) @@ -443,7 +439,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -471,7 +467,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -485,7 +481,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -499,8 +495,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -514,7 +509,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -528,7 +523,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -542,7 +537,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -556,8 +551,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -571,8 +566,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -586,8 +581,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -601,8 +596,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -616,8 +611,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -631,8 +626,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -646,8 +641,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -661,8 +656,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -676,8 +671,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -691,8 +686,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -706,8 +701,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -721,8 +716,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -736,8 +731,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -751,8 +746,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -766,8 +761,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -781,8 +776,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting in @@ -796,8 +791,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) fun quantity(quantity: Double) = quantity(JsonField.of(quantity)) @@ -844,22 +839,22 @@ private constructor( * For complex pricing structures, the line item can be broken down further in * `sub_line_items`. */ - fun addSubLineItem(matrixSubLineItem: SubLineItem.MatrixSubLineItem) = - addSubLineItem(SubLineItem.ofMatrixSubLineItem(matrixSubLineItem)) + fun addSubLineItem(matrix: SubLineItem.MatrixSubLineItem) = + addSubLineItem(SubLineItem.ofMatrix(matrix)) /** * For complex pricing structures, the line item can be broken down further in * `sub_line_items`. */ - fun addSubLineItem(tierSubLineItem: SubLineItem.TierSubLineItem) = - addSubLineItem(SubLineItem.ofTierSubLineItem(tierSubLineItem)) + fun addSubLineItem(tier: SubLineItem.TierSubLineItem) = + addSubLineItem(SubLineItem.ofTier(tier)) /** * For complex pricing structures, the line item can be broken down further in * `sub_line_items`. */ - fun addSubLineItem(otherSubLineItem: SubLineItem.OtherSubLineItem) = - addSubLineItem(SubLineItem.ofOtherSubLineItem(otherSubLineItem)) + fun addSubLineItem(other: SubLineItem.OtherSubLineItem) = + addSubLineItem(SubLineItem.ofOther(other)) /** The line amount before any line item-specific discounts or minimums. */ fun subtotal(subtotal: String) = subtotal(JsonField.of(subtotal)) @@ -1259,39 +1254,37 @@ private constructor( @JsonSerialize(using = SubLineItem.Serializer::class) class SubLineItem private constructor( - private val matrixSubLineItem: MatrixSubLineItem? = null, - private val tierSubLineItem: TierSubLineItem? = null, - private val otherSubLineItem: OtherSubLineItem? = null, + private val matrix: MatrixSubLineItem? = null, + private val tier: TierSubLineItem? = null, + private val other: OtherSubLineItem? = null, private val _json: JsonValue? = null, ) { - fun matrixSubLineItem(): Optional = - Optional.ofNullable(matrixSubLineItem) + fun matrix(): Optional = Optional.ofNullable(matrix) - fun tierSubLineItem(): Optional = Optional.ofNullable(tierSubLineItem) + fun tier(): Optional = Optional.ofNullable(tier) - fun otherSubLineItem(): Optional = Optional.ofNullable(otherSubLineItem) + fun other(): Optional = Optional.ofNullable(other) - fun isMatrixSubLineItem(): Boolean = matrixSubLineItem != null + fun isMatrix(): Boolean = matrix != null - fun isTierSubLineItem(): Boolean = tierSubLineItem != null + fun isTier(): Boolean = tier != null - fun isOtherSubLineItem(): Boolean = otherSubLineItem != null + fun isOther(): Boolean = other != null - fun asMatrixSubLineItem(): MatrixSubLineItem = - matrixSubLineItem.getOrThrow("matrixSubLineItem") + fun asMatrix(): MatrixSubLineItem = matrix.getOrThrow("matrix") - fun asTierSubLineItem(): TierSubLineItem = tierSubLineItem.getOrThrow("tierSubLineItem") + fun asTier(): TierSubLineItem = tier.getOrThrow("tier") - fun asOtherSubLineItem(): OtherSubLineItem = otherSubLineItem.getOrThrow("otherSubLineItem") + fun asOther(): OtherSubLineItem = other.getOrThrow("other") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - matrixSubLineItem != null -> visitor.visitMatrixSubLineItem(matrixSubLineItem) - tierSubLineItem != null -> visitor.visitTierSubLineItem(tierSubLineItem) - otherSubLineItem != null -> visitor.visitOtherSubLineItem(otherSubLineItem) + matrix != null -> visitor.visitMatrix(matrix) + tier != null -> visitor.visitTier(tier) + other != null -> visitor.visitOther(other) else -> visitor.unknown(_json) } } @@ -1305,16 +1298,16 @@ private constructor( accept( object : Visitor { - override fun visitMatrixSubLineItem(matrixSubLineItem: MatrixSubLineItem) { - matrixSubLineItem.validate() + override fun visitMatrix(matrix: MatrixSubLineItem) { + matrix.validate() } - override fun visitTierSubLineItem(tierSubLineItem: TierSubLineItem) { - tierSubLineItem.validate() + override fun visitTier(tier: TierSubLineItem) { + tier.validate() } - override fun visitOtherSubLineItem(otherSubLineItem: OtherSubLineItem) { - otherSubLineItem.validate() + override fun visitOther(other: OtherSubLineItem) { + other.validate() } } ) @@ -1326,42 +1319,36 @@ private constructor( return true } - return /* spotless:off */ other is SubLineItem && matrixSubLineItem == other.matrixSubLineItem && tierSubLineItem == other.tierSubLineItem && otherSubLineItem == other.otherSubLineItem /* spotless:on */ + return /* spotless:off */ other is SubLineItem && matrix == other.matrix && tier == other.tier && this.other == other.other /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(matrixSubLineItem, tierSubLineItem, otherSubLineItem) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(matrix, tier, other) /* spotless:on */ override fun toString(): String = when { - matrixSubLineItem != null -> "SubLineItem{matrixSubLineItem=$matrixSubLineItem}" - tierSubLineItem != null -> "SubLineItem{tierSubLineItem=$tierSubLineItem}" - otherSubLineItem != null -> "SubLineItem{otherSubLineItem=$otherSubLineItem}" + matrix != null -> "SubLineItem{matrix=$matrix}" + tier != null -> "SubLineItem{tier=$tier}" + other != null -> "SubLineItem{other=$other}" _json != null -> "SubLineItem{_unknown=$_json}" else -> throw IllegalStateException("Invalid SubLineItem") } companion object { - @JvmStatic - fun ofMatrixSubLineItem(matrixSubLineItem: MatrixSubLineItem) = - SubLineItem(matrixSubLineItem = matrixSubLineItem) + @JvmStatic fun ofMatrix(matrix: MatrixSubLineItem) = SubLineItem(matrix = matrix) - @JvmStatic - fun ofTierSubLineItem(tierSubLineItem: TierSubLineItem) = - SubLineItem(tierSubLineItem = tierSubLineItem) + @JvmStatic fun ofTier(tier: TierSubLineItem) = SubLineItem(tier = tier) - @JvmStatic - fun ofOtherSubLineItem(otherSubLineItem: OtherSubLineItem) = - SubLineItem(otherSubLineItem = otherSubLineItem) + @JvmStatic fun ofOther(other: OtherSubLineItem) = SubLineItem(other = other) } interface Visitor { - fun visitMatrixSubLineItem(matrixSubLineItem: MatrixSubLineItem): T + fun visitMatrix(matrix: MatrixSubLineItem): T - fun visitTierSubLineItem(tierSubLineItem: TierSubLineItem): T + fun visitTier(tier: TierSubLineItem): T - fun visitOtherSubLineItem(otherSubLineItem: OtherSubLineItem): T + fun visitOther(other: OtherSubLineItem): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown SubLineItem: $json") @@ -1378,19 +1365,19 @@ private constructor( "matrix" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return SubLineItem(matrixSubLineItem = it, _json = json) + return SubLineItem(matrix = it, _json = json) } } "tier" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return SubLineItem(tierSubLineItem = it, _json = json) + return SubLineItem(tier = it, _json = json) } } "'null'" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return SubLineItem(otherSubLineItem = it, _json = json) + return SubLineItem(other = it, _json = json) } } } @@ -1407,10 +1394,9 @@ private constructor( provider: SerializerProvider ) { when { - value.matrixSubLineItem != null -> - generator.writeObject(value.matrixSubLineItem) - value.tierSubLineItem != null -> generator.writeObject(value.tierSubLineItem) - value.otherSubLineItem != null -> generator.writeObject(value.otherSubLineItem) + value.matrix != null -> generator.writeObject(value.matrix) + value.tier != null -> generator.writeObject(value.tier) + value.other != null -> generator.writeObject(value.other) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid SubLineItem") } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/Plan.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/Plan.kt index 8ec2ce13..d979c82c 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/Plan.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/Plan.kt @@ -446,36 +446,36 @@ private constructor( * Adjustments for this plan. If the plan has phases, this includes adjustments across all * phases of the plan. */ - fun addAdjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - addAdjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun addAdjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + addAdjustment(Adjustment.ofAmountDiscount(amountDiscount)) /** * Adjustments for this plan. If the plan has phases, this includes adjustments across all * phases of the plan. */ - fun addAdjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - addAdjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun addAdjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + addAdjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) /** * Adjustments for this plan. If the plan has phases, this includes adjustments across all * phases of the plan. */ - fun addAdjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - addAdjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun addAdjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + addAdjustment(Adjustment.ofUsageDiscount(usageDiscount)) /** * Adjustments for this plan. If the plan has phases, this includes adjustments across all * phases of the plan. */ - fun addAdjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - addAdjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun addAdjustment(minimum: Adjustment.MinimumAdjustment) = + addAdjustment(Adjustment.ofMinimum(minimum)) /** * Adjustments for this plan. If the plan has phases, this includes adjustments across all * phases of the plan. */ - fun addAdjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - addAdjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun addAdjustment(maximum: Adjustment.MaximumAdjustment) = + addAdjustment(Adjustment.ofMaximum(maximum)) fun basePlan(basePlan: BasePlan?) = basePlan(JsonField.ofNullable(basePlan)) @@ -548,17 +548,13 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) /** * An optional user-defined ID for this plan resource, used throughout the system as an @@ -739,7 +735,7 @@ private constructor( * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(unitPrice: Price.UnitPrice) = addPrice(Price.ofUnitPrice(unitPrice)) + fun addPrice(unit: Price.UnitPrice) = addPrice(Price.ofUnit(unit)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of @@ -752,158 +748,156 @@ private constructor( * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(matrixPrice: Price.MatrixPrice) = addPrice(Price.ofMatrixPrice(matrixPrice)) + fun addPrice(matrix: Price.MatrixPrice) = addPrice(Price.ofMatrix(matrix)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(tieredPrice: Price.TieredPrice) = addPrice(Price.ofTieredPrice(tieredPrice)) + fun addPrice(tiered: Price.TieredPrice) = addPrice(Price.ofTiered(tiered)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(tieredBpsPrice: Price.TieredBpsPrice) = - addPrice(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun addPrice(tieredBps: Price.TieredBpsPrice) = addPrice(Price.ofTieredBps(tieredBps)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(bpsPrice: Price.BpsPrice) = addPrice(Price.ofBpsPrice(bpsPrice)) + fun addPrice(bps: Price.BpsPrice) = addPrice(Price.ofBps(bps)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(bulkBpsPrice: Price.BulkBpsPrice) = - addPrice(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun addPrice(bulkBps: Price.BulkBpsPrice) = addPrice(Price.ofBulkBps(bulkBps)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(bulkPrice: Price.BulkPrice) = addPrice(Price.ofBulkPrice(bulkPrice)) + fun addPrice(bulk: Price.BulkPrice) = addPrice(Price.ofBulk(bulk)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - addPrice(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun addPrice(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + addPrice(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(tieredPackagePrice: Price.TieredPackagePrice) = - addPrice(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun addPrice(tieredPackage: Price.TieredPackagePrice) = + addPrice(Price.ofTieredPackage(tieredPackage)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(groupedTieredPrice: Price.GroupedTieredPrice) = - addPrice(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun addPrice(groupedTiered: Price.GroupedTieredPrice) = + addPrice(Price.ofGroupedTiered(groupedTiered)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - addPrice(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun addPrice(tieredWithMinimum: Price.TieredWithMinimumPrice) = + addPrice(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - addPrice(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun addPrice(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + addPrice(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - addPrice(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun addPrice(packageWithAllocation: Price.PackageWithAllocationPrice) = + addPrice(Price.ofPackageWithAllocation(packageWithAllocation)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(unitWithPercentPrice: Price.UnitWithPercentPrice) = - addPrice(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun addPrice(unitWithPercent: Price.UnitWithPercentPrice) = + addPrice(Price.ofUnitWithPercent(unitWithPercent)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - addPrice(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun addPrice(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + addPrice(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - addPrice(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun addPrice(tieredWithProration: Price.TieredWithProrationPrice) = + addPrice(Price.ofTieredWithProration(tieredWithProration)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(unitWithProrationPrice: Price.UnitWithProrationPrice) = - addPrice(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun addPrice(unitWithProration: Price.UnitWithProrationPrice) = + addPrice(Price.ofUnitWithProration(unitWithProration)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(groupedAllocationPrice: Price.GroupedAllocationPrice) = - addPrice(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun addPrice(groupedAllocation: Price.GroupedAllocationPrice) = + addPrice(Price.ofGroupedAllocation(groupedAllocation)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - addPrice(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun addPrice(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + addPrice(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - addPrice(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun addPrice(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + addPrice(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - addPrice(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun addPrice(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + addPrice(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - addPrice(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun addPrice(bulkWithProration: Price.BulkWithProrationPrice) = + addPrice(Price.ofBulkWithProration(bulkWithProration)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - addPrice(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun addPrice(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + addPrice(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - addPrice(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun addPrice(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + addPrice(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) fun product(product: Product) = product(JsonField.of(product)) @@ -976,66 +970,57 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1049,30 +1034,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1084,21 +1065,18 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1106,40 +1084,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1159,7 +1130,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1167,7 +1138,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(percentageDiscountAdjustment = it, _json = json) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1175,19 +1146,19 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1204,16 +1175,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3687,17 +3654,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) /** * How many terms of length `duration_unit` this phase is active for. If null, this diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/PlanCreateParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/PlanCreateParams.kt index 2e4b9a3e..389431b1 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/PlanCreateParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/PlanCreateParams.kt @@ -329,129 +329,123 @@ constructor( * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanUnitPrice: Price.NewPlanUnitPrice) = - addPrice(Price.ofNewPlanUnitPrice(newPlanUnitPrice)) + fun addPrice(newPlanUnit: Price.NewPlanUnitPrice) = + addPrice(Price.ofNewPlanUnit(newPlanUnit)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanPackagePrice: Price.NewPlanPackagePrice) = - addPrice(Price.ofNewPlanPackagePrice(newPlanPackagePrice)) + fun addPrice(newPlanPackage: Price.NewPlanPackagePrice) = + addPrice(Price.ofNewPlanPackage(newPlanPackage)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanMatrixPrice: Price.NewPlanMatrixPrice) = - addPrice(Price.ofNewPlanMatrixPrice(newPlanMatrixPrice)) + fun addPrice(newPlanMatrix: Price.NewPlanMatrixPrice) = + addPrice(Price.ofNewPlanMatrix(newPlanMatrix)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanTieredPrice: Price.NewPlanTieredPrice) = - addPrice(Price.ofNewPlanTieredPrice(newPlanTieredPrice)) + fun addPrice(newPlanTiered: Price.NewPlanTieredPrice) = + addPrice(Price.ofNewPlanTiered(newPlanTiered)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanTieredBpsPrice: Price.NewPlanTieredBpsPrice) = - addPrice(Price.ofNewPlanTieredBpsPrice(newPlanTieredBpsPrice)) + fun addPrice(newPlanTieredBps: Price.NewPlanTieredBpsPrice) = + addPrice(Price.ofNewPlanTieredBps(newPlanTieredBps)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanBpsPrice: Price.NewPlanBpsPrice) = - addPrice(Price.ofNewPlanBpsPrice(newPlanBpsPrice)) + fun addPrice(newPlanBps: Price.NewPlanBpsPrice) = + addPrice(Price.ofNewPlanBps(newPlanBps)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanBulkBpsPrice: Price.NewPlanBulkBpsPrice) = - addPrice(Price.ofNewPlanBulkBpsPrice(newPlanBulkBpsPrice)) + fun addPrice(newPlanBulkBps: Price.NewPlanBulkBpsPrice) = + addPrice(Price.ofNewPlanBulkBps(newPlanBulkBps)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanBulkPrice: Price.NewPlanBulkPrice) = - addPrice(Price.ofNewPlanBulkPrice(newPlanBulkPrice)) + fun addPrice(newPlanBulk: Price.NewPlanBulkPrice) = + addPrice(Price.ofNewPlanBulk(newPlanBulk)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanThresholdTotalAmountPrice: Price.NewPlanThresholdTotalAmountPrice) = - addPrice(Price.ofNewPlanThresholdTotalAmountPrice(newPlanThresholdTotalAmountPrice)) + fun addPrice(newPlanThresholdTotalAmount: Price.NewPlanThresholdTotalAmountPrice) = + addPrice(Price.ofNewPlanThresholdTotalAmount(newPlanThresholdTotalAmount)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanTieredPackagePrice: Price.NewPlanTieredPackagePrice) = - addPrice(Price.ofNewPlanTieredPackagePrice(newPlanTieredPackagePrice)) + fun addPrice(newPlanTieredPackage: Price.NewPlanTieredPackagePrice) = + addPrice(Price.ofNewPlanTieredPackage(newPlanTieredPackage)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanTieredWithMinimumPrice: Price.NewPlanTieredWithMinimumPrice) = - addPrice(Price.ofNewPlanTieredWithMinimumPrice(newPlanTieredWithMinimumPrice)) + fun addPrice(newPlanTieredWithMinimum: Price.NewPlanTieredWithMinimumPrice) = + addPrice(Price.ofNewPlanTieredWithMinimum(newPlanTieredWithMinimum)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanUnitWithPercentPrice: Price.NewPlanUnitWithPercentPrice) = - addPrice(Price.ofNewPlanUnitWithPercentPrice(newPlanUnitWithPercentPrice)) + fun addPrice(newPlanUnitWithPercent: Price.NewPlanUnitWithPercentPrice) = + addPrice(Price.ofNewPlanUnitWithPercent(newPlanUnitWithPercent)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice( - newPlanPackageWithAllocationPrice: Price.NewPlanPackageWithAllocationPrice - ) = - addPrice( - Price.ofNewPlanPackageWithAllocationPrice(newPlanPackageWithAllocationPrice) - ) + fun addPrice(newPlanPackageWithAllocation: Price.NewPlanPackageWithAllocationPrice) = + addPrice(Price.ofNewPlanPackageWithAllocation(newPlanPackageWithAllocation)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanTierWithProrationPrice: Price.NewPlanTierWithProrationPrice) = - addPrice(Price.ofNewPlanTierWithProrationPrice(newPlanTierWithProrationPrice)) + fun addPrice(newPlanTierWithProration: Price.NewPlanTierWithProrationPrice) = + addPrice(Price.ofNewPlanTierWithProration(newPlanTierWithProration)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanUnitWithProrationPrice: Price.NewPlanUnitWithProrationPrice) = - addPrice(Price.ofNewPlanUnitWithProrationPrice(newPlanUnitWithProrationPrice)) + fun addPrice(newPlanUnitWithProration: Price.NewPlanUnitWithProrationPrice) = + addPrice(Price.ofNewPlanUnitWithProration(newPlanUnitWithProration)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanGroupedAllocationPrice: Price.NewPlanGroupedAllocationPrice) = - addPrice(Price.ofNewPlanGroupedAllocationPrice(newPlanGroupedAllocationPrice)) + fun addPrice(newPlanGroupedAllocation: Price.NewPlanGroupedAllocationPrice) = + addPrice(Price.ofNewPlanGroupedAllocation(newPlanGroupedAllocation)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ fun addPrice( - newPlanGroupedWithProratedMinimumPrice: Price.NewPlanGroupedWithProratedMinimumPrice + newPlanGroupedWithProratedMinimum: Price.NewPlanGroupedWithProratedMinimumPrice ) = addPrice( - Price.ofNewPlanGroupedWithProratedMinimumPrice( - newPlanGroupedWithProratedMinimumPrice - ) + Price.ofNewPlanGroupedWithProratedMinimum(newPlanGroupedWithProratedMinimum) ) /** @@ -459,45 +453,36 @@ constructor( * of the plan. */ fun addPrice( - newPlanGroupedWithMeteredMinimumPrice: Price.NewPlanGroupedWithMeteredMinimumPrice - ) = - addPrice( - Price.ofNewPlanGroupedWithMeteredMinimumPrice( - newPlanGroupedWithMeteredMinimumPrice - ) - ) + newPlanGroupedWithMeteredMinimum: Price.NewPlanGroupedWithMeteredMinimumPrice + ) = addPrice(Price.ofNewPlanGroupedWithMeteredMinimum(newPlanGroupedWithMeteredMinimum)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice( - newPlanMatrixWithDisplayNamePrice: Price.NewPlanMatrixWithDisplayNamePrice - ) = - addPrice( - Price.ofNewPlanMatrixWithDisplayNamePrice(newPlanMatrixWithDisplayNamePrice) - ) + fun addPrice(newPlanMatrixWithDisplayName: Price.NewPlanMatrixWithDisplayNamePrice) = + addPrice(Price.ofNewPlanMatrixWithDisplayName(newPlanMatrixWithDisplayName)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanBulkWithProrationPrice: Price.NewPlanBulkWithProrationPrice) = - addPrice(Price.ofNewPlanBulkWithProrationPrice(newPlanBulkWithProrationPrice)) + fun addPrice(newPlanBulkWithProration: Price.NewPlanBulkWithProrationPrice) = + addPrice(Price.ofNewPlanBulkWithProration(newPlanBulkWithProration)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanGroupedTieredPackagePrice: Price.NewPlanGroupedTieredPackagePrice) = - addPrice(Price.ofNewPlanGroupedTieredPackagePrice(newPlanGroupedTieredPackagePrice)) + fun addPrice(newPlanGroupedTieredPackage: Price.NewPlanGroupedTieredPackagePrice) = + addPrice(Price.ofNewPlanGroupedTieredPackage(newPlanGroupedTieredPackage)) /** * Prices for this plan. If the plan has phases, this includes prices across all phases * of the plan. */ - fun addPrice(newPlanMaxGroupTieredPrice: Price.NewPlanMaxGroupTieredPrice) = - addPrice(Price.ofNewPlanMaxGroupTieredPrice(newPlanMaxGroupTieredPrice)) + fun addPrice(newPlanMaxGroupTieredPackage: Price.NewPlanMaxGroupTieredPackagePrice) = + addPrice(Price.ofNewPlanMaxGroupTieredPackage(newPlanMaxGroupTieredPackage)) /** Free-form text which is available on the invoice PDF and the Orb invoice portal. */ fun defaultInvoiceMemo(defaultInvoiceMemo: String?) = @@ -684,130 +669,123 @@ constructor( * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanUnitPrice: Price.NewPlanUnitPrice) = apply { - body.addPrice(newPlanUnitPrice) - } + fun addPrice(newPlanUnit: Price.NewPlanUnitPrice) = apply { body.addPrice(newPlanUnit) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanPackagePrice: Price.NewPlanPackagePrice) = apply { - body.addPrice(newPlanPackagePrice) + fun addPrice(newPlanPackage: Price.NewPlanPackagePrice) = apply { + body.addPrice(newPlanPackage) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanMatrixPrice: Price.NewPlanMatrixPrice) = apply { - body.addPrice(newPlanMatrixPrice) + fun addPrice(newPlanMatrix: Price.NewPlanMatrixPrice) = apply { + body.addPrice(newPlanMatrix) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanTieredPrice: Price.NewPlanTieredPrice) = apply { - body.addPrice(newPlanTieredPrice) + fun addPrice(newPlanTiered: Price.NewPlanTieredPrice) = apply { + body.addPrice(newPlanTiered) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanTieredBpsPrice: Price.NewPlanTieredBpsPrice) = apply { - body.addPrice(newPlanTieredBpsPrice) + fun addPrice(newPlanTieredBps: Price.NewPlanTieredBpsPrice) = apply { + body.addPrice(newPlanTieredBps) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanBpsPrice: Price.NewPlanBpsPrice) = apply { - body.addPrice(newPlanBpsPrice) - } + fun addPrice(newPlanBps: Price.NewPlanBpsPrice) = apply { body.addPrice(newPlanBps) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanBulkBpsPrice: Price.NewPlanBulkBpsPrice) = apply { - body.addPrice(newPlanBulkBpsPrice) + fun addPrice(newPlanBulkBps: Price.NewPlanBulkBpsPrice) = apply { + body.addPrice(newPlanBulkBps) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanBulkPrice: Price.NewPlanBulkPrice) = apply { - body.addPrice(newPlanBulkPrice) - } + fun addPrice(newPlanBulk: Price.NewPlanBulkPrice) = apply { body.addPrice(newPlanBulk) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanThresholdTotalAmountPrice: Price.NewPlanThresholdTotalAmountPrice) = - apply { - body.addPrice(newPlanThresholdTotalAmountPrice) - } + fun addPrice(newPlanThresholdTotalAmount: Price.NewPlanThresholdTotalAmountPrice) = apply { + body.addPrice(newPlanThresholdTotalAmount) + } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanTieredPackagePrice: Price.NewPlanTieredPackagePrice) = apply { - body.addPrice(newPlanTieredPackagePrice) + fun addPrice(newPlanTieredPackage: Price.NewPlanTieredPackagePrice) = apply { + body.addPrice(newPlanTieredPackage) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanTieredWithMinimumPrice: Price.NewPlanTieredWithMinimumPrice) = apply { - body.addPrice(newPlanTieredWithMinimumPrice) + fun addPrice(newPlanTieredWithMinimum: Price.NewPlanTieredWithMinimumPrice) = apply { + body.addPrice(newPlanTieredWithMinimum) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanUnitWithPercentPrice: Price.NewPlanUnitWithPercentPrice) = apply { - body.addPrice(newPlanUnitWithPercentPrice) + fun addPrice(newPlanUnitWithPercent: Price.NewPlanUnitWithPercentPrice) = apply { + body.addPrice(newPlanUnitWithPercent) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanPackageWithAllocationPrice: Price.NewPlanPackageWithAllocationPrice) = + fun addPrice(newPlanPackageWithAllocation: Price.NewPlanPackageWithAllocationPrice) = apply { - body.addPrice(newPlanPackageWithAllocationPrice) + body.addPrice(newPlanPackageWithAllocation) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanTierWithProrationPrice: Price.NewPlanTierWithProrationPrice) = apply { - body.addPrice(newPlanTierWithProrationPrice) + fun addPrice(newPlanTierWithProration: Price.NewPlanTierWithProrationPrice) = apply { + body.addPrice(newPlanTierWithProration) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanUnitWithProrationPrice: Price.NewPlanUnitWithProrationPrice) = apply { - body.addPrice(newPlanUnitWithProrationPrice) + fun addPrice(newPlanUnitWithProration: Price.NewPlanUnitWithProrationPrice) = apply { + body.addPrice(newPlanUnitWithProration) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanGroupedAllocationPrice: Price.NewPlanGroupedAllocationPrice) = apply { - body.addPrice(newPlanGroupedAllocationPrice) + fun addPrice(newPlanGroupedAllocation: Price.NewPlanGroupedAllocationPrice) = apply { + body.addPrice(newPlanGroupedAllocation) } /** @@ -815,50 +793,50 @@ constructor( * the plan. */ fun addPrice( - newPlanGroupedWithProratedMinimumPrice: Price.NewPlanGroupedWithProratedMinimumPrice - ) = apply { body.addPrice(newPlanGroupedWithProratedMinimumPrice) } + newPlanGroupedWithProratedMinimum: Price.NewPlanGroupedWithProratedMinimumPrice + ) = apply { body.addPrice(newPlanGroupedWithProratedMinimum) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ fun addPrice( - newPlanGroupedWithMeteredMinimumPrice: Price.NewPlanGroupedWithMeteredMinimumPrice - ) = apply { body.addPrice(newPlanGroupedWithMeteredMinimumPrice) } + newPlanGroupedWithMeteredMinimum: Price.NewPlanGroupedWithMeteredMinimumPrice + ) = apply { body.addPrice(newPlanGroupedWithMeteredMinimum) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanMatrixWithDisplayNamePrice: Price.NewPlanMatrixWithDisplayNamePrice) = + fun addPrice(newPlanMatrixWithDisplayName: Price.NewPlanMatrixWithDisplayNamePrice) = apply { - body.addPrice(newPlanMatrixWithDisplayNamePrice) + body.addPrice(newPlanMatrixWithDisplayName) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanBulkWithProrationPrice: Price.NewPlanBulkWithProrationPrice) = apply { - body.addPrice(newPlanBulkWithProrationPrice) + fun addPrice(newPlanBulkWithProration: Price.NewPlanBulkWithProrationPrice) = apply { + body.addPrice(newPlanBulkWithProration) } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanGroupedTieredPackagePrice: Price.NewPlanGroupedTieredPackagePrice) = - apply { - body.addPrice(newPlanGroupedTieredPackagePrice) - } + fun addPrice(newPlanGroupedTieredPackage: Price.NewPlanGroupedTieredPackagePrice) = apply { + body.addPrice(newPlanGroupedTieredPackage) + } /** * Prices for this plan. If the plan has phases, this includes prices across all phases of * the plan. */ - fun addPrice(newPlanMaxGroupTieredPrice: Price.NewPlanMaxGroupTieredPrice) = apply { - body.addPrice(newPlanMaxGroupTieredPrice) - } + fun addPrice(newPlanMaxGroupTieredPackage: Price.NewPlanMaxGroupTieredPackagePrice) = + apply { + body.addPrice(newPlanMaxGroupTieredPackage) + } /** Free-form text which is available on the invoice PDF and the Orb invoice portal. */ fun defaultInvoiceMemo(defaultInvoiceMemo: String?) = apply { @@ -1070,263 +1048,237 @@ constructor( @JsonSerialize(using = Price.Serializer::class) class Price private constructor( - private val newPlanUnitPrice: NewPlanUnitPrice? = null, - private val newPlanPackagePrice: NewPlanPackagePrice? = null, - private val newPlanMatrixPrice: NewPlanMatrixPrice? = null, - private val newPlanTieredPrice: NewPlanTieredPrice? = null, - private val newPlanTieredBpsPrice: NewPlanTieredBpsPrice? = null, - private val newPlanBpsPrice: NewPlanBpsPrice? = null, - private val newPlanBulkBpsPrice: NewPlanBulkBpsPrice? = null, - private val newPlanBulkPrice: NewPlanBulkPrice? = null, - private val newPlanThresholdTotalAmountPrice: NewPlanThresholdTotalAmountPrice? = null, - private val newPlanTieredPackagePrice: NewPlanTieredPackagePrice? = null, - private val newPlanTieredWithMinimumPrice: NewPlanTieredWithMinimumPrice? = null, - private val newPlanUnitWithPercentPrice: NewPlanUnitWithPercentPrice? = null, - private val newPlanPackageWithAllocationPrice: NewPlanPackageWithAllocationPrice? = null, - private val newPlanTierWithProrationPrice: NewPlanTierWithProrationPrice? = null, - private val newPlanUnitWithProrationPrice: NewPlanUnitWithProrationPrice? = null, - private val newPlanGroupedAllocationPrice: NewPlanGroupedAllocationPrice? = null, - private val newPlanGroupedWithProratedMinimumPrice: - NewPlanGroupedWithProratedMinimumPrice? = - null, - private val newPlanGroupedWithMeteredMinimumPrice: NewPlanGroupedWithMeteredMinimumPrice? = + private val newPlanUnit: NewPlanUnitPrice? = null, + private val newPlanPackage: NewPlanPackagePrice? = null, + private val newPlanMatrix: NewPlanMatrixPrice? = null, + private val newPlanTiered: NewPlanTieredPrice? = null, + private val newPlanTieredBps: NewPlanTieredBpsPrice? = null, + private val newPlanBps: NewPlanBpsPrice? = null, + private val newPlanBulkBps: NewPlanBulkBpsPrice? = null, + private val newPlanBulk: NewPlanBulkPrice? = null, + private val newPlanThresholdTotalAmount: NewPlanThresholdTotalAmountPrice? = null, + private val newPlanTieredPackage: NewPlanTieredPackagePrice? = null, + private val newPlanTieredWithMinimum: NewPlanTieredWithMinimumPrice? = null, + private val newPlanUnitWithPercent: NewPlanUnitWithPercentPrice? = null, + private val newPlanPackageWithAllocation: NewPlanPackageWithAllocationPrice? = null, + private val newPlanTierWithProration: NewPlanTierWithProrationPrice? = null, + private val newPlanUnitWithProration: NewPlanUnitWithProrationPrice? = null, + private val newPlanGroupedAllocation: NewPlanGroupedAllocationPrice? = null, + private val newPlanGroupedWithProratedMinimum: NewPlanGroupedWithProratedMinimumPrice? = null, - private val newPlanMatrixWithDisplayNamePrice: NewPlanMatrixWithDisplayNamePrice? = null, - private val newPlanBulkWithProrationPrice: NewPlanBulkWithProrationPrice? = null, - private val newPlanGroupedTieredPackagePrice: NewPlanGroupedTieredPackagePrice? = null, - private val newPlanMaxGroupTieredPrice: NewPlanMaxGroupTieredPrice? = null, + private val newPlanGroupedWithMeteredMinimum: NewPlanGroupedWithMeteredMinimumPrice? = null, + private val newPlanMatrixWithDisplayName: NewPlanMatrixWithDisplayNamePrice? = null, + private val newPlanBulkWithProration: NewPlanBulkWithProrationPrice? = null, + private val newPlanGroupedTieredPackage: NewPlanGroupedTieredPackagePrice? = null, + private val newPlanMaxGroupTieredPackage: NewPlanMaxGroupTieredPackagePrice? = null, private val _json: JsonValue? = null, ) { - fun newPlanUnitPrice(): Optional = Optional.ofNullable(newPlanUnitPrice) + fun newPlanUnit(): Optional = Optional.ofNullable(newPlanUnit) - fun newPlanPackagePrice(): Optional = - Optional.ofNullable(newPlanPackagePrice) + fun newPlanPackage(): Optional = Optional.ofNullable(newPlanPackage) - fun newPlanMatrixPrice(): Optional = - Optional.ofNullable(newPlanMatrixPrice) + fun newPlanMatrix(): Optional = Optional.ofNullable(newPlanMatrix) - fun newPlanTieredPrice(): Optional = - Optional.ofNullable(newPlanTieredPrice) + fun newPlanTiered(): Optional = Optional.ofNullable(newPlanTiered) - fun newPlanTieredBpsPrice(): Optional = - Optional.ofNullable(newPlanTieredBpsPrice) + fun newPlanTieredBps(): Optional = + Optional.ofNullable(newPlanTieredBps) - fun newPlanBpsPrice(): Optional = Optional.ofNullable(newPlanBpsPrice) + fun newPlanBps(): Optional = Optional.ofNullable(newPlanBps) - fun newPlanBulkBpsPrice(): Optional = - Optional.ofNullable(newPlanBulkBpsPrice) + fun newPlanBulkBps(): Optional = Optional.ofNullable(newPlanBulkBps) - fun newPlanBulkPrice(): Optional = Optional.ofNullable(newPlanBulkPrice) + fun newPlanBulk(): Optional = Optional.ofNullable(newPlanBulk) - fun newPlanThresholdTotalAmountPrice(): Optional = - Optional.ofNullable(newPlanThresholdTotalAmountPrice) + fun newPlanThresholdTotalAmount(): Optional = + Optional.ofNullable(newPlanThresholdTotalAmount) - fun newPlanTieredPackagePrice(): Optional = - Optional.ofNullable(newPlanTieredPackagePrice) + fun newPlanTieredPackage(): Optional = + Optional.ofNullable(newPlanTieredPackage) - fun newPlanTieredWithMinimumPrice(): Optional = - Optional.ofNullable(newPlanTieredWithMinimumPrice) + fun newPlanTieredWithMinimum(): Optional = + Optional.ofNullable(newPlanTieredWithMinimum) - fun newPlanUnitWithPercentPrice(): Optional = - Optional.ofNullable(newPlanUnitWithPercentPrice) + fun newPlanUnitWithPercent(): Optional = + Optional.ofNullable(newPlanUnitWithPercent) - fun newPlanPackageWithAllocationPrice(): Optional = - Optional.ofNullable(newPlanPackageWithAllocationPrice) + fun newPlanPackageWithAllocation(): Optional = + Optional.ofNullable(newPlanPackageWithAllocation) - fun newPlanTierWithProrationPrice(): Optional = - Optional.ofNullable(newPlanTierWithProrationPrice) + fun newPlanTierWithProration(): Optional = + Optional.ofNullable(newPlanTierWithProration) - fun newPlanUnitWithProrationPrice(): Optional = - Optional.ofNullable(newPlanUnitWithProrationPrice) + fun newPlanUnitWithProration(): Optional = + Optional.ofNullable(newPlanUnitWithProration) - fun newPlanGroupedAllocationPrice(): Optional = - Optional.ofNullable(newPlanGroupedAllocationPrice) + fun newPlanGroupedAllocation(): Optional = + Optional.ofNullable(newPlanGroupedAllocation) - fun newPlanGroupedWithProratedMinimumPrice(): - Optional = - Optional.ofNullable(newPlanGroupedWithProratedMinimumPrice) + fun newPlanGroupedWithProratedMinimum(): Optional = + Optional.ofNullable(newPlanGroupedWithProratedMinimum) - fun newPlanGroupedWithMeteredMinimumPrice(): - Optional = - Optional.ofNullable(newPlanGroupedWithMeteredMinimumPrice) + fun newPlanGroupedWithMeteredMinimum(): Optional = + Optional.ofNullable(newPlanGroupedWithMeteredMinimum) - fun newPlanMatrixWithDisplayNamePrice(): Optional = - Optional.ofNullable(newPlanMatrixWithDisplayNamePrice) + fun newPlanMatrixWithDisplayName(): Optional = + Optional.ofNullable(newPlanMatrixWithDisplayName) - fun newPlanBulkWithProrationPrice(): Optional = - Optional.ofNullable(newPlanBulkWithProrationPrice) + fun newPlanBulkWithProration(): Optional = + Optional.ofNullable(newPlanBulkWithProration) - fun newPlanGroupedTieredPackagePrice(): Optional = - Optional.ofNullable(newPlanGroupedTieredPackagePrice) + fun newPlanGroupedTieredPackage(): Optional = + Optional.ofNullable(newPlanGroupedTieredPackage) - fun newPlanMaxGroupTieredPrice(): Optional = - Optional.ofNullable(newPlanMaxGroupTieredPrice) + fun newPlanMaxGroupTieredPackage(): Optional = + Optional.ofNullable(newPlanMaxGroupTieredPackage) - fun isNewPlanUnitPrice(): Boolean = newPlanUnitPrice != null + fun isNewPlanUnit(): Boolean = newPlanUnit != null - fun isNewPlanPackagePrice(): Boolean = newPlanPackagePrice != null + fun isNewPlanPackage(): Boolean = newPlanPackage != null - fun isNewPlanMatrixPrice(): Boolean = newPlanMatrixPrice != null + fun isNewPlanMatrix(): Boolean = newPlanMatrix != null - fun isNewPlanTieredPrice(): Boolean = newPlanTieredPrice != null + fun isNewPlanTiered(): Boolean = newPlanTiered != null - fun isNewPlanTieredBpsPrice(): Boolean = newPlanTieredBpsPrice != null + fun isNewPlanTieredBps(): Boolean = newPlanTieredBps != null - fun isNewPlanBpsPrice(): Boolean = newPlanBpsPrice != null + fun isNewPlanBps(): Boolean = newPlanBps != null - fun isNewPlanBulkBpsPrice(): Boolean = newPlanBulkBpsPrice != null + fun isNewPlanBulkBps(): Boolean = newPlanBulkBps != null - fun isNewPlanBulkPrice(): Boolean = newPlanBulkPrice != null + fun isNewPlanBulk(): Boolean = newPlanBulk != null - fun isNewPlanThresholdTotalAmountPrice(): Boolean = newPlanThresholdTotalAmountPrice != null + fun isNewPlanThresholdTotalAmount(): Boolean = newPlanThresholdTotalAmount != null - fun isNewPlanTieredPackagePrice(): Boolean = newPlanTieredPackagePrice != null + fun isNewPlanTieredPackage(): Boolean = newPlanTieredPackage != null - fun isNewPlanTieredWithMinimumPrice(): Boolean = newPlanTieredWithMinimumPrice != null + fun isNewPlanTieredWithMinimum(): Boolean = newPlanTieredWithMinimum != null - fun isNewPlanUnitWithPercentPrice(): Boolean = newPlanUnitWithPercentPrice != null + fun isNewPlanUnitWithPercent(): Boolean = newPlanUnitWithPercent != null - fun isNewPlanPackageWithAllocationPrice(): Boolean = - newPlanPackageWithAllocationPrice != null + fun isNewPlanPackageWithAllocation(): Boolean = newPlanPackageWithAllocation != null - fun isNewPlanTierWithProrationPrice(): Boolean = newPlanTierWithProrationPrice != null + fun isNewPlanTierWithProration(): Boolean = newPlanTierWithProration != null - fun isNewPlanUnitWithProrationPrice(): Boolean = newPlanUnitWithProrationPrice != null + fun isNewPlanUnitWithProration(): Boolean = newPlanUnitWithProration != null - fun isNewPlanGroupedAllocationPrice(): Boolean = newPlanGroupedAllocationPrice != null + fun isNewPlanGroupedAllocation(): Boolean = newPlanGroupedAllocation != null - fun isNewPlanGroupedWithProratedMinimumPrice(): Boolean = - newPlanGroupedWithProratedMinimumPrice != null + fun isNewPlanGroupedWithProratedMinimum(): Boolean = + newPlanGroupedWithProratedMinimum != null - fun isNewPlanGroupedWithMeteredMinimumPrice(): Boolean = - newPlanGroupedWithMeteredMinimumPrice != null + fun isNewPlanGroupedWithMeteredMinimum(): Boolean = newPlanGroupedWithMeteredMinimum != null - fun isNewPlanMatrixWithDisplayNamePrice(): Boolean = - newPlanMatrixWithDisplayNamePrice != null + fun isNewPlanMatrixWithDisplayName(): Boolean = newPlanMatrixWithDisplayName != null - fun isNewPlanBulkWithProrationPrice(): Boolean = newPlanBulkWithProrationPrice != null + fun isNewPlanBulkWithProration(): Boolean = newPlanBulkWithProration != null - fun isNewPlanGroupedTieredPackagePrice(): Boolean = newPlanGroupedTieredPackagePrice != null + fun isNewPlanGroupedTieredPackage(): Boolean = newPlanGroupedTieredPackage != null - fun isNewPlanMaxGroupTieredPrice(): Boolean = newPlanMaxGroupTieredPrice != null + fun isNewPlanMaxGroupTieredPackage(): Boolean = newPlanMaxGroupTieredPackage != null - fun asNewPlanUnitPrice(): NewPlanUnitPrice = newPlanUnitPrice.getOrThrow("newPlanUnitPrice") + fun asNewPlanUnit(): NewPlanUnitPrice = newPlanUnit.getOrThrow("newPlanUnit") - fun asNewPlanPackagePrice(): NewPlanPackagePrice = - newPlanPackagePrice.getOrThrow("newPlanPackagePrice") + fun asNewPlanPackage(): NewPlanPackagePrice = newPlanPackage.getOrThrow("newPlanPackage") - fun asNewPlanMatrixPrice(): NewPlanMatrixPrice = - newPlanMatrixPrice.getOrThrow("newPlanMatrixPrice") + fun asNewPlanMatrix(): NewPlanMatrixPrice = newPlanMatrix.getOrThrow("newPlanMatrix") - fun asNewPlanTieredPrice(): NewPlanTieredPrice = - newPlanTieredPrice.getOrThrow("newPlanTieredPrice") + fun asNewPlanTiered(): NewPlanTieredPrice = newPlanTiered.getOrThrow("newPlanTiered") - fun asNewPlanTieredBpsPrice(): NewPlanTieredBpsPrice = - newPlanTieredBpsPrice.getOrThrow("newPlanTieredBpsPrice") + fun asNewPlanTieredBps(): NewPlanTieredBpsPrice = + newPlanTieredBps.getOrThrow("newPlanTieredBps") - fun asNewPlanBpsPrice(): NewPlanBpsPrice = newPlanBpsPrice.getOrThrow("newPlanBpsPrice") + fun asNewPlanBps(): NewPlanBpsPrice = newPlanBps.getOrThrow("newPlanBps") - fun asNewPlanBulkBpsPrice(): NewPlanBulkBpsPrice = - newPlanBulkBpsPrice.getOrThrow("newPlanBulkBpsPrice") + fun asNewPlanBulkBps(): NewPlanBulkBpsPrice = newPlanBulkBps.getOrThrow("newPlanBulkBps") - fun asNewPlanBulkPrice(): NewPlanBulkPrice = newPlanBulkPrice.getOrThrow("newPlanBulkPrice") + fun asNewPlanBulk(): NewPlanBulkPrice = newPlanBulk.getOrThrow("newPlanBulk") - fun asNewPlanThresholdTotalAmountPrice(): NewPlanThresholdTotalAmountPrice = - newPlanThresholdTotalAmountPrice.getOrThrow("newPlanThresholdTotalAmountPrice") + fun asNewPlanThresholdTotalAmount(): NewPlanThresholdTotalAmountPrice = + newPlanThresholdTotalAmount.getOrThrow("newPlanThresholdTotalAmount") - fun asNewPlanTieredPackagePrice(): NewPlanTieredPackagePrice = - newPlanTieredPackagePrice.getOrThrow("newPlanTieredPackagePrice") + fun asNewPlanTieredPackage(): NewPlanTieredPackagePrice = + newPlanTieredPackage.getOrThrow("newPlanTieredPackage") - fun asNewPlanTieredWithMinimumPrice(): NewPlanTieredWithMinimumPrice = - newPlanTieredWithMinimumPrice.getOrThrow("newPlanTieredWithMinimumPrice") + fun asNewPlanTieredWithMinimum(): NewPlanTieredWithMinimumPrice = + newPlanTieredWithMinimum.getOrThrow("newPlanTieredWithMinimum") - fun asNewPlanUnitWithPercentPrice(): NewPlanUnitWithPercentPrice = - newPlanUnitWithPercentPrice.getOrThrow("newPlanUnitWithPercentPrice") + fun asNewPlanUnitWithPercent(): NewPlanUnitWithPercentPrice = + newPlanUnitWithPercent.getOrThrow("newPlanUnitWithPercent") - fun asNewPlanPackageWithAllocationPrice(): NewPlanPackageWithAllocationPrice = - newPlanPackageWithAllocationPrice.getOrThrow("newPlanPackageWithAllocationPrice") + fun asNewPlanPackageWithAllocation(): NewPlanPackageWithAllocationPrice = + newPlanPackageWithAllocation.getOrThrow("newPlanPackageWithAllocation") - fun asNewPlanTierWithProrationPrice(): NewPlanTierWithProrationPrice = - newPlanTierWithProrationPrice.getOrThrow("newPlanTierWithProrationPrice") + fun asNewPlanTierWithProration(): NewPlanTierWithProrationPrice = + newPlanTierWithProration.getOrThrow("newPlanTierWithProration") - fun asNewPlanUnitWithProrationPrice(): NewPlanUnitWithProrationPrice = - newPlanUnitWithProrationPrice.getOrThrow("newPlanUnitWithProrationPrice") + fun asNewPlanUnitWithProration(): NewPlanUnitWithProrationPrice = + newPlanUnitWithProration.getOrThrow("newPlanUnitWithProration") - fun asNewPlanGroupedAllocationPrice(): NewPlanGroupedAllocationPrice = - newPlanGroupedAllocationPrice.getOrThrow("newPlanGroupedAllocationPrice") + fun asNewPlanGroupedAllocation(): NewPlanGroupedAllocationPrice = + newPlanGroupedAllocation.getOrThrow("newPlanGroupedAllocation") - fun asNewPlanGroupedWithProratedMinimumPrice(): NewPlanGroupedWithProratedMinimumPrice = - newPlanGroupedWithProratedMinimumPrice.getOrThrow( - "newPlanGroupedWithProratedMinimumPrice" - ) + fun asNewPlanGroupedWithProratedMinimum(): NewPlanGroupedWithProratedMinimumPrice = + newPlanGroupedWithProratedMinimum.getOrThrow("newPlanGroupedWithProratedMinimum") - fun asNewPlanGroupedWithMeteredMinimumPrice(): NewPlanGroupedWithMeteredMinimumPrice = - newPlanGroupedWithMeteredMinimumPrice.getOrThrow( - "newPlanGroupedWithMeteredMinimumPrice" - ) + fun asNewPlanGroupedWithMeteredMinimum(): NewPlanGroupedWithMeteredMinimumPrice = + newPlanGroupedWithMeteredMinimum.getOrThrow("newPlanGroupedWithMeteredMinimum") - fun asNewPlanMatrixWithDisplayNamePrice(): NewPlanMatrixWithDisplayNamePrice = - newPlanMatrixWithDisplayNamePrice.getOrThrow("newPlanMatrixWithDisplayNamePrice") + fun asNewPlanMatrixWithDisplayName(): NewPlanMatrixWithDisplayNamePrice = + newPlanMatrixWithDisplayName.getOrThrow("newPlanMatrixWithDisplayName") - fun asNewPlanBulkWithProrationPrice(): NewPlanBulkWithProrationPrice = - newPlanBulkWithProrationPrice.getOrThrow("newPlanBulkWithProrationPrice") + fun asNewPlanBulkWithProration(): NewPlanBulkWithProrationPrice = + newPlanBulkWithProration.getOrThrow("newPlanBulkWithProration") - fun asNewPlanGroupedTieredPackagePrice(): NewPlanGroupedTieredPackagePrice = - newPlanGroupedTieredPackagePrice.getOrThrow("newPlanGroupedTieredPackagePrice") + fun asNewPlanGroupedTieredPackage(): NewPlanGroupedTieredPackagePrice = + newPlanGroupedTieredPackage.getOrThrow("newPlanGroupedTieredPackage") - fun asNewPlanMaxGroupTieredPrice(): NewPlanMaxGroupTieredPrice = - newPlanMaxGroupTieredPrice.getOrThrow("newPlanMaxGroupTieredPrice") + fun asNewPlanMaxGroupTieredPackage(): NewPlanMaxGroupTieredPackagePrice = + newPlanMaxGroupTieredPackage.getOrThrow("newPlanMaxGroupTieredPackage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newPlanUnitPrice != null -> visitor.visitNewPlanUnitPrice(newPlanUnitPrice) - newPlanPackagePrice != null -> visitor.visitNewPlanPackagePrice(newPlanPackagePrice) - newPlanMatrixPrice != null -> visitor.visitNewPlanMatrixPrice(newPlanMatrixPrice) - newPlanTieredPrice != null -> visitor.visitNewPlanTieredPrice(newPlanTieredPrice) - newPlanTieredBpsPrice != null -> - visitor.visitNewPlanTieredBpsPrice(newPlanTieredBpsPrice) - newPlanBpsPrice != null -> visitor.visitNewPlanBpsPrice(newPlanBpsPrice) - newPlanBulkBpsPrice != null -> visitor.visitNewPlanBulkBpsPrice(newPlanBulkBpsPrice) - newPlanBulkPrice != null -> visitor.visitNewPlanBulkPrice(newPlanBulkPrice) - newPlanThresholdTotalAmountPrice != null -> - visitor.visitNewPlanThresholdTotalAmountPrice(newPlanThresholdTotalAmountPrice) - newPlanTieredPackagePrice != null -> - visitor.visitNewPlanTieredPackagePrice(newPlanTieredPackagePrice) - newPlanTieredWithMinimumPrice != null -> - visitor.visitNewPlanTieredWithMinimumPrice(newPlanTieredWithMinimumPrice) - newPlanUnitWithPercentPrice != null -> - visitor.visitNewPlanUnitWithPercentPrice(newPlanUnitWithPercentPrice) - newPlanPackageWithAllocationPrice != null -> - visitor.visitNewPlanPackageWithAllocationPrice( - newPlanPackageWithAllocationPrice - ) - newPlanTierWithProrationPrice != null -> - visitor.visitNewPlanTierWithProrationPrice(newPlanTierWithProrationPrice) - newPlanUnitWithProrationPrice != null -> - visitor.visitNewPlanUnitWithProrationPrice(newPlanUnitWithProrationPrice) - newPlanGroupedAllocationPrice != null -> - visitor.visitNewPlanGroupedAllocationPrice(newPlanGroupedAllocationPrice) - newPlanGroupedWithProratedMinimumPrice != null -> - visitor.visitNewPlanGroupedWithProratedMinimumPrice( - newPlanGroupedWithProratedMinimumPrice - ) - newPlanGroupedWithMeteredMinimumPrice != null -> - visitor.visitNewPlanGroupedWithMeteredMinimumPrice( - newPlanGroupedWithMeteredMinimumPrice + newPlanUnit != null -> visitor.visitNewPlanUnit(newPlanUnit) + newPlanPackage != null -> visitor.visitNewPlanPackage(newPlanPackage) + newPlanMatrix != null -> visitor.visitNewPlanMatrix(newPlanMatrix) + newPlanTiered != null -> visitor.visitNewPlanTiered(newPlanTiered) + newPlanTieredBps != null -> visitor.visitNewPlanTieredBps(newPlanTieredBps) + newPlanBps != null -> visitor.visitNewPlanBps(newPlanBps) + newPlanBulkBps != null -> visitor.visitNewPlanBulkBps(newPlanBulkBps) + newPlanBulk != null -> visitor.visitNewPlanBulk(newPlanBulk) + newPlanThresholdTotalAmount != null -> + visitor.visitNewPlanThresholdTotalAmount(newPlanThresholdTotalAmount) + newPlanTieredPackage != null -> + visitor.visitNewPlanTieredPackage(newPlanTieredPackage) + newPlanTieredWithMinimum != null -> + visitor.visitNewPlanTieredWithMinimum(newPlanTieredWithMinimum) + newPlanUnitWithPercent != null -> + visitor.visitNewPlanUnitWithPercent(newPlanUnitWithPercent) + newPlanPackageWithAllocation != null -> + visitor.visitNewPlanPackageWithAllocation(newPlanPackageWithAllocation) + newPlanTierWithProration != null -> + visitor.visitNewPlanTierWithProration(newPlanTierWithProration) + newPlanUnitWithProration != null -> + visitor.visitNewPlanUnitWithProration(newPlanUnitWithProration) + newPlanGroupedAllocation != null -> + visitor.visitNewPlanGroupedAllocation(newPlanGroupedAllocation) + newPlanGroupedWithProratedMinimum != null -> + visitor.visitNewPlanGroupedWithProratedMinimum( + newPlanGroupedWithProratedMinimum ) - newPlanMatrixWithDisplayNamePrice != null -> - visitor.visitNewPlanMatrixWithDisplayNamePrice( - newPlanMatrixWithDisplayNamePrice - ) - newPlanBulkWithProrationPrice != null -> - visitor.visitNewPlanBulkWithProrationPrice(newPlanBulkWithProrationPrice) - newPlanGroupedTieredPackagePrice != null -> - visitor.visitNewPlanGroupedTieredPackagePrice(newPlanGroupedTieredPackagePrice) - newPlanMaxGroupTieredPrice != null -> - visitor.visitNewPlanMaxGroupTieredPrice(newPlanMaxGroupTieredPrice) + newPlanGroupedWithMeteredMinimum != null -> + visitor.visitNewPlanGroupedWithMeteredMinimum(newPlanGroupedWithMeteredMinimum) + newPlanMatrixWithDisplayName != null -> + visitor.visitNewPlanMatrixWithDisplayName(newPlanMatrixWithDisplayName) + newPlanBulkWithProration != null -> + visitor.visitNewPlanBulkWithProration(newPlanBulkWithProration) + newPlanGroupedTieredPackage != null -> + visitor.visitNewPlanGroupedTieredPackage(newPlanGroupedTieredPackage) + newPlanMaxGroupTieredPackage != null -> + visitor.visitNewPlanMaxGroupTieredPackage(newPlanMaxGroupTieredPackage) else -> visitor.unknown(_json) } } @@ -1340,127 +1292,120 @@ constructor( accept( object : Visitor { - override fun visitNewPlanUnitPrice(newPlanUnitPrice: NewPlanUnitPrice) { - newPlanUnitPrice.validate() + override fun visitNewPlanUnit(newPlanUnit: NewPlanUnitPrice) { + newPlanUnit.validate() } - override fun visitNewPlanPackagePrice( - newPlanPackagePrice: NewPlanPackagePrice - ) { - newPlanPackagePrice.validate() + override fun visitNewPlanPackage(newPlanPackage: NewPlanPackagePrice) { + newPlanPackage.validate() } - override fun visitNewPlanMatrixPrice(newPlanMatrixPrice: NewPlanMatrixPrice) { - newPlanMatrixPrice.validate() + override fun visitNewPlanMatrix(newPlanMatrix: NewPlanMatrixPrice) { + newPlanMatrix.validate() } - override fun visitNewPlanTieredPrice(newPlanTieredPrice: NewPlanTieredPrice) { - newPlanTieredPrice.validate() + override fun visitNewPlanTiered(newPlanTiered: NewPlanTieredPrice) { + newPlanTiered.validate() } - override fun visitNewPlanTieredBpsPrice( - newPlanTieredBpsPrice: NewPlanTieredBpsPrice - ) { - newPlanTieredBpsPrice.validate() + override fun visitNewPlanTieredBps(newPlanTieredBps: NewPlanTieredBpsPrice) { + newPlanTieredBps.validate() } - override fun visitNewPlanBpsPrice(newPlanBpsPrice: NewPlanBpsPrice) { - newPlanBpsPrice.validate() + override fun visitNewPlanBps(newPlanBps: NewPlanBpsPrice) { + newPlanBps.validate() } - override fun visitNewPlanBulkBpsPrice( - newPlanBulkBpsPrice: NewPlanBulkBpsPrice - ) { - newPlanBulkBpsPrice.validate() + override fun visitNewPlanBulkBps(newPlanBulkBps: NewPlanBulkBpsPrice) { + newPlanBulkBps.validate() } - override fun visitNewPlanBulkPrice(newPlanBulkPrice: NewPlanBulkPrice) { - newPlanBulkPrice.validate() + override fun visitNewPlanBulk(newPlanBulk: NewPlanBulkPrice) { + newPlanBulk.validate() } - override fun visitNewPlanThresholdTotalAmountPrice( - newPlanThresholdTotalAmountPrice: NewPlanThresholdTotalAmountPrice + override fun visitNewPlanThresholdTotalAmount( + newPlanThresholdTotalAmount: NewPlanThresholdTotalAmountPrice ) { - newPlanThresholdTotalAmountPrice.validate() + newPlanThresholdTotalAmount.validate() } - override fun visitNewPlanTieredPackagePrice( - newPlanTieredPackagePrice: NewPlanTieredPackagePrice + override fun visitNewPlanTieredPackage( + newPlanTieredPackage: NewPlanTieredPackagePrice ) { - newPlanTieredPackagePrice.validate() + newPlanTieredPackage.validate() } - override fun visitNewPlanTieredWithMinimumPrice( - newPlanTieredWithMinimumPrice: NewPlanTieredWithMinimumPrice + override fun visitNewPlanTieredWithMinimum( + newPlanTieredWithMinimum: NewPlanTieredWithMinimumPrice ) { - newPlanTieredWithMinimumPrice.validate() + newPlanTieredWithMinimum.validate() } - override fun visitNewPlanUnitWithPercentPrice( - newPlanUnitWithPercentPrice: NewPlanUnitWithPercentPrice + override fun visitNewPlanUnitWithPercent( + newPlanUnitWithPercent: NewPlanUnitWithPercentPrice ) { - newPlanUnitWithPercentPrice.validate() + newPlanUnitWithPercent.validate() } - override fun visitNewPlanPackageWithAllocationPrice( - newPlanPackageWithAllocationPrice: NewPlanPackageWithAllocationPrice + override fun visitNewPlanPackageWithAllocation( + newPlanPackageWithAllocation: NewPlanPackageWithAllocationPrice ) { - newPlanPackageWithAllocationPrice.validate() + newPlanPackageWithAllocation.validate() } - override fun visitNewPlanTierWithProrationPrice( - newPlanTierWithProrationPrice: NewPlanTierWithProrationPrice + override fun visitNewPlanTierWithProration( + newPlanTierWithProration: NewPlanTierWithProrationPrice ) { - newPlanTierWithProrationPrice.validate() + newPlanTierWithProration.validate() } - override fun visitNewPlanUnitWithProrationPrice( - newPlanUnitWithProrationPrice: NewPlanUnitWithProrationPrice + override fun visitNewPlanUnitWithProration( + newPlanUnitWithProration: NewPlanUnitWithProrationPrice ) { - newPlanUnitWithProrationPrice.validate() + newPlanUnitWithProration.validate() } - override fun visitNewPlanGroupedAllocationPrice( - newPlanGroupedAllocationPrice: NewPlanGroupedAllocationPrice + override fun visitNewPlanGroupedAllocation( + newPlanGroupedAllocation: NewPlanGroupedAllocationPrice ) { - newPlanGroupedAllocationPrice.validate() + newPlanGroupedAllocation.validate() } - override fun visitNewPlanGroupedWithProratedMinimumPrice( - newPlanGroupedWithProratedMinimumPrice: - NewPlanGroupedWithProratedMinimumPrice + override fun visitNewPlanGroupedWithProratedMinimum( + newPlanGroupedWithProratedMinimum: NewPlanGroupedWithProratedMinimumPrice ) { - newPlanGroupedWithProratedMinimumPrice.validate() + newPlanGroupedWithProratedMinimum.validate() } - override fun visitNewPlanGroupedWithMeteredMinimumPrice( - newPlanGroupedWithMeteredMinimumPrice: NewPlanGroupedWithMeteredMinimumPrice + override fun visitNewPlanGroupedWithMeteredMinimum( + newPlanGroupedWithMeteredMinimum: NewPlanGroupedWithMeteredMinimumPrice ) { - newPlanGroupedWithMeteredMinimumPrice.validate() + newPlanGroupedWithMeteredMinimum.validate() } - override fun visitNewPlanMatrixWithDisplayNamePrice( - newPlanMatrixWithDisplayNamePrice: NewPlanMatrixWithDisplayNamePrice + override fun visitNewPlanMatrixWithDisplayName( + newPlanMatrixWithDisplayName: NewPlanMatrixWithDisplayNamePrice ) { - newPlanMatrixWithDisplayNamePrice.validate() + newPlanMatrixWithDisplayName.validate() } - override fun visitNewPlanBulkWithProrationPrice( - newPlanBulkWithProrationPrice: NewPlanBulkWithProrationPrice + override fun visitNewPlanBulkWithProration( + newPlanBulkWithProration: NewPlanBulkWithProrationPrice ) { - newPlanBulkWithProrationPrice.validate() + newPlanBulkWithProration.validate() } - override fun visitNewPlanGroupedTieredPackagePrice( - newPlanGroupedTieredPackagePrice: NewPlanGroupedTieredPackagePrice + override fun visitNewPlanGroupedTieredPackage( + newPlanGroupedTieredPackage: NewPlanGroupedTieredPackagePrice ) { - newPlanGroupedTieredPackagePrice.validate() + newPlanGroupedTieredPackage.validate() } - override fun visitNewPlanMaxGroupTieredPrice( - newPlanMaxGroupTieredPrice: NewPlanMaxGroupTieredPrice + override fun visitNewPlanMaxGroupTieredPackage( + newPlanMaxGroupTieredPackage: NewPlanMaxGroupTieredPackagePrice ) { - newPlanMaxGroupTieredPrice.validate() + newPlanMaxGroupTieredPackage.validate() } } ) @@ -1472,50 +1417,48 @@ constructor( return true } - return /* spotless:off */ other is Price && newPlanUnitPrice == other.newPlanUnitPrice && newPlanPackagePrice == other.newPlanPackagePrice && newPlanMatrixPrice == other.newPlanMatrixPrice && newPlanTieredPrice == other.newPlanTieredPrice && newPlanTieredBpsPrice == other.newPlanTieredBpsPrice && newPlanBpsPrice == other.newPlanBpsPrice && newPlanBulkBpsPrice == other.newPlanBulkBpsPrice && newPlanBulkPrice == other.newPlanBulkPrice && newPlanThresholdTotalAmountPrice == other.newPlanThresholdTotalAmountPrice && newPlanTieredPackagePrice == other.newPlanTieredPackagePrice && newPlanTieredWithMinimumPrice == other.newPlanTieredWithMinimumPrice && newPlanUnitWithPercentPrice == other.newPlanUnitWithPercentPrice && newPlanPackageWithAllocationPrice == other.newPlanPackageWithAllocationPrice && newPlanTierWithProrationPrice == other.newPlanTierWithProrationPrice && newPlanUnitWithProrationPrice == other.newPlanUnitWithProrationPrice && newPlanGroupedAllocationPrice == other.newPlanGroupedAllocationPrice && newPlanGroupedWithProratedMinimumPrice == other.newPlanGroupedWithProratedMinimumPrice && newPlanGroupedWithMeteredMinimumPrice == other.newPlanGroupedWithMeteredMinimumPrice && newPlanMatrixWithDisplayNamePrice == other.newPlanMatrixWithDisplayNamePrice && newPlanBulkWithProrationPrice == other.newPlanBulkWithProrationPrice && newPlanGroupedTieredPackagePrice == other.newPlanGroupedTieredPackagePrice && newPlanMaxGroupTieredPrice == other.newPlanMaxGroupTieredPrice /* spotless:on */ + return /* spotless:off */ other is Price && newPlanUnit == other.newPlanUnit && newPlanPackage == other.newPlanPackage && newPlanMatrix == other.newPlanMatrix && newPlanTiered == other.newPlanTiered && newPlanTieredBps == other.newPlanTieredBps && newPlanBps == other.newPlanBps && newPlanBulkBps == other.newPlanBulkBps && newPlanBulk == other.newPlanBulk && newPlanThresholdTotalAmount == other.newPlanThresholdTotalAmount && newPlanTieredPackage == other.newPlanTieredPackage && newPlanTieredWithMinimum == other.newPlanTieredWithMinimum && newPlanUnitWithPercent == other.newPlanUnitWithPercent && newPlanPackageWithAllocation == other.newPlanPackageWithAllocation && newPlanTierWithProration == other.newPlanTierWithProration && newPlanUnitWithProration == other.newPlanUnitWithProration && newPlanGroupedAllocation == other.newPlanGroupedAllocation && newPlanGroupedWithProratedMinimum == other.newPlanGroupedWithProratedMinimum && newPlanGroupedWithMeteredMinimum == other.newPlanGroupedWithMeteredMinimum && newPlanMatrixWithDisplayName == other.newPlanMatrixWithDisplayName && newPlanBulkWithProration == other.newPlanBulkWithProration && newPlanGroupedTieredPackage == other.newPlanGroupedTieredPackage && newPlanMaxGroupTieredPackage == other.newPlanMaxGroupTieredPackage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newPlanUnitPrice, newPlanPackagePrice, newPlanMatrixPrice, newPlanTieredPrice, newPlanTieredBpsPrice, newPlanBpsPrice, newPlanBulkBpsPrice, newPlanBulkPrice, newPlanThresholdTotalAmountPrice, newPlanTieredPackagePrice, newPlanTieredWithMinimumPrice, newPlanUnitWithPercentPrice, newPlanPackageWithAllocationPrice, newPlanTierWithProrationPrice, newPlanUnitWithProrationPrice, newPlanGroupedAllocationPrice, newPlanGroupedWithProratedMinimumPrice, newPlanGroupedWithMeteredMinimumPrice, newPlanMatrixWithDisplayNamePrice, newPlanBulkWithProrationPrice, newPlanGroupedTieredPackagePrice, newPlanMaxGroupTieredPrice) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newPlanUnit, newPlanPackage, newPlanMatrix, newPlanTiered, newPlanTieredBps, newPlanBps, newPlanBulkBps, newPlanBulk, newPlanThresholdTotalAmount, newPlanTieredPackage, newPlanTieredWithMinimum, newPlanUnitWithPercent, newPlanPackageWithAllocation, newPlanTierWithProration, newPlanUnitWithProration, newPlanGroupedAllocation, newPlanGroupedWithProratedMinimum, newPlanGroupedWithMeteredMinimum, newPlanMatrixWithDisplayName, newPlanBulkWithProration, newPlanGroupedTieredPackage, newPlanMaxGroupTieredPackage) /* spotless:on */ override fun toString(): String = when { - newPlanUnitPrice != null -> "Price{newPlanUnitPrice=$newPlanUnitPrice}" - newPlanPackagePrice != null -> "Price{newPlanPackagePrice=$newPlanPackagePrice}" - newPlanMatrixPrice != null -> "Price{newPlanMatrixPrice=$newPlanMatrixPrice}" - newPlanTieredPrice != null -> "Price{newPlanTieredPrice=$newPlanTieredPrice}" - newPlanTieredBpsPrice != null -> - "Price{newPlanTieredBpsPrice=$newPlanTieredBpsPrice}" - newPlanBpsPrice != null -> "Price{newPlanBpsPrice=$newPlanBpsPrice}" - newPlanBulkBpsPrice != null -> "Price{newPlanBulkBpsPrice=$newPlanBulkBpsPrice}" - newPlanBulkPrice != null -> "Price{newPlanBulkPrice=$newPlanBulkPrice}" - newPlanThresholdTotalAmountPrice != null -> - "Price{newPlanThresholdTotalAmountPrice=$newPlanThresholdTotalAmountPrice}" - newPlanTieredPackagePrice != null -> - "Price{newPlanTieredPackagePrice=$newPlanTieredPackagePrice}" - newPlanTieredWithMinimumPrice != null -> - "Price{newPlanTieredWithMinimumPrice=$newPlanTieredWithMinimumPrice}" - newPlanUnitWithPercentPrice != null -> - "Price{newPlanUnitWithPercentPrice=$newPlanUnitWithPercentPrice}" - newPlanPackageWithAllocationPrice != null -> - "Price{newPlanPackageWithAllocationPrice=$newPlanPackageWithAllocationPrice}" - newPlanTierWithProrationPrice != null -> - "Price{newPlanTierWithProrationPrice=$newPlanTierWithProrationPrice}" - newPlanUnitWithProrationPrice != null -> - "Price{newPlanUnitWithProrationPrice=$newPlanUnitWithProrationPrice}" - newPlanGroupedAllocationPrice != null -> - "Price{newPlanGroupedAllocationPrice=$newPlanGroupedAllocationPrice}" - newPlanGroupedWithProratedMinimumPrice != null -> - "Price{newPlanGroupedWithProratedMinimumPrice=$newPlanGroupedWithProratedMinimumPrice}" - newPlanGroupedWithMeteredMinimumPrice != null -> - "Price{newPlanGroupedWithMeteredMinimumPrice=$newPlanGroupedWithMeteredMinimumPrice}" - newPlanMatrixWithDisplayNamePrice != null -> - "Price{newPlanMatrixWithDisplayNamePrice=$newPlanMatrixWithDisplayNamePrice}" - newPlanBulkWithProrationPrice != null -> - "Price{newPlanBulkWithProrationPrice=$newPlanBulkWithProrationPrice}" - newPlanGroupedTieredPackagePrice != null -> - "Price{newPlanGroupedTieredPackagePrice=$newPlanGroupedTieredPackagePrice}" - newPlanMaxGroupTieredPrice != null -> - "Price{newPlanMaxGroupTieredPrice=$newPlanMaxGroupTieredPrice}" + newPlanUnit != null -> "Price{newPlanUnit=$newPlanUnit}" + newPlanPackage != null -> "Price{newPlanPackage=$newPlanPackage}" + newPlanMatrix != null -> "Price{newPlanMatrix=$newPlanMatrix}" + newPlanTiered != null -> "Price{newPlanTiered=$newPlanTiered}" + newPlanTieredBps != null -> "Price{newPlanTieredBps=$newPlanTieredBps}" + newPlanBps != null -> "Price{newPlanBps=$newPlanBps}" + newPlanBulkBps != null -> "Price{newPlanBulkBps=$newPlanBulkBps}" + newPlanBulk != null -> "Price{newPlanBulk=$newPlanBulk}" + newPlanThresholdTotalAmount != null -> + "Price{newPlanThresholdTotalAmount=$newPlanThresholdTotalAmount}" + newPlanTieredPackage != null -> "Price{newPlanTieredPackage=$newPlanTieredPackage}" + newPlanTieredWithMinimum != null -> + "Price{newPlanTieredWithMinimum=$newPlanTieredWithMinimum}" + newPlanUnitWithPercent != null -> + "Price{newPlanUnitWithPercent=$newPlanUnitWithPercent}" + newPlanPackageWithAllocation != null -> + "Price{newPlanPackageWithAllocation=$newPlanPackageWithAllocation}" + newPlanTierWithProration != null -> + "Price{newPlanTierWithProration=$newPlanTierWithProration}" + newPlanUnitWithProration != null -> + "Price{newPlanUnitWithProration=$newPlanUnitWithProration}" + newPlanGroupedAllocation != null -> + "Price{newPlanGroupedAllocation=$newPlanGroupedAllocation}" + newPlanGroupedWithProratedMinimum != null -> + "Price{newPlanGroupedWithProratedMinimum=$newPlanGroupedWithProratedMinimum}" + newPlanGroupedWithMeteredMinimum != null -> + "Price{newPlanGroupedWithMeteredMinimum=$newPlanGroupedWithMeteredMinimum}" + newPlanMatrixWithDisplayName != null -> + "Price{newPlanMatrixWithDisplayName=$newPlanMatrixWithDisplayName}" + newPlanBulkWithProration != null -> + "Price{newPlanBulkWithProration=$newPlanBulkWithProration}" + newPlanGroupedTieredPackage != null -> + "Price{newPlanGroupedTieredPackage=$newPlanGroupedTieredPackage}" + newPlanMaxGroupTieredPackage != null -> + "Price{newPlanMaxGroupTieredPackage=$newPlanMaxGroupTieredPackage}" _json != null -> "Price{_unknown=$_json}" else -> throw IllegalStateException("Invalid Price") } @@ -1523,182 +1466,171 @@ constructor( companion object { @JvmStatic - fun ofNewPlanUnitPrice(newPlanUnitPrice: NewPlanUnitPrice) = - Price(newPlanUnitPrice = newPlanUnitPrice) + fun ofNewPlanUnit(newPlanUnit: NewPlanUnitPrice) = Price(newPlanUnit = newPlanUnit) @JvmStatic - fun ofNewPlanPackagePrice(newPlanPackagePrice: NewPlanPackagePrice) = - Price(newPlanPackagePrice = newPlanPackagePrice) + fun ofNewPlanPackage(newPlanPackage: NewPlanPackagePrice) = + Price(newPlanPackage = newPlanPackage) @JvmStatic - fun ofNewPlanMatrixPrice(newPlanMatrixPrice: NewPlanMatrixPrice) = - Price(newPlanMatrixPrice = newPlanMatrixPrice) + fun ofNewPlanMatrix(newPlanMatrix: NewPlanMatrixPrice) = + Price(newPlanMatrix = newPlanMatrix) @JvmStatic - fun ofNewPlanTieredPrice(newPlanTieredPrice: NewPlanTieredPrice) = - Price(newPlanTieredPrice = newPlanTieredPrice) + fun ofNewPlanTiered(newPlanTiered: NewPlanTieredPrice) = + Price(newPlanTiered = newPlanTiered) @JvmStatic - fun ofNewPlanTieredBpsPrice(newPlanTieredBpsPrice: NewPlanTieredBpsPrice) = - Price(newPlanTieredBpsPrice = newPlanTieredBpsPrice) + fun ofNewPlanTieredBps(newPlanTieredBps: NewPlanTieredBpsPrice) = + Price(newPlanTieredBps = newPlanTieredBps) @JvmStatic - fun ofNewPlanBpsPrice(newPlanBpsPrice: NewPlanBpsPrice) = - Price(newPlanBpsPrice = newPlanBpsPrice) + fun ofNewPlanBps(newPlanBps: NewPlanBpsPrice) = Price(newPlanBps = newPlanBps) @JvmStatic - fun ofNewPlanBulkBpsPrice(newPlanBulkBpsPrice: NewPlanBulkBpsPrice) = - Price(newPlanBulkBpsPrice = newPlanBulkBpsPrice) + fun ofNewPlanBulkBps(newPlanBulkBps: NewPlanBulkBpsPrice) = + Price(newPlanBulkBps = newPlanBulkBps) @JvmStatic - fun ofNewPlanBulkPrice(newPlanBulkPrice: NewPlanBulkPrice) = - Price(newPlanBulkPrice = newPlanBulkPrice) + fun ofNewPlanBulk(newPlanBulk: NewPlanBulkPrice) = Price(newPlanBulk = newPlanBulk) @JvmStatic - fun ofNewPlanThresholdTotalAmountPrice( - newPlanThresholdTotalAmountPrice: NewPlanThresholdTotalAmountPrice - ) = Price(newPlanThresholdTotalAmountPrice = newPlanThresholdTotalAmountPrice) + fun ofNewPlanThresholdTotalAmount( + newPlanThresholdTotalAmount: NewPlanThresholdTotalAmountPrice + ) = Price(newPlanThresholdTotalAmount = newPlanThresholdTotalAmount) @JvmStatic - fun ofNewPlanTieredPackagePrice(newPlanTieredPackagePrice: NewPlanTieredPackagePrice) = - Price(newPlanTieredPackagePrice = newPlanTieredPackagePrice) + fun ofNewPlanTieredPackage(newPlanTieredPackage: NewPlanTieredPackagePrice) = + Price(newPlanTieredPackage = newPlanTieredPackage) @JvmStatic - fun ofNewPlanTieredWithMinimumPrice( - newPlanTieredWithMinimumPrice: NewPlanTieredWithMinimumPrice - ) = Price(newPlanTieredWithMinimumPrice = newPlanTieredWithMinimumPrice) + fun ofNewPlanTieredWithMinimum( + newPlanTieredWithMinimum: NewPlanTieredWithMinimumPrice + ) = Price(newPlanTieredWithMinimum = newPlanTieredWithMinimum) @JvmStatic - fun ofNewPlanUnitWithPercentPrice( - newPlanUnitWithPercentPrice: NewPlanUnitWithPercentPrice - ) = Price(newPlanUnitWithPercentPrice = newPlanUnitWithPercentPrice) + fun ofNewPlanUnitWithPercent(newPlanUnitWithPercent: NewPlanUnitWithPercentPrice) = + Price(newPlanUnitWithPercent = newPlanUnitWithPercent) @JvmStatic - fun ofNewPlanPackageWithAllocationPrice( - newPlanPackageWithAllocationPrice: NewPlanPackageWithAllocationPrice - ) = Price(newPlanPackageWithAllocationPrice = newPlanPackageWithAllocationPrice) + fun ofNewPlanPackageWithAllocation( + newPlanPackageWithAllocation: NewPlanPackageWithAllocationPrice + ) = Price(newPlanPackageWithAllocation = newPlanPackageWithAllocation) @JvmStatic - fun ofNewPlanTierWithProrationPrice( - newPlanTierWithProrationPrice: NewPlanTierWithProrationPrice - ) = Price(newPlanTierWithProrationPrice = newPlanTierWithProrationPrice) + fun ofNewPlanTierWithProration( + newPlanTierWithProration: NewPlanTierWithProrationPrice + ) = Price(newPlanTierWithProration = newPlanTierWithProration) @JvmStatic - fun ofNewPlanUnitWithProrationPrice( - newPlanUnitWithProrationPrice: NewPlanUnitWithProrationPrice - ) = Price(newPlanUnitWithProrationPrice = newPlanUnitWithProrationPrice) + fun ofNewPlanUnitWithProration( + newPlanUnitWithProration: NewPlanUnitWithProrationPrice + ) = Price(newPlanUnitWithProration = newPlanUnitWithProration) @JvmStatic - fun ofNewPlanGroupedAllocationPrice( - newPlanGroupedAllocationPrice: NewPlanGroupedAllocationPrice - ) = Price(newPlanGroupedAllocationPrice = newPlanGroupedAllocationPrice) + fun ofNewPlanGroupedAllocation( + newPlanGroupedAllocation: NewPlanGroupedAllocationPrice + ) = Price(newPlanGroupedAllocation = newPlanGroupedAllocation) @JvmStatic - fun ofNewPlanGroupedWithProratedMinimumPrice( - newPlanGroupedWithProratedMinimumPrice: NewPlanGroupedWithProratedMinimumPrice - ) = - Price( - newPlanGroupedWithProratedMinimumPrice = newPlanGroupedWithProratedMinimumPrice - ) + fun ofNewPlanGroupedWithProratedMinimum( + newPlanGroupedWithProratedMinimum: NewPlanGroupedWithProratedMinimumPrice + ) = Price(newPlanGroupedWithProratedMinimum = newPlanGroupedWithProratedMinimum) @JvmStatic - fun ofNewPlanGroupedWithMeteredMinimumPrice( - newPlanGroupedWithMeteredMinimumPrice: NewPlanGroupedWithMeteredMinimumPrice - ) = Price(newPlanGroupedWithMeteredMinimumPrice = newPlanGroupedWithMeteredMinimumPrice) + fun ofNewPlanGroupedWithMeteredMinimum( + newPlanGroupedWithMeteredMinimum: NewPlanGroupedWithMeteredMinimumPrice + ) = Price(newPlanGroupedWithMeteredMinimum = newPlanGroupedWithMeteredMinimum) @JvmStatic - fun ofNewPlanMatrixWithDisplayNamePrice( - newPlanMatrixWithDisplayNamePrice: NewPlanMatrixWithDisplayNamePrice - ) = Price(newPlanMatrixWithDisplayNamePrice = newPlanMatrixWithDisplayNamePrice) + fun ofNewPlanMatrixWithDisplayName( + newPlanMatrixWithDisplayName: NewPlanMatrixWithDisplayNamePrice + ) = Price(newPlanMatrixWithDisplayName = newPlanMatrixWithDisplayName) @JvmStatic - fun ofNewPlanBulkWithProrationPrice( - newPlanBulkWithProrationPrice: NewPlanBulkWithProrationPrice - ) = Price(newPlanBulkWithProrationPrice = newPlanBulkWithProrationPrice) + fun ofNewPlanBulkWithProration( + newPlanBulkWithProration: NewPlanBulkWithProrationPrice + ) = Price(newPlanBulkWithProration = newPlanBulkWithProration) @JvmStatic - fun ofNewPlanGroupedTieredPackagePrice( - newPlanGroupedTieredPackagePrice: NewPlanGroupedTieredPackagePrice - ) = Price(newPlanGroupedTieredPackagePrice = newPlanGroupedTieredPackagePrice) + fun ofNewPlanGroupedTieredPackage( + newPlanGroupedTieredPackage: NewPlanGroupedTieredPackagePrice + ) = Price(newPlanGroupedTieredPackage = newPlanGroupedTieredPackage) @JvmStatic - fun ofNewPlanMaxGroupTieredPrice( - newPlanMaxGroupTieredPrice: NewPlanMaxGroupTieredPrice - ) = Price(newPlanMaxGroupTieredPrice = newPlanMaxGroupTieredPrice) + fun ofNewPlanMaxGroupTieredPackage( + newPlanMaxGroupTieredPackage: NewPlanMaxGroupTieredPackagePrice + ) = Price(newPlanMaxGroupTieredPackage = newPlanMaxGroupTieredPackage) } interface Visitor { - fun visitNewPlanUnitPrice(newPlanUnitPrice: NewPlanUnitPrice): T + fun visitNewPlanUnit(newPlanUnit: NewPlanUnitPrice): T - fun visitNewPlanPackagePrice(newPlanPackagePrice: NewPlanPackagePrice): T + fun visitNewPlanPackage(newPlanPackage: NewPlanPackagePrice): T - fun visitNewPlanMatrixPrice(newPlanMatrixPrice: NewPlanMatrixPrice): T + fun visitNewPlanMatrix(newPlanMatrix: NewPlanMatrixPrice): T - fun visitNewPlanTieredPrice(newPlanTieredPrice: NewPlanTieredPrice): T + fun visitNewPlanTiered(newPlanTiered: NewPlanTieredPrice): T - fun visitNewPlanTieredBpsPrice(newPlanTieredBpsPrice: NewPlanTieredBpsPrice): T + fun visitNewPlanTieredBps(newPlanTieredBps: NewPlanTieredBpsPrice): T - fun visitNewPlanBpsPrice(newPlanBpsPrice: NewPlanBpsPrice): T + fun visitNewPlanBps(newPlanBps: NewPlanBpsPrice): T - fun visitNewPlanBulkBpsPrice(newPlanBulkBpsPrice: NewPlanBulkBpsPrice): T + fun visitNewPlanBulkBps(newPlanBulkBps: NewPlanBulkBpsPrice): T - fun visitNewPlanBulkPrice(newPlanBulkPrice: NewPlanBulkPrice): T + fun visitNewPlanBulk(newPlanBulk: NewPlanBulkPrice): T - fun visitNewPlanThresholdTotalAmountPrice( - newPlanThresholdTotalAmountPrice: NewPlanThresholdTotalAmountPrice + fun visitNewPlanThresholdTotalAmount( + newPlanThresholdTotalAmount: NewPlanThresholdTotalAmountPrice ): T - fun visitNewPlanTieredPackagePrice( - newPlanTieredPackagePrice: NewPlanTieredPackagePrice - ): T + fun visitNewPlanTieredPackage(newPlanTieredPackage: NewPlanTieredPackagePrice): T - fun visitNewPlanTieredWithMinimumPrice( - newPlanTieredWithMinimumPrice: NewPlanTieredWithMinimumPrice + fun visitNewPlanTieredWithMinimum( + newPlanTieredWithMinimum: NewPlanTieredWithMinimumPrice ): T - fun visitNewPlanUnitWithPercentPrice( - newPlanUnitWithPercentPrice: NewPlanUnitWithPercentPrice - ): T + fun visitNewPlanUnitWithPercent(newPlanUnitWithPercent: NewPlanUnitWithPercentPrice): T - fun visitNewPlanPackageWithAllocationPrice( - newPlanPackageWithAllocationPrice: NewPlanPackageWithAllocationPrice + fun visitNewPlanPackageWithAllocation( + newPlanPackageWithAllocation: NewPlanPackageWithAllocationPrice ): T - fun visitNewPlanTierWithProrationPrice( - newPlanTierWithProrationPrice: NewPlanTierWithProrationPrice + fun visitNewPlanTierWithProration( + newPlanTierWithProration: NewPlanTierWithProrationPrice ): T - fun visitNewPlanUnitWithProrationPrice( - newPlanUnitWithProrationPrice: NewPlanUnitWithProrationPrice + fun visitNewPlanUnitWithProration( + newPlanUnitWithProration: NewPlanUnitWithProrationPrice ): T - fun visitNewPlanGroupedAllocationPrice( - newPlanGroupedAllocationPrice: NewPlanGroupedAllocationPrice + fun visitNewPlanGroupedAllocation( + newPlanGroupedAllocation: NewPlanGroupedAllocationPrice ): T - fun visitNewPlanGroupedWithProratedMinimumPrice( - newPlanGroupedWithProratedMinimumPrice: NewPlanGroupedWithProratedMinimumPrice + fun visitNewPlanGroupedWithProratedMinimum( + newPlanGroupedWithProratedMinimum: NewPlanGroupedWithProratedMinimumPrice ): T - fun visitNewPlanGroupedWithMeteredMinimumPrice( - newPlanGroupedWithMeteredMinimumPrice: NewPlanGroupedWithMeteredMinimumPrice + fun visitNewPlanGroupedWithMeteredMinimum( + newPlanGroupedWithMeteredMinimum: NewPlanGroupedWithMeteredMinimumPrice ): T - fun visitNewPlanMatrixWithDisplayNamePrice( - newPlanMatrixWithDisplayNamePrice: NewPlanMatrixWithDisplayNamePrice + fun visitNewPlanMatrixWithDisplayName( + newPlanMatrixWithDisplayName: NewPlanMatrixWithDisplayNamePrice ): T - fun visitNewPlanBulkWithProrationPrice( - newPlanBulkWithProrationPrice: NewPlanBulkWithProrationPrice + fun visitNewPlanBulkWithProration( + newPlanBulkWithProration: NewPlanBulkWithProrationPrice ): T - fun visitNewPlanGroupedTieredPackagePrice( - newPlanGroupedTieredPackagePrice: NewPlanGroupedTieredPackagePrice + fun visitNewPlanGroupedTieredPackage( + newPlanGroupedTieredPackage: NewPlanGroupedTieredPackagePrice ): T - fun visitNewPlanMaxGroupTieredPrice( - newPlanMaxGroupTieredPrice: NewPlanMaxGroupTieredPrice + fun visitNewPlanMaxGroupTieredPackage( + newPlanMaxGroupTieredPackage: NewPlanMaxGroupTieredPackagePrice ): T fun unknown(json: JsonValue?): T { @@ -1717,7 +1649,7 @@ constructor( "unit" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(newPlanUnitPrice = it, _json = json) + return Price(newPlanUnit = it, _json = json) } } "package" -> { @@ -1725,19 +1657,19 @@ constructor( it.validate() } ?.let { - return Price(newPlanPackagePrice = it, _json = json) + return Price(newPlanPackage = it, _json = json) } } "matrix" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(newPlanMatrixPrice = it, _json = json) + return Price(newPlanMatrix = it, _json = json) } } "tiered" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(newPlanTieredPrice = it, _json = json) + return Price(newPlanTiered = it, _json = json) } } "tiered_bps" -> { @@ -1745,13 +1677,13 @@ constructor( it.validate() } ?.let { - return Price(newPlanTieredBpsPrice = it, _json = json) + return Price(newPlanTieredBps = it, _json = json) } } "bps" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(newPlanBpsPrice = it, _json = json) + return Price(newPlanBps = it, _json = json) } } "bulk_bps" -> { @@ -1759,13 +1691,13 @@ constructor( it.validate() } ?.let { - return Price(newPlanBulkBpsPrice = it, _json = json) + return Price(newPlanBulkBps = it, _json = json) } } "bulk" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(newPlanBulkPrice = it, _json = json) + return Price(newPlanBulk = it, _json = json) } } "threshold_total_amount" -> { @@ -1773,7 +1705,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanThresholdTotalAmountPrice = it, _json = json) + return Price(newPlanThresholdTotalAmount = it, _json = json) } } "tiered_package" -> { @@ -1781,7 +1713,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanTieredPackagePrice = it, _json = json) + return Price(newPlanTieredPackage = it, _json = json) } } "tiered_with_minimum" -> { @@ -1789,7 +1721,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanTieredWithMinimumPrice = it, _json = json) + return Price(newPlanTieredWithMinimum = it, _json = json) } } "unit_with_percent" -> { @@ -1797,7 +1729,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanUnitWithPercentPrice = it, _json = json) + return Price(newPlanUnitWithPercent = it, _json = json) } } "package_with_allocation" -> { @@ -1805,7 +1737,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanPackageWithAllocationPrice = it, _json = json) + return Price(newPlanPackageWithAllocation = it, _json = json) } } "tiered_with_proration" -> { @@ -1813,7 +1745,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanTierWithProrationPrice = it, _json = json) + return Price(newPlanTierWithProration = it, _json = json) } } "unit_with_proration" -> { @@ -1821,7 +1753,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanUnitWithProrationPrice = it, _json = json) + return Price(newPlanUnitWithProration = it, _json = json) } } "grouped_allocation" -> { @@ -1829,7 +1761,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanGroupedAllocationPrice = it, _json = json) + return Price(newPlanGroupedAllocation = it, _json = json) } } "grouped_with_prorated_minimum" -> { @@ -1840,10 +1772,7 @@ constructor( it.validate() } ?.let { - return Price( - newPlanGroupedWithProratedMinimumPrice = it, - _json = json - ) + return Price(newPlanGroupedWithProratedMinimum = it, _json = json) } } "grouped_with_metered_minimum" -> { @@ -1854,10 +1783,7 @@ constructor( it.validate() } ?.let { - return Price( - newPlanGroupedWithMeteredMinimumPrice = it, - _json = json - ) + return Price(newPlanGroupedWithMeteredMinimum = it, _json = json) } } "matrix_with_display_name" -> { @@ -1865,7 +1791,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanMatrixWithDisplayNamePrice = it, _json = json) + return Price(newPlanMatrixWithDisplayName = it, _json = json) } } "bulk_with_proration" -> { @@ -1873,7 +1799,7 @@ constructor( it.validate() } ?.let { - return Price(newPlanBulkWithProrationPrice = it, _json = json) + return Price(newPlanBulkWithProration = it, _json = json) } } "grouped_tiered_package" -> { @@ -1881,15 +1807,15 @@ constructor( it.validate() } ?.let { - return Price(newPlanGroupedTieredPackagePrice = it, _json = json) + return Price(newPlanGroupedTieredPackage = it, _json = json) } } - "max_group_tiered" -> { - tryDeserialize(node, jacksonTypeRef()) { + "max_group_tiered_package" -> { + tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(newPlanMaxGroupTieredPrice = it, _json = json) + return Price(newPlanMaxGroupTieredPackage = it, _json = json) } } } @@ -1906,47 +1832,42 @@ constructor( provider: SerializerProvider ) { when { - value.newPlanUnitPrice != null -> generator.writeObject(value.newPlanUnitPrice) - value.newPlanPackagePrice != null -> - generator.writeObject(value.newPlanPackagePrice) - value.newPlanMatrixPrice != null -> - generator.writeObject(value.newPlanMatrixPrice) - value.newPlanTieredPrice != null -> - generator.writeObject(value.newPlanTieredPrice) - value.newPlanTieredBpsPrice != null -> - generator.writeObject(value.newPlanTieredBpsPrice) - value.newPlanBpsPrice != null -> generator.writeObject(value.newPlanBpsPrice) - value.newPlanBulkBpsPrice != null -> - generator.writeObject(value.newPlanBulkBpsPrice) - value.newPlanBulkPrice != null -> generator.writeObject(value.newPlanBulkPrice) - value.newPlanThresholdTotalAmountPrice != null -> - generator.writeObject(value.newPlanThresholdTotalAmountPrice) - value.newPlanTieredPackagePrice != null -> - generator.writeObject(value.newPlanTieredPackagePrice) - value.newPlanTieredWithMinimumPrice != null -> - generator.writeObject(value.newPlanTieredWithMinimumPrice) - value.newPlanUnitWithPercentPrice != null -> - generator.writeObject(value.newPlanUnitWithPercentPrice) - value.newPlanPackageWithAllocationPrice != null -> - generator.writeObject(value.newPlanPackageWithAllocationPrice) - value.newPlanTierWithProrationPrice != null -> - generator.writeObject(value.newPlanTierWithProrationPrice) - value.newPlanUnitWithProrationPrice != null -> - generator.writeObject(value.newPlanUnitWithProrationPrice) - value.newPlanGroupedAllocationPrice != null -> - generator.writeObject(value.newPlanGroupedAllocationPrice) - value.newPlanGroupedWithProratedMinimumPrice != null -> - generator.writeObject(value.newPlanGroupedWithProratedMinimumPrice) - value.newPlanGroupedWithMeteredMinimumPrice != null -> - generator.writeObject(value.newPlanGroupedWithMeteredMinimumPrice) - value.newPlanMatrixWithDisplayNamePrice != null -> - generator.writeObject(value.newPlanMatrixWithDisplayNamePrice) - value.newPlanBulkWithProrationPrice != null -> - generator.writeObject(value.newPlanBulkWithProrationPrice) - value.newPlanGroupedTieredPackagePrice != null -> - generator.writeObject(value.newPlanGroupedTieredPackagePrice) - value.newPlanMaxGroupTieredPrice != null -> - generator.writeObject(value.newPlanMaxGroupTieredPrice) + value.newPlanUnit != null -> generator.writeObject(value.newPlanUnit) + value.newPlanPackage != null -> generator.writeObject(value.newPlanPackage) + value.newPlanMatrix != null -> generator.writeObject(value.newPlanMatrix) + value.newPlanTiered != null -> generator.writeObject(value.newPlanTiered) + value.newPlanTieredBps != null -> generator.writeObject(value.newPlanTieredBps) + value.newPlanBps != null -> generator.writeObject(value.newPlanBps) + value.newPlanBulkBps != null -> generator.writeObject(value.newPlanBulkBps) + value.newPlanBulk != null -> generator.writeObject(value.newPlanBulk) + value.newPlanThresholdTotalAmount != null -> + generator.writeObject(value.newPlanThresholdTotalAmount) + value.newPlanTieredPackage != null -> + generator.writeObject(value.newPlanTieredPackage) + value.newPlanTieredWithMinimum != null -> + generator.writeObject(value.newPlanTieredWithMinimum) + value.newPlanUnitWithPercent != null -> + generator.writeObject(value.newPlanUnitWithPercent) + value.newPlanPackageWithAllocation != null -> + generator.writeObject(value.newPlanPackageWithAllocation) + value.newPlanTierWithProration != null -> + generator.writeObject(value.newPlanTierWithProration) + value.newPlanUnitWithProration != null -> + generator.writeObject(value.newPlanUnitWithProration) + value.newPlanGroupedAllocation != null -> + generator.writeObject(value.newPlanGroupedAllocation) + value.newPlanGroupedWithProratedMinimum != null -> + generator.writeObject(value.newPlanGroupedWithProratedMinimum) + value.newPlanGroupedWithMeteredMinimum != null -> + generator.writeObject(value.newPlanGroupedWithMeteredMinimum) + value.newPlanMatrixWithDisplayName != null -> + generator.writeObject(value.newPlanMatrixWithDisplayName) + value.newPlanBulkWithProration != null -> + generator.writeObject(value.newPlanBulkWithProration) + value.newPlanGroupedTieredPackage != null -> + generator.writeObject(value.newPlanGroupedTieredPackage) + value.newPlanMaxGroupTieredPackage != null -> + generator.writeObject(value.newPlanMaxGroupTieredPackage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Price") } @@ -30349,7 +30270,7 @@ constructor( } @NoAutoDetect - class NewPlanMaxGroupTieredPrice + class NewPlanMaxGroupTieredPackagePrice @JsonCreator private constructor( @JsonProperty("cadence") @@ -30358,9 +30279,10 @@ constructor( @JsonProperty("item_id") @ExcludeMissing private val itemId: JsonField = JsonMissing.of(), - @JsonProperty("max_group_tiered_config") + @JsonProperty("max_group_tiered_package_config") @ExcludeMissing - private val maxGroupTieredConfig: JsonField = JsonMissing.of(), + private val maxGroupTieredPackageConfig: JsonField = + JsonMissing.of(), @JsonProperty("model_type") @ExcludeMissing private val modelType: JsonField = JsonMissing.of(), @@ -30409,8 +30331,8 @@ constructor( /** The id of the item the plan will be associated with. */ fun itemId(): String = itemId.getRequired("item_id") - fun maxGroupTieredConfig(): MaxGroupTieredConfig = - maxGroupTieredConfig.getRequired("max_group_tiered_config") + fun maxGroupTieredPackageConfig(): MaxGroupTieredPackageConfig = + maxGroupTieredPackageConfig.getRequired("max_group_tiered_package_config") fun modelType(): ModelType = modelType.getRequired("model_type") @@ -30485,9 +30407,10 @@ constructor( /** The id of the item the plan will be associated with. */ @JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField = itemId - @JsonProperty("max_group_tiered_config") + @JsonProperty("max_group_tiered_package_config") @ExcludeMissing - fun _maxGroupTieredConfig(): JsonField = maxGroupTieredConfig + fun _maxGroupTieredPackageConfig(): JsonField = + maxGroupTieredPackageConfig @JsonProperty("model_type") @ExcludeMissing @@ -30571,14 +30494,14 @@ constructor( private var validated: Boolean = false - fun validate(): NewPlanMaxGroupTieredPrice = apply { + fun validate(): NewPlanMaxGroupTieredPackagePrice = apply { if (validated) { return@apply } cadence() itemId() - maxGroupTieredConfig().validate() + maxGroupTieredPackageConfig().validate() modelType() name() billableMetricId() @@ -30605,7 +30528,8 @@ constructor( private var cadence: JsonField? = null private var itemId: JsonField? = null - private var maxGroupTieredConfig: JsonField? = null + private var maxGroupTieredPackageConfig: JsonField? = + null private var modelType: JsonField? = null private var name: JsonField? = null private var billableMetricId: JsonField = JsonMissing.of() @@ -30623,25 +30547,29 @@ constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(newPlanMaxGroupTieredPrice: NewPlanMaxGroupTieredPrice) = apply { - cadence = newPlanMaxGroupTieredPrice.cadence - itemId = newPlanMaxGroupTieredPrice.itemId - maxGroupTieredConfig = newPlanMaxGroupTieredPrice.maxGroupTieredConfig - modelType = newPlanMaxGroupTieredPrice.modelType - name = newPlanMaxGroupTieredPrice.name - billableMetricId = newPlanMaxGroupTieredPrice.billableMetricId - billedInAdvance = newPlanMaxGroupTieredPrice.billedInAdvance - billingCycleConfiguration = newPlanMaxGroupTieredPrice.billingCycleConfiguration - conversionRate = newPlanMaxGroupTieredPrice.conversionRate - currency = newPlanMaxGroupTieredPrice.currency - externalPriceId = newPlanMaxGroupTieredPrice.externalPriceId - fixedPriceQuantity = newPlanMaxGroupTieredPrice.fixedPriceQuantity - invoiceGroupingKey = newPlanMaxGroupTieredPrice.invoiceGroupingKey + internal fun from( + newPlanMaxGroupTieredPackagePrice: NewPlanMaxGroupTieredPackagePrice + ) = apply { + cadence = newPlanMaxGroupTieredPackagePrice.cadence + itemId = newPlanMaxGroupTieredPackagePrice.itemId + maxGroupTieredPackageConfig = + newPlanMaxGroupTieredPackagePrice.maxGroupTieredPackageConfig + modelType = newPlanMaxGroupTieredPackagePrice.modelType + name = newPlanMaxGroupTieredPackagePrice.name + billableMetricId = newPlanMaxGroupTieredPackagePrice.billableMetricId + billedInAdvance = newPlanMaxGroupTieredPackagePrice.billedInAdvance + billingCycleConfiguration = + newPlanMaxGroupTieredPackagePrice.billingCycleConfiguration + conversionRate = newPlanMaxGroupTieredPackagePrice.conversionRate + currency = newPlanMaxGroupTieredPackagePrice.currency + externalPriceId = newPlanMaxGroupTieredPackagePrice.externalPriceId + fixedPriceQuantity = newPlanMaxGroupTieredPackagePrice.fixedPriceQuantity + invoiceGroupingKey = newPlanMaxGroupTieredPackagePrice.invoiceGroupingKey invoicingCycleConfiguration = - newPlanMaxGroupTieredPrice.invoicingCycleConfiguration - metadata = newPlanMaxGroupTieredPrice.metadata + newPlanMaxGroupTieredPackagePrice.invoicingCycleConfiguration + metadata = newPlanMaxGroupTieredPackagePrice.metadata additionalProperties = - newPlanMaxGroupTieredPrice.additionalProperties.toMutableMap() + newPlanMaxGroupTieredPackagePrice.additionalProperties.toMutableMap() } /** The cadence to bill for this price on. */ @@ -30656,13 +30584,13 @@ constructor( /** The id of the item the plan will be associated with. */ fun itemId(itemId: JsonField) = apply { this.itemId = itemId } - fun maxGroupTieredConfig(maxGroupTieredConfig: MaxGroupTieredConfig) = - maxGroupTieredConfig(JsonField.of(maxGroupTieredConfig)) + fun maxGroupTieredPackageConfig( + maxGroupTieredPackageConfig: MaxGroupTieredPackageConfig + ) = maxGroupTieredPackageConfig(JsonField.of(maxGroupTieredPackageConfig)) - fun maxGroupTieredConfig(maxGroupTieredConfig: JsonField) = - apply { - this.maxGroupTieredConfig = maxGroupTieredConfig - } + fun maxGroupTieredPackageConfig( + maxGroupTieredPackageConfig: JsonField + ) = apply { this.maxGroupTieredPackageConfig = maxGroupTieredPackageConfig } fun modelType(modelType: ModelType) = modelType(JsonField.of(modelType)) @@ -30911,11 +30839,11 @@ constructor( keys.forEach(::removeAdditionalProperty) } - fun build(): NewPlanMaxGroupTieredPrice = - NewPlanMaxGroupTieredPrice( + fun build(): NewPlanMaxGroupTieredPackagePrice = + NewPlanMaxGroupTieredPackagePrice( checkRequired("cadence", cadence), checkRequired("itemId", itemId), - checkRequired("maxGroupTieredConfig", maxGroupTieredConfig), + checkRequired("maxGroupTieredPackageConfig", maxGroupTieredPackageConfig), checkRequired("modelType", modelType), checkRequired("name", name), billableMetricId, @@ -31015,7 +30943,7 @@ constructor( } @NoAutoDetect - class MaxGroupTieredConfig + class MaxGroupTieredPackageConfig @JsonCreator private constructor( @JsonAnySetter @@ -31028,7 +30956,7 @@ constructor( private var validated: Boolean = false - fun validate(): MaxGroupTieredConfig = apply { + fun validate(): MaxGroupTieredPackageConfig = apply { if (validated) { return@apply } @@ -31048,10 +30976,11 @@ constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(maxGroupTieredConfig: MaxGroupTieredConfig) = apply { - additionalProperties = - maxGroupTieredConfig.additionalProperties.toMutableMap() - } + internal fun from(maxGroupTieredPackageConfig: MaxGroupTieredPackageConfig) = + apply { + additionalProperties = + maxGroupTieredPackageConfig.additionalProperties.toMutableMap() + } fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -31075,8 +31004,8 @@ constructor( keys.forEach(::removeAdditionalProperty) } - fun build(): MaxGroupTieredConfig = - MaxGroupTieredConfig(additionalProperties.toImmutable()) + fun build(): MaxGroupTieredPackageConfig = + MaxGroupTieredPackageConfig(additionalProperties.toImmutable()) } override fun equals(other: Any?): Boolean { @@ -31084,7 +31013,7 @@ constructor( return true } - return /* spotless:off */ other is MaxGroupTieredConfig && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is MaxGroupTieredPackageConfig && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ @@ -31094,7 +31023,7 @@ constructor( override fun hashCode(): Int = hashCode override fun toString() = - "MaxGroupTieredConfig{additionalProperties=$additionalProperties}" + "MaxGroupTieredPackageConfig{additionalProperties=$additionalProperties}" } class ModelType @@ -31107,29 +31036,29 @@ constructor( companion object { - @JvmField val MAX_GROUP_TIERED = of("max_group_tiered") + @JvmField val MAX_GROUP_TIERED_PACKAGE = of("max_group_tiered_package") @JvmStatic fun of(value: String) = ModelType(JsonField.of(value)) } enum class Known { - MAX_GROUP_TIERED, + MAX_GROUP_TIERED_PACKAGE, } enum class Value { - MAX_GROUP_TIERED, + MAX_GROUP_TIERED_PACKAGE, _UNKNOWN, } fun value(): Value = when (this) { - MAX_GROUP_TIERED -> Value.MAX_GROUP_TIERED + MAX_GROUP_TIERED_PACKAGE -> Value.MAX_GROUP_TIERED_PACKAGE else -> Value._UNKNOWN } fun known(): Known = when (this) { - MAX_GROUP_TIERED -> Known.MAX_GROUP_TIERED + MAX_GROUP_TIERED_PACKAGE -> Known.MAX_GROUP_TIERED_PACKAGE else -> throw OrbInvalidDataException("Unknown ModelType: $value") } @@ -31625,17 +31554,17 @@ constructor( return true } - return /* spotless:off */ other is NewPlanMaxGroupTieredPrice && cadence == other.cadence && itemId == other.itemId && maxGroupTieredConfig == other.maxGroupTieredConfig && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && currency == other.currency && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is NewPlanMaxGroupTieredPackagePrice && cadence == other.cadence && itemId == other.itemId && maxGroupTieredPackageConfig == other.maxGroupTieredPackageConfig && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && currency == other.currency && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(cadence, itemId, maxGroupTieredConfig, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, currency, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(cadence, itemId, maxGroupTieredPackageConfig, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, currency, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "NewPlanMaxGroupTieredPrice{cadence=$cadence, itemId=$itemId, maxGroupTieredConfig=$maxGroupTieredConfig, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, currency=$currency, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, additionalProperties=$additionalProperties}" + "NewPlanMaxGroupTieredPackagePrice{cadence=$cadence, itemId=$itemId, maxGroupTieredPackageConfig=$maxGroupTieredPackageConfig, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, currency=$currency, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, additionalProperties=$additionalProperties}" } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/Price.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/Price.kt index b919f6c7..246f4808 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/Price.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/Price.kt @@ -47,258 +47,247 @@ import kotlin.jvm.optionals.getOrNull @JsonSerialize(using = Price.Serializer::class) class Price private constructor( - private val unitPrice: UnitPrice? = null, + private val unit: UnitPrice? = null, private val packagePrice: PackagePrice? = null, - private val matrixPrice: MatrixPrice? = null, - private val tieredPrice: TieredPrice? = null, - private val tieredBpsPrice: TieredBpsPrice? = null, - private val bpsPrice: BpsPrice? = null, - private val bulkBpsPrice: BulkBpsPrice? = null, - private val bulkPrice: BulkPrice? = null, - private val thresholdTotalAmountPrice: ThresholdTotalAmountPrice? = null, - private val tieredPackagePrice: TieredPackagePrice? = null, - private val groupedTieredPrice: GroupedTieredPrice? = null, - private val tieredWithMinimumPrice: TieredWithMinimumPrice? = null, - private val tieredPackageWithMinimumPrice: TieredPackageWithMinimumPrice? = null, - private val packageWithAllocationPrice: PackageWithAllocationPrice? = null, - private val unitWithPercentPrice: UnitWithPercentPrice? = null, - private val matrixWithAllocationPrice: MatrixWithAllocationPrice? = null, - private val tieredWithProrationPrice: TieredWithProrationPrice? = null, - private val unitWithProrationPrice: UnitWithProrationPrice? = null, - private val groupedAllocationPrice: GroupedAllocationPrice? = null, - private val groupedWithProratedMinimumPrice: GroupedWithProratedMinimumPrice? = null, - private val groupedWithMeteredMinimumPrice: GroupedWithMeteredMinimumPrice? = null, - private val matrixWithDisplayNamePrice: MatrixWithDisplayNamePrice? = null, - private val bulkWithProrationPrice: BulkWithProrationPrice? = null, - private val groupedTieredPackagePrice: GroupedTieredPackagePrice? = null, - private val maxGroupTieredPrice: MaxGroupTieredPrice? = null, + private val matrix: MatrixPrice? = null, + private val tiered: TieredPrice? = null, + private val tieredBps: TieredBpsPrice? = null, + private val bps: BpsPrice? = null, + private val bulkBps: BulkBpsPrice? = null, + private val bulk: BulkPrice? = null, + private val thresholdTotalAmount: ThresholdTotalAmountPrice? = null, + private val tieredPackage: TieredPackagePrice? = null, + private val groupedTiered: GroupedTieredPrice? = null, + private val tieredWithMinimum: TieredWithMinimumPrice? = null, + private val tieredPackageWithMinimum: TieredPackageWithMinimumPrice? = null, + private val packageWithAllocation: PackageWithAllocationPrice? = null, + private val unitWithPercent: UnitWithPercentPrice? = null, + private val matrixWithAllocation: MatrixWithAllocationPrice? = null, + private val tieredWithProration: TieredWithProrationPrice? = null, + private val unitWithProration: UnitWithProrationPrice? = null, + private val groupedAllocation: GroupedAllocationPrice? = null, + private val groupedWithProratedMinimum: GroupedWithProratedMinimumPrice? = null, + private val groupedWithMeteredMinimum: GroupedWithMeteredMinimumPrice? = null, + private val matrixWithDisplayName: MatrixWithDisplayNamePrice? = null, + private val bulkWithProration: BulkWithProrationPrice? = null, + private val groupedTieredPackage: GroupedTieredPackagePrice? = null, + private val maxGroupTieredPackage: MaxGroupTieredPackagePrice? = null, private val _json: JsonValue? = null, ) { - fun unitPrice(): Optional = Optional.ofNullable(unitPrice) + fun unit(): Optional = Optional.ofNullable(unit) fun packagePrice(): Optional = Optional.ofNullable(packagePrice) - fun matrixPrice(): Optional = Optional.ofNullable(matrixPrice) + fun matrix(): Optional = Optional.ofNullable(matrix) - fun tieredPrice(): Optional = Optional.ofNullable(tieredPrice) + fun tiered(): Optional = Optional.ofNullable(tiered) - fun tieredBpsPrice(): Optional = Optional.ofNullable(tieredBpsPrice) + fun tieredBps(): Optional = Optional.ofNullable(tieredBps) - fun bpsPrice(): Optional = Optional.ofNullable(bpsPrice) + fun bps(): Optional = Optional.ofNullable(bps) - fun bulkBpsPrice(): Optional = Optional.ofNullable(bulkBpsPrice) + fun bulkBps(): Optional = Optional.ofNullable(bulkBps) - fun bulkPrice(): Optional = Optional.ofNullable(bulkPrice) + fun bulk(): Optional = Optional.ofNullable(bulk) - fun thresholdTotalAmountPrice(): Optional = - Optional.ofNullable(thresholdTotalAmountPrice) + fun thresholdTotalAmount(): Optional = + Optional.ofNullable(thresholdTotalAmount) - fun tieredPackagePrice(): Optional = Optional.ofNullable(tieredPackagePrice) + fun tieredPackage(): Optional = Optional.ofNullable(tieredPackage) - fun groupedTieredPrice(): Optional = Optional.ofNullable(groupedTieredPrice) + fun groupedTiered(): Optional = Optional.ofNullable(groupedTiered) - fun tieredWithMinimumPrice(): Optional = - Optional.ofNullable(tieredWithMinimumPrice) + fun tieredWithMinimum(): Optional = + Optional.ofNullable(tieredWithMinimum) - fun tieredPackageWithMinimumPrice(): Optional = - Optional.ofNullable(tieredPackageWithMinimumPrice) + fun tieredPackageWithMinimum(): Optional = + Optional.ofNullable(tieredPackageWithMinimum) - fun packageWithAllocationPrice(): Optional = - Optional.ofNullable(packageWithAllocationPrice) + fun packageWithAllocation(): Optional = + Optional.ofNullable(packageWithAllocation) - fun unitWithPercentPrice(): Optional = - Optional.ofNullable(unitWithPercentPrice) + fun unitWithPercent(): Optional = Optional.ofNullable(unitWithPercent) - fun matrixWithAllocationPrice(): Optional = - Optional.ofNullable(matrixWithAllocationPrice) + fun matrixWithAllocation(): Optional = + Optional.ofNullable(matrixWithAllocation) - fun tieredWithProrationPrice(): Optional = - Optional.ofNullable(tieredWithProrationPrice) + fun tieredWithProration(): Optional = + Optional.ofNullable(tieredWithProration) - fun unitWithProrationPrice(): Optional = - Optional.ofNullable(unitWithProrationPrice) + fun unitWithProration(): Optional = + Optional.ofNullable(unitWithProration) - fun groupedAllocationPrice(): Optional = - Optional.ofNullable(groupedAllocationPrice) + fun groupedAllocation(): Optional = + Optional.ofNullable(groupedAllocation) - fun groupedWithProratedMinimumPrice(): Optional = - Optional.ofNullable(groupedWithProratedMinimumPrice) + fun groupedWithProratedMinimum(): Optional = + Optional.ofNullable(groupedWithProratedMinimum) - fun groupedWithMeteredMinimumPrice(): Optional = - Optional.ofNullable(groupedWithMeteredMinimumPrice) + fun groupedWithMeteredMinimum(): Optional = + Optional.ofNullable(groupedWithMeteredMinimum) - fun matrixWithDisplayNamePrice(): Optional = - Optional.ofNullable(matrixWithDisplayNamePrice) + fun matrixWithDisplayName(): Optional = + Optional.ofNullable(matrixWithDisplayName) - fun bulkWithProrationPrice(): Optional = - Optional.ofNullable(bulkWithProrationPrice) + fun bulkWithProration(): Optional = + Optional.ofNullable(bulkWithProration) - fun groupedTieredPackagePrice(): Optional = - Optional.ofNullable(groupedTieredPackagePrice) + fun groupedTieredPackage(): Optional = + Optional.ofNullable(groupedTieredPackage) - fun maxGroupTieredPrice(): Optional = - Optional.ofNullable(maxGroupTieredPrice) + fun maxGroupTieredPackage(): Optional = + Optional.ofNullable(maxGroupTieredPackage) - fun isUnitPrice(): Boolean = unitPrice != null + fun isUnit(): Boolean = unit != null fun isPackagePrice(): Boolean = packagePrice != null - fun isMatrixPrice(): Boolean = matrixPrice != null + fun isMatrix(): Boolean = matrix != null - fun isTieredPrice(): Boolean = tieredPrice != null + fun isTiered(): Boolean = tiered != null - fun isTieredBpsPrice(): Boolean = tieredBpsPrice != null + fun isTieredBps(): Boolean = tieredBps != null - fun isBpsPrice(): Boolean = bpsPrice != null + fun isBps(): Boolean = bps != null - fun isBulkBpsPrice(): Boolean = bulkBpsPrice != null + fun isBulkBps(): Boolean = bulkBps != null - fun isBulkPrice(): Boolean = bulkPrice != null + fun isBulk(): Boolean = bulk != null - fun isThresholdTotalAmountPrice(): Boolean = thresholdTotalAmountPrice != null + fun isThresholdTotalAmount(): Boolean = thresholdTotalAmount != null - fun isTieredPackagePrice(): Boolean = tieredPackagePrice != null + fun isTieredPackage(): Boolean = tieredPackage != null - fun isGroupedTieredPrice(): Boolean = groupedTieredPrice != null + fun isGroupedTiered(): Boolean = groupedTiered != null - fun isTieredWithMinimumPrice(): Boolean = tieredWithMinimumPrice != null + fun isTieredWithMinimum(): Boolean = tieredWithMinimum != null - fun isTieredPackageWithMinimumPrice(): Boolean = tieredPackageWithMinimumPrice != null + fun isTieredPackageWithMinimum(): Boolean = tieredPackageWithMinimum != null - fun isPackageWithAllocationPrice(): Boolean = packageWithAllocationPrice != null + fun isPackageWithAllocation(): Boolean = packageWithAllocation != null - fun isUnitWithPercentPrice(): Boolean = unitWithPercentPrice != null + fun isUnitWithPercent(): Boolean = unitWithPercent != null - fun isMatrixWithAllocationPrice(): Boolean = matrixWithAllocationPrice != null + fun isMatrixWithAllocation(): Boolean = matrixWithAllocation != null - fun isTieredWithProrationPrice(): Boolean = tieredWithProrationPrice != null + fun isTieredWithProration(): Boolean = tieredWithProration != null - fun isUnitWithProrationPrice(): Boolean = unitWithProrationPrice != null + fun isUnitWithProration(): Boolean = unitWithProration != null - fun isGroupedAllocationPrice(): Boolean = groupedAllocationPrice != null + fun isGroupedAllocation(): Boolean = groupedAllocation != null - fun isGroupedWithProratedMinimumPrice(): Boolean = groupedWithProratedMinimumPrice != null + fun isGroupedWithProratedMinimum(): Boolean = groupedWithProratedMinimum != null - fun isGroupedWithMeteredMinimumPrice(): Boolean = groupedWithMeteredMinimumPrice != null + fun isGroupedWithMeteredMinimum(): Boolean = groupedWithMeteredMinimum != null - fun isMatrixWithDisplayNamePrice(): Boolean = matrixWithDisplayNamePrice != null + fun isMatrixWithDisplayName(): Boolean = matrixWithDisplayName != null - fun isBulkWithProrationPrice(): Boolean = bulkWithProrationPrice != null + fun isBulkWithProration(): Boolean = bulkWithProration != null - fun isGroupedTieredPackagePrice(): Boolean = groupedTieredPackagePrice != null + fun isGroupedTieredPackage(): Boolean = groupedTieredPackage != null - fun isMaxGroupTieredPrice(): Boolean = maxGroupTieredPrice != null + fun isMaxGroupTieredPackage(): Boolean = maxGroupTieredPackage != null - fun asUnitPrice(): UnitPrice = unitPrice.getOrThrow("unitPrice") + fun asUnit(): UnitPrice = unit.getOrThrow("unit") fun asPackagePrice(): PackagePrice = packagePrice.getOrThrow("packagePrice") - fun asMatrixPrice(): MatrixPrice = matrixPrice.getOrThrow("matrixPrice") + fun asMatrix(): MatrixPrice = matrix.getOrThrow("matrix") - fun asTieredPrice(): TieredPrice = tieredPrice.getOrThrow("tieredPrice") + fun asTiered(): TieredPrice = tiered.getOrThrow("tiered") - fun asTieredBpsPrice(): TieredBpsPrice = tieredBpsPrice.getOrThrow("tieredBpsPrice") + fun asTieredBps(): TieredBpsPrice = tieredBps.getOrThrow("tieredBps") - fun asBpsPrice(): BpsPrice = bpsPrice.getOrThrow("bpsPrice") + fun asBps(): BpsPrice = bps.getOrThrow("bps") - fun asBulkBpsPrice(): BulkBpsPrice = bulkBpsPrice.getOrThrow("bulkBpsPrice") + fun asBulkBps(): BulkBpsPrice = bulkBps.getOrThrow("bulkBps") - fun asBulkPrice(): BulkPrice = bulkPrice.getOrThrow("bulkPrice") + fun asBulk(): BulkPrice = bulk.getOrThrow("bulk") - fun asThresholdTotalAmountPrice(): ThresholdTotalAmountPrice = - thresholdTotalAmountPrice.getOrThrow("thresholdTotalAmountPrice") + fun asThresholdTotalAmount(): ThresholdTotalAmountPrice = + thresholdTotalAmount.getOrThrow("thresholdTotalAmount") - fun asTieredPackagePrice(): TieredPackagePrice = - tieredPackagePrice.getOrThrow("tieredPackagePrice") + fun asTieredPackage(): TieredPackagePrice = tieredPackage.getOrThrow("tieredPackage") - fun asGroupedTieredPrice(): GroupedTieredPrice = - groupedTieredPrice.getOrThrow("groupedTieredPrice") + fun asGroupedTiered(): GroupedTieredPrice = groupedTiered.getOrThrow("groupedTiered") - fun asTieredWithMinimumPrice(): TieredWithMinimumPrice = - tieredWithMinimumPrice.getOrThrow("tieredWithMinimumPrice") + fun asTieredWithMinimum(): TieredWithMinimumPrice = + tieredWithMinimum.getOrThrow("tieredWithMinimum") - fun asTieredPackageWithMinimumPrice(): TieredPackageWithMinimumPrice = - tieredPackageWithMinimumPrice.getOrThrow("tieredPackageWithMinimumPrice") + fun asTieredPackageWithMinimum(): TieredPackageWithMinimumPrice = + tieredPackageWithMinimum.getOrThrow("tieredPackageWithMinimum") - fun asPackageWithAllocationPrice(): PackageWithAllocationPrice = - packageWithAllocationPrice.getOrThrow("packageWithAllocationPrice") + fun asPackageWithAllocation(): PackageWithAllocationPrice = + packageWithAllocation.getOrThrow("packageWithAllocation") - fun asUnitWithPercentPrice(): UnitWithPercentPrice = - unitWithPercentPrice.getOrThrow("unitWithPercentPrice") + fun asUnitWithPercent(): UnitWithPercentPrice = unitWithPercent.getOrThrow("unitWithPercent") - fun asMatrixWithAllocationPrice(): MatrixWithAllocationPrice = - matrixWithAllocationPrice.getOrThrow("matrixWithAllocationPrice") + fun asMatrixWithAllocation(): MatrixWithAllocationPrice = + matrixWithAllocation.getOrThrow("matrixWithAllocation") - fun asTieredWithProrationPrice(): TieredWithProrationPrice = - tieredWithProrationPrice.getOrThrow("tieredWithProrationPrice") + fun asTieredWithProration(): TieredWithProrationPrice = + tieredWithProration.getOrThrow("tieredWithProration") - fun asUnitWithProrationPrice(): UnitWithProrationPrice = - unitWithProrationPrice.getOrThrow("unitWithProrationPrice") + fun asUnitWithProration(): UnitWithProrationPrice = + unitWithProration.getOrThrow("unitWithProration") - fun asGroupedAllocationPrice(): GroupedAllocationPrice = - groupedAllocationPrice.getOrThrow("groupedAllocationPrice") + fun asGroupedAllocation(): GroupedAllocationPrice = + groupedAllocation.getOrThrow("groupedAllocation") - fun asGroupedWithProratedMinimumPrice(): GroupedWithProratedMinimumPrice = - groupedWithProratedMinimumPrice.getOrThrow("groupedWithProratedMinimumPrice") + fun asGroupedWithProratedMinimum(): GroupedWithProratedMinimumPrice = + groupedWithProratedMinimum.getOrThrow("groupedWithProratedMinimum") - fun asGroupedWithMeteredMinimumPrice(): GroupedWithMeteredMinimumPrice = - groupedWithMeteredMinimumPrice.getOrThrow("groupedWithMeteredMinimumPrice") + fun asGroupedWithMeteredMinimum(): GroupedWithMeteredMinimumPrice = + groupedWithMeteredMinimum.getOrThrow("groupedWithMeteredMinimum") - fun asMatrixWithDisplayNamePrice(): MatrixWithDisplayNamePrice = - matrixWithDisplayNamePrice.getOrThrow("matrixWithDisplayNamePrice") + fun asMatrixWithDisplayName(): MatrixWithDisplayNamePrice = + matrixWithDisplayName.getOrThrow("matrixWithDisplayName") - fun asBulkWithProrationPrice(): BulkWithProrationPrice = - bulkWithProrationPrice.getOrThrow("bulkWithProrationPrice") + fun asBulkWithProration(): BulkWithProrationPrice = + bulkWithProration.getOrThrow("bulkWithProration") - fun asGroupedTieredPackagePrice(): GroupedTieredPackagePrice = - groupedTieredPackagePrice.getOrThrow("groupedTieredPackagePrice") + fun asGroupedTieredPackage(): GroupedTieredPackagePrice = + groupedTieredPackage.getOrThrow("groupedTieredPackage") - fun asMaxGroupTieredPrice(): MaxGroupTieredPrice = - maxGroupTieredPrice.getOrThrow("maxGroupTieredPrice") + fun asMaxGroupTieredPackage(): MaxGroupTieredPackagePrice = + maxGroupTieredPackage.getOrThrow("maxGroupTieredPackage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - unitPrice != null -> visitor.visitUnitPrice(unitPrice) + unit != null -> visitor.visitUnit(unit) packagePrice != null -> visitor.visitPackagePrice(packagePrice) - matrixPrice != null -> visitor.visitMatrixPrice(matrixPrice) - tieredPrice != null -> visitor.visitTieredPrice(tieredPrice) - tieredBpsPrice != null -> visitor.visitTieredBpsPrice(tieredBpsPrice) - bpsPrice != null -> visitor.visitBpsPrice(bpsPrice) - bulkBpsPrice != null -> visitor.visitBulkBpsPrice(bulkBpsPrice) - bulkPrice != null -> visitor.visitBulkPrice(bulkPrice) - thresholdTotalAmountPrice != null -> - visitor.visitThresholdTotalAmountPrice(thresholdTotalAmountPrice) - tieredPackagePrice != null -> visitor.visitTieredPackagePrice(tieredPackagePrice) - groupedTieredPrice != null -> visitor.visitGroupedTieredPrice(groupedTieredPrice) - tieredWithMinimumPrice != null -> - visitor.visitTieredWithMinimumPrice(tieredWithMinimumPrice) - tieredPackageWithMinimumPrice != null -> - visitor.visitTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice) - packageWithAllocationPrice != null -> - visitor.visitPackageWithAllocationPrice(packageWithAllocationPrice) - unitWithPercentPrice != null -> visitor.visitUnitWithPercentPrice(unitWithPercentPrice) - matrixWithAllocationPrice != null -> - visitor.visitMatrixWithAllocationPrice(matrixWithAllocationPrice) - tieredWithProrationPrice != null -> - visitor.visitTieredWithProrationPrice(tieredWithProrationPrice) - unitWithProrationPrice != null -> - visitor.visitUnitWithProrationPrice(unitWithProrationPrice) - groupedAllocationPrice != null -> - visitor.visitGroupedAllocationPrice(groupedAllocationPrice) - groupedWithProratedMinimumPrice != null -> - visitor.visitGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice) - groupedWithMeteredMinimumPrice != null -> - visitor.visitGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice) - matrixWithDisplayNamePrice != null -> - visitor.visitMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice) - bulkWithProrationPrice != null -> - visitor.visitBulkWithProrationPrice(bulkWithProrationPrice) - groupedTieredPackagePrice != null -> - visitor.visitGroupedTieredPackagePrice(groupedTieredPackagePrice) - maxGroupTieredPrice != null -> visitor.visitMaxGroupTieredPrice(maxGroupTieredPrice) + matrix != null -> visitor.visitMatrix(matrix) + tiered != null -> visitor.visitTiered(tiered) + tieredBps != null -> visitor.visitTieredBps(tieredBps) + bps != null -> visitor.visitBps(bps) + bulkBps != null -> visitor.visitBulkBps(bulkBps) + bulk != null -> visitor.visitBulk(bulk) + thresholdTotalAmount != null -> visitor.visitThresholdTotalAmount(thresholdTotalAmount) + tieredPackage != null -> visitor.visitTieredPackage(tieredPackage) + groupedTiered != null -> visitor.visitGroupedTiered(groupedTiered) + tieredWithMinimum != null -> visitor.visitTieredWithMinimum(tieredWithMinimum) + tieredPackageWithMinimum != null -> + visitor.visitTieredPackageWithMinimum(tieredPackageWithMinimum) + packageWithAllocation != null -> + visitor.visitPackageWithAllocation(packageWithAllocation) + unitWithPercent != null -> visitor.visitUnitWithPercent(unitWithPercent) + matrixWithAllocation != null -> visitor.visitMatrixWithAllocation(matrixWithAllocation) + tieredWithProration != null -> visitor.visitTieredWithProration(tieredWithProration) + unitWithProration != null -> visitor.visitUnitWithProration(unitWithProration) + groupedAllocation != null -> visitor.visitGroupedAllocation(groupedAllocation) + groupedWithProratedMinimum != null -> + visitor.visitGroupedWithProratedMinimum(groupedWithProratedMinimum) + groupedWithMeteredMinimum != null -> + visitor.visitGroupedWithMeteredMinimum(groupedWithMeteredMinimum) + matrixWithDisplayName != null -> + visitor.visitMatrixWithDisplayName(matrixWithDisplayName) + bulkWithProration != null -> visitor.visitBulkWithProration(bulkWithProration) + groupedTieredPackage != null -> visitor.visitGroupedTieredPackage(groupedTieredPackage) + maxGroupTieredPackage != null -> + visitor.visitMaxGroupTieredPackage(maxGroupTieredPackage) else -> visitor.unknown(_json) } } @@ -312,130 +301,124 @@ private constructor( accept( object : Visitor { - override fun visitUnitPrice(unitPrice: UnitPrice) { - unitPrice.validate() + override fun visitUnit(unit: UnitPrice) { + unit.validate() } override fun visitPackagePrice(packagePrice: PackagePrice) { packagePrice.validate() } - override fun visitMatrixPrice(matrixPrice: MatrixPrice) { - matrixPrice.validate() + override fun visitMatrix(matrix: MatrixPrice) { + matrix.validate() } - override fun visitTieredPrice(tieredPrice: TieredPrice) { - tieredPrice.validate() + override fun visitTiered(tiered: TieredPrice) { + tiered.validate() } - override fun visitTieredBpsPrice(tieredBpsPrice: TieredBpsPrice) { - tieredBpsPrice.validate() + override fun visitTieredBps(tieredBps: TieredBpsPrice) { + tieredBps.validate() } - override fun visitBpsPrice(bpsPrice: BpsPrice) { - bpsPrice.validate() + override fun visitBps(bps: BpsPrice) { + bps.validate() } - override fun visitBulkBpsPrice(bulkBpsPrice: BulkBpsPrice) { - bulkBpsPrice.validate() + override fun visitBulkBps(bulkBps: BulkBpsPrice) { + bulkBps.validate() } - override fun visitBulkPrice(bulkPrice: BulkPrice) { - bulkPrice.validate() + override fun visitBulk(bulk: BulkPrice) { + bulk.validate() } - override fun visitThresholdTotalAmountPrice( - thresholdTotalAmountPrice: ThresholdTotalAmountPrice + override fun visitThresholdTotalAmount( + thresholdTotalAmount: ThresholdTotalAmountPrice ) { - thresholdTotalAmountPrice.validate() + thresholdTotalAmount.validate() } - override fun visitTieredPackagePrice(tieredPackagePrice: TieredPackagePrice) { - tieredPackagePrice.validate() + override fun visitTieredPackage(tieredPackage: TieredPackagePrice) { + tieredPackage.validate() } - override fun visitGroupedTieredPrice(groupedTieredPrice: GroupedTieredPrice) { - groupedTieredPrice.validate() + override fun visitGroupedTiered(groupedTiered: GroupedTieredPrice) { + groupedTiered.validate() } - override fun visitTieredWithMinimumPrice( - tieredWithMinimumPrice: TieredWithMinimumPrice - ) { - tieredWithMinimumPrice.validate() + override fun visitTieredWithMinimum(tieredWithMinimum: TieredWithMinimumPrice) { + tieredWithMinimum.validate() } - override fun visitTieredPackageWithMinimumPrice( - tieredPackageWithMinimumPrice: TieredPackageWithMinimumPrice + override fun visitTieredPackageWithMinimum( + tieredPackageWithMinimum: TieredPackageWithMinimumPrice ) { - tieredPackageWithMinimumPrice.validate() + tieredPackageWithMinimum.validate() } - override fun visitPackageWithAllocationPrice( - packageWithAllocationPrice: PackageWithAllocationPrice + override fun visitPackageWithAllocation( + packageWithAllocation: PackageWithAllocationPrice ) { - packageWithAllocationPrice.validate() + packageWithAllocation.validate() } - override fun visitUnitWithPercentPrice(unitWithPercentPrice: UnitWithPercentPrice) { - unitWithPercentPrice.validate() + override fun visitUnitWithPercent(unitWithPercent: UnitWithPercentPrice) { + unitWithPercent.validate() } - override fun visitMatrixWithAllocationPrice( - matrixWithAllocationPrice: MatrixWithAllocationPrice + override fun visitMatrixWithAllocation( + matrixWithAllocation: MatrixWithAllocationPrice ) { - matrixWithAllocationPrice.validate() + matrixWithAllocation.validate() } - override fun visitTieredWithProrationPrice( - tieredWithProrationPrice: TieredWithProrationPrice + override fun visitTieredWithProration( + tieredWithProration: TieredWithProrationPrice ) { - tieredWithProrationPrice.validate() + tieredWithProration.validate() } - override fun visitUnitWithProrationPrice( - unitWithProrationPrice: UnitWithProrationPrice - ) { - unitWithProrationPrice.validate() + override fun visitUnitWithProration(unitWithProration: UnitWithProrationPrice) { + unitWithProration.validate() } - override fun visitGroupedAllocationPrice( - groupedAllocationPrice: GroupedAllocationPrice - ) { - groupedAllocationPrice.validate() + override fun visitGroupedAllocation(groupedAllocation: GroupedAllocationPrice) { + groupedAllocation.validate() } - override fun visitGroupedWithProratedMinimumPrice( - groupedWithProratedMinimumPrice: GroupedWithProratedMinimumPrice + override fun visitGroupedWithProratedMinimum( + groupedWithProratedMinimum: GroupedWithProratedMinimumPrice ) { - groupedWithProratedMinimumPrice.validate() + groupedWithProratedMinimum.validate() } - override fun visitGroupedWithMeteredMinimumPrice( - groupedWithMeteredMinimumPrice: GroupedWithMeteredMinimumPrice + override fun visitGroupedWithMeteredMinimum( + groupedWithMeteredMinimum: GroupedWithMeteredMinimumPrice ) { - groupedWithMeteredMinimumPrice.validate() + groupedWithMeteredMinimum.validate() } - override fun visitMatrixWithDisplayNamePrice( - matrixWithDisplayNamePrice: MatrixWithDisplayNamePrice + override fun visitMatrixWithDisplayName( + matrixWithDisplayName: MatrixWithDisplayNamePrice ) { - matrixWithDisplayNamePrice.validate() + matrixWithDisplayName.validate() } - override fun visitBulkWithProrationPrice( - bulkWithProrationPrice: BulkWithProrationPrice - ) { - bulkWithProrationPrice.validate() + override fun visitBulkWithProration(bulkWithProration: BulkWithProrationPrice) { + bulkWithProration.validate() } - override fun visitGroupedTieredPackagePrice( - groupedTieredPackagePrice: GroupedTieredPackagePrice + override fun visitGroupedTieredPackage( + groupedTieredPackage: GroupedTieredPackagePrice ) { - groupedTieredPackagePrice.validate() + groupedTieredPackage.validate() } - override fun visitMaxGroupTieredPrice(maxGroupTieredPrice: MaxGroupTieredPrice) { - maxGroupTieredPrice.validate() + override fun visitMaxGroupTieredPackage( + maxGroupTieredPackage: MaxGroupTieredPackagePrice + ) { + maxGroupTieredPackage.validate() } } ) @@ -447,210 +430,191 @@ private constructor( return true } - return /* spotless:off */ other is Price && unitPrice == other.unitPrice && packagePrice == other.packagePrice && matrixPrice == other.matrixPrice && tieredPrice == other.tieredPrice && tieredBpsPrice == other.tieredBpsPrice && bpsPrice == other.bpsPrice && bulkBpsPrice == other.bulkBpsPrice && bulkPrice == other.bulkPrice && thresholdTotalAmountPrice == other.thresholdTotalAmountPrice && tieredPackagePrice == other.tieredPackagePrice && groupedTieredPrice == other.groupedTieredPrice && tieredWithMinimumPrice == other.tieredWithMinimumPrice && tieredPackageWithMinimumPrice == other.tieredPackageWithMinimumPrice && packageWithAllocationPrice == other.packageWithAllocationPrice && unitWithPercentPrice == other.unitWithPercentPrice && matrixWithAllocationPrice == other.matrixWithAllocationPrice && tieredWithProrationPrice == other.tieredWithProrationPrice && unitWithProrationPrice == other.unitWithProrationPrice && groupedAllocationPrice == other.groupedAllocationPrice && groupedWithProratedMinimumPrice == other.groupedWithProratedMinimumPrice && groupedWithMeteredMinimumPrice == other.groupedWithMeteredMinimumPrice && matrixWithDisplayNamePrice == other.matrixWithDisplayNamePrice && bulkWithProrationPrice == other.bulkWithProrationPrice && groupedTieredPackagePrice == other.groupedTieredPackagePrice && maxGroupTieredPrice == other.maxGroupTieredPrice /* spotless:on */ + return /* spotless:off */ other is Price && unit == other.unit && packagePrice == other.packagePrice && matrix == other.matrix && tiered == other.tiered && tieredBps == other.tieredBps && bps == other.bps && bulkBps == other.bulkBps && bulk == other.bulk && thresholdTotalAmount == other.thresholdTotalAmount && tieredPackage == other.tieredPackage && groupedTiered == other.groupedTiered && tieredWithMinimum == other.tieredWithMinimum && tieredPackageWithMinimum == other.tieredPackageWithMinimum && packageWithAllocation == other.packageWithAllocation && unitWithPercent == other.unitWithPercent && matrixWithAllocation == other.matrixWithAllocation && tieredWithProration == other.tieredWithProration && unitWithProration == other.unitWithProration && groupedAllocation == other.groupedAllocation && groupedWithProratedMinimum == other.groupedWithProratedMinimum && groupedWithMeteredMinimum == other.groupedWithMeteredMinimum && matrixWithDisplayName == other.matrixWithDisplayName && bulkWithProration == other.bulkWithProration && groupedTieredPackage == other.groupedTieredPackage && maxGroupTieredPackage == other.maxGroupTieredPackage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(unitPrice, packagePrice, matrixPrice, tieredPrice, tieredBpsPrice, bpsPrice, bulkBpsPrice, bulkPrice, thresholdTotalAmountPrice, tieredPackagePrice, groupedTieredPrice, tieredWithMinimumPrice, tieredPackageWithMinimumPrice, packageWithAllocationPrice, unitWithPercentPrice, matrixWithAllocationPrice, tieredWithProrationPrice, unitWithProrationPrice, groupedAllocationPrice, groupedWithProratedMinimumPrice, groupedWithMeteredMinimumPrice, matrixWithDisplayNamePrice, bulkWithProrationPrice, groupedTieredPackagePrice, maxGroupTieredPrice) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(unit, packagePrice, matrix, tiered, tieredBps, bps, bulkBps, bulk, thresholdTotalAmount, tieredPackage, groupedTiered, tieredWithMinimum, tieredPackageWithMinimum, packageWithAllocation, unitWithPercent, matrixWithAllocation, tieredWithProration, unitWithProration, groupedAllocation, groupedWithProratedMinimum, groupedWithMeteredMinimum, matrixWithDisplayName, bulkWithProration, groupedTieredPackage, maxGroupTieredPackage) /* spotless:on */ override fun toString(): String = when { - unitPrice != null -> "Price{unitPrice=$unitPrice}" + unit != null -> "Price{unit=$unit}" packagePrice != null -> "Price{packagePrice=$packagePrice}" - matrixPrice != null -> "Price{matrixPrice=$matrixPrice}" - tieredPrice != null -> "Price{tieredPrice=$tieredPrice}" - tieredBpsPrice != null -> "Price{tieredBpsPrice=$tieredBpsPrice}" - bpsPrice != null -> "Price{bpsPrice=$bpsPrice}" - bulkBpsPrice != null -> "Price{bulkBpsPrice=$bulkBpsPrice}" - bulkPrice != null -> "Price{bulkPrice=$bulkPrice}" - thresholdTotalAmountPrice != null -> - "Price{thresholdTotalAmountPrice=$thresholdTotalAmountPrice}" - tieredPackagePrice != null -> "Price{tieredPackagePrice=$tieredPackagePrice}" - groupedTieredPrice != null -> "Price{groupedTieredPrice=$groupedTieredPrice}" - tieredWithMinimumPrice != null -> - "Price{tieredWithMinimumPrice=$tieredWithMinimumPrice}" - tieredPackageWithMinimumPrice != null -> - "Price{tieredPackageWithMinimumPrice=$tieredPackageWithMinimumPrice}" - packageWithAllocationPrice != null -> - "Price{packageWithAllocationPrice=$packageWithAllocationPrice}" - unitWithPercentPrice != null -> "Price{unitWithPercentPrice=$unitWithPercentPrice}" - matrixWithAllocationPrice != null -> - "Price{matrixWithAllocationPrice=$matrixWithAllocationPrice}" - tieredWithProrationPrice != null -> - "Price{tieredWithProrationPrice=$tieredWithProrationPrice}" - unitWithProrationPrice != null -> - "Price{unitWithProrationPrice=$unitWithProrationPrice}" - groupedAllocationPrice != null -> - "Price{groupedAllocationPrice=$groupedAllocationPrice}" - groupedWithProratedMinimumPrice != null -> - "Price{groupedWithProratedMinimumPrice=$groupedWithProratedMinimumPrice}" - groupedWithMeteredMinimumPrice != null -> - "Price{groupedWithMeteredMinimumPrice=$groupedWithMeteredMinimumPrice}" - matrixWithDisplayNamePrice != null -> - "Price{matrixWithDisplayNamePrice=$matrixWithDisplayNamePrice}" - bulkWithProrationPrice != null -> - "Price{bulkWithProrationPrice=$bulkWithProrationPrice}" - groupedTieredPackagePrice != null -> - "Price{groupedTieredPackagePrice=$groupedTieredPackagePrice}" - maxGroupTieredPrice != null -> "Price{maxGroupTieredPrice=$maxGroupTieredPrice}" + matrix != null -> "Price{matrix=$matrix}" + tiered != null -> "Price{tiered=$tiered}" + tieredBps != null -> "Price{tieredBps=$tieredBps}" + bps != null -> "Price{bps=$bps}" + bulkBps != null -> "Price{bulkBps=$bulkBps}" + bulk != null -> "Price{bulk=$bulk}" + thresholdTotalAmount != null -> "Price{thresholdTotalAmount=$thresholdTotalAmount}" + tieredPackage != null -> "Price{tieredPackage=$tieredPackage}" + groupedTiered != null -> "Price{groupedTiered=$groupedTiered}" + tieredWithMinimum != null -> "Price{tieredWithMinimum=$tieredWithMinimum}" + tieredPackageWithMinimum != null -> + "Price{tieredPackageWithMinimum=$tieredPackageWithMinimum}" + packageWithAllocation != null -> "Price{packageWithAllocation=$packageWithAllocation}" + unitWithPercent != null -> "Price{unitWithPercent=$unitWithPercent}" + matrixWithAllocation != null -> "Price{matrixWithAllocation=$matrixWithAllocation}" + tieredWithProration != null -> "Price{tieredWithProration=$tieredWithProration}" + unitWithProration != null -> "Price{unitWithProration=$unitWithProration}" + groupedAllocation != null -> "Price{groupedAllocation=$groupedAllocation}" + groupedWithProratedMinimum != null -> + "Price{groupedWithProratedMinimum=$groupedWithProratedMinimum}" + groupedWithMeteredMinimum != null -> + "Price{groupedWithMeteredMinimum=$groupedWithMeteredMinimum}" + matrixWithDisplayName != null -> "Price{matrixWithDisplayName=$matrixWithDisplayName}" + bulkWithProration != null -> "Price{bulkWithProration=$bulkWithProration}" + groupedTieredPackage != null -> "Price{groupedTieredPackage=$groupedTieredPackage}" + maxGroupTieredPackage != null -> "Price{maxGroupTieredPackage=$maxGroupTieredPackage}" _json != null -> "Price{_unknown=$_json}" else -> throw IllegalStateException("Invalid Price") } companion object { - @JvmStatic fun ofUnitPrice(unitPrice: UnitPrice) = Price(unitPrice = unitPrice) + @JvmStatic fun ofUnit(unit: UnitPrice) = Price(unit = unit) @JvmStatic fun ofPackagePrice(packagePrice: PackagePrice) = Price(packagePrice = packagePrice) - @JvmStatic fun ofMatrixPrice(matrixPrice: MatrixPrice) = Price(matrixPrice = matrixPrice) + @JvmStatic fun ofMatrix(matrix: MatrixPrice) = Price(matrix = matrix) - @JvmStatic fun ofTieredPrice(tieredPrice: TieredPrice) = Price(tieredPrice = tieredPrice) + @JvmStatic fun ofTiered(tiered: TieredPrice) = Price(tiered = tiered) - @JvmStatic - fun ofTieredBpsPrice(tieredBpsPrice: TieredBpsPrice) = - Price(tieredBpsPrice = tieredBpsPrice) + @JvmStatic fun ofTieredBps(tieredBps: TieredBpsPrice) = Price(tieredBps = tieredBps) - @JvmStatic fun ofBpsPrice(bpsPrice: BpsPrice) = Price(bpsPrice = bpsPrice) + @JvmStatic fun ofBps(bps: BpsPrice) = Price(bps = bps) - @JvmStatic - fun ofBulkBpsPrice(bulkBpsPrice: BulkBpsPrice) = Price(bulkBpsPrice = bulkBpsPrice) + @JvmStatic fun ofBulkBps(bulkBps: BulkBpsPrice) = Price(bulkBps = bulkBps) - @JvmStatic fun ofBulkPrice(bulkPrice: BulkPrice) = Price(bulkPrice = bulkPrice) + @JvmStatic fun ofBulk(bulk: BulkPrice) = Price(bulk = bulk) @JvmStatic - fun ofThresholdTotalAmountPrice(thresholdTotalAmountPrice: ThresholdTotalAmountPrice) = - Price(thresholdTotalAmountPrice = thresholdTotalAmountPrice) + fun ofThresholdTotalAmount(thresholdTotalAmount: ThresholdTotalAmountPrice) = + Price(thresholdTotalAmount = thresholdTotalAmount) @JvmStatic - fun ofTieredPackagePrice(tieredPackagePrice: TieredPackagePrice) = - Price(tieredPackagePrice = tieredPackagePrice) + fun ofTieredPackage(tieredPackage: TieredPackagePrice) = + Price(tieredPackage = tieredPackage) @JvmStatic - fun ofGroupedTieredPrice(groupedTieredPrice: GroupedTieredPrice) = - Price(groupedTieredPrice = groupedTieredPrice) + fun ofGroupedTiered(groupedTiered: GroupedTieredPrice) = + Price(groupedTiered = groupedTiered) @JvmStatic - fun ofTieredWithMinimumPrice(tieredWithMinimumPrice: TieredWithMinimumPrice) = - Price(tieredWithMinimumPrice = tieredWithMinimumPrice) + fun ofTieredWithMinimum(tieredWithMinimum: TieredWithMinimumPrice) = + Price(tieredWithMinimum = tieredWithMinimum) @JvmStatic - fun ofTieredPackageWithMinimumPrice( - tieredPackageWithMinimumPrice: TieredPackageWithMinimumPrice - ) = Price(tieredPackageWithMinimumPrice = tieredPackageWithMinimumPrice) + fun ofTieredPackageWithMinimum(tieredPackageWithMinimum: TieredPackageWithMinimumPrice) = + Price(tieredPackageWithMinimum = tieredPackageWithMinimum) @JvmStatic - fun ofPackageWithAllocationPrice(packageWithAllocationPrice: PackageWithAllocationPrice) = - Price(packageWithAllocationPrice = packageWithAllocationPrice) + fun ofPackageWithAllocation(packageWithAllocation: PackageWithAllocationPrice) = + Price(packageWithAllocation = packageWithAllocation) @JvmStatic - fun ofUnitWithPercentPrice(unitWithPercentPrice: UnitWithPercentPrice) = - Price(unitWithPercentPrice = unitWithPercentPrice) + fun ofUnitWithPercent(unitWithPercent: UnitWithPercentPrice) = + Price(unitWithPercent = unitWithPercent) @JvmStatic - fun ofMatrixWithAllocationPrice(matrixWithAllocationPrice: MatrixWithAllocationPrice) = - Price(matrixWithAllocationPrice = matrixWithAllocationPrice) + fun ofMatrixWithAllocation(matrixWithAllocation: MatrixWithAllocationPrice) = + Price(matrixWithAllocation = matrixWithAllocation) @JvmStatic - fun ofTieredWithProrationPrice(tieredWithProrationPrice: TieredWithProrationPrice) = - Price(tieredWithProrationPrice = tieredWithProrationPrice) + fun ofTieredWithProration(tieredWithProration: TieredWithProrationPrice) = + Price(tieredWithProration = tieredWithProration) @JvmStatic - fun ofUnitWithProrationPrice(unitWithProrationPrice: UnitWithProrationPrice) = - Price(unitWithProrationPrice = unitWithProrationPrice) + fun ofUnitWithProration(unitWithProration: UnitWithProrationPrice) = + Price(unitWithProration = unitWithProration) @JvmStatic - fun ofGroupedAllocationPrice(groupedAllocationPrice: GroupedAllocationPrice) = - Price(groupedAllocationPrice = groupedAllocationPrice) + fun ofGroupedAllocation(groupedAllocation: GroupedAllocationPrice) = + Price(groupedAllocation = groupedAllocation) @JvmStatic - fun ofGroupedWithProratedMinimumPrice( - groupedWithProratedMinimumPrice: GroupedWithProratedMinimumPrice - ) = Price(groupedWithProratedMinimumPrice = groupedWithProratedMinimumPrice) + fun ofGroupedWithProratedMinimum( + groupedWithProratedMinimum: GroupedWithProratedMinimumPrice + ) = Price(groupedWithProratedMinimum = groupedWithProratedMinimum) @JvmStatic - fun ofGroupedWithMeteredMinimumPrice( - groupedWithMeteredMinimumPrice: GroupedWithMeteredMinimumPrice - ) = Price(groupedWithMeteredMinimumPrice = groupedWithMeteredMinimumPrice) + fun ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum: GroupedWithMeteredMinimumPrice) = + Price(groupedWithMeteredMinimum = groupedWithMeteredMinimum) @JvmStatic - fun ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice: MatrixWithDisplayNamePrice) = - Price(matrixWithDisplayNamePrice = matrixWithDisplayNamePrice) + fun ofMatrixWithDisplayName(matrixWithDisplayName: MatrixWithDisplayNamePrice) = + Price(matrixWithDisplayName = matrixWithDisplayName) @JvmStatic - fun ofBulkWithProrationPrice(bulkWithProrationPrice: BulkWithProrationPrice) = - Price(bulkWithProrationPrice = bulkWithProrationPrice) + fun ofBulkWithProration(bulkWithProration: BulkWithProrationPrice) = + Price(bulkWithProration = bulkWithProration) @JvmStatic - fun ofGroupedTieredPackagePrice(groupedTieredPackagePrice: GroupedTieredPackagePrice) = - Price(groupedTieredPackagePrice = groupedTieredPackagePrice) + fun ofGroupedTieredPackage(groupedTieredPackage: GroupedTieredPackagePrice) = + Price(groupedTieredPackage = groupedTieredPackage) @JvmStatic - fun ofMaxGroupTieredPrice(maxGroupTieredPrice: MaxGroupTieredPrice) = - Price(maxGroupTieredPrice = maxGroupTieredPrice) + fun ofMaxGroupTieredPackage(maxGroupTieredPackage: MaxGroupTieredPackagePrice) = + Price(maxGroupTieredPackage = maxGroupTieredPackage) } interface Visitor { - fun visitUnitPrice(unitPrice: UnitPrice): T + fun visitUnit(unit: UnitPrice): T fun visitPackagePrice(packagePrice: PackagePrice): T - fun visitMatrixPrice(matrixPrice: MatrixPrice): T + fun visitMatrix(matrix: MatrixPrice): T - fun visitTieredPrice(tieredPrice: TieredPrice): T + fun visitTiered(tiered: TieredPrice): T - fun visitTieredBpsPrice(tieredBpsPrice: TieredBpsPrice): T + fun visitTieredBps(tieredBps: TieredBpsPrice): T - fun visitBpsPrice(bpsPrice: BpsPrice): T + fun visitBps(bps: BpsPrice): T - fun visitBulkBpsPrice(bulkBpsPrice: BulkBpsPrice): T + fun visitBulkBps(bulkBps: BulkBpsPrice): T - fun visitBulkPrice(bulkPrice: BulkPrice): T + fun visitBulk(bulk: BulkPrice): T - fun visitThresholdTotalAmountPrice(thresholdTotalAmountPrice: ThresholdTotalAmountPrice): T + fun visitThresholdTotalAmount(thresholdTotalAmount: ThresholdTotalAmountPrice): T - fun visitTieredPackagePrice(tieredPackagePrice: TieredPackagePrice): T + fun visitTieredPackage(tieredPackage: TieredPackagePrice): T - fun visitGroupedTieredPrice(groupedTieredPrice: GroupedTieredPrice): T + fun visitGroupedTiered(groupedTiered: GroupedTieredPrice): T - fun visitTieredWithMinimumPrice(tieredWithMinimumPrice: TieredWithMinimumPrice): T + fun visitTieredWithMinimum(tieredWithMinimum: TieredWithMinimumPrice): T - fun visitTieredPackageWithMinimumPrice( - tieredPackageWithMinimumPrice: TieredPackageWithMinimumPrice + fun visitTieredPackageWithMinimum( + tieredPackageWithMinimum: TieredPackageWithMinimumPrice ): T - fun visitPackageWithAllocationPrice( - packageWithAllocationPrice: PackageWithAllocationPrice - ): T + fun visitPackageWithAllocation(packageWithAllocation: PackageWithAllocationPrice): T - fun visitUnitWithPercentPrice(unitWithPercentPrice: UnitWithPercentPrice): T + fun visitUnitWithPercent(unitWithPercent: UnitWithPercentPrice): T - fun visitMatrixWithAllocationPrice(matrixWithAllocationPrice: MatrixWithAllocationPrice): T + fun visitMatrixWithAllocation(matrixWithAllocation: MatrixWithAllocationPrice): T - fun visitTieredWithProrationPrice(tieredWithProrationPrice: TieredWithProrationPrice): T + fun visitTieredWithProration(tieredWithProration: TieredWithProrationPrice): T - fun visitUnitWithProrationPrice(unitWithProrationPrice: UnitWithProrationPrice): T + fun visitUnitWithProration(unitWithProration: UnitWithProrationPrice): T - fun visitGroupedAllocationPrice(groupedAllocationPrice: GroupedAllocationPrice): T + fun visitGroupedAllocation(groupedAllocation: GroupedAllocationPrice): T - fun visitGroupedWithProratedMinimumPrice( - groupedWithProratedMinimumPrice: GroupedWithProratedMinimumPrice + fun visitGroupedWithProratedMinimum( + groupedWithProratedMinimum: GroupedWithProratedMinimumPrice ): T - fun visitGroupedWithMeteredMinimumPrice( - groupedWithMeteredMinimumPrice: GroupedWithMeteredMinimumPrice + fun visitGroupedWithMeteredMinimum( + groupedWithMeteredMinimum: GroupedWithMeteredMinimumPrice ): T - fun visitMatrixWithDisplayNamePrice( - matrixWithDisplayNamePrice: MatrixWithDisplayNamePrice - ): T + fun visitMatrixWithDisplayName(matrixWithDisplayName: MatrixWithDisplayNamePrice): T - fun visitBulkWithProrationPrice(bulkWithProrationPrice: BulkWithProrationPrice): T + fun visitBulkWithProration(bulkWithProration: BulkWithProrationPrice): T - fun visitGroupedTieredPackagePrice(groupedTieredPackagePrice: GroupedTieredPackagePrice): T + fun visitGroupedTieredPackage(groupedTieredPackage: GroupedTieredPackagePrice): T - fun visitMaxGroupTieredPrice(maxGroupTieredPrice: MaxGroupTieredPrice): T + fun visitMaxGroupTieredPackage(maxGroupTieredPackage: MaxGroupTieredPackagePrice): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Price: $json") @@ -667,7 +631,7 @@ private constructor( "unit" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(unitPrice = it, _json = json) + return Price(unit = it, _json = json) } } "package" -> { @@ -679,37 +643,37 @@ private constructor( "matrix" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(matrixPrice = it, _json = json) + return Price(matrix = it, _json = json) } } "tiered" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(tieredPrice = it, _json = json) + return Price(tiered = it, _json = json) } } "tiered_bps" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(tieredBpsPrice = it, _json = json) + return Price(tieredBps = it, _json = json) } } "bps" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(bpsPrice = it, _json = json) + return Price(bps = it, _json = json) } } "bulk_bps" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(bulkBpsPrice = it, _json = json) + return Price(bulkBps = it, _json = json) } } "bulk" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(bulkPrice = it, _json = json) + return Price(bulk = it, _json = json) } } "threshold_total_amount" -> { @@ -717,25 +681,25 @@ private constructor( it.validate() } ?.let { - return Price(thresholdTotalAmountPrice = it, _json = json) + return Price(thresholdTotalAmount = it, _json = json) } } "tiered_package" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(tieredPackagePrice = it, _json = json) + return Price(tieredPackage = it, _json = json) } } "grouped_tiered" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(groupedTieredPrice = it, _json = json) + return Price(groupedTiered = it, _json = json) } } "tiered_with_minimum" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(tieredWithMinimumPrice = it, _json = json) + return Price(tieredWithMinimum = it, _json = json) } } "tiered_package_with_minimum" -> { @@ -743,7 +707,7 @@ private constructor( it.validate() } ?.let { - return Price(tieredPackageWithMinimumPrice = it, _json = json) + return Price(tieredPackageWithMinimum = it, _json = json) } } "package_with_allocation" -> { @@ -751,13 +715,13 @@ private constructor( it.validate() } ?.let { - return Price(packageWithAllocationPrice = it, _json = json) + return Price(packageWithAllocation = it, _json = json) } } "unit_with_percent" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(unitWithPercentPrice = it, _json = json) + return Price(unitWithPercent = it, _json = json) } } "matrix_with_allocation" -> { @@ -765,7 +729,7 @@ private constructor( it.validate() } ?.let { - return Price(matrixWithAllocationPrice = it, _json = json) + return Price(matrixWithAllocation = it, _json = json) } } "tiered_with_proration" -> { @@ -773,19 +737,19 @@ private constructor( it.validate() } ?.let { - return Price(tieredWithProrationPrice = it, _json = json) + return Price(tieredWithProration = it, _json = json) } } "unit_with_proration" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(unitWithProrationPrice = it, _json = json) + return Price(unitWithProration = it, _json = json) } } "grouped_allocation" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(groupedAllocationPrice = it, _json = json) + return Price(groupedAllocation = it, _json = json) } } "grouped_with_prorated_minimum" -> { @@ -793,7 +757,7 @@ private constructor( it.validate() } ?.let { - return Price(groupedWithProratedMinimumPrice = it, _json = json) + return Price(groupedWithProratedMinimum = it, _json = json) } } "grouped_with_metered_minimum" -> { @@ -801,7 +765,7 @@ private constructor( it.validate() } ?.let { - return Price(groupedWithMeteredMinimumPrice = it, _json = json) + return Price(groupedWithMeteredMinimum = it, _json = json) } } "matrix_with_display_name" -> { @@ -809,13 +773,13 @@ private constructor( it.validate() } ?.let { - return Price(matrixWithDisplayNamePrice = it, _json = json) + return Price(matrixWithDisplayName = it, _json = json) } } "bulk_with_proration" -> { tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return Price(bulkWithProrationPrice = it, _json = json) + return Price(bulkWithProration = it, _json = json) } } "grouped_tiered_package" -> { @@ -823,13 +787,15 @@ private constructor( it.validate() } ?.let { - return Price(groupedTieredPackagePrice = it, _json = json) + return Price(groupedTieredPackage = it, _json = json) } } - "max_group_tiered" -> { - tryDeserialize(node, jacksonTypeRef()) { it.validate() } + "max_group_tiered_package" -> { + tryDeserialize(node, jacksonTypeRef()) { + it.validate() + } ?.let { - return Price(maxGroupTieredPrice = it, _json = json) + return Price(maxGroupTieredPackage = it, _json = json) } } } @@ -846,46 +812,41 @@ private constructor( provider: SerializerProvider ) { when { - value.unitPrice != null -> generator.writeObject(value.unitPrice) + value.unit != null -> generator.writeObject(value.unit) value.packagePrice != null -> generator.writeObject(value.packagePrice) - value.matrixPrice != null -> generator.writeObject(value.matrixPrice) - value.tieredPrice != null -> generator.writeObject(value.tieredPrice) - value.tieredBpsPrice != null -> generator.writeObject(value.tieredBpsPrice) - value.bpsPrice != null -> generator.writeObject(value.bpsPrice) - value.bulkBpsPrice != null -> generator.writeObject(value.bulkBpsPrice) - value.bulkPrice != null -> generator.writeObject(value.bulkPrice) - value.thresholdTotalAmountPrice != null -> - generator.writeObject(value.thresholdTotalAmountPrice) - value.tieredPackagePrice != null -> generator.writeObject(value.tieredPackagePrice) - value.groupedTieredPrice != null -> generator.writeObject(value.groupedTieredPrice) - value.tieredWithMinimumPrice != null -> - generator.writeObject(value.tieredWithMinimumPrice) - value.tieredPackageWithMinimumPrice != null -> - generator.writeObject(value.tieredPackageWithMinimumPrice) - value.packageWithAllocationPrice != null -> - generator.writeObject(value.packageWithAllocationPrice) - value.unitWithPercentPrice != null -> - generator.writeObject(value.unitWithPercentPrice) - value.matrixWithAllocationPrice != null -> - generator.writeObject(value.matrixWithAllocationPrice) - value.tieredWithProrationPrice != null -> - generator.writeObject(value.tieredWithProrationPrice) - value.unitWithProrationPrice != null -> - generator.writeObject(value.unitWithProrationPrice) - value.groupedAllocationPrice != null -> - generator.writeObject(value.groupedAllocationPrice) - value.groupedWithProratedMinimumPrice != null -> - generator.writeObject(value.groupedWithProratedMinimumPrice) - value.groupedWithMeteredMinimumPrice != null -> - generator.writeObject(value.groupedWithMeteredMinimumPrice) - value.matrixWithDisplayNamePrice != null -> - generator.writeObject(value.matrixWithDisplayNamePrice) - value.bulkWithProrationPrice != null -> - generator.writeObject(value.bulkWithProrationPrice) - value.groupedTieredPackagePrice != null -> - generator.writeObject(value.groupedTieredPackagePrice) - value.maxGroupTieredPrice != null -> - generator.writeObject(value.maxGroupTieredPrice) + value.matrix != null -> generator.writeObject(value.matrix) + value.tiered != null -> generator.writeObject(value.tiered) + value.tieredBps != null -> generator.writeObject(value.tieredBps) + value.bps != null -> generator.writeObject(value.bps) + value.bulkBps != null -> generator.writeObject(value.bulkBps) + value.bulk != null -> generator.writeObject(value.bulk) + value.thresholdTotalAmount != null -> + generator.writeObject(value.thresholdTotalAmount) + value.tieredPackage != null -> generator.writeObject(value.tieredPackage) + value.groupedTiered != null -> generator.writeObject(value.groupedTiered) + value.tieredWithMinimum != null -> generator.writeObject(value.tieredWithMinimum) + value.tieredPackageWithMinimum != null -> + generator.writeObject(value.tieredPackageWithMinimum) + value.packageWithAllocation != null -> + generator.writeObject(value.packageWithAllocation) + value.unitWithPercent != null -> generator.writeObject(value.unitWithPercent) + value.matrixWithAllocation != null -> + generator.writeObject(value.matrixWithAllocation) + value.tieredWithProration != null -> + generator.writeObject(value.tieredWithProration) + value.unitWithProration != null -> generator.writeObject(value.unitWithProration) + value.groupedAllocation != null -> generator.writeObject(value.groupedAllocation) + value.groupedWithProratedMinimum != null -> + generator.writeObject(value.groupedWithProratedMinimum) + value.groupedWithMeteredMinimum != null -> + generator.writeObject(value.groupedWithMeteredMinimum) + value.matrixWithDisplayName != null -> + generator.writeObject(value.matrixWithDisplayName) + value.bulkWithProration != null -> generator.writeObject(value.bulkWithProration) + value.groupedTieredPackage != null -> + generator.writeObject(value.groupedTieredPackage) + value.maxGroupTieredPackage != null -> + generator.writeObject(value.maxGroupTieredPackage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Price") } @@ -1274,17 +1235,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -3244,17 +3202,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -5251,17 +5206,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -7469,17 +7421,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -9611,17 +9560,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -11796,17 +11742,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -13792,17 +13735,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -15950,17 +15890,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -18069,17 +18006,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -20017,17 +19951,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -21964,17 +21895,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -23911,17 +23839,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -25867,17 +25792,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -27820,17 +27742,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -29770,17 +29689,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -31720,17 +31636,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -33967,17 +33880,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -35915,17 +35825,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -37863,17 +37770,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -39820,17 +39724,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -41783,17 +41684,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -43740,17 +43638,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -45697,17 +45592,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -47640,17 +47532,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -49206,7 +49095,7 @@ private constructor( } @NoAutoDetect - class MaxGroupTieredPrice + class MaxGroupTieredPackagePrice @JsonCreator private constructor( @JsonProperty("id") @ExcludeMissing private val id: JsonField = JsonMissing.of(), @@ -49246,9 +49135,10 @@ private constructor( private val invoicingCycleConfiguration: JsonField = JsonMissing.of(), @JsonProperty("item") @ExcludeMissing private val item: JsonField = JsonMissing.of(), - @JsonProperty("max_group_tiered_config") + @JsonProperty("max_group_tiered_package_config") @ExcludeMissing - private val maxGroupTieredConfig: JsonField = JsonMissing.of(), + private val maxGroupTieredPackageConfig: JsonField = + JsonMissing.of(), @JsonProperty("maximum") @ExcludeMissing private val maximum: JsonField = JsonMissing.of(), @@ -49315,8 +49205,8 @@ private constructor( fun item(): Item = item.getRequired("item") - fun maxGroupTieredConfig(): MaxGroupTieredConfig = - maxGroupTieredConfig.getRequired("max_group_tiered_config") + fun maxGroupTieredPackageConfig(): MaxGroupTieredPackageConfig = + maxGroupTieredPackageConfig.getRequired("max_group_tiered_package_config") fun maximum(): Optional = Optional.ofNullable(maximum.getNullable("maximum")) @@ -49388,9 +49278,10 @@ private constructor( @JsonProperty("item") @ExcludeMissing fun _item(): JsonField = item - @JsonProperty("max_group_tiered_config") + @JsonProperty("max_group_tiered_package_config") @ExcludeMissing - fun _maxGroupTieredConfig(): JsonField = maxGroupTieredConfig + fun _maxGroupTieredPackageConfig(): JsonField = + maxGroupTieredPackageConfig @JsonProperty("maximum") @ExcludeMissing fun _maximum(): JsonField = maximum @@ -49431,7 +49322,7 @@ private constructor( private var validated: Boolean = false - fun validate(): MaxGroupTieredPrice = apply { + fun validate(): MaxGroupTieredPackagePrice = apply { if (validated) { return@apply } @@ -49449,7 +49340,7 @@ private constructor( fixedPriceQuantity() invoicingCycleConfiguration().ifPresent { it.validate() } item().validate() - maxGroupTieredConfig().validate() + maxGroupTieredPackageConfig().validate() maximum().ifPresent { it.validate() } maximumAmount() metadata().validate() @@ -49484,7 +49375,7 @@ private constructor( private var fixedPriceQuantity: JsonField? = null private var invoicingCycleConfiguration: JsonField? = null private var item: JsonField? = null - private var maxGroupTieredConfig: JsonField? = null + private var maxGroupTieredPackageConfig: JsonField? = null private var maximum: JsonField? = null private var maximumAmount: JsonField? = null private var metadata: JsonField? = null @@ -49497,31 +49388,32 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(maxGroupTieredPrice: MaxGroupTieredPrice) = apply { - id = maxGroupTieredPrice.id - billableMetric = maxGroupTieredPrice.billableMetric - billingCycleConfiguration = maxGroupTieredPrice.billingCycleConfiguration - cadence = maxGroupTieredPrice.cadence - conversionRate = maxGroupTieredPrice.conversionRate - createdAt = maxGroupTieredPrice.createdAt - creditAllocation = maxGroupTieredPrice.creditAllocation - currency = maxGroupTieredPrice.currency - discount = maxGroupTieredPrice.discount - externalPriceId = maxGroupTieredPrice.externalPriceId - fixedPriceQuantity = maxGroupTieredPrice.fixedPriceQuantity - invoicingCycleConfiguration = maxGroupTieredPrice.invoicingCycleConfiguration - item = maxGroupTieredPrice.item - maxGroupTieredConfig = maxGroupTieredPrice.maxGroupTieredConfig - maximum = maxGroupTieredPrice.maximum - maximumAmount = maxGroupTieredPrice.maximumAmount - metadata = maxGroupTieredPrice.metadata - minimum = maxGroupTieredPrice.minimum - minimumAmount = maxGroupTieredPrice.minimumAmount - modelType = maxGroupTieredPrice.modelType - name = maxGroupTieredPrice.name - planPhaseOrder = maxGroupTieredPrice.planPhaseOrder - priceType = maxGroupTieredPrice.priceType - additionalProperties = maxGroupTieredPrice.additionalProperties.toMutableMap() + internal fun from(maxGroupTieredPackagePrice: MaxGroupTieredPackagePrice) = apply { + id = maxGroupTieredPackagePrice.id + billableMetric = maxGroupTieredPackagePrice.billableMetric + billingCycleConfiguration = maxGroupTieredPackagePrice.billingCycleConfiguration + cadence = maxGroupTieredPackagePrice.cadence + conversionRate = maxGroupTieredPackagePrice.conversionRate + createdAt = maxGroupTieredPackagePrice.createdAt + creditAllocation = maxGroupTieredPackagePrice.creditAllocation + currency = maxGroupTieredPackagePrice.currency + discount = maxGroupTieredPackagePrice.discount + externalPriceId = maxGroupTieredPackagePrice.externalPriceId + fixedPriceQuantity = maxGroupTieredPackagePrice.fixedPriceQuantity + invoicingCycleConfiguration = maxGroupTieredPackagePrice.invoicingCycleConfiguration + item = maxGroupTieredPackagePrice.item + maxGroupTieredPackageConfig = maxGroupTieredPackagePrice.maxGroupTieredPackageConfig + maximum = maxGroupTieredPackagePrice.maximum + maximumAmount = maxGroupTieredPackagePrice.maximumAmount + metadata = maxGroupTieredPackagePrice.metadata + minimum = maxGroupTieredPackagePrice.minimum + minimumAmount = maxGroupTieredPackagePrice.minimumAmount + modelType = maxGroupTieredPackagePrice.modelType + name = maxGroupTieredPackagePrice.name + planPhaseOrder = maxGroupTieredPackagePrice.planPhaseOrder + priceType = maxGroupTieredPackagePrice.priceType + additionalProperties = + maxGroupTieredPackagePrice.additionalProperties.toMutableMap() } fun id(id: String) = id(JsonField.of(id)) @@ -49588,17 +49480,14 @@ private constructor( fun discount(discount: JsonField) = apply { this.discount = discount } - fun discount(percentageDiscount: PercentageDiscount) = - discount(Discount.ofPercentageDiscount(percentageDiscount)) + fun discount(percentage: PercentageDiscount) = + discount(Discount.ofPercentage(percentage)) - fun discount(trialDiscount: TrialDiscount) = - discount(Discount.ofTrialDiscount(trialDiscount)) + fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial)) - fun discount(usageDiscount: Discount.UsageDiscount) = - discount(Discount.ofUsageDiscount(usageDiscount)) + fun discount(usage: Discount.UsageDiscount) = discount(Discount.ofUsage(usage)) - fun discount(amountDiscount: AmountDiscount) = - discount(Discount.ofAmountDiscount(amountDiscount)) + fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount)) fun externalPriceId(externalPriceId: String?) = externalPriceId(JsonField.ofNullable(externalPriceId)) @@ -49640,13 +49529,13 @@ private constructor( fun item(item: JsonField) = apply { this.item = item } - fun maxGroupTieredConfig(maxGroupTieredConfig: MaxGroupTieredConfig) = - maxGroupTieredConfig(JsonField.of(maxGroupTieredConfig)) + fun maxGroupTieredPackageConfig( + maxGroupTieredPackageConfig: MaxGroupTieredPackageConfig + ) = maxGroupTieredPackageConfig(JsonField.of(maxGroupTieredPackageConfig)) - fun maxGroupTieredConfig(maxGroupTieredConfig: JsonField) = - apply { - this.maxGroupTieredConfig = maxGroupTieredConfig - } + fun maxGroupTieredPackageConfig( + maxGroupTieredPackageConfig: JsonField + ) = apply { this.maxGroupTieredPackageConfig = maxGroupTieredPackageConfig } fun maximum(maximum: Maximum?) = maximum(JsonField.ofNullable(maximum)) @@ -49738,8 +49627,8 @@ private constructor( keys.forEach(::removeAdditionalProperty) } - fun build(): MaxGroupTieredPrice = - MaxGroupTieredPrice( + fun build(): MaxGroupTieredPackagePrice = + MaxGroupTieredPackagePrice( checkRequired("id", id), checkRequired("billableMetric", billableMetric), checkRequired("billingCycleConfiguration", billingCycleConfiguration), @@ -49753,7 +49642,7 @@ private constructor( checkRequired("fixedPriceQuantity", fixedPriceQuantity), checkRequired("invoicingCycleConfiguration", invoicingCycleConfiguration), checkRequired("item", item), - checkRequired("maxGroupTieredConfig", maxGroupTieredConfig), + checkRequired("maxGroupTieredPackageConfig", maxGroupTieredPackageConfig), checkRequired("maximum", maximum), checkRequired("maximumAmount", maximumAmount), checkRequired("metadata", metadata), @@ -50533,7 +50422,7 @@ private constructor( } @NoAutoDetect - class MaxGroupTieredConfig + class MaxGroupTieredPackageConfig @JsonCreator private constructor( @JsonAnySetter @@ -50546,7 +50435,7 @@ private constructor( private var validated: Boolean = false - fun validate(): MaxGroupTieredConfig = apply { + fun validate(): MaxGroupTieredPackageConfig = apply { if (validated) { return@apply } @@ -50566,9 +50455,11 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(maxGroupTieredConfig: MaxGroupTieredConfig) = apply { - additionalProperties = maxGroupTieredConfig.additionalProperties.toMutableMap() - } + internal fun from(maxGroupTieredPackageConfig: MaxGroupTieredPackageConfig) = + apply { + additionalProperties = + maxGroupTieredPackageConfig.additionalProperties.toMutableMap() + } fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -50592,8 +50483,8 @@ private constructor( keys.forEach(::removeAdditionalProperty) } - fun build(): MaxGroupTieredConfig = - MaxGroupTieredConfig(additionalProperties.toImmutable()) + fun build(): MaxGroupTieredPackageConfig = + MaxGroupTieredPackageConfig(additionalProperties.toImmutable()) } override fun equals(other: Any?): Boolean { @@ -50601,7 +50492,7 @@ private constructor( return true } - return /* spotless:off */ other is MaxGroupTieredConfig && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is MaxGroupTieredPackageConfig && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ @@ -50611,7 +50502,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "MaxGroupTieredConfig{additionalProperties=$additionalProperties}" + "MaxGroupTieredPackageConfig{additionalProperties=$additionalProperties}" } @NoAutoDetect @@ -51037,29 +50928,29 @@ private constructor( companion object { - @JvmField val MAX_GROUP_TIERED = of("max_group_tiered") + @JvmField val MAX_GROUP_TIERED_PACKAGE = of("max_group_tiered_package") @JvmStatic fun of(value: String) = ModelType(JsonField.of(value)) } enum class Known { - MAX_GROUP_TIERED, + MAX_GROUP_TIERED_PACKAGE, } enum class Value { - MAX_GROUP_TIERED, + MAX_GROUP_TIERED_PACKAGE, _UNKNOWN, } fun value(): Value = when (this) { - MAX_GROUP_TIERED -> Value.MAX_GROUP_TIERED + MAX_GROUP_TIERED_PACKAGE -> Value.MAX_GROUP_TIERED_PACKAGE else -> Value._UNKNOWN } fun known(): Known = when (this) { - MAX_GROUP_TIERED -> Known.MAX_GROUP_TIERED + MAX_GROUP_TIERED_PACKAGE -> Known.MAX_GROUP_TIERED_PACKAGE else -> throw OrbInvalidDataException("Unknown ModelType: $value") } @@ -51140,16 +51031,16 @@ private constructor( return true } - return /* spotless:off */ other is MaxGroupTieredPrice && id == other.id && billableMetric == other.billableMetric && billingCycleConfiguration == other.billingCycleConfiguration && cadence == other.cadence && conversionRate == other.conversionRate && createdAt == other.createdAt && creditAllocation == other.creditAllocation && currency == other.currency && discount == other.discount && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoicingCycleConfiguration == other.invoicingCycleConfiguration && item == other.item && maxGroupTieredConfig == other.maxGroupTieredConfig && maximum == other.maximum && maximumAmount == other.maximumAmount && metadata == other.metadata && minimum == other.minimum && minimumAmount == other.minimumAmount && modelType == other.modelType && name == other.name && planPhaseOrder == other.planPhaseOrder && priceType == other.priceType && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is MaxGroupTieredPackagePrice && id == other.id && billableMetric == other.billableMetric && billingCycleConfiguration == other.billingCycleConfiguration && cadence == other.cadence && conversionRate == other.conversionRate && createdAt == other.createdAt && creditAllocation == other.creditAllocation && currency == other.currency && discount == other.discount && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoicingCycleConfiguration == other.invoicingCycleConfiguration && item == other.item && maxGroupTieredPackageConfig == other.maxGroupTieredPackageConfig && maximum == other.maximum && maximumAmount == other.maximumAmount && metadata == other.metadata && minimum == other.minimum && minimumAmount == other.minimumAmount && modelType == other.modelType && name == other.name && planPhaseOrder == other.planPhaseOrder && priceType == other.priceType && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(id, billableMetric, billingCycleConfiguration, cadence, conversionRate, createdAt, creditAllocation, currency, discount, externalPriceId, fixedPriceQuantity, invoicingCycleConfiguration, item, maxGroupTieredConfig, maximum, maximumAmount, metadata, minimum, minimumAmount, modelType, name, planPhaseOrder, priceType, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(id, billableMetric, billingCycleConfiguration, cadence, conversionRate, createdAt, creditAllocation, currency, discount, externalPriceId, fixedPriceQuantity, invoicingCycleConfiguration, item, maxGroupTieredPackageConfig, maximum, maximumAmount, metadata, minimum, minimumAmount, modelType, name, planPhaseOrder, priceType, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "MaxGroupTieredPrice{id=$id, billableMetric=$billableMetric, billingCycleConfiguration=$billingCycleConfiguration, cadence=$cadence, conversionRate=$conversionRate, createdAt=$createdAt, creditAllocation=$creditAllocation, currency=$currency, discount=$discount, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoicingCycleConfiguration=$invoicingCycleConfiguration, item=$item, maxGroupTieredConfig=$maxGroupTieredConfig, maximum=$maximum, maximumAmount=$maximumAmount, metadata=$metadata, minimum=$minimum, minimumAmount=$minimumAmount, modelType=$modelType, name=$name, planPhaseOrder=$planPhaseOrder, priceType=$priceType, additionalProperties=$additionalProperties}" + "MaxGroupTieredPackagePrice{id=$id, billableMetric=$billableMetric, billingCycleConfiguration=$billingCycleConfiguration, cadence=$cadence, conversionRate=$conversionRate, createdAt=$createdAt, creditAllocation=$creditAllocation, currency=$currency, discount=$discount, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoicingCycleConfiguration=$invoicingCycleConfiguration, item=$item, maxGroupTieredPackageConfig=$maxGroupTieredPackageConfig, maximum=$maximum, maximumAmount=$maximumAmount, metadata=$metadata, minimum=$minimum, minimumAmount=$minimumAmount, modelType=$modelType, name=$name, planPhaseOrder=$planPhaseOrder, priceType=$priceType, additionalProperties=$additionalProperties}" } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/PriceCreateParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/PriceCreateParams.kt index 8cb07d53..2bc785e2 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/PriceCreateParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/PriceCreateParams.kt @@ -82,8 +82,8 @@ constructor( fun newFloatingGroupedTieredPrice(): Optional = body.newFloatingGroupedTieredPrice() - fun newFloatingMaxGroupTieredPrice(): Optional = - body.newFloatingMaxGroupTieredPrice() + fun newFloatingMaxGroupTieredPackagePrice(): Optional = + body.newFloatingMaxGroupTieredPackagePrice() fun newFloatingTieredWithMinimumPrice(): Optional = body.newFloatingTieredWithMinimumPrice() @@ -152,7 +152,8 @@ constructor( null, private val newFloatingTieredPackagePrice: NewFloatingTieredPackagePrice? = null, private val newFloatingGroupedTieredPrice: NewFloatingGroupedTieredPrice? = null, - private val newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice? = null, + private val newFloatingMaxGroupTieredPackagePrice: NewFloatingMaxGroupTieredPackagePrice? = + null, private val newFloatingTieredWithMinimumPrice: NewFloatingTieredWithMinimumPrice? = null, private val newFloatingPackageWithAllocationPrice: NewFloatingPackageWithAllocationPrice? = null, @@ -214,8 +215,9 @@ constructor( fun newFloatingGroupedTieredPrice(): Optional = Optional.ofNullable(newFloatingGroupedTieredPrice) - fun newFloatingMaxGroupTieredPrice(): Optional = - Optional.ofNullable(newFloatingMaxGroupTieredPrice) + fun newFloatingMaxGroupTieredPackagePrice(): + Optional = + Optional.ofNullable(newFloatingMaxGroupTieredPackagePrice) fun newFloatingTieredWithMinimumPrice(): Optional = Optional.ofNullable(newFloatingTieredWithMinimumPrice) @@ -284,7 +286,8 @@ constructor( fun isNewFloatingGroupedTieredPrice(): Boolean = newFloatingGroupedTieredPrice != null - fun isNewFloatingMaxGroupTieredPrice(): Boolean = newFloatingMaxGroupTieredPrice != null + fun isNewFloatingMaxGroupTieredPackagePrice(): Boolean = + newFloatingMaxGroupTieredPackagePrice != null fun isNewFloatingTieredWithMinimumPrice(): Boolean = newFloatingTieredWithMinimumPrice != null @@ -357,8 +360,10 @@ constructor( fun asNewFloatingGroupedTieredPrice(): NewFloatingGroupedTieredPrice = newFloatingGroupedTieredPrice.getOrThrow("newFloatingGroupedTieredPrice") - fun asNewFloatingMaxGroupTieredPrice(): NewFloatingMaxGroupTieredPrice = - newFloatingMaxGroupTieredPrice.getOrThrow("newFloatingMaxGroupTieredPrice") + fun asNewFloatingMaxGroupTieredPackagePrice(): NewFloatingMaxGroupTieredPackagePrice = + newFloatingMaxGroupTieredPackagePrice.getOrThrow( + "newFloatingMaxGroupTieredPackagePrice" + ) fun asNewFloatingTieredWithMinimumPrice(): NewFloatingTieredWithMinimumPrice = newFloatingTieredWithMinimumPrice.getOrThrow("newFloatingTieredWithMinimumPrice") @@ -439,8 +444,10 @@ constructor( visitor.visitNewFloatingTieredPackagePrice(newFloatingTieredPackagePrice) newFloatingGroupedTieredPrice != null -> visitor.visitNewFloatingGroupedTieredPrice(newFloatingGroupedTieredPrice) - newFloatingMaxGroupTieredPrice != null -> - visitor.visitNewFloatingMaxGroupTieredPrice(newFloatingMaxGroupTieredPrice) + newFloatingMaxGroupTieredPackagePrice != null -> + visitor.visitNewFloatingMaxGroupTieredPackagePrice( + newFloatingMaxGroupTieredPackagePrice + ) newFloatingTieredWithMinimumPrice != null -> visitor.visitNewFloatingTieredWithMinimumPrice( newFloatingTieredWithMinimumPrice @@ -496,10 +503,10 @@ constructor( return true } - return /* spotless:off */ other is PriceCreateBody && newFloatingUnitPrice == other.newFloatingUnitPrice && newFloatingPackagePrice == other.newFloatingPackagePrice && newFloatingMatrixPrice == other.newFloatingMatrixPrice && newFloatingMatrixWithAllocationPrice == other.newFloatingMatrixWithAllocationPrice && newFloatingTieredPrice == other.newFloatingTieredPrice && newFloatingTieredBpsPrice == other.newFloatingTieredBpsPrice && newFloatingBpsPrice == other.newFloatingBpsPrice && newFloatingBulkBpsPrice == other.newFloatingBulkBpsPrice && newFloatingBulkPrice == other.newFloatingBulkPrice && newFloatingThresholdTotalAmountPrice == other.newFloatingThresholdTotalAmountPrice && newFloatingTieredPackagePrice == other.newFloatingTieredPackagePrice && newFloatingGroupedTieredPrice == other.newFloatingGroupedTieredPrice && newFloatingMaxGroupTieredPrice == other.newFloatingMaxGroupTieredPrice && newFloatingTieredWithMinimumPrice == other.newFloatingTieredWithMinimumPrice && newFloatingPackageWithAllocationPrice == other.newFloatingPackageWithAllocationPrice && newFloatingTieredPackageWithMinimumPrice == other.newFloatingTieredPackageWithMinimumPrice && newFloatingUnitWithPercentPrice == other.newFloatingUnitWithPercentPrice && newFloatingTieredWithProrationPrice == other.newFloatingTieredWithProrationPrice && newFloatingUnitWithProrationPrice == other.newFloatingUnitWithProrationPrice && newFloatingGroupedAllocationPrice == other.newFloatingGroupedAllocationPrice && newFloatingGroupedWithProratedMinimumPrice == other.newFloatingGroupedWithProratedMinimumPrice && newFloatingGroupedWithMeteredMinimumPrice == other.newFloatingGroupedWithMeteredMinimumPrice && newFloatingMatrixWithDisplayNamePrice == other.newFloatingMatrixWithDisplayNamePrice && newFloatingBulkWithProrationPrice == other.newFloatingBulkWithProrationPrice && newFloatingGroupedTieredPackagePrice == other.newFloatingGroupedTieredPackagePrice /* spotless:on */ + return /* spotless:off */ other is PriceCreateBody && newFloatingUnitPrice == other.newFloatingUnitPrice && newFloatingPackagePrice == other.newFloatingPackagePrice && newFloatingMatrixPrice == other.newFloatingMatrixPrice && newFloatingMatrixWithAllocationPrice == other.newFloatingMatrixWithAllocationPrice && newFloatingTieredPrice == other.newFloatingTieredPrice && newFloatingTieredBpsPrice == other.newFloatingTieredBpsPrice && newFloatingBpsPrice == other.newFloatingBpsPrice && newFloatingBulkBpsPrice == other.newFloatingBulkBpsPrice && newFloatingBulkPrice == other.newFloatingBulkPrice && newFloatingThresholdTotalAmountPrice == other.newFloatingThresholdTotalAmountPrice && newFloatingTieredPackagePrice == other.newFloatingTieredPackagePrice && newFloatingGroupedTieredPrice == other.newFloatingGroupedTieredPrice && newFloatingMaxGroupTieredPackagePrice == other.newFloatingMaxGroupTieredPackagePrice && newFloatingTieredWithMinimumPrice == other.newFloatingTieredWithMinimumPrice && newFloatingPackageWithAllocationPrice == other.newFloatingPackageWithAllocationPrice && newFloatingTieredPackageWithMinimumPrice == other.newFloatingTieredPackageWithMinimumPrice && newFloatingUnitWithPercentPrice == other.newFloatingUnitWithPercentPrice && newFloatingTieredWithProrationPrice == other.newFloatingTieredWithProrationPrice && newFloatingUnitWithProrationPrice == other.newFloatingUnitWithProrationPrice && newFloatingGroupedAllocationPrice == other.newFloatingGroupedAllocationPrice && newFloatingGroupedWithProratedMinimumPrice == other.newFloatingGroupedWithProratedMinimumPrice && newFloatingGroupedWithMeteredMinimumPrice == other.newFloatingGroupedWithMeteredMinimumPrice && newFloatingMatrixWithDisplayNamePrice == other.newFloatingMatrixWithDisplayNamePrice && newFloatingBulkWithProrationPrice == other.newFloatingBulkWithProrationPrice && newFloatingGroupedTieredPackagePrice == other.newFloatingGroupedTieredPackagePrice /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newFloatingUnitPrice, newFloatingPackagePrice, newFloatingMatrixPrice, newFloatingMatrixWithAllocationPrice, newFloatingTieredPrice, newFloatingTieredBpsPrice, newFloatingBpsPrice, newFloatingBulkBpsPrice, newFloatingBulkPrice, newFloatingThresholdTotalAmountPrice, newFloatingTieredPackagePrice, newFloatingGroupedTieredPrice, newFloatingMaxGroupTieredPrice, newFloatingTieredWithMinimumPrice, newFloatingPackageWithAllocationPrice, newFloatingTieredPackageWithMinimumPrice, newFloatingUnitWithPercentPrice, newFloatingTieredWithProrationPrice, newFloatingUnitWithProrationPrice, newFloatingGroupedAllocationPrice, newFloatingGroupedWithProratedMinimumPrice, newFloatingGroupedWithMeteredMinimumPrice, newFloatingMatrixWithDisplayNamePrice, newFloatingBulkWithProrationPrice, newFloatingGroupedTieredPackagePrice) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newFloatingUnitPrice, newFloatingPackagePrice, newFloatingMatrixPrice, newFloatingMatrixWithAllocationPrice, newFloatingTieredPrice, newFloatingTieredBpsPrice, newFloatingBpsPrice, newFloatingBulkBpsPrice, newFloatingBulkPrice, newFloatingThresholdTotalAmountPrice, newFloatingTieredPackagePrice, newFloatingGroupedTieredPrice, newFloatingMaxGroupTieredPackagePrice, newFloatingTieredWithMinimumPrice, newFloatingPackageWithAllocationPrice, newFloatingTieredPackageWithMinimumPrice, newFloatingUnitWithPercentPrice, newFloatingTieredWithProrationPrice, newFloatingUnitWithProrationPrice, newFloatingGroupedAllocationPrice, newFloatingGroupedWithProratedMinimumPrice, newFloatingGroupedWithMeteredMinimumPrice, newFloatingMatrixWithDisplayNamePrice, newFloatingBulkWithProrationPrice, newFloatingGroupedTieredPackagePrice) /* spotless:on */ override fun toString(): String = when { @@ -527,8 +534,8 @@ constructor( "PriceCreateBody{newFloatingTieredPackagePrice=$newFloatingTieredPackagePrice}" newFloatingGroupedTieredPrice != null -> "PriceCreateBody{newFloatingGroupedTieredPrice=$newFloatingGroupedTieredPrice}" - newFloatingMaxGroupTieredPrice != null -> - "PriceCreateBody{newFloatingMaxGroupTieredPrice=$newFloatingMaxGroupTieredPrice}" + newFloatingMaxGroupTieredPackagePrice != null -> + "PriceCreateBody{newFloatingMaxGroupTieredPackagePrice=$newFloatingMaxGroupTieredPackagePrice}" newFloatingTieredWithMinimumPrice != null -> "PriceCreateBody{newFloatingTieredWithMinimumPrice=$newFloatingTieredWithMinimumPrice}" newFloatingPackageWithAllocationPrice != null -> @@ -618,9 +625,12 @@ constructor( ) = PriceCreateBody(newFloatingGroupedTieredPrice = newFloatingGroupedTieredPrice) @JvmStatic - fun ofNewFloatingMaxGroupTieredPrice( - newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice - ) = PriceCreateBody(newFloatingMaxGroupTieredPrice = newFloatingMaxGroupTieredPrice) + fun ofNewFloatingMaxGroupTieredPackagePrice( + newFloatingMaxGroupTieredPackagePrice: NewFloatingMaxGroupTieredPackagePrice + ) = + PriceCreateBody( + newFloatingMaxGroupTieredPackagePrice = newFloatingMaxGroupTieredPackagePrice + ) @JvmStatic fun ofNewFloatingTieredWithMinimumPrice( @@ -756,8 +766,8 @@ constructor( newFloatingGroupedTieredPrice: NewFloatingGroupedTieredPrice ): T - fun visitNewFloatingMaxGroupTieredPrice( - newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice + fun visitNewFloatingMaxGroupTieredPackagePrice( + newFloatingMaxGroupTieredPackagePrice: NewFloatingMaxGroupTieredPackagePrice ): T fun visitNewFloatingTieredWithMinimumPrice( @@ -890,11 +900,14 @@ constructor( return PriceCreateBody(newFloatingGroupedTieredPrice = it, _json = json) } } - "max_group_tiered" -> { - tryDeserialize(node, jacksonTypeRef()) + "max_group_tiered_package" -> { + tryDeserialize( + node, + jacksonTypeRef() + ) ?.let { return PriceCreateBody( - newFloatingMaxGroupTieredPrice = it, + newFloatingMaxGroupTieredPackagePrice = it, _json = json ) } @@ -1060,8 +1073,8 @@ constructor( generator.writeObject(value.newFloatingTieredPackagePrice) value.newFloatingGroupedTieredPrice != null -> generator.writeObject(value.newFloatingGroupedTieredPrice) - value.newFloatingMaxGroupTieredPrice != null -> - generator.writeObject(value.newFloatingMaxGroupTieredPrice) + value.newFloatingMaxGroupTieredPackagePrice != null -> + generator.writeObject(value.newFloatingMaxGroupTieredPackagePrice) value.newFloatingTieredWithMinimumPrice != null -> generator.writeObject(value.newFloatingTieredWithMinimumPrice) value.newFloatingPackageWithAllocationPrice != null -> @@ -1177,10 +1190,13 @@ constructor( body = PriceCreateBody.ofNewFloatingGroupedTieredPrice(newFloatingGroupedTieredPrice) } - fun forNewFloatingMaxGroupTieredPrice( - newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice + fun forNewFloatingMaxGroupTieredPackagePrice( + newFloatingMaxGroupTieredPackagePrice: NewFloatingMaxGroupTieredPackagePrice ) = apply { - body = PriceCreateBody.ofNewFloatingMaxGroupTieredPrice(newFloatingMaxGroupTieredPrice) + body = + PriceCreateBody.ofNewFloatingMaxGroupTieredPackagePrice( + newFloatingMaxGroupTieredPackagePrice + ) } fun forNewFloatingTieredWithMinimumPrice( @@ -17659,7 +17675,7 @@ constructor( } @NoAutoDetect - class NewFloatingMaxGroupTieredPrice + class NewFloatingMaxGroupTieredPackagePrice @JsonCreator private constructor( @JsonProperty("cadence") @@ -17671,9 +17687,10 @@ constructor( @JsonProperty("item_id") @ExcludeMissing private val itemId: JsonField = JsonMissing.of(), - @JsonProperty("max_group_tiered_config") + @JsonProperty("max_group_tiered_package_config") @ExcludeMissing - private val maxGroupTieredConfig: JsonField = JsonMissing.of(), + private val maxGroupTieredPackageConfig: JsonField = + JsonMissing.of(), @JsonProperty("model_type") @ExcludeMissing private val modelType: JsonField = JsonMissing.of(), @@ -17722,8 +17739,8 @@ constructor( /** The id of the item the plan will be associated with. */ fun itemId(): String = itemId.getRequired("item_id") - fun maxGroupTieredConfig(): MaxGroupTieredConfig = - maxGroupTieredConfig.getRequired("max_group_tiered_config") + fun maxGroupTieredPackageConfig(): MaxGroupTieredPackageConfig = + maxGroupTieredPackageConfig.getRequired("max_group_tiered_package_config") fun modelType(): ModelType = modelType.getRequired("model_type") @@ -17788,9 +17805,10 @@ constructor( /** The id of the item the plan will be associated with. */ @JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField = itemId - @JsonProperty("max_group_tiered_config") + @JsonProperty("max_group_tiered_package_config") @ExcludeMissing - fun _maxGroupTieredConfig(): JsonField = maxGroupTieredConfig + fun _maxGroupTieredPackageConfig(): JsonField = + maxGroupTieredPackageConfig @JsonProperty("model_type") @ExcludeMissing @@ -17860,7 +17878,7 @@ constructor( private var validated: Boolean = false - fun validate(): NewFloatingMaxGroupTieredPrice = apply { + fun validate(): NewFloatingMaxGroupTieredPackagePrice = apply { if (validated) { return@apply } @@ -17868,7 +17886,7 @@ constructor( cadence() currency() itemId() - maxGroupTieredConfig().validate() + maxGroupTieredPackageConfig().validate() modelType() name() billableMetricId() @@ -17895,7 +17913,7 @@ constructor( private var cadence: JsonField? = null private var currency: JsonField? = null private var itemId: JsonField? = null - private var maxGroupTieredConfig: JsonField? = null + private var maxGroupTieredPackageConfig: JsonField? = null private var modelType: JsonField? = null private var name: JsonField? = null private var billableMetricId: JsonField = JsonMissing.of() @@ -17912,28 +17930,30 @@ constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice) = - apply { - cadence = newFloatingMaxGroupTieredPrice.cadence - currency = newFloatingMaxGroupTieredPrice.currency - itemId = newFloatingMaxGroupTieredPrice.itemId - maxGroupTieredConfig = newFloatingMaxGroupTieredPrice.maxGroupTieredConfig - modelType = newFloatingMaxGroupTieredPrice.modelType - name = newFloatingMaxGroupTieredPrice.name - billableMetricId = newFloatingMaxGroupTieredPrice.billableMetricId - billedInAdvance = newFloatingMaxGroupTieredPrice.billedInAdvance - billingCycleConfiguration = - newFloatingMaxGroupTieredPrice.billingCycleConfiguration - conversionRate = newFloatingMaxGroupTieredPrice.conversionRate - externalPriceId = newFloatingMaxGroupTieredPrice.externalPriceId - fixedPriceQuantity = newFloatingMaxGroupTieredPrice.fixedPriceQuantity - invoiceGroupingKey = newFloatingMaxGroupTieredPrice.invoiceGroupingKey - invoicingCycleConfiguration = - newFloatingMaxGroupTieredPrice.invoicingCycleConfiguration - metadata = newFloatingMaxGroupTieredPrice.metadata - additionalProperties = - newFloatingMaxGroupTieredPrice.additionalProperties.toMutableMap() - } + internal fun from( + newFloatingMaxGroupTieredPackagePrice: NewFloatingMaxGroupTieredPackagePrice + ) = apply { + cadence = newFloatingMaxGroupTieredPackagePrice.cadence + currency = newFloatingMaxGroupTieredPackagePrice.currency + itemId = newFloatingMaxGroupTieredPackagePrice.itemId + maxGroupTieredPackageConfig = + newFloatingMaxGroupTieredPackagePrice.maxGroupTieredPackageConfig + modelType = newFloatingMaxGroupTieredPackagePrice.modelType + name = newFloatingMaxGroupTieredPackagePrice.name + billableMetricId = newFloatingMaxGroupTieredPackagePrice.billableMetricId + billedInAdvance = newFloatingMaxGroupTieredPackagePrice.billedInAdvance + billingCycleConfiguration = + newFloatingMaxGroupTieredPackagePrice.billingCycleConfiguration + conversionRate = newFloatingMaxGroupTieredPackagePrice.conversionRate + externalPriceId = newFloatingMaxGroupTieredPackagePrice.externalPriceId + fixedPriceQuantity = newFloatingMaxGroupTieredPackagePrice.fixedPriceQuantity + invoiceGroupingKey = newFloatingMaxGroupTieredPackagePrice.invoiceGroupingKey + invoicingCycleConfiguration = + newFloatingMaxGroupTieredPackagePrice.invoicingCycleConfiguration + metadata = newFloatingMaxGroupTieredPackagePrice.metadata + additionalProperties = + newFloatingMaxGroupTieredPackagePrice.additionalProperties.toMutableMap() + } /** The cadence to bill for this price on. */ fun cadence(cadence: Cadence) = cadence(JsonField.of(cadence)) @@ -17953,13 +17973,13 @@ constructor( /** The id of the item the plan will be associated with. */ fun itemId(itemId: JsonField) = apply { this.itemId = itemId } - fun maxGroupTieredConfig(maxGroupTieredConfig: MaxGroupTieredConfig) = - maxGroupTieredConfig(JsonField.of(maxGroupTieredConfig)) + fun maxGroupTieredPackageConfig( + maxGroupTieredPackageConfig: MaxGroupTieredPackageConfig + ) = maxGroupTieredPackageConfig(JsonField.of(maxGroupTieredPackageConfig)) - fun maxGroupTieredConfig(maxGroupTieredConfig: JsonField) = - apply { - this.maxGroupTieredConfig = maxGroupTieredConfig - } + fun maxGroupTieredPackageConfig( + maxGroupTieredPackageConfig: JsonField + ) = apply { this.maxGroupTieredPackageConfig = maxGroupTieredPackageConfig } fun modelType(modelType: ModelType) = modelType(JsonField.of(modelType)) @@ -18173,12 +18193,12 @@ constructor( keys.forEach(::removeAdditionalProperty) } - fun build(): NewFloatingMaxGroupTieredPrice = - NewFloatingMaxGroupTieredPrice( + fun build(): NewFloatingMaxGroupTieredPackagePrice = + NewFloatingMaxGroupTieredPackagePrice( checkRequired("cadence", cadence), checkRequired("currency", currency), checkRequired("itemId", itemId), - checkRequired("maxGroupTieredConfig", maxGroupTieredConfig), + checkRequired("maxGroupTieredPackageConfig", maxGroupTieredPackageConfig), checkRequired("modelType", modelType), checkRequired("name", name), billableMetricId, @@ -18277,7 +18297,7 @@ constructor( } @NoAutoDetect - class MaxGroupTieredConfig + class MaxGroupTieredPackageConfig @JsonCreator private constructor( @JsonAnySetter @@ -18290,7 +18310,7 @@ constructor( private var validated: Boolean = false - fun validate(): MaxGroupTieredConfig = apply { + fun validate(): MaxGroupTieredPackageConfig = apply { if (validated) { return@apply } @@ -18310,9 +18330,11 @@ constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(maxGroupTieredConfig: MaxGroupTieredConfig) = apply { - additionalProperties = maxGroupTieredConfig.additionalProperties.toMutableMap() - } + internal fun from(maxGroupTieredPackageConfig: MaxGroupTieredPackageConfig) = + apply { + additionalProperties = + maxGroupTieredPackageConfig.additionalProperties.toMutableMap() + } fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -18336,8 +18358,8 @@ constructor( keys.forEach(::removeAdditionalProperty) } - fun build(): MaxGroupTieredConfig = - MaxGroupTieredConfig(additionalProperties.toImmutable()) + fun build(): MaxGroupTieredPackageConfig = + MaxGroupTieredPackageConfig(additionalProperties.toImmutable()) } override fun equals(other: Any?): Boolean { @@ -18345,7 +18367,7 @@ constructor( return true } - return /* spotless:off */ other is MaxGroupTieredConfig && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is MaxGroupTieredPackageConfig && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ @@ -18355,7 +18377,7 @@ constructor( override fun hashCode(): Int = hashCode override fun toString() = - "MaxGroupTieredConfig{additionalProperties=$additionalProperties}" + "MaxGroupTieredPackageConfig{additionalProperties=$additionalProperties}" } class ModelType @@ -18368,29 +18390,29 @@ constructor( companion object { - @JvmField val MAX_GROUP_TIERED = of("max_group_tiered") + @JvmField val MAX_GROUP_TIERED_PACKAGE = of("max_group_tiered_package") @JvmStatic fun of(value: String) = ModelType(JsonField.of(value)) } enum class Known { - MAX_GROUP_TIERED, + MAX_GROUP_TIERED_PACKAGE, } enum class Value { - MAX_GROUP_TIERED, + MAX_GROUP_TIERED_PACKAGE, _UNKNOWN, } fun value(): Value = when (this) { - MAX_GROUP_TIERED -> Value.MAX_GROUP_TIERED + MAX_GROUP_TIERED_PACKAGE -> Value.MAX_GROUP_TIERED_PACKAGE else -> Value._UNKNOWN } fun known(): Known = when (this) { - MAX_GROUP_TIERED -> Known.MAX_GROUP_TIERED + MAX_GROUP_TIERED_PACKAGE -> Known.MAX_GROUP_TIERED_PACKAGE else -> throw OrbInvalidDataException("Unknown ModelType: $value") } @@ -18877,17 +18899,17 @@ constructor( return true } - return /* spotless:off */ other is NewFloatingMaxGroupTieredPrice && cadence == other.cadence && currency == other.currency && itemId == other.itemId && maxGroupTieredConfig == other.maxGroupTieredConfig && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is NewFloatingMaxGroupTieredPackagePrice && cadence == other.cadence && currency == other.currency && itemId == other.itemId && maxGroupTieredPackageConfig == other.maxGroupTieredPackageConfig && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(cadence, currency, itemId, maxGroupTieredConfig, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(cadence, currency, itemId, maxGroupTieredPackageConfig, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "NewFloatingMaxGroupTieredPrice{cadence=$cadence, currency=$currency, itemId=$itemId, maxGroupTieredConfig=$maxGroupTieredConfig, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, additionalProperties=$additionalProperties}" + "NewFloatingMaxGroupTieredPackagePrice{cadence=$cadence, currency=$currency, itemId=$itemId, maxGroupTieredPackageConfig=$maxGroupTieredPackageConfig, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, additionalProperties=$additionalProperties}" } @NoAutoDetect 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 3883e820..21e9b232 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 @@ -764,20 +764,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1121,20 +1117,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1214,66 +1210,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1287,30 +1277,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1322,21 +1308,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1344,44 +1328,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1401,7 +1374,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1409,10 +1382,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1420,7 +1390,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1428,7 +1398,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1436,7 +1406,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1453,16 +1423,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3429,46 +3395,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3482,22 +3439,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3509,19 +3460,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3529,28 +3477,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3570,7 +3512,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3578,10 +3520,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3589,7 +3528,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3606,12 +3545,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5690,7 +5626,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5718,7 +5654,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5732,7 +5668,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5746,8 +5682,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5761,7 +5696,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5775,7 +5710,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5789,7 +5724,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5803,8 +5738,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5818,8 +5753,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5833,8 +5768,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5848,8 +5783,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5863,8 +5798,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5878,8 +5813,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5893,8 +5828,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5908,8 +5843,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5923,8 +5858,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5938,8 +5873,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5953,8 +5888,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5968,8 +5903,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5983,8 +5918,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5998,8 +5933,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6013,8 +5948,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6028,8 +5963,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6043,8 +5978,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for 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 c8b2ab4d..d99dbb7a 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 @@ -752,20 +752,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1109,20 +1105,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1202,66 +1198,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1275,30 +1265,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1310,21 +1296,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1332,44 +1316,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1389,7 +1362,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1397,10 +1370,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1408,7 +1378,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1416,7 +1386,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1424,7 +1394,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1441,16 +1411,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3417,46 +3383,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3470,22 +3427,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3497,19 +3448,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3517,28 +3465,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3558,7 +3500,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3566,10 +3508,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3577,7 +3516,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3594,12 +3533,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5678,7 +5614,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5706,7 +5642,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5720,7 +5656,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5734,8 +5670,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5749,7 +5684,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5763,7 +5698,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5777,7 +5712,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5791,8 +5726,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5806,8 +5741,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5821,8 +5756,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5836,8 +5771,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5851,8 +5786,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5866,8 +5801,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5881,8 +5816,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5896,8 +5831,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5911,8 +5846,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5926,8 +5861,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5941,8 +5876,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5956,8 +5891,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5971,8 +5906,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5986,8 +5921,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6001,8 +5936,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6016,8 +5951,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6031,8 +5966,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCreateParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCreateParams.kt index 13f0c889..51980a4c 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCreateParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionCreateParams.kt @@ -4823,131 +4823,99 @@ constructor( fun price(price: JsonField) = apply { this.price = price } /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionUnitPrice: Price.NewSubscriptionUnitPrice) = - price(Price.ofNewSubscriptionUnitPrice(newSubscriptionUnitPrice)) + fun price(newSubscriptionUnit: Price.NewSubscriptionUnitPrice) = + price(Price.ofNewSubscriptionUnit(newSubscriptionUnit)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionPackagePrice: Price.NewSubscriptionPackagePrice) = - price(Price.ofNewSubscriptionPackagePrice(newSubscriptionPackagePrice)) + fun price(newSubscriptionPackage: Price.NewSubscriptionPackagePrice) = + price(Price.ofNewSubscriptionPackage(newSubscriptionPackage)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionMatrixPrice: Price.NewSubscriptionMatrixPrice) = - price(Price.ofNewSubscriptionMatrixPrice(newSubscriptionMatrixPrice)) + fun price(newSubscriptionMatrix: Price.NewSubscriptionMatrixPrice) = + price(Price.ofNewSubscriptionMatrix(newSubscriptionMatrix)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredPrice: Price.NewSubscriptionTieredPrice) = - price(Price.ofNewSubscriptionTieredPrice(newSubscriptionTieredPrice)) + fun price(newSubscriptionTiered: Price.NewSubscriptionTieredPrice) = + price(Price.ofNewSubscriptionTiered(newSubscriptionTiered)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredBpsPrice: Price.NewSubscriptionTieredBpsPrice) = - price(Price.ofNewSubscriptionTieredBpsPrice(newSubscriptionTieredBpsPrice)) + fun price(newSubscriptionTieredBps: Price.NewSubscriptionTieredBpsPrice) = + price(Price.ofNewSubscriptionTieredBps(newSubscriptionTieredBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBpsPrice: Price.NewSubscriptionBpsPrice) = - price(Price.ofNewSubscriptionBpsPrice(newSubscriptionBpsPrice)) + fun price(newSubscriptionBps: Price.NewSubscriptionBpsPrice) = + price(Price.ofNewSubscriptionBps(newSubscriptionBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBulkBpsPrice: Price.NewSubscriptionBulkBpsPrice) = - price(Price.ofNewSubscriptionBulkBpsPrice(newSubscriptionBulkBpsPrice)) + fun price(newSubscriptionBulkBps: Price.NewSubscriptionBulkBpsPrice) = + price(Price.ofNewSubscriptionBulkBps(newSubscriptionBulkBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBulkPrice: Price.NewSubscriptionBulkPrice) = - price(Price.ofNewSubscriptionBulkPrice(newSubscriptionBulkPrice)) + fun price(newSubscriptionBulk: Price.NewSubscriptionBulkPrice) = + price(Price.ofNewSubscriptionBulk(newSubscriptionBulk)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionThresholdTotalAmountPrice: - Price.NewSubscriptionThresholdTotalAmountPrice + newSubscriptionThresholdTotalAmount: Price.NewSubscriptionThresholdTotalAmountPrice ) = price( - Price.ofNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice - ) + Price.ofNewSubscriptionThresholdTotalAmount(newSubscriptionThresholdTotalAmount) ) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredPackagePrice: Price.NewSubscriptionTieredPackagePrice) = - price(Price.ofNewSubscriptionTieredPackagePrice(newSubscriptionTieredPackagePrice)) + fun price(newSubscriptionTieredPackage: Price.NewSubscriptionTieredPackagePrice) = + price(Price.ofNewSubscriptionTieredPackage(newSubscriptionTieredPackage)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionTieredWithMinimumPrice: Price.NewSubscriptionTieredWithMinimumPrice - ) = - price( - Price.ofNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice - ) - ) + newSubscriptionTieredWithMinimum: Price.NewSubscriptionTieredWithMinimumPrice + ) = price(Price.ofNewSubscriptionTieredWithMinimum(newSubscriptionTieredWithMinimum)) /** The definition of a new price to create and add to the subscription. */ - fun price( - newSubscriptionUnitWithPercentPrice: Price.NewSubscriptionUnitWithPercentPrice - ) = - price( - Price.ofNewSubscriptionUnitWithPercentPrice(newSubscriptionUnitWithPercentPrice) - ) + fun price(newSubscriptionUnitWithPercent: Price.NewSubscriptionUnitWithPercentPrice) = + price(Price.ofNewSubscriptionUnitWithPercent(newSubscriptionUnitWithPercent)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionPackageWithAllocationPrice: + newSubscriptionPackageWithAllocation: Price.NewSubscriptionPackageWithAllocationPrice ) = price( - Price.ofNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice + Price.ofNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionTierWithProrationPrice: Price.NewSubscriptionTierWithProrationPrice - ) = - price( - Price.ofNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice - ) - ) + newSubscriptionTierWithProration: Price.NewSubscriptionTierWithProrationPrice + ) = price(Price.ofNewSubscriptionTierWithProration(newSubscriptionTierWithProration)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionUnitWithProrationPrice: Price.NewSubscriptionUnitWithProrationPrice - ) = - price( - Price.ofNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice - ) - ) + newSubscriptionUnitWithProration: Price.NewSubscriptionUnitWithProrationPrice + ) = price(Price.ofNewSubscriptionUnitWithProration(newSubscriptionUnitWithProration)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionGroupedAllocationPrice: Price.NewSubscriptionGroupedAllocationPrice - ) = - price( - Price.ofNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice - ) - ) + newSubscriptionGroupedAllocation: Price.NewSubscriptionGroupedAllocationPrice + ) = price(Price.ofNewSubscriptionGroupedAllocation(newSubscriptionGroupedAllocation)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionGroupedWithProratedMinimumPrice: + newSubscriptionGroupedWithProratedMinimum: Price.NewSubscriptionGroupedWithProratedMinimumPrice ) = price( - Price.ofNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice + Price.ofNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionBulkWithProrationPrice: Price.NewSubscriptionBulkWithProrationPrice - ) = - price( - Price.ofNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice - ) - ) + newSubscriptionBulkWithProration: Price.NewSubscriptionBulkWithProrationPrice + ) = price(Price.ofNewSubscriptionBulkWithProration(newSubscriptionBulkWithProration)) /** The id of the price to add to the subscription. */ fun priceId(priceId: String?) = priceId(JsonField.ofNullable(priceId)) @@ -5317,288 +5285,261 @@ constructor( @JsonSerialize(using = Price.Serializer::class) class Price private constructor( - private val newSubscriptionUnitPrice: NewSubscriptionUnitPrice? = null, - private val newSubscriptionPackagePrice: NewSubscriptionPackagePrice? = null, - private val newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice? = null, - private val newSubscriptionTieredPrice: NewSubscriptionTieredPrice? = null, - private val newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice? = null, - private val newSubscriptionBpsPrice: NewSubscriptionBpsPrice? = null, - private val newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice? = null, - private val newSubscriptionBulkPrice: NewSubscriptionBulkPrice? = null, - private val newSubscriptionThresholdTotalAmountPrice: + private val newSubscriptionUnit: NewSubscriptionUnitPrice? = null, + private val newSubscriptionPackage: NewSubscriptionPackagePrice? = null, + private val newSubscriptionMatrix: NewSubscriptionMatrixPrice? = null, + private val newSubscriptionTiered: NewSubscriptionTieredPrice? = null, + private val newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice? = null, + private val newSubscriptionBps: NewSubscriptionBpsPrice? = null, + private val newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice? = null, + private val newSubscriptionBulk: NewSubscriptionBulkPrice? = null, + private val newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice? = null, - private val newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice? = - null, - private val newSubscriptionTieredWithMinimumPrice: - NewSubscriptionTieredWithMinimumPrice? = + private val newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice? = null, + private val newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice? = null, - private val newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice? = - null, - private val newSubscriptionPackageWithAllocationPrice: + private val newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice? = null, + private val newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice? = null, - private val newSubscriptionTierWithProrationPrice: - NewSubscriptionTierWithProrationPrice? = + private val newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice? = null, - private val newSubscriptionUnitWithProrationPrice: - NewSubscriptionUnitWithProrationPrice? = + private val newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice? = null, - private val newSubscriptionGroupedAllocationPrice: - NewSubscriptionGroupedAllocationPrice? = + private val newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice? = null, - private val newSubscriptionGroupedWithProratedMinimumPrice: + private val newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice? = null, - private val newSubscriptionBulkWithProrationPrice: - NewSubscriptionBulkWithProrationPrice? = + private val newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice? = null, private val _json: JsonValue? = null, ) { - fun newSubscriptionUnitPrice(): Optional = - Optional.ofNullable(newSubscriptionUnitPrice) + fun newSubscriptionUnit(): Optional = + Optional.ofNullable(newSubscriptionUnit) - fun newSubscriptionPackagePrice(): Optional = - Optional.ofNullable(newSubscriptionPackagePrice) + fun newSubscriptionPackage(): Optional = + Optional.ofNullable(newSubscriptionPackage) - fun newSubscriptionMatrixPrice(): Optional = - Optional.ofNullable(newSubscriptionMatrixPrice) + fun newSubscriptionMatrix(): Optional = + Optional.ofNullable(newSubscriptionMatrix) - fun newSubscriptionTieredPrice(): Optional = - Optional.ofNullable(newSubscriptionTieredPrice) + fun newSubscriptionTiered(): Optional = + Optional.ofNullable(newSubscriptionTiered) - fun newSubscriptionTieredBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionTieredBpsPrice) + fun newSubscriptionTieredBps(): Optional = + Optional.ofNullable(newSubscriptionTieredBps) - fun newSubscriptionBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionBpsPrice) + fun newSubscriptionBps(): Optional = + Optional.ofNullable(newSubscriptionBps) - fun newSubscriptionBulkBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionBulkBpsPrice) + fun newSubscriptionBulkBps(): Optional = + Optional.ofNullable(newSubscriptionBulkBps) - fun newSubscriptionBulkPrice(): Optional = - Optional.ofNullable(newSubscriptionBulkPrice) + fun newSubscriptionBulk(): Optional = + Optional.ofNullable(newSubscriptionBulk) - fun newSubscriptionThresholdTotalAmountPrice(): + fun newSubscriptionThresholdTotalAmount(): Optional = - Optional.ofNullable(newSubscriptionThresholdTotalAmountPrice) + Optional.ofNullable(newSubscriptionThresholdTotalAmount) - fun newSubscriptionTieredPackagePrice(): Optional = - Optional.ofNullable(newSubscriptionTieredPackagePrice) + fun newSubscriptionTieredPackage(): Optional = + Optional.ofNullable(newSubscriptionTieredPackage) - fun newSubscriptionTieredWithMinimumPrice(): + fun newSubscriptionTieredWithMinimum(): Optional = - Optional.ofNullable(newSubscriptionTieredWithMinimumPrice) + Optional.ofNullable(newSubscriptionTieredWithMinimum) - fun newSubscriptionUnitWithPercentPrice(): - Optional = - Optional.ofNullable(newSubscriptionUnitWithPercentPrice) + fun newSubscriptionUnitWithPercent(): Optional = + Optional.ofNullable(newSubscriptionUnitWithPercent) - fun newSubscriptionPackageWithAllocationPrice(): + fun newSubscriptionPackageWithAllocation(): Optional = - Optional.ofNullable(newSubscriptionPackageWithAllocationPrice) + Optional.ofNullable(newSubscriptionPackageWithAllocation) - fun newSubscriptionTierWithProrationPrice(): + fun newSubscriptionTierWithProration(): Optional = - Optional.ofNullable(newSubscriptionTierWithProrationPrice) + Optional.ofNullable(newSubscriptionTierWithProration) - fun newSubscriptionUnitWithProrationPrice(): + fun newSubscriptionUnitWithProration(): Optional = - Optional.ofNullable(newSubscriptionUnitWithProrationPrice) + Optional.ofNullable(newSubscriptionUnitWithProration) - fun newSubscriptionGroupedAllocationPrice(): + fun newSubscriptionGroupedAllocation(): Optional = - Optional.ofNullable(newSubscriptionGroupedAllocationPrice) + Optional.ofNullable(newSubscriptionGroupedAllocation) - fun newSubscriptionGroupedWithProratedMinimumPrice(): + fun newSubscriptionGroupedWithProratedMinimum(): Optional = - Optional.ofNullable(newSubscriptionGroupedWithProratedMinimumPrice) + Optional.ofNullable(newSubscriptionGroupedWithProratedMinimum) - fun newSubscriptionBulkWithProrationPrice(): + fun newSubscriptionBulkWithProration(): Optional = - Optional.ofNullable(newSubscriptionBulkWithProrationPrice) + Optional.ofNullable(newSubscriptionBulkWithProration) - fun isNewSubscriptionUnitPrice(): Boolean = newSubscriptionUnitPrice != null + fun isNewSubscriptionUnit(): Boolean = newSubscriptionUnit != null - fun isNewSubscriptionPackagePrice(): Boolean = newSubscriptionPackagePrice != null + fun isNewSubscriptionPackage(): Boolean = newSubscriptionPackage != null - fun isNewSubscriptionMatrixPrice(): Boolean = newSubscriptionMatrixPrice != null + fun isNewSubscriptionMatrix(): Boolean = newSubscriptionMatrix != null - fun isNewSubscriptionTieredPrice(): Boolean = newSubscriptionTieredPrice != null + fun isNewSubscriptionTiered(): Boolean = newSubscriptionTiered != null - fun isNewSubscriptionTieredBpsPrice(): Boolean = newSubscriptionTieredBpsPrice != null + fun isNewSubscriptionTieredBps(): Boolean = newSubscriptionTieredBps != null - fun isNewSubscriptionBpsPrice(): Boolean = newSubscriptionBpsPrice != null + fun isNewSubscriptionBps(): Boolean = newSubscriptionBps != null - fun isNewSubscriptionBulkBpsPrice(): Boolean = newSubscriptionBulkBpsPrice != null + fun isNewSubscriptionBulkBps(): Boolean = newSubscriptionBulkBps != null - fun isNewSubscriptionBulkPrice(): Boolean = newSubscriptionBulkPrice != null + fun isNewSubscriptionBulk(): Boolean = newSubscriptionBulk != null - fun isNewSubscriptionThresholdTotalAmountPrice(): Boolean = - newSubscriptionThresholdTotalAmountPrice != null + fun isNewSubscriptionThresholdTotalAmount(): Boolean = + newSubscriptionThresholdTotalAmount != null - fun isNewSubscriptionTieredPackagePrice(): Boolean = - newSubscriptionTieredPackagePrice != null + fun isNewSubscriptionTieredPackage(): Boolean = newSubscriptionTieredPackage != null - fun isNewSubscriptionTieredWithMinimumPrice(): Boolean = - newSubscriptionTieredWithMinimumPrice != null + fun isNewSubscriptionTieredWithMinimum(): Boolean = + newSubscriptionTieredWithMinimum != null - fun isNewSubscriptionUnitWithPercentPrice(): Boolean = - newSubscriptionUnitWithPercentPrice != null + fun isNewSubscriptionUnitWithPercent(): Boolean = newSubscriptionUnitWithPercent != null - fun isNewSubscriptionPackageWithAllocationPrice(): Boolean = - newSubscriptionPackageWithAllocationPrice != null + fun isNewSubscriptionPackageWithAllocation(): Boolean = + newSubscriptionPackageWithAllocation != null - fun isNewSubscriptionTierWithProrationPrice(): Boolean = - newSubscriptionTierWithProrationPrice != null + fun isNewSubscriptionTierWithProration(): Boolean = + newSubscriptionTierWithProration != null - fun isNewSubscriptionUnitWithProrationPrice(): Boolean = - newSubscriptionUnitWithProrationPrice != null + fun isNewSubscriptionUnitWithProration(): Boolean = + newSubscriptionUnitWithProration != null - fun isNewSubscriptionGroupedAllocationPrice(): Boolean = - newSubscriptionGroupedAllocationPrice != null + fun isNewSubscriptionGroupedAllocation(): Boolean = + newSubscriptionGroupedAllocation != null - fun isNewSubscriptionGroupedWithProratedMinimumPrice(): Boolean = - newSubscriptionGroupedWithProratedMinimumPrice != null + fun isNewSubscriptionGroupedWithProratedMinimum(): Boolean = + newSubscriptionGroupedWithProratedMinimum != null - fun isNewSubscriptionBulkWithProrationPrice(): Boolean = - newSubscriptionBulkWithProrationPrice != null + fun isNewSubscriptionBulkWithProration(): Boolean = + newSubscriptionBulkWithProration != null - fun asNewSubscriptionUnitPrice(): NewSubscriptionUnitPrice = - newSubscriptionUnitPrice.getOrThrow("newSubscriptionUnitPrice") + fun asNewSubscriptionUnit(): NewSubscriptionUnitPrice = + newSubscriptionUnit.getOrThrow("newSubscriptionUnit") - fun asNewSubscriptionPackagePrice(): NewSubscriptionPackagePrice = - newSubscriptionPackagePrice.getOrThrow("newSubscriptionPackagePrice") + fun asNewSubscriptionPackage(): NewSubscriptionPackagePrice = + newSubscriptionPackage.getOrThrow("newSubscriptionPackage") - fun asNewSubscriptionMatrixPrice(): NewSubscriptionMatrixPrice = - newSubscriptionMatrixPrice.getOrThrow("newSubscriptionMatrixPrice") + fun asNewSubscriptionMatrix(): NewSubscriptionMatrixPrice = + newSubscriptionMatrix.getOrThrow("newSubscriptionMatrix") - fun asNewSubscriptionTieredPrice(): NewSubscriptionTieredPrice = - newSubscriptionTieredPrice.getOrThrow("newSubscriptionTieredPrice") + fun asNewSubscriptionTiered(): NewSubscriptionTieredPrice = + newSubscriptionTiered.getOrThrow("newSubscriptionTiered") - fun asNewSubscriptionTieredBpsPrice(): NewSubscriptionTieredBpsPrice = - newSubscriptionTieredBpsPrice.getOrThrow("newSubscriptionTieredBpsPrice") + fun asNewSubscriptionTieredBps(): NewSubscriptionTieredBpsPrice = + newSubscriptionTieredBps.getOrThrow("newSubscriptionTieredBps") - fun asNewSubscriptionBpsPrice(): NewSubscriptionBpsPrice = - newSubscriptionBpsPrice.getOrThrow("newSubscriptionBpsPrice") + fun asNewSubscriptionBps(): NewSubscriptionBpsPrice = + newSubscriptionBps.getOrThrow("newSubscriptionBps") - fun asNewSubscriptionBulkBpsPrice(): NewSubscriptionBulkBpsPrice = - newSubscriptionBulkBpsPrice.getOrThrow("newSubscriptionBulkBpsPrice") + fun asNewSubscriptionBulkBps(): NewSubscriptionBulkBpsPrice = + newSubscriptionBulkBps.getOrThrow("newSubscriptionBulkBps") - fun asNewSubscriptionBulkPrice(): NewSubscriptionBulkPrice = - newSubscriptionBulkPrice.getOrThrow("newSubscriptionBulkPrice") + fun asNewSubscriptionBulk(): NewSubscriptionBulkPrice = + newSubscriptionBulk.getOrThrow("newSubscriptionBulk") - fun asNewSubscriptionThresholdTotalAmountPrice(): - NewSubscriptionThresholdTotalAmountPrice = - newSubscriptionThresholdTotalAmountPrice.getOrThrow( - "newSubscriptionThresholdTotalAmountPrice" + fun asNewSubscriptionThresholdTotalAmount(): NewSubscriptionThresholdTotalAmountPrice = + newSubscriptionThresholdTotalAmount.getOrThrow( + "newSubscriptionThresholdTotalAmount" ) - fun asNewSubscriptionTieredPackagePrice(): NewSubscriptionTieredPackagePrice = - newSubscriptionTieredPackagePrice.getOrThrow("newSubscriptionTieredPackagePrice") + fun asNewSubscriptionTieredPackage(): NewSubscriptionTieredPackagePrice = + newSubscriptionTieredPackage.getOrThrow("newSubscriptionTieredPackage") - fun asNewSubscriptionTieredWithMinimumPrice(): NewSubscriptionTieredWithMinimumPrice = - newSubscriptionTieredWithMinimumPrice.getOrThrow( - "newSubscriptionTieredWithMinimumPrice" - ) + fun asNewSubscriptionTieredWithMinimum(): NewSubscriptionTieredWithMinimumPrice = + newSubscriptionTieredWithMinimum.getOrThrow("newSubscriptionTieredWithMinimum") - fun asNewSubscriptionUnitWithPercentPrice(): NewSubscriptionUnitWithPercentPrice = - newSubscriptionUnitWithPercentPrice.getOrThrow( - "newSubscriptionUnitWithPercentPrice" - ) + fun asNewSubscriptionUnitWithPercent(): NewSubscriptionUnitWithPercentPrice = + newSubscriptionUnitWithPercent.getOrThrow("newSubscriptionUnitWithPercent") - fun asNewSubscriptionPackageWithAllocationPrice(): + fun asNewSubscriptionPackageWithAllocation(): NewSubscriptionPackageWithAllocationPrice = - newSubscriptionPackageWithAllocationPrice.getOrThrow( - "newSubscriptionPackageWithAllocationPrice" + newSubscriptionPackageWithAllocation.getOrThrow( + "newSubscriptionPackageWithAllocation" ) - fun asNewSubscriptionTierWithProrationPrice(): NewSubscriptionTierWithProrationPrice = - newSubscriptionTierWithProrationPrice.getOrThrow( - "newSubscriptionTierWithProrationPrice" - ) + fun asNewSubscriptionTierWithProration(): NewSubscriptionTierWithProrationPrice = + newSubscriptionTierWithProration.getOrThrow("newSubscriptionTierWithProration") - fun asNewSubscriptionUnitWithProrationPrice(): NewSubscriptionUnitWithProrationPrice = - newSubscriptionUnitWithProrationPrice.getOrThrow( - "newSubscriptionUnitWithProrationPrice" - ) + fun asNewSubscriptionUnitWithProration(): NewSubscriptionUnitWithProrationPrice = + newSubscriptionUnitWithProration.getOrThrow("newSubscriptionUnitWithProration") - fun asNewSubscriptionGroupedAllocationPrice(): NewSubscriptionGroupedAllocationPrice = - newSubscriptionGroupedAllocationPrice.getOrThrow( - "newSubscriptionGroupedAllocationPrice" - ) + fun asNewSubscriptionGroupedAllocation(): NewSubscriptionGroupedAllocationPrice = + newSubscriptionGroupedAllocation.getOrThrow("newSubscriptionGroupedAllocation") - fun asNewSubscriptionGroupedWithProratedMinimumPrice(): + fun asNewSubscriptionGroupedWithProratedMinimum(): NewSubscriptionGroupedWithProratedMinimumPrice = - newSubscriptionGroupedWithProratedMinimumPrice.getOrThrow( - "newSubscriptionGroupedWithProratedMinimumPrice" + newSubscriptionGroupedWithProratedMinimum.getOrThrow( + "newSubscriptionGroupedWithProratedMinimum" ) - fun asNewSubscriptionBulkWithProrationPrice(): NewSubscriptionBulkWithProrationPrice = - newSubscriptionBulkWithProrationPrice.getOrThrow( - "newSubscriptionBulkWithProrationPrice" - ) + fun asNewSubscriptionBulkWithProration(): NewSubscriptionBulkWithProrationPrice = + newSubscriptionBulkWithProration.getOrThrow("newSubscriptionBulkWithProration") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newSubscriptionUnitPrice != null -> - visitor.visitNewSubscriptionUnitPrice(newSubscriptionUnitPrice) - newSubscriptionPackagePrice != null -> - visitor.visitNewSubscriptionPackagePrice(newSubscriptionPackagePrice) - newSubscriptionMatrixPrice != null -> - visitor.visitNewSubscriptionMatrixPrice(newSubscriptionMatrixPrice) - newSubscriptionTieredPrice != null -> - visitor.visitNewSubscriptionTieredPrice(newSubscriptionTieredPrice) - newSubscriptionTieredBpsPrice != null -> - visitor.visitNewSubscriptionTieredBpsPrice(newSubscriptionTieredBpsPrice) - newSubscriptionBpsPrice != null -> - visitor.visitNewSubscriptionBpsPrice(newSubscriptionBpsPrice) - newSubscriptionBulkBpsPrice != null -> - visitor.visitNewSubscriptionBulkBpsPrice(newSubscriptionBulkBpsPrice) - newSubscriptionBulkPrice != null -> - visitor.visitNewSubscriptionBulkPrice(newSubscriptionBulkPrice) - newSubscriptionThresholdTotalAmountPrice != null -> - visitor.visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice + newSubscriptionUnit != null -> + visitor.visitNewSubscriptionUnit(newSubscriptionUnit) + newSubscriptionPackage != null -> + visitor.visitNewSubscriptionPackage(newSubscriptionPackage) + newSubscriptionMatrix != null -> + visitor.visitNewSubscriptionMatrix(newSubscriptionMatrix) + newSubscriptionTiered != null -> + visitor.visitNewSubscriptionTiered(newSubscriptionTiered) + newSubscriptionTieredBps != null -> + visitor.visitNewSubscriptionTieredBps(newSubscriptionTieredBps) + newSubscriptionBps != null -> + visitor.visitNewSubscriptionBps(newSubscriptionBps) + newSubscriptionBulkBps != null -> + visitor.visitNewSubscriptionBulkBps(newSubscriptionBulkBps) + newSubscriptionBulk != null -> + visitor.visitNewSubscriptionBulk(newSubscriptionBulk) + newSubscriptionThresholdTotalAmount != null -> + visitor.visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount ) - newSubscriptionTieredPackagePrice != null -> - visitor.visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice + newSubscriptionTieredPackage != null -> + visitor.visitNewSubscriptionTieredPackage(newSubscriptionTieredPackage) + newSubscriptionTieredWithMinimum != null -> + visitor.visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum ) - newSubscriptionTieredWithMinimumPrice != null -> - visitor.visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice + newSubscriptionUnitWithPercent != null -> + visitor.visitNewSubscriptionUnitWithPercent(newSubscriptionUnitWithPercent) + newSubscriptionPackageWithAllocation != null -> + visitor.visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation ) - newSubscriptionUnitWithPercentPrice != null -> - visitor.visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice + newSubscriptionTierWithProration != null -> + visitor.visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration ) - newSubscriptionPackageWithAllocationPrice != null -> - visitor.visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice + newSubscriptionUnitWithProration != null -> + visitor.visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration ) - newSubscriptionTierWithProrationPrice != null -> - visitor.visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice + newSubscriptionGroupedAllocation != null -> + visitor.visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation ) - newSubscriptionUnitWithProrationPrice != null -> - visitor.visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice + newSubscriptionGroupedWithProratedMinimum != null -> + visitor.visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum ) - newSubscriptionGroupedAllocationPrice != null -> - visitor.visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice - ) - newSubscriptionGroupedWithProratedMinimumPrice != null -> - visitor.visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice - ) - newSubscriptionBulkWithProrationPrice != null -> - visitor.visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice + newSubscriptionBulkWithProration != null -> + visitor.visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration ) else -> visitor.unknown(_json) } @@ -5613,120 +5554,115 @@ constructor( accept( object : Visitor { - override fun visitNewSubscriptionUnitPrice( - newSubscriptionUnitPrice: NewSubscriptionUnitPrice + override fun visitNewSubscriptionUnit( + newSubscriptionUnit: NewSubscriptionUnitPrice ) { - newSubscriptionUnitPrice.validate() + newSubscriptionUnit.validate() } - override fun visitNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice + override fun visitNewSubscriptionPackage( + newSubscriptionPackage: NewSubscriptionPackagePrice ) { - newSubscriptionPackagePrice.validate() + newSubscriptionPackage.validate() } - override fun visitNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice + override fun visitNewSubscriptionMatrix( + newSubscriptionMatrix: NewSubscriptionMatrixPrice ) { - newSubscriptionMatrixPrice.validate() + newSubscriptionMatrix.validate() } - override fun visitNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice + override fun visitNewSubscriptionTiered( + newSubscriptionTiered: NewSubscriptionTieredPrice ) { - newSubscriptionTieredPrice.validate() + newSubscriptionTiered.validate() } - override fun visitNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice + override fun visitNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice ) { - newSubscriptionTieredBpsPrice.validate() + newSubscriptionTieredBps.validate() } - override fun visitNewSubscriptionBpsPrice( - newSubscriptionBpsPrice: NewSubscriptionBpsPrice + override fun visitNewSubscriptionBps( + newSubscriptionBps: NewSubscriptionBpsPrice ) { - newSubscriptionBpsPrice.validate() + newSubscriptionBps.validate() } - override fun visitNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice + override fun visitNewSubscriptionBulkBps( + newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice ) { - newSubscriptionBulkBpsPrice.validate() + newSubscriptionBulkBps.validate() } - override fun visitNewSubscriptionBulkPrice( - newSubscriptionBulkPrice: NewSubscriptionBulkPrice + override fun visitNewSubscriptionBulk( + newSubscriptionBulk: NewSubscriptionBulkPrice ) { - newSubscriptionBulkPrice.validate() + newSubscriptionBulk.validate() } - override fun visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: + override fun visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice ) { - newSubscriptionThresholdTotalAmountPrice.validate() + newSubscriptionThresholdTotalAmount.validate() } - override fun visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice + override fun visitNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice ) { - newSubscriptionTieredPackagePrice.validate() + newSubscriptionTieredPackage.validate() } - override fun visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: - NewSubscriptionTieredWithMinimumPrice + override fun visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice ) { - newSubscriptionTieredWithMinimumPrice.validate() + newSubscriptionTieredWithMinimum.validate() } - override fun visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice + override fun visitNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice ) { - newSubscriptionUnitWithPercentPrice.validate() + newSubscriptionUnitWithPercent.validate() } - override fun visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: + override fun visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ) { - newSubscriptionPackageWithAllocationPrice.validate() + newSubscriptionPackageWithAllocation.validate() } - override fun visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: - NewSubscriptionTierWithProrationPrice + override fun visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice ) { - newSubscriptionTierWithProrationPrice.validate() + newSubscriptionTierWithProration.validate() } - override fun visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: - NewSubscriptionUnitWithProrationPrice + override fun visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice ) { - newSubscriptionUnitWithProrationPrice.validate() + newSubscriptionUnitWithProration.validate() } - override fun visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: - NewSubscriptionGroupedAllocationPrice + override fun visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice ) { - newSubscriptionGroupedAllocationPrice.validate() + newSubscriptionGroupedAllocation.validate() } - override fun visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + override fun visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ) { - newSubscriptionGroupedWithProratedMinimumPrice.validate() + newSubscriptionGroupedWithProratedMinimum.validate() } - override fun visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: - NewSubscriptionBulkWithProrationPrice + override fun visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice ) { - newSubscriptionBulkWithProrationPrice.validate() + newSubscriptionBulkWithProration.validate() } } ) @@ -5738,49 +5674,46 @@ constructor( return true } - return /* spotless:off */ other is Price && newSubscriptionUnitPrice == other.newSubscriptionUnitPrice && newSubscriptionPackagePrice == other.newSubscriptionPackagePrice && newSubscriptionMatrixPrice == other.newSubscriptionMatrixPrice && newSubscriptionTieredPrice == other.newSubscriptionTieredPrice && newSubscriptionTieredBpsPrice == other.newSubscriptionTieredBpsPrice && newSubscriptionBpsPrice == other.newSubscriptionBpsPrice && newSubscriptionBulkBpsPrice == other.newSubscriptionBulkBpsPrice && newSubscriptionBulkPrice == other.newSubscriptionBulkPrice && newSubscriptionThresholdTotalAmountPrice == other.newSubscriptionThresholdTotalAmountPrice && newSubscriptionTieredPackagePrice == other.newSubscriptionTieredPackagePrice && newSubscriptionTieredWithMinimumPrice == other.newSubscriptionTieredWithMinimumPrice && newSubscriptionUnitWithPercentPrice == other.newSubscriptionUnitWithPercentPrice && newSubscriptionPackageWithAllocationPrice == other.newSubscriptionPackageWithAllocationPrice && newSubscriptionTierWithProrationPrice == other.newSubscriptionTierWithProrationPrice && newSubscriptionUnitWithProrationPrice == other.newSubscriptionUnitWithProrationPrice && newSubscriptionGroupedAllocationPrice == other.newSubscriptionGroupedAllocationPrice && newSubscriptionGroupedWithProratedMinimumPrice == other.newSubscriptionGroupedWithProratedMinimumPrice && newSubscriptionBulkWithProrationPrice == other.newSubscriptionBulkWithProrationPrice /* spotless:on */ + return /* spotless:off */ other is Price && newSubscriptionUnit == other.newSubscriptionUnit && newSubscriptionPackage == other.newSubscriptionPackage && newSubscriptionMatrix == other.newSubscriptionMatrix && newSubscriptionTiered == other.newSubscriptionTiered && newSubscriptionTieredBps == other.newSubscriptionTieredBps && newSubscriptionBps == other.newSubscriptionBps && newSubscriptionBulkBps == other.newSubscriptionBulkBps && newSubscriptionBulk == other.newSubscriptionBulk && newSubscriptionThresholdTotalAmount == other.newSubscriptionThresholdTotalAmount && newSubscriptionTieredPackage == other.newSubscriptionTieredPackage && newSubscriptionTieredWithMinimum == other.newSubscriptionTieredWithMinimum && newSubscriptionUnitWithPercent == other.newSubscriptionUnitWithPercent && newSubscriptionPackageWithAllocation == other.newSubscriptionPackageWithAllocation && newSubscriptionTierWithProration == other.newSubscriptionTierWithProration && newSubscriptionUnitWithProration == other.newSubscriptionUnitWithProration && newSubscriptionGroupedAllocation == other.newSubscriptionGroupedAllocation && newSubscriptionGroupedWithProratedMinimum == other.newSubscriptionGroupedWithProratedMinimum && newSubscriptionBulkWithProration == other.newSubscriptionBulkWithProration /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newSubscriptionUnitPrice, newSubscriptionPackagePrice, newSubscriptionMatrixPrice, newSubscriptionTieredPrice, newSubscriptionTieredBpsPrice, newSubscriptionBpsPrice, newSubscriptionBulkBpsPrice, newSubscriptionBulkPrice, newSubscriptionThresholdTotalAmountPrice, newSubscriptionTieredPackagePrice, newSubscriptionTieredWithMinimumPrice, newSubscriptionUnitWithPercentPrice, newSubscriptionPackageWithAllocationPrice, newSubscriptionTierWithProrationPrice, newSubscriptionUnitWithProrationPrice, newSubscriptionGroupedAllocationPrice, newSubscriptionGroupedWithProratedMinimumPrice, newSubscriptionBulkWithProrationPrice) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newSubscriptionUnit, newSubscriptionPackage, newSubscriptionMatrix, newSubscriptionTiered, newSubscriptionTieredBps, newSubscriptionBps, newSubscriptionBulkBps, newSubscriptionBulk, newSubscriptionThresholdTotalAmount, newSubscriptionTieredPackage, newSubscriptionTieredWithMinimum, newSubscriptionUnitWithPercent, newSubscriptionPackageWithAllocation, newSubscriptionTierWithProration, newSubscriptionUnitWithProration, newSubscriptionGroupedAllocation, newSubscriptionGroupedWithProratedMinimum, newSubscriptionBulkWithProration) /* spotless:on */ override fun toString(): String = when { - newSubscriptionUnitPrice != null -> - "Price{newSubscriptionUnitPrice=$newSubscriptionUnitPrice}" - newSubscriptionPackagePrice != null -> - "Price{newSubscriptionPackagePrice=$newSubscriptionPackagePrice}" - newSubscriptionMatrixPrice != null -> - "Price{newSubscriptionMatrixPrice=$newSubscriptionMatrixPrice}" - newSubscriptionTieredPrice != null -> - "Price{newSubscriptionTieredPrice=$newSubscriptionTieredPrice}" - newSubscriptionTieredBpsPrice != null -> - "Price{newSubscriptionTieredBpsPrice=$newSubscriptionTieredBpsPrice}" - newSubscriptionBpsPrice != null -> - "Price{newSubscriptionBpsPrice=$newSubscriptionBpsPrice}" - newSubscriptionBulkBpsPrice != null -> - "Price{newSubscriptionBulkBpsPrice=$newSubscriptionBulkBpsPrice}" - newSubscriptionBulkPrice != null -> - "Price{newSubscriptionBulkPrice=$newSubscriptionBulkPrice}" - newSubscriptionThresholdTotalAmountPrice != null -> - "Price{newSubscriptionThresholdTotalAmountPrice=$newSubscriptionThresholdTotalAmountPrice}" - newSubscriptionTieredPackagePrice != null -> - "Price{newSubscriptionTieredPackagePrice=$newSubscriptionTieredPackagePrice}" - newSubscriptionTieredWithMinimumPrice != null -> - "Price{newSubscriptionTieredWithMinimumPrice=$newSubscriptionTieredWithMinimumPrice}" - newSubscriptionUnitWithPercentPrice != null -> - "Price{newSubscriptionUnitWithPercentPrice=$newSubscriptionUnitWithPercentPrice}" - newSubscriptionPackageWithAllocationPrice != null -> - "Price{newSubscriptionPackageWithAllocationPrice=$newSubscriptionPackageWithAllocationPrice}" - newSubscriptionTierWithProrationPrice != null -> - "Price{newSubscriptionTierWithProrationPrice=$newSubscriptionTierWithProrationPrice}" - newSubscriptionUnitWithProrationPrice != null -> - "Price{newSubscriptionUnitWithProrationPrice=$newSubscriptionUnitWithProrationPrice}" - newSubscriptionGroupedAllocationPrice != null -> - "Price{newSubscriptionGroupedAllocationPrice=$newSubscriptionGroupedAllocationPrice}" - newSubscriptionGroupedWithProratedMinimumPrice != null -> - "Price{newSubscriptionGroupedWithProratedMinimumPrice=$newSubscriptionGroupedWithProratedMinimumPrice}" - newSubscriptionBulkWithProrationPrice != null -> - "Price{newSubscriptionBulkWithProrationPrice=$newSubscriptionBulkWithProrationPrice}" + newSubscriptionUnit != null -> "Price{newSubscriptionUnit=$newSubscriptionUnit}" + newSubscriptionPackage != null -> + "Price{newSubscriptionPackage=$newSubscriptionPackage}" + newSubscriptionMatrix != null -> + "Price{newSubscriptionMatrix=$newSubscriptionMatrix}" + newSubscriptionTiered != null -> + "Price{newSubscriptionTiered=$newSubscriptionTiered}" + newSubscriptionTieredBps != null -> + "Price{newSubscriptionTieredBps=$newSubscriptionTieredBps}" + newSubscriptionBps != null -> "Price{newSubscriptionBps=$newSubscriptionBps}" + newSubscriptionBulkBps != null -> + "Price{newSubscriptionBulkBps=$newSubscriptionBulkBps}" + newSubscriptionBulk != null -> "Price{newSubscriptionBulk=$newSubscriptionBulk}" + newSubscriptionThresholdTotalAmount != null -> + "Price{newSubscriptionThresholdTotalAmount=$newSubscriptionThresholdTotalAmount}" + newSubscriptionTieredPackage != null -> + "Price{newSubscriptionTieredPackage=$newSubscriptionTieredPackage}" + newSubscriptionTieredWithMinimum != null -> + "Price{newSubscriptionTieredWithMinimum=$newSubscriptionTieredWithMinimum}" + newSubscriptionUnitWithPercent != null -> + "Price{newSubscriptionUnitWithPercent=$newSubscriptionUnitWithPercent}" + newSubscriptionPackageWithAllocation != null -> + "Price{newSubscriptionPackageWithAllocation=$newSubscriptionPackageWithAllocation}" + newSubscriptionTierWithProration != null -> + "Price{newSubscriptionTierWithProration=$newSubscriptionTierWithProration}" + newSubscriptionUnitWithProration != null -> + "Price{newSubscriptionUnitWithProration=$newSubscriptionUnitWithProration}" + newSubscriptionGroupedAllocation != null -> + "Price{newSubscriptionGroupedAllocation=$newSubscriptionGroupedAllocation}" + newSubscriptionGroupedWithProratedMinimum != null -> + "Price{newSubscriptionGroupedWithProratedMinimum=$newSubscriptionGroupedWithProratedMinimum}" + newSubscriptionBulkWithProration != null -> + "Price{newSubscriptionBulkWithProration=$newSubscriptionBulkWithProration}" _json != null -> "Price{_unknown=$_json}" else -> throw IllegalStateException("Invalid Price") } @@ -5788,203 +5721,160 @@ constructor( companion object { @JvmStatic - fun ofNewSubscriptionUnitPrice(newSubscriptionUnitPrice: NewSubscriptionUnitPrice) = - Price(newSubscriptionUnitPrice = newSubscriptionUnitPrice) + fun ofNewSubscriptionUnit(newSubscriptionUnit: NewSubscriptionUnitPrice) = + Price(newSubscriptionUnit = newSubscriptionUnit) @JvmStatic - fun ofNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice - ) = Price(newSubscriptionPackagePrice = newSubscriptionPackagePrice) + fun ofNewSubscriptionPackage(newSubscriptionPackage: NewSubscriptionPackagePrice) = + Price(newSubscriptionPackage = newSubscriptionPackage) @JvmStatic - fun ofNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice - ) = Price(newSubscriptionMatrixPrice = newSubscriptionMatrixPrice) + fun ofNewSubscriptionMatrix(newSubscriptionMatrix: NewSubscriptionMatrixPrice) = + Price(newSubscriptionMatrix = newSubscriptionMatrix) @JvmStatic - fun ofNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice - ) = Price(newSubscriptionTieredPrice = newSubscriptionTieredPrice) + fun ofNewSubscriptionTiered(newSubscriptionTiered: NewSubscriptionTieredPrice) = + Price(newSubscriptionTiered = newSubscriptionTiered) @JvmStatic - fun ofNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice - ) = Price(newSubscriptionTieredBpsPrice = newSubscriptionTieredBpsPrice) + fun ofNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice + ) = Price(newSubscriptionTieredBps = newSubscriptionTieredBps) @JvmStatic - fun ofNewSubscriptionBpsPrice(newSubscriptionBpsPrice: NewSubscriptionBpsPrice) = - Price(newSubscriptionBpsPrice = newSubscriptionBpsPrice) + fun ofNewSubscriptionBps(newSubscriptionBps: NewSubscriptionBpsPrice) = + Price(newSubscriptionBps = newSubscriptionBps) @JvmStatic - fun ofNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice - ) = Price(newSubscriptionBulkBpsPrice = newSubscriptionBulkBpsPrice) + fun ofNewSubscriptionBulkBps(newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice) = + Price(newSubscriptionBulkBps = newSubscriptionBulkBps) @JvmStatic - fun ofNewSubscriptionBulkPrice(newSubscriptionBulkPrice: NewSubscriptionBulkPrice) = - Price(newSubscriptionBulkPrice = newSubscriptionBulkPrice) + fun ofNewSubscriptionBulk(newSubscriptionBulk: NewSubscriptionBulkPrice) = + Price(newSubscriptionBulk = newSubscriptionBulk) @JvmStatic - fun ofNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: - NewSubscriptionThresholdTotalAmountPrice - ) = - Price( - newSubscriptionThresholdTotalAmountPrice = - newSubscriptionThresholdTotalAmountPrice - ) + fun ofNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice + ) = Price(newSubscriptionThresholdTotalAmount = newSubscriptionThresholdTotalAmount) @JvmStatic - fun ofNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice - ) = Price(newSubscriptionTieredPackagePrice = newSubscriptionTieredPackagePrice) + fun ofNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice + ) = Price(newSubscriptionTieredPackage = newSubscriptionTieredPackage) @JvmStatic - fun ofNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: NewSubscriptionTieredWithMinimumPrice - ) = - Price( - newSubscriptionTieredWithMinimumPrice = - newSubscriptionTieredWithMinimumPrice - ) + fun ofNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice + ) = Price(newSubscriptionTieredWithMinimum = newSubscriptionTieredWithMinimum) @JvmStatic - fun ofNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice - ) = Price(newSubscriptionUnitWithPercentPrice = newSubscriptionUnitWithPercentPrice) + fun ofNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice + ) = Price(newSubscriptionUnitWithPercent = newSubscriptionUnitWithPercent) @JvmStatic - fun ofNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: - NewSubscriptionPackageWithAllocationPrice + fun ofNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ) = Price( - newSubscriptionPackageWithAllocationPrice = - newSubscriptionPackageWithAllocationPrice + newSubscriptionPackageWithAllocation = newSubscriptionPackageWithAllocation ) @JvmStatic - fun ofNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: NewSubscriptionTierWithProrationPrice - ) = - Price( - newSubscriptionTierWithProrationPrice = - newSubscriptionTierWithProrationPrice - ) + fun ofNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice + ) = Price(newSubscriptionTierWithProration = newSubscriptionTierWithProration) @JvmStatic - fun ofNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: NewSubscriptionUnitWithProrationPrice - ) = - Price( - newSubscriptionUnitWithProrationPrice = - newSubscriptionUnitWithProrationPrice - ) + fun ofNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice + ) = Price(newSubscriptionUnitWithProration = newSubscriptionUnitWithProration) @JvmStatic - fun ofNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: NewSubscriptionGroupedAllocationPrice - ) = - Price( - newSubscriptionGroupedAllocationPrice = - newSubscriptionGroupedAllocationPrice - ) + fun ofNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice + ) = Price(newSubscriptionGroupedAllocation = newSubscriptionGroupedAllocation) @JvmStatic - fun ofNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + fun ofNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ) = Price( - newSubscriptionGroupedWithProratedMinimumPrice = - newSubscriptionGroupedWithProratedMinimumPrice + newSubscriptionGroupedWithProratedMinimum = + newSubscriptionGroupedWithProratedMinimum ) @JvmStatic - fun ofNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: NewSubscriptionBulkWithProrationPrice - ) = - Price( - newSubscriptionBulkWithProrationPrice = - newSubscriptionBulkWithProrationPrice - ) + fun ofNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice + ) = Price(newSubscriptionBulkWithProration = newSubscriptionBulkWithProration) } interface Visitor { - fun visitNewSubscriptionUnitPrice( - newSubscriptionUnitPrice: NewSubscriptionUnitPrice - ): T + fun visitNewSubscriptionUnit(newSubscriptionUnit: NewSubscriptionUnitPrice): T - fun visitNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice + fun visitNewSubscriptionPackage( + newSubscriptionPackage: NewSubscriptionPackagePrice ): T - fun visitNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice - ): T + fun visitNewSubscriptionMatrix(newSubscriptionMatrix: NewSubscriptionMatrixPrice): T - fun visitNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice - ): T + fun visitNewSubscriptionTiered(newSubscriptionTiered: NewSubscriptionTieredPrice): T - fun visitNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice + fun visitNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice ): T - fun visitNewSubscriptionBpsPrice( - newSubscriptionBpsPrice: NewSubscriptionBpsPrice - ): T + fun visitNewSubscriptionBps(newSubscriptionBps: NewSubscriptionBpsPrice): T - fun visitNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice + fun visitNewSubscriptionBulkBps( + newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice ): T - fun visitNewSubscriptionBulkPrice( - newSubscriptionBulkPrice: NewSubscriptionBulkPrice - ): T + fun visitNewSubscriptionBulk(newSubscriptionBulk: NewSubscriptionBulkPrice): T - fun visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: - NewSubscriptionThresholdTotalAmountPrice + fun visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice ): T - fun visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice + fun visitNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice ): T - fun visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: NewSubscriptionTieredWithMinimumPrice + fun visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice ): T - fun visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice + fun visitNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice ): T - fun visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: - NewSubscriptionPackageWithAllocationPrice + fun visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ): T - fun visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: NewSubscriptionTierWithProrationPrice + fun visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice ): T - fun visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: NewSubscriptionUnitWithProrationPrice + fun visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice ): T - fun visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: NewSubscriptionGroupedAllocationPrice + fun visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice ): T - fun visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + fun visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ): T - fun visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: NewSubscriptionBulkWithProrationPrice + fun visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice ): T fun unknown(json: JsonValue?): T { @@ -6005,7 +5895,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionUnitPrice = it, _json = json) + return Price(newSubscriptionUnit = it, _json = json) } } "package" -> { @@ -6013,7 +5903,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionPackagePrice = it, _json = json) + return Price(newSubscriptionPackage = it, _json = json) } } "matrix" -> { @@ -6021,7 +5911,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionMatrixPrice = it, _json = json) + return Price(newSubscriptionMatrix = it, _json = json) } } "tiered" -> { @@ -6029,7 +5919,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionTieredPrice = it, _json = json) + return Price(newSubscriptionTiered = it, _json = json) } } "tiered_bps" -> { @@ -6037,7 +5927,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionTieredBpsPrice = it, _json = json) + return Price(newSubscriptionTieredBps = it, _json = json) } } "bps" -> { @@ -6045,7 +5935,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBpsPrice = it, _json = json) + return Price(newSubscriptionBps = it, _json = json) } } "bulk_bps" -> { @@ -6053,7 +5943,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBulkBpsPrice = it, _json = json) + return Price(newSubscriptionBulkBps = it, _json = json) } } "bulk" -> { @@ -6061,7 +5951,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBulkPrice = it, _json = json) + return Price(newSubscriptionBulk = it, _json = json) } } "threshold_total_amount" -> { @@ -6073,7 +5963,7 @@ constructor( } ?.let { return Price( - newSubscriptionThresholdTotalAmountPrice = it, + newSubscriptionThresholdTotalAmount = it, _json = json ) } @@ -6086,10 +5976,7 @@ constructor( it.validate() } ?.let { - return Price( - newSubscriptionTieredPackagePrice = it, - _json = json - ) + return Price(newSubscriptionTieredPackage = it, _json = json) } } "tiered_with_minimum" -> { @@ -6101,7 +5988,7 @@ constructor( } ?.let { return Price( - newSubscriptionTieredWithMinimumPrice = it, + newSubscriptionTieredWithMinimum = it, _json = json ) } @@ -6114,10 +6001,7 @@ constructor( it.validate() } ?.let { - return Price( - newSubscriptionUnitWithPercentPrice = it, - _json = json - ) + return Price(newSubscriptionUnitWithPercent = it, _json = json) } } "package_with_allocation" -> { @@ -6129,7 +6013,7 @@ constructor( } ?.let { return Price( - newSubscriptionPackageWithAllocationPrice = it, + newSubscriptionPackageWithAllocation = it, _json = json ) } @@ -6143,7 +6027,7 @@ constructor( } ?.let { return Price( - newSubscriptionTierWithProrationPrice = it, + newSubscriptionTierWithProration = it, _json = json ) } @@ -6157,7 +6041,7 @@ constructor( } ?.let { return Price( - newSubscriptionUnitWithProrationPrice = it, + newSubscriptionUnitWithProration = it, _json = json ) } @@ -6171,7 +6055,7 @@ constructor( } ?.let { return Price( - newSubscriptionGroupedAllocationPrice = it, + newSubscriptionGroupedAllocation = it, _json = json ) } @@ -6185,7 +6069,7 @@ constructor( } ?.let { return Price( - newSubscriptionGroupedWithProratedMinimumPrice = it, + newSubscriptionGroupedWithProratedMinimum = it, _json = json ) } @@ -6199,7 +6083,7 @@ constructor( } ?.let { return Price( - newSubscriptionBulkWithProrationPrice = it, + newSubscriptionBulkWithProration = it, _json = json ) } @@ -6218,44 +6102,42 @@ constructor( provider: SerializerProvider ) { when { - value.newSubscriptionUnitPrice != null -> - generator.writeObject(value.newSubscriptionUnitPrice) - value.newSubscriptionPackagePrice != null -> - generator.writeObject(value.newSubscriptionPackagePrice) - value.newSubscriptionMatrixPrice != null -> - generator.writeObject(value.newSubscriptionMatrixPrice) - value.newSubscriptionTieredPrice != null -> - generator.writeObject(value.newSubscriptionTieredPrice) - value.newSubscriptionTieredBpsPrice != null -> - generator.writeObject(value.newSubscriptionTieredBpsPrice) - value.newSubscriptionBpsPrice != null -> - generator.writeObject(value.newSubscriptionBpsPrice) - value.newSubscriptionBulkBpsPrice != null -> - generator.writeObject(value.newSubscriptionBulkBpsPrice) - value.newSubscriptionBulkPrice != null -> - generator.writeObject(value.newSubscriptionBulkPrice) - value.newSubscriptionThresholdTotalAmountPrice != null -> - generator.writeObject(value.newSubscriptionThresholdTotalAmountPrice) - value.newSubscriptionTieredPackagePrice != null -> - generator.writeObject(value.newSubscriptionTieredPackagePrice) - value.newSubscriptionTieredWithMinimumPrice != null -> - generator.writeObject(value.newSubscriptionTieredWithMinimumPrice) - value.newSubscriptionUnitWithPercentPrice != null -> - generator.writeObject(value.newSubscriptionUnitWithPercentPrice) - value.newSubscriptionPackageWithAllocationPrice != null -> - generator.writeObject(value.newSubscriptionPackageWithAllocationPrice) - value.newSubscriptionTierWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionTierWithProrationPrice) - value.newSubscriptionUnitWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionUnitWithProrationPrice) - value.newSubscriptionGroupedAllocationPrice != null -> - generator.writeObject(value.newSubscriptionGroupedAllocationPrice) - value.newSubscriptionGroupedWithProratedMinimumPrice != null -> - generator.writeObject( - value.newSubscriptionGroupedWithProratedMinimumPrice - ) - value.newSubscriptionBulkWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionBulkWithProrationPrice) + value.newSubscriptionUnit != null -> + generator.writeObject(value.newSubscriptionUnit) + value.newSubscriptionPackage != null -> + generator.writeObject(value.newSubscriptionPackage) + value.newSubscriptionMatrix != null -> + generator.writeObject(value.newSubscriptionMatrix) + value.newSubscriptionTiered != null -> + generator.writeObject(value.newSubscriptionTiered) + value.newSubscriptionTieredBps != null -> + generator.writeObject(value.newSubscriptionTieredBps) + value.newSubscriptionBps != null -> + generator.writeObject(value.newSubscriptionBps) + value.newSubscriptionBulkBps != null -> + generator.writeObject(value.newSubscriptionBulkBps) + value.newSubscriptionBulk != null -> + generator.writeObject(value.newSubscriptionBulk) + value.newSubscriptionThresholdTotalAmount != null -> + generator.writeObject(value.newSubscriptionThresholdTotalAmount) + value.newSubscriptionTieredPackage != null -> + generator.writeObject(value.newSubscriptionTieredPackage) + value.newSubscriptionTieredWithMinimum != null -> + generator.writeObject(value.newSubscriptionTieredWithMinimum) + value.newSubscriptionUnitWithPercent != null -> + generator.writeObject(value.newSubscriptionUnitWithPercent) + value.newSubscriptionPackageWithAllocation != null -> + generator.writeObject(value.newSubscriptionPackageWithAllocation) + value.newSubscriptionTierWithProration != null -> + generator.writeObject(value.newSubscriptionTierWithProration) + value.newSubscriptionUnitWithProration != null -> + generator.writeObject(value.newSubscriptionUnitWithProration) + value.newSubscriptionGroupedAllocation != null -> + generator.writeObject(value.newSubscriptionGroupedAllocation) + value.newSubscriptionGroupedWithProratedMinimum != null -> + generator.writeObject(value.newSubscriptionGroupedWithProratedMinimum) + value.newSubscriptionBulkWithProration != null -> + generator.writeObject(value.newSubscriptionBulkWithProration) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Price") } @@ -34871,131 +34753,99 @@ constructor( fun price(price: JsonField) = apply { this.price = price } /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionUnitPrice: Price.NewSubscriptionUnitPrice) = - price(Price.ofNewSubscriptionUnitPrice(newSubscriptionUnitPrice)) + fun price(newSubscriptionUnit: Price.NewSubscriptionUnitPrice) = + price(Price.ofNewSubscriptionUnit(newSubscriptionUnit)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionPackagePrice: Price.NewSubscriptionPackagePrice) = - price(Price.ofNewSubscriptionPackagePrice(newSubscriptionPackagePrice)) + fun price(newSubscriptionPackage: Price.NewSubscriptionPackagePrice) = + price(Price.ofNewSubscriptionPackage(newSubscriptionPackage)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionMatrixPrice: Price.NewSubscriptionMatrixPrice) = - price(Price.ofNewSubscriptionMatrixPrice(newSubscriptionMatrixPrice)) + fun price(newSubscriptionMatrix: Price.NewSubscriptionMatrixPrice) = + price(Price.ofNewSubscriptionMatrix(newSubscriptionMatrix)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredPrice: Price.NewSubscriptionTieredPrice) = - price(Price.ofNewSubscriptionTieredPrice(newSubscriptionTieredPrice)) + fun price(newSubscriptionTiered: Price.NewSubscriptionTieredPrice) = + price(Price.ofNewSubscriptionTiered(newSubscriptionTiered)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredBpsPrice: Price.NewSubscriptionTieredBpsPrice) = - price(Price.ofNewSubscriptionTieredBpsPrice(newSubscriptionTieredBpsPrice)) + fun price(newSubscriptionTieredBps: Price.NewSubscriptionTieredBpsPrice) = + price(Price.ofNewSubscriptionTieredBps(newSubscriptionTieredBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBpsPrice: Price.NewSubscriptionBpsPrice) = - price(Price.ofNewSubscriptionBpsPrice(newSubscriptionBpsPrice)) + fun price(newSubscriptionBps: Price.NewSubscriptionBpsPrice) = + price(Price.ofNewSubscriptionBps(newSubscriptionBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBulkBpsPrice: Price.NewSubscriptionBulkBpsPrice) = - price(Price.ofNewSubscriptionBulkBpsPrice(newSubscriptionBulkBpsPrice)) + fun price(newSubscriptionBulkBps: Price.NewSubscriptionBulkBpsPrice) = + price(Price.ofNewSubscriptionBulkBps(newSubscriptionBulkBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBulkPrice: Price.NewSubscriptionBulkPrice) = - price(Price.ofNewSubscriptionBulkPrice(newSubscriptionBulkPrice)) + fun price(newSubscriptionBulk: Price.NewSubscriptionBulkPrice) = + price(Price.ofNewSubscriptionBulk(newSubscriptionBulk)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionThresholdTotalAmountPrice: - Price.NewSubscriptionThresholdTotalAmountPrice + newSubscriptionThresholdTotalAmount: Price.NewSubscriptionThresholdTotalAmountPrice ) = price( - Price.ofNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice - ) + Price.ofNewSubscriptionThresholdTotalAmount(newSubscriptionThresholdTotalAmount) ) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredPackagePrice: Price.NewSubscriptionTieredPackagePrice) = - price(Price.ofNewSubscriptionTieredPackagePrice(newSubscriptionTieredPackagePrice)) + fun price(newSubscriptionTieredPackage: Price.NewSubscriptionTieredPackagePrice) = + price(Price.ofNewSubscriptionTieredPackage(newSubscriptionTieredPackage)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionTieredWithMinimumPrice: Price.NewSubscriptionTieredWithMinimumPrice - ) = - price( - Price.ofNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice - ) - ) + newSubscriptionTieredWithMinimum: Price.NewSubscriptionTieredWithMinimumPrice + ) = price(Price.ofNewSubscriptionTieredWithMinimum(newSubscriptionTieredWithMinimum)) /** The definition of a new price to create and add to the subscription. */ - fun price( - newSubscriptionUnitWithPercentPrice: Price.NewSubscriptionUnitWithPercentPrice - ) = - price( - Price.ofNewSubscriptionUnitWithPercentPrice(newSubscriptionUnitWithPercentPrice) - ) + fun price(newSubscriptionUnitWithPercent: Price.NewSubscriptionUnitWithPercentPrice) = + price(Price.ofNewSubscriptionUnitWithPercent(newSubscriptionUnitWithPercent)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionPackageWithAllocationPrice: + newSubscriptionPackageWithAllocation: Price.NewSubscriptionPackageWithAllocationPrice ) = price( - Price.ofNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice + Price.ofNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionTierWithProrationPrice: Price.NewSubscriptionTierWithProrationPrice - ) = - price( - Price.ofNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice - ) - ) + newSubscriptionTierWithProration: Price.NewSubscriptionTierWithProrationPrice + ) = price(Price.ofNewSubscriptionTierWithProration(newSubscriptionTierWithProration)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionUnitWithProrationPrice: Price.NewSubscriptionUnitWithProrationPrice - ) = - price( - Price.ofNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice - ) - ) + newSubscriptionUnitWithProration: Price.NewSubscriptionUnitWithProrationPrice + ) = price(Price.ofNewSubscriptionUnitWithProration(newSubscriptionUnitWithProration)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionGroupedAllocationPrice: Price.NewSubscriptionGroupedAllocationPrice - ) = - price( - Price.ofNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice - ) - ) + newSubscriptionGroupedAllocation: Price.NewSubscriptionGroupedAllocationPrice + ) = price(Price.ofNewSubscriptionGroupedAllocation(newSubscriptionGroupedAllocation)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionGroupedWithProratedMinimumPrice: + newSubscriptionGroupedWithProratedMinimum: Price.NewSubscriptionGroupedWithProratedMinimumPrice ) = price( - Price.ofNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice + Price.ofNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionBulkWithProrationPrice: Price.NewSubscriptionBulkWithProrationPrice - ) = - price( - Price.ofNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice - ) - ) + newSubscriptionBulkWithProration: Price.NewSubscriptionBulkWithProrationPrice + ) = price(Price.ofNewSubscriptionBulkWithProration(newSubscriptionBulkWithProration)) /** The id of the price to add to the subscription. */ fun priceId(priceId: String?) = priceId(JsonField.ofNullable(priceId)) @@ -35341,288 +35191,261 @@ constructor( @JsonSerialize(using = Price.Serializer::class) class Price private constructor( - private val newSubscriptionUnitPrice: NewSubscriptionUnitPrice? = null, - private val newSubscriptionPackagePrice: NewSubscriptionPackagePrice? = null, - private val newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice? = null, - private val newSubscriptionTieredPrice: NewSubscriptionTieredPrice? = null, - private val newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice? = null, - private val newSubscriptionBpsPrice: NewSubscriptionBpsPrice? = null, - private val newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice? = null, - private val newSubscriptionBulkPrice: NewSubscriptionBulkPrice? = null, - private val newSubscriptionThresholdTotalAmountPrice: + private val newSubscriptionUnit: NewSubscriptionUnitPrice? = null, + private val newSubscriptionPackage: NewSubscriptionPackagePrice? = null, + private val newSubscriptionMatrix: NewSubscriptionMatrixPrice? = null, + private val newSubscriptionTiered: NewSubscriptionTieredPrice? = null, + private val newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice? = null, + private val newSubscriptionBps: NewSubscriptionBpsPrice? = null, + private val newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice? = null, + private val newSubscriptionBulk: NewSubscriptionBulkPrice? = null, + private val newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice? = null, - private val newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice? = - null, - private val newSubscriptionTieredWithMinimumPrice: - NewSubscriptionTieredWithMinimumPrice? = + private val newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice? = null, + private val newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice? = null, - private val newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice? = - null, - private val newSubscriptionPackageWithAllocationPrice: + private val newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice? = null, + private val newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice? = null, - private val newSubscriptionTierWithProrationPrice: - NewSubscriptionTierWithProrationPrice? = + private val newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice? = null, - private val newSubscriptionUnitWithProrationPrice: - NewSubscriptionUnitWithProrationPrice? = + private val newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice? = null, - private val newSubscriptionGroupedAllocationPrice: - NewSubscriptionGroupedAllocationPrice? = + private val newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice? = null, - private val newSubscriptionGroupedWithProratedMinimumPrice: + private val newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice? = null, - private val newSubscriptionBulkWithProrationPrice: - NewSubscriptionBulkWithProrationPrice? = + private val newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice? = null, private val _json: JsonValue? = null, ) { - fun newSubscriptionUnitPrice(): Optional = - Optional.ofNullable(newSubscriptionUnitPrice) + fun newSubscriptionUnit(): Optional = + Optional.ofNullable(newSubscriptionUnit) - fun newSubscriptionPackagePrice(): Optional = - Optional.ofNullable(newSubscriptionPackagePrice) + fun newSubscriptionPackage(): Optional = + Optional.ofNullable(newSubscriptionPackage) - fun newSubscriptionMatrixPrice(): Optional = - Optional.ofNullable(newSubscriptionMatrixPrice) + fun newSubscriptionMatrix(): Optional = + Optional.ofNullable(newSubscriptionMatrix) - fun newSubscriptionTieredPrice(): Optional = - Optional.ofNullable(newSubscriptionTieredPrice) + fun newSubscriptionTiered(): Optional = + Optional.ofNullable(newSubscriptionTiered) - fun newSubscriptionTieredBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionTieredBpsPrice) + fun newSubscriptionTieredBps(): Optional = + Optional.ofNullable(newSubscriptionTieredBps) - fun newSubscriptionBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionBpsPrice) + fun newSubscriptionBps(): Optional = + Optional.ofNullable(newSubscriptionBps) - fun newSubscriptionBulkBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionBulkBpsPrice) + fun newSubscriptionBulkBps(): Optional = + Optional.ofNullable(newSubscriptionBulkBps) - fun newSubscriptionBulkPrice(): Optional = - Optional.ofNullable(newSubscriptionBulkPrice) + fun newSubscriptionBulk(): Optional = + Optional.ofNullable(newSubscriptionBulk) - fun newSubscriptionThresholdTotalAmountPrice(): + fun newSubscriptionThresholdTotalAmount(): Optional = - Optional.ofNullable(newSubscriptionThresholdTotalAmountPrice) + Optional.ofNullable(newSubscriptionThresholdTotalAmount) - fun newSubscriptionTieredPackagePrice(): Optional = - Optional.ofNullable(newSubscriptionTieredPackagePrice) + fun newSubscriptionTieredPackage(): Optional = + Optional.ofNullable(newSubscriptionTieredPackage) - fun newSubscriptionTieredWithMinimumPrice(): + fun newSubscriptionTieredWithMinimum(): Optional = - Optional.ofNullable(newSubscriptionTieredWithMinimumPrice) + Optional.ofNullable(newSubscriptionTieredWithMinimum) - fun newSubscriptionUnitWithPercentPrice(): - Optional = - Optional.ofNullable(newSubscriptionUnitWithPercentPrice) + fun newSubscriptionUnitWithPercent(): Optional = + Optional.ofNullable(newSubscriptionUnitWithPercent) - fun newSubscriptionPackageWithAllocationPrice(): + fun newSubscriptionPackageWithAllocation(): Optional = - Optional.ofNullable(newSubscriptionPackageWithAllocationPrice) + Optional.ofNullable(newSubscriptionPackageWithAllocation) - fun newSubscriptionTierWithProrationPrice(): + fun newSubscriptionTierWithProration(): Optional = - Optional.ofNullable(newSubscriptionTierWithProrationPrice) + Optional.ofNullable(newSubscriptionTierWithProration) - fun newSubscriptionUnitWithProrationPrice(): + fun newSubscriptionUnitWithProration(): Optional = - Optional.ofNullable(newSubscriptionUnitWithProrationPrice) + Optional.ofNullable(newSubscriptionUnitWithProration) - fun newSubscriptionGroupedAllocationPrice(): + fun newSubscriptionGroupedAllocation(): Optional = - Optional.ofNullable(newSubscriptionGroupedAllocationPrice) + Optional.ofNullable(newSubscriptionGroupedAllocation) - fun newSubscriptionGroupedWithProratedMinimumPrice(): + fun newSubscriptionGroupedWithProratedMinimum(): Optional = - Optional.ofNullable(newSubscriptionGroupedWithProratedMinimumPrice) + Optional.ofNullable(newSubscriptionGroupedWithProratedMinimum) - fun newSubscriptionBulkWithProrationPrice(): + fun newSubscriptionBulkWithProration(): Optional = - Optional.ofNullable(newSubscriptionBulkWithProrationPrice) + Optional.ofNullable(newSubscriptionBulkWithProration) - fun isNewSubscriptionUnitPrice(): Boolean = newSubscriptionUnitPrice != null + fun isNewSubscriptionUnit(): Boolean = newSubscriptionUnit != null - fun isNewSubscriptionPackagePrice(): Boolean = newSubscriptionPackagePrice != null + fun isNewSubscriptionPackage(): Boolean = newSubscriptionPackage != null - fun isNewSubscriptionMatrixPrice(): Boolean = newSubscriptionMatrixPrice != null + fun isNewSubscriptionMatrix(): Boolean = newSubscriptionMatrix != null - fun isNewSubscriptionTieredPrice(): Boolean = newSubscriptionTieredPrice != null + fun isNewSubscriptionTiered(): Boolean = newSubscriptionTiered != null - fun isNewSubscriptionTieredBpsPrice(): Boolean = newSubscriptionTieredBpsPrice != null + fun isNewSubscriptionTieredBps(): Boolean = newSubscriptionTieredBps != null - fun isNewSubscriptionBpsPrice(): Boolean = newSubscriptionBpsPrice != null + fun isNewSubscriptionBps(): Boolean = newSubscriptionBps != null - fun isNewSubscriptionBulkBpsPrice(): Boolean = newSubscriptionBulkBpsPrice != null + fun isNewSubscriptionBulkBps(): Boolean = newSubscriptionBulkBps != null - fun isNewSubscriptionBulkPrice(): Boolean = newSubscriptionBulkPrice != null + fun isNewSubscriptionBulk(): Boolean = newSubscriptionBulk != null - fun isNewSubscriptionThresholdTotalAmountPrice(): Boolean = - newSubscriptionThresholdTotalAmountPrice != null + fun isNewSubscriptionThresholdTotalAmount(): Boolean = + newSubscriptionThresholdTotalAmount != null - fun isNewSubscriptionTieredPackagePrice(): Boolean = - newSubscriptionTieredPackagePrice != null + fun isNewSubscriptionTieredPackage(): Boolean = newSubscriptionTieredPackage != null - fun isNewSubscriptionTieredWithMinimumPrice(): Boolean = - newSubscriptionTieredWithMinimumPrice != null + fun isNewSubscriptionTieredWithMinimum(): Boolean = + newSubscriptionTieredWithMinimum != null - fun isNewSubscriptionUnitWithPercentPrice(): Boolean = - newSubscriptionUnitWithPercentPrice != null + fun isNewSubscriptionUnitWithPercent(): Boolean = newSubscriptionUnitWithPercent != null - fun isNewSubscriptionPackageWithAllocationPrice(): Boolean = - newSubscriptionPackageWithAllocationPrice != null + fun isNewSubscriptionPackageWithAllocation(): Boolean = + newSubscriptionPackageWithAllocation != null - fun isNewSubscriptionTierWithProrationPrice(): Boolean = - newSubscriptionTierWithProrationPrice != null + fun isNewSubscriptionTierWithProration(): Boolean = + newSubscriptionTierWithProration != null - fun isNewSubscriptionUnitWithProrationPrice(): Boolean = - newSubscriptionUnitWithProrationPrice != null + fun isNewSubscriptionUnitWithProration(): Boolean = + newSubscriptionUnitWithProration != null - fun isNewSubscriptionGroupedAllocationPrice(): Boolean = - newSubscriptionGroupedAllocationPrice != null + fun isNewSubscriptionGroupedAllocation(): Boolean = + newSubscriptionGroupedAllocation != null - fun isNewSubscriptionGroupedWithProratedMinimumPrice(): Boolean = - newSubscriptionGroupedWithProratedMinimumPrice != null + fun isNewSubscriptionGroupedWithProratedMinimum(): Boolean = + newSubscriptionGroupedWithProratedMinimum != null - fun isNewSubscriptionBulkWithProrationPrice(): Boolean = - newSubscriptionBulkWithProrationPrice != null + fun isNewSubscriptionBulkWithProration(): Boolean = + newSubscriptionBulkWithProration != null - fun asNewSubscriptionUnitPrice(): NewSubscriptionUnitPrice = - newSubscriptionUnitPrice.getOrThrow("newSubscriptionUnitPrice") + fun asNewSubscriptionUnit(): NewSubscriptionUnitPrice = + newSubscriptionUnit.getOrThrow("newSubscriptionUnit") - fun asNewSubscriptionPackagePrice(): NewSubscriptionPackagePrice = - newSubscriptionPackagePrice.getOrThrow("newSubscriptionPackagePrice") + fun asNewSubscriptionPackage(): NewSubscriptionPackagePrice = + newSubscriptionPackage.getOrThrow("newSubscriptionPackage") - fun asNewSubscriptionMatrixPrice(): NewSubscriptionMatrixPrice = - newSubscriptionMatrixPrice.getOrThrow("newSubscriptionMatrixPrice") + fun asNewSubscriptionMatrix(): NewSubscriptionMatrixPrice = + newSubscriptionMatrix.getOrThrow("newSubscriptionMatrix") - fun asNewSubscriptionTieredPrice(): NewSubscriptionTieredPrice = - newSubscriptionTieredPrice.getOrThrow("newSubscriptionTieredPrice") + fun asNewSubscriptionTiered(): NewSubscriptionTieredPrice = + newSubscriptionTiered.getOrThrow("newSubscriptionTiered") - fun asNewSubscriptionTieredBpsPrice(): NewSubscriptionTieredBpsPrice = - newSubscriptionTieredBpsPrice.getOrThrow("newSubscriptionTieredBpsPrice") + fun asNewSubscriptionTieredBps(): NewSubscriptionTieredBpsPrice = + newSubscriptionTieredBps.getOrThrow("newSubscriptionTieredBps") - fun asNewSubscriptionBpsPrice(): NewSubscriptionBpsPrice = - newSubscriptionBpsPrice.getOrThrow("newSubscriptionBpsPrice") + fun asNewSubscriptionBps(): NewSubscriptionBpsPrice = + newSubscriptionBps.getOrThrow("newSubscriptionBps") - fun asNewSubscriptionBulkBpsPrice(): NewSubscriptionBulkBpsPrice = - newSubscriptionBulkBpsPrice.getOrThrow("newSubscriptionBulkBpsPrice") + fun asNewSubscriptionBulkBps(): NewSubscriptionBulkBpsPrice = + newSubscriptionBulkBps.getOrThrow("newSubscriptionBulkBps") - fun asNewSubscriptionBulkPrice(): NewSubscriptionBulkPrice = - newSubscriptionBulkPrice.getOrThrow("newSubscriptionBulkPrice") + fun asNewSubscriptionBulk(): NewSubscriptionBulkPrice = + newSubscriptionBulk.getOrThrow("newSubscriptionBulk") - fun asNewSubscriptionThresholdTotalAmountPrice(): - NewSubscriptionThresholdTotalAmountPrice = - newSubscriptionThresholdTotalAmountPrice.getOrThrow( - "newSubscriptionThresholdTotalAmountPrice" + fun asNewSubscriptionThresholdTotalAmount(): NewSubscriptionThresholdTotalAmountPrice = + newSubscriptionThresholdTotalAmount.getOrThrow( + "newSubscriptionThresholdTotalAmount" ) - fun asNewSubscriptionTieredPackagePrice(): NewSubscriptionTieredPackagePrice = - newSubscriptionTieredPackagePrice.getOrThrow("newSubscriptionTieredPackagePrice") + fun asNewSubscriptionTieredPackage(): NewSubscriptionTieredPackagePrice = + newSubscriptionTieredPackage.getOrThrow("newSubscriptionTieredPackage") - fun asNewSubscriptionTieredWithMinimumPrice(): NewSubscriptionTieredWithMinimumPrice = - newSubscriptionTieredWithMinimumPrice.getOrThrow( - "newSubscriptionTieredWithMinimumPrice" - ) + fun asNewSubscriptionTieredWithMinimum(): NewSubscriptionTieredWithMinimumPrice = + newSubscriptionTieredWithMinimum.getOrThrow("newSubscriptionTieredWithMinimum") - fun asNewSubscriptionUnitWithPercentPrice(): NewSubscriptionUnitWithPercentPrice = - newSubscriptionUnitWithPercentPrice.getOrThrow( - "newSubscriptionUnitWithPercentPrice" - ) + fun asNewSubscriptionUnitWithPercent(): NewSubscriptionUnitWithPercentPrice = + newSubscriptionUnitWithPercent.getOrThrow("newSubscriptionUnitWithPercent") - fun asNewSubscriptionPackageWithAllocationPrice(): + fun asNewSubscriptionPackageWithAllocation(): NewSubscriptionPackageWithAllocationPrice = - newSubscriptionPackageWithAllocationPrice.getOrThrow( - "newSubscriptionPackageWithAllocationPrice" + newSubscriptionPackageWithAllocation.getOrThrow( + "newSubscriptionPackageWithAllocation" ) - fun asNewSubscriptionTierWithProrationPrice(): NewSubscriptionTierWithProrationPrice = - newSubscriptionTierWithProrationPrice.getOrThrow( - "newSubscriptionTierWithProrationPrice" - ) + fun asNewSubscriptionTierWithProration(): NewSubscriptionTierWithProrationPrice = + newSubscriptionTierWithProration.getOrThrow("newSubscriptionTierWithProration") - fun asNewSubscriptionUnitWithProrationPrice(): NewSubscriptionUnitWithProrationPrice = - newSubscriptionUnitWithProrationPrice.getOrThrow( - "newSubscriptionUnitWithProrationPrice" - ) + fun asNewSubscriptionUnitWithProration(): NewSubscriptionUnitWithProrationPrice = + newSubscriptionUnitWithProration.getOrThrow("newSubscriptionUnitWithProration") - fun asNewSubscriptionGroupedAllocationPrice(): NewSubscriptionGroupedAllocationPrice = - newSubscriptionGroupedAllocationPrice.getOrThrow( - "newSubscriptionGroupedAllocationPrice" - ) + fun asNewSubscriptionGroupedAllocation(): NewSubscriptionGroupedAllocationPrice = + newSubscriptionGroupedAllocation.getOrThrow("newSubscriptionGroupedAllocation") - fun asNewSubscriptionGroupedWithProratedMinimumPrice(): + fun asNewSubscriptionGroupedWithProratedMinimum(): NewSubscriptionGroupedWithProratedMinimumPrice = - newSubscriptionGroupedWithProratedMinimumPrice.getOrThrow( - "newSubscriptionGroupedWithProratedMinimumPrice" + newSubscriptionGroupedWithProratedMinimum.getOrThrow( + "newSubscriptionGroupedWithProratedMinimum" ) - fun asNewSubscriptionBulkWithProrationPrice(): NewSubscriptionBulkWithProrationPrice = - newSubscriptionBulkWithProrationPrice.getOrThrow( - "newSubscriptionBulkWithProrationPrice" - ) + fun asNewSubscriptionBulkWithProration(): NewSubscriptionBulkWithProrationPrice = + newSubscriptionBulkWithProration.getOrThrow("newSubscriptionBulkWithProration") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newSubscriptionUnitPrice != null -> - visitor.visitNewSubscriptionUnitPrice(newSubscriptionUnitPrice) - newSubscriptionPackagePrice != null -> - visitor.visitNewSubscriptionPackagePrice(newSubscriptionPackagePrice) - newSubscriptionMatrixPrice != null -> - visitor.visitNewSubscriptionMatrixPrice(newSubscriptionMatrixPrice) - newSubscriptionTieredPrice != null -> - visitor.visitNewSubscriptionTieredPrice(newSubscriptionTieredPrice) - newSubscriptionTieredBpsPrice != null -> - visitor.visitNewSubscriptionTieredBpsPrice(newSubscriptionTieredBpsPrice) - newSubscriptionBpsPrice != null -> - visitor.visitNewSubscriptionBpsPrice(newSubscriptionBpsPrice) - newSubscriptionBulkBpsPrice != null -> - visitor.visitNewSubscriptionBulkBpsPrice(newSubscriptionBulkBpsPrice) - newSubscriptionBulkPrice != null -> - visitor.visitNewSubscriptionBulkPrice(newSubscriptionBulkPrice) - newSubscriptionThresholdTotalAmountPrice != null -> - visitor.visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice + newSubscriptionUnit != null -> + visitor.visitNewSubscriptionUnit(newSubscriptionUnit) + newSubscriptionPackage != null -> + visitor.visitNewSubscriptionPackage(newSubscriptionPackage) + newSubscriptionMatrix != null -> + visitor.visitNewSubscriptionMatrix(newSubscriptionMatrix) + newSubscriptionTiered != null -> + visitor.visitNewSubscriptionTiered(newSubscriptionTiered) + newSubscriptionTieredBps != null -> + visitor.visitNewSubscriptionTieredBps(newSubscriptionTieredBps) + newSubscriptionBps != null -> + visitor.visitNewSubscriptionBps(newSubscriptionBps) + newSubscriptionBulkBps != null -> + visitor.visitNewSubscriptionBulkBps(newSubscriptionBulkBps) + newSubscriptionBulk != null -> + visitor.visitNewSubscriptionBulk(newSubscriptionBulk) + newSubscriptionThresholdTotalAmount != null -> + visitor.visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount ) - newSubscriptionTieredPackagePrice != null -> - visitor.visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice + newSubscriptionTieredPackage != null -> + visitor.visitNewSubscriptionTieredPackage(newSubscriptionTieredPackage) + newSubscriptionTieredWithMinimum != null -> + visitor.visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum ) - newSubscriptionTieredWithMinimumPrice != null -> - visitor.visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice + newSubscriptionUnitWithPercent != null -> + visitor.visitNewSubscriptionUnitWithPercent(newSubscriptionUnitWithPercent) + newSubscriptionPackageWithAllocation != null -> + visitor.visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation ) - newSubscriptionUnitWithPercentPrice != null -> - visitor.visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice + newSubscriptionTierWithProration != null -> + visitor.visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration ) - newSubscriptionPackageWithAllocationPrice != null -> - visitor.visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice + newSubscriptionUnitWithProration != null -> + visitor.visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration ) - newSubscriptionTierWithProrationPrice != null -> - visitor.visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice + newSubscriptionGroupedAllocation != null -> + visitor.visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation ) - newSubscriptionUnitWithProrationPrice != null -> - visitor.visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice + newSubscriptionGroupedWithProratedMinimum != null -> + visitor.visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum ) - newSubscriptionGroupedAllocationPrice != null -> - visitor.visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice - ) - newSubscriptionGroupedWithProratedMinimumPrice != null -> - visitor.visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice - ) - newSubscriptionBulkWithProrationPrice != null -> - visitor.visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice + newSubscriptionBulkWithProration != null -> + visitor.visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration ) else -> visitor.unknown(_json) } @@ -35637,120 +35460,115 @@ constructor( accept( object : Visitor { - override fun visitNewSubscriptionUnitPrice( - newSubscriptionUnitPrice: NewSubscriptionUnitPrice + override fun visitNewSubscriptionUnit( + newSubscriptionUnit: NewSubscriptionUnitPrice ) { - newSubscriptionUnitPrice.validate() + newSubscriptionUnit.validate() } - override fun visitNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice + override fun visitNewSubscriptionPackage( + newSubscriptionPackage: NewSubscriptionPackagePrice ) { - newSubscriptionPackagePrice.validate() + newSubscriptionPackage.validate() } - override fun visitNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice + override fun visitNewSubscriptionMatrix( + newSubscriptionMatrix: NewSubscriptionMatrixPrice ) { - newSubscriptionMatrixPrice.validate() + newSubscriptionMatrix.validate() } - override fun visitNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice + override fun visitNewSubscriptionTiered( + newSubscriptionTiered: NewSubscriptionTieredPrice ) { - newSubscriptionTieredPrice.validate() + newSubscriptionTiered.validate() } - override fun visitNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice + override fun visitNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice ) { - newSubscriptionTieredBpsPrice.validate() + newSubscriptionTieredBps.validate() } - override fun visitNewSubscriptionBpsPrice( - newSubscriptionBpsPrice: NewSubscriptionBpsPrice + override fun visitNewSubscriptionBps( + newSubscriptionBps: NewSubscriptionBpsPrice ) { - newSubscriptionBpsPrice.validate() + newSubscriptionBps.validate() } - override fun visitNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice + override fun visitNewSubscriptionBulkBps( + newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice ) { - newSubscriptionBulkBpsPrice.validate() + newSubscriptionBulkBps.validate() } - override fun visitNewSubscriptionBulkPrice( - newSubscriptionBulkPrice: NewSubscriptionBulkPrice + override fun visitNewSubscriptionBulk( + newSubscriptionBulk: NewSubscriptionBulkPrice ) { - newSubscriptionBulkPrice.validate() + newSubscriptionBulk.validate() } - override fun visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: + override fun visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice ) { - newSubscriptionThresholdTotalAmountPrice.validate() + newSubscriptionThresholdTotalAmount.validate() } - override fun visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice + override fun visitNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice ) { - newSubscriptionTieredPackagePrice.validate() + newSubscriptionTieredPackage.validate() } - override fun visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: - NewSubscriptionTieredWithMinimumPrice + override fun visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice ) { - newSubscriptionTieredWithMinimumPrice.validate() + newSubscriptionTieredWithMinimum.validate() } - override fun visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice + override fun visitNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice ) { - newSubscriptionUnitWithPercentPrice.validate() + newSubscriptionUnitWithPercent.validate() } - override fun visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: + override fun visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ) { - newSubscriptionPackageWithAllocationPrice.validate() + newSubscriptionPackageWithAllocation.validate() } - override fun visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: - NewSubscriptionTierWithProrationPrice + override fun visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice ) { - newSubscriptionTierWithProrationPrice.validate() + newSubscriptionTierWithProration.validate() } - override fun visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: - NewSubscriptionUnitWithProrationPrice + override fun visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice ) { - newSubscriptionUnitWithProrationPrice.validate() + newSubscriptionUnitWithProration.validate() } - override fun visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: - NewSubscriptionGroupedAllocationPrice + override fun visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice ) { - newSubscriptionGroupedAllocationPrice.validate() + newSubscriptionGroupedAllocation.validate() } - override fun visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + override fun visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ) { - newSubscriptionGroupedWithProratedMinimumPrice.validate() + newSubscriptionGroupedWithProratedMinimum.validate() } - override fun visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: - NewSubscriptionBulkWithProrationPrice + override fun visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice ) { - newSubscriptionBulkWithProrationPrice.validate() + newSubscriptionBulkWithProration.validate() } } ) @@ -35762,49 +35580,46 @@ constructor( return true } - return /* spotless:off */ other is Price && newSubscriptionUnitPrice == other.newSubscriptionUnitPrice && newSubscriptionPackagePrice == other.newSubscriptionPackagePrice && newSubscriptionMatrixPrice == other.newSubscriptionMatrixPrice && newSubscriptionTieredPrice == other.newSubscriptionTieredPrice && newSubscriptionTieredBpsPrice == other.newSubscriptionTieredBpsPrice && newSubscriptionBpsPrice == other.newSubscriptionBpsPrice && newSubscriptionBulkBpsPrice == other.newSubscriptionBulkBpsPrice && newSubscriptionBulkPrice == other.newSubscriptionBulkPrice && newSubscriptionThresholdTotalAmountPrice == other.newSubscriptionThresholdTotalAmountPrice && newSubscriptionTieredPackagePrice == other.newSubscriptionTieredPackagePrice && newSubscriptionTieredWithMinimumPrice == other.newSubscriptionTieredWithMinimumPrice && newSubscriptionUnitWithPercentPrice == other.newSubscriptionUnitWithPercentPrice && newSubscriptionPackageWithAllocationPrice == other.newSubscriptionPackageWithAllocationPrice && newSubscriptionTierWithProrationPrice == other.newSubscriptionTierWithProrationPrice && newSubscriptionUnitWithProrationPrice == other.newSubscriptionUnitWithProrationPrice && newSubscriptionGroupedAllocationPrice == other.newSubscriptionGroupedAllocationPrice && newSubscriptionGroupedWithProratedMinimumPrice == other.newSubscriptionGroupedWithProratedMinimumPrice && newSubscriptionBulkWithProrationPrice == other.newSubscriptionBulkWithProrationPrice /* spotless:on */ + return /* spotless:off */ other is Price && newSubscriptionUnit == other.newSubscriptionUnit && newSubscriptionPackage == other.newSubscriptionPackage && newSubscriptionMatrix == other.newSubscriptionMatrix && newSubscriptionTiered == other.newSubscriptionTiered && newSubscriptionTieredBps == other.newSubscriptionTieredBps && newSubscriptionBps == other.newSubscriptionBps && newSubscriptionBulkBps == other.newSubscriptionBulkBps && newSubscriptionBulk == other.newSubscriptionBulk && newSubscriptionThresholdTotalAmount == other.newSubscriptionThresholdTotalAmount && newSubscriptionTieredPackage == other.newSubscriptionTieredPackage && newSubscriptionTieredWithMinimum == other.newSubscriptionTieredWithMinimum && newSubscriptionUnitWithPercent == other.newSubscriptionUnitWithPercent && newSubscriptionPackageWithAllocation == other.newSubscriptionPackageWithAllocation && newSubscriptionTierWithProration == other.newSubscriptionTierWithProration && newSubscriptionUnitWithProration == other.newSubscriptionUnitWithProration && newSubscriptionGroupedAllocation == other.newSubscriptionGroupedAllocation && newSubscriptionGroupedWithProratedMinimum == other.newSubscriptionGroupedWithProratedMinimum && newSubscriptionBulkWithProration == other.newSubscriptionBulkWithProration /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newSubscriptionUnitPrice, newSubscriptionPackagePrice, newSubscriptionMatrixPrice, newSubscriptionTieredPrice, newSubscriptionTieredBpsPrice, newSubscriptionBpsPrice, newSubscriptionBulkBpsPrice, newSubscriptionBulkPrice, newSubscriptionThresholdTotalAmountPrice, newSubscriptionTieredPackagePrice, newSubscriptionTieredWithMinimumPrice, newSubscriptionUnitWithPercentPrice, newSubscriptionPackageWithAllocationPrice, newSubscriptionTierWithProrationPrice, newSubscriptionUnitWithProrationPrice, newSubscriptionGroupedAllocationPrice, newSubscriptionGroupedWithProratedMinimumPrice, newSubscriptionBulkWithProrationPrice) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newSubscriptionUnit, newSubscriptionPackage, newSubscriptionMatrix, newSubscriptionTiered, newSubscriptionTieredBps, newSubscriptionBps, newSubscriptionBulkBps, newSubscriptionBulk, newSubscriptionThresholdTotalAmount, newSubscriptionTieredPackage, newSubscriptionTieredWithMinimum, newSubscriptionUnitWithPercent, newSubscriptionPackageWithAllocation, newSubscriptionTierWithProration, newSubscriptionUnitWithProration, newSubscriptionGroupedAllocation, newSubscriptionGroupedWithProratedMinimum, newSubscriptionBulkWithProration) /* spotless:on */ override fun toString(): String = when { - newSubscriptionUnitPrice != null -> - "Price{newSubscriptionUnitPrice=$newSubscriptionUnitPrice}" - newSubscriptionPackagePrice != null -> - "Price{newSubscriptionPackagePrice=$newSubscriptionPackagePrice}" - newSubscriptionMatrixPrice != null -> - "Price{newSubscriptionMatrixPrice=$newSubscriptionMatrixPrice}" - newSubscriptionTieredPrice != null -> - "Price{newSubscriptionTieredPrice=$newSubscriptionTieredPrice}" - newSubscriptionTieredBpsPrice != null -> - "Price{newSubscriptionTieredBpsPrice=$newSubscriptionTieredBpsPrice}" - newSubscriptionBpsPrice != null -> - "Price{newSubscriptionBpsPrice=$newSubscriptionBpsPrice}" - newSubscriptionBulkBpsPrice != null -> - "Price{newSubscriptionBulkBpsPrice=$newSubscriptionBulkBpsPrice}" - newSubscriptionBulkPrice != null -> - "Price{newSubscriptionBulkPrice=$newSubscriptionBulkPrice}" - newSubscriptionThresholdTotalAmountPrice != null -> - "Price{newSubscriptionThresholdTotalAmountPrice=$newSubscriptionThresholdTotalAmountPrice}" - newSubscriptionTieredPackagePrice != null -> - "Price{newSubscriptionTieredPackagePrice=$newSubscriptionTieredPackagePrice}" - newSubscriptionTieredWithMinimumPrice != null -> - "Price{newSubscriptionTieredWithMinimumPrice=$newSubscriptionTieredWithMinimumPrice}" - newSubscriptionUnitWithPercentPrice != null -> - "Price{newSubscriptionUnitWithPercentPrice=$newSubscriptionUnitWithPercentPrice}" - newSubscriptionPackageWithAllocationPrice != null -> - "Price{newSubscriptionPackageWithAllocationPrice=$newSubscriptionPackageWithAllocationPrice}" - newSubscriptionTierWithProrationPrice != null -> - "Price{newSubscriptionTierWithProrationPrice=$newSubscriptionTierWithProrationPrice}" - newSubscriptionUnitWithProrationPrice != null -> - "Price{newSubscriptionUnitWithProrationPrice=$newSubscriptionUnitWithProrationPrice}" - newSubscriptionGroupedAllocationPrice != null -> - "Price{newSubscriptionGroupedAllocationPrice=$newSubscriptionGroupedAllocationPrice}" - newSubscriptionGroupedWithProratedMinimumPrice != null -> - "Price{newSubscriptionGroupedWithProratedMinimumPrice=$newSubscriptionGroupedWithProratedMinimumPrice}" - newSubscriptionBulkWithProrationPrice != null -> - "Price{newSubscriptionBulkWithProrationPrice=$newSubscriptionBulkWithProrationPrice}" + newSubscriptionUnit != null -> "Price{newSubscriptionUnit=$newSubscriptionUnit}" + newSubscriptionPackage != null -> + "Price{newSubscriptionPackage=$newSubscriptionPackage}" + newSubscriptionMatrix != null -> + "Price{newSubscriptionMatrix=$newSubscriptionMatrix}" + newSubscriptionTiered != null -> + "Price{newSubscriptionTiered=$newSubscriptionTiered}" + newSubscriptionTieredBps != null -> + "Price{newSubscriptionTieredBps=$newSubscriptionTieredBps}" + newSubscriptionBps != null -> "Price{newSubscriptionBps=$newSubscriptionBps}" + newSubscriptionBulkBps != null -> + "Price{newSubscriptionBulkBps=$newSubscriptionBulkBps}" + newSubscriptionBulk != null -> "Price{newSubscriptionBulk=$newSubscriptionBulk}" + newSubscriptionThresholdTotalAmount != null -> + "Price{newSubscriptionThresholdTotalAmount=$newSubscriptionThresholdTotalAmount}" + newSubscriptionTieredPackage != null -> + "Price{newSubscriptionTieredPackage=$newSubscriptionTieredPackage}" + newSubscriptionTieredWithMinimum != null -> + "Price{newSubscriptionTieredWithMinimum=$newSubscriptionTieredWithMinimum}" + newSubscriptionUnitWithPercent != null -> + "Price{newSubscriptionUnitWithPercent=$newSubscriptionUnitWithPercent}" + newSubscriptionPackageWithAllocation != null -> + "Price{newSubscriptionPackageWithAllocation=$newSubscriptionPackageWithAllocation}" + newSubscriptionTierWithProration != null -> + "Price{newSubscriptionTierWithProration=$newSubscriptionTierWithProration}" + newSubscriptionUnitWithProration != null -> + "Price{newSubscriptionUnitWithProration=$newSubscriptionUnitWithProration}" + newSubscriptionGroupedAllocation != null -> + "Price{newSubscriptionGroupedAllocation=$newSubscriptionGroupedAllocation}" + newSubscriptionGroupedWithProratedMinimum != null -> + "Price{newSubscriptionGroupedWithProratedMinimum=$newSubscriptionGroupedWithProratedMinimum}" + newSubscriptionBulkWithProration != null -> + "Price{newSubscriptionBulkWithProration=$newSubscriptionBulkWithProration}" _json != null -> "Price{_unknown=$_json}" else -> throw IllegalStateException("Invalid Price") } @@ -35812,203 +35627,160 @@ constructor( companion object { @JvmStatic - fun ofNewSubscriptionUnitPrice(newSubscriptionUnitPrice: NewSubscriptionUnitPrice) = - Price(newSubscriptionUnitPrice = newSubscriptionUnitPrice) + fun ofNewSubscriptionUnit(newSubscriptionUnit: NewSubscriptionUnitPrice) = + Price(newSubscriptionUnit = newSubscriptionUnit) @JvmStatic - fun ofNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice - ) = Price(newSubscriptionPackagePrice = newSubscriptionPackagePrice) + fun ofNewSubscriptionPackage(newSubscriptionPackage: NewSubscriptionPackagePrice) = + Price(newSubscriptionPackage = newSubscriptionPackage) @JvmStatic - fun ofNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice - ) = Price(newSubscriptionMatrixPrice = newSubscriptionMatrixPrice) + fun ofNewSubscriptionMatrix(newSubscriptionMatrix: NewSubscriptionMatrixPrice) = + Price(newSubscriptionMatrix = newSubscriptionMatrix) @JvmStatic - fun ofNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice - ) = Price(newSubscriptionTieredPrice = newSubscriptionTieredPrice) + fun ofNewSubscriptionTiered(newSubscriptionTiered: NewSubscriptionTieredPrice) = + Price(newSubscriptionTiered = newSubscriptionTiered) @JvmStatic - fun ofNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice - ) = Price(newSubscriptionTieredBpsPrice = newSubscriptionTieredBpsPrice) + fun ofNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice + ) = Price(newSubscriptionTieredBps = newSubscriptionTieredBps) @JvmStatic - fun ofNewSubscriptionBpsPrice(newSubscriptionBpsPrice: NewSubscriptionBpsPrice) = - Price(newSubscriptionBpsPrice = newSubscriptionBpsPrice) + fun ofNewSubscriptionBps(newSubscriptionBps: NewSubscriptionBpsPrice) = + Price(newSubscriptionBps = newSubscriptionBps) @JvmStatic - fun ofNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice - ) = Price(newSubscriptionBulkBpsPrice = newSubscriptionBulkBpsPrice) + fun ofNewSubscriptionBulkBps(newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice) = + Price(newSubscriptionBulkBps = newSubscriptionBulkBps) @JvmStatic - fun ofNewSubscriptionBulkPrice(newSubscriptionBulkPrice: NewSubscriptionBulkPrice) = - Price(newSubscriptionBulkPrice = newSubscriptionBulkPrice) + fun ofNewSubscriptionBulk(newSubscriptionBulk: NewSubscriptionBulkPrice) = + Price(newSubscriptionBulk = newSubscriptionBulk) @JvmStatic - fun ofNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: - NewSubscriptionThresholdTotalAmountPrice - ) = - Price( - newSubscriptionThresholdTotalAmountPrice = - newSubscriptionThresholdTotalAmountPrice - ) + fun ofNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice + ) = Price(newSubscriptionThresholdTotalAmount = newSubscriptionThresholdTotalAmount) @JvmStatic - fun ofNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice - ) = Price(newSubscriptionTieredPackagePrice = newSubscriptionTieredPackagePrice) + fun ofNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice + ) = Price(newSubscriptionTieredPackage = newSubscriptionTieredPackage) @JvmStatic - fun ofNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: NewSubscriptionTieredWithMinimumPrice - ) = - Price( - newSubscriptionTieredWithMinimumPrice = - newSubscriptionTieredWithMinimumPrice - ) + fun ofNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice + ) = Price(newSubscriptionTieredWithMinimum = newSubscriptionTieredWithMinimum) @JvmStatic - fun ofNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice - ) = Price(newSubscriptionUnitWithPercentPrice = newSubscriptionUnitWithPercentPrice) + fun ofNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice + ) = Price(newSubscriptionUnitWithPercent = newSubscriptionUnitWithPercent) @JvmStatic - fun ofNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: - NewSubscriptionPackageWithAllocationPrice + fun ofNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ) = Price( - newSubscriptionPackageWithAllocationPrice = - newSubscriptionPackageWithAllocationPrice + newSubscriptionPackageWithAllocation = newSubscriptionPackageWithAllocation ) @JvmStatic - fun ofNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: NewSubscriptionTierWithProrationPrice - ) = - Price( - newSubscriptionTierWithProrationPrice = - newSubscriptionTierWithProrationPrice - ) + fun ofNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice + ) = Price(newSubscriptionTierWithProration = newSubscriptionTierWithProration) @JvmStatic - fun ofNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: NewSubscriptionUnitWithProrationPrice - ) = - Price( - newSubscriptionUnitWithProrationPrice = - newSubscriptionUnitWithProrationPrice - ) + fun ofNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice + ) = Price(newSubscriptionUnitWithProration = newSubscriptionUnitWithProration) @JvmStatic - fun ofNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: NewSubscriptionGroupedAllocationPrice - ) = - Price( - newSubscriptionGroupedAllocationPrice = - newSubscriptionGroupedAllocationPrice - ) + fun ofNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice + ) = Price(newSubscriptionGroupedAllocation = newSubscriptionGroupedAllocation) @JvmStatic - fun ofNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + fun ofNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ) = Price( - newSubscriptionGroupedWithProratedMinimumPrice = - newSubscriptionGroupedWithProratedMinimumPrice + newSubscriptionGroupedWithProratedMinimum = + newSubscriptionGroupedWithProratedMinimum ) @JvmStatic - fun ofNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: NewSubscriptionBulkWithProrationPrice - ) = - Price( - newSubscriptionBulkWithProrationPrice = - newSubscriptionBulkWithProrationPrice - ) + fun ofNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice + ) = Price(newSubscriptionBulkWithProration = newSubscriptionBulkWithProration) } interface Visitor { - fun visitNewSubscriptionUnitPrice( - newSubscriptionUnitPrice: NewSubscriptionUnitPrice - ): T + fun visitNewSubscriptionUnit(newSubscriptionUnit: NewSubscriptionUnitPrice): T - fun visitNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice + fun visitNewSubscriptionPackage( + newSubscriptionPackage: NewSubscriptionPackagePrice ): T - fun visitNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice - ): T + fun visitNewSubscriptionMatrix(newSubscriptionMatrix: NewSubscriptionMatrixPrice): T - fun visitNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice - ): T + fun visitNewSubscriptionTiered(newSubscriptionTiered: NewSubscriptionTieredPrice): T - fun visitNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice + fun visitNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice ): T - fun visitNewSubscriptionBpsPrice( - newSubscriptionBpsPrice: NewSubscriptionBpsPrice - ): T + fun visitNewSubscriptionBps(newSubscriptionBps: NewSubscriptionBpsPrice): T - fun visitNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice + fun visitNewSubscriptionBulkBps( + newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice ): T - fun visitNewSubscriptionBulkPrice( - newSubscriptionBulkPrice: NewSubscriptionBulkPrice - ): T + fun visitNewSubscriptionBulk(newSubscriptionBulk: NewSubscriptionBulkPrice): T - fun visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: - NewSubscriptionThresholdTotalAmountPrice + fun visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice ): T - fun visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice + fun visitNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice ): T - fun visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: NewSubscriptionTieredWithMinimumPrice + fun visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice ): T - fun visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice + fun visitNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice ): T - fun visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: - NewSubscriptionPackageWithAllocationPrice + fun visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ): T - fun visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: NewSubscriptionTierWithProrationPrice + fun visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice ): T - fun visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: NewSubscriptionUnitWithProrationPrice + fun visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice ): T - fun visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: NewSubscriptionGroupedAllocationPrice + fun visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice ): T - fun visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + fun visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ): T - fun visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: NewSubscriptionBulkWithProrationPrice + fun visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice ): T fun unknown(json: JsonValue?): T { @@ -36029,7 +35801,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionUnitPrice = it, _json = json) + return Price(newSubscriptionUnit = it, _json = json) } } "package" -> { @@ -36037,7 +35809,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionPackagePrice = it, _json = json) + return Price(newSubscriptionPackage = it, _json = json) } } "matrix" -> { @@ -36045,7 +35817,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionMatrixPrice = it, _json = json) + return Price(newSubscriptionMatrix = it, _json = json) } } "tiered" -> { @@ -36053,7 +35825,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionTieredPrice = it, _json = json) + return Price(newSubscriptionTiered = it, _json = json) } } "tiered_bps" -> { @@ -36061,7 +35833,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionTieredBpsPrice = it, _json = json) + return Price(newSubscriptionTieredBps = it, _json = json) } } "bps" -> { @@ -36069,7 +35841,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBpsPrice = it, _json = json) + return Price(newSubscriptionBps = it, _json = json) } } "bulk_bps" -> { @@ -36077,7 +35849,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBulkBpsPrice = it, _json = json) + return Price(newSubscriptionBulkBps = it, _json = json) } } "bulk" -> { @@ -36085,7 +35857,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBulkPrice = it, _json = json) + return Price(newSubscriptionBulk = it, _json = json) } } "threshold_total_amount" -> { @@ -36097,7 +35869,7 @@ constructor( } ?.let { return Price( - newSubscriptionThresholdTotalAmountPrice = it, + newSubscriptionThresholdTotalAmount = it, _json = json ) } @@ -36110,10 +35882,7 @@ constructor( it.validate() } ?.let { - return Price( - newSubscriptionTieredPackagePrice = it, - _json = json - ) + return Price(newSubscriptionTieredPackage = it, _json = json) } } "tiered_with_minimum" -> { @@ -36125,7 +35894,7 @@ constructor( } ?.let { return Price( - newSubscriptionTieredWithMinimumPrice = it, + newSubscriptionTieredWithMinimum = it, _json = json ) } @@ -36138,10 +35907,7 @@ constructor( it.validate() } ?.let { - return Price( - newSubscriptionUnitWithPercentPrice = it, - _json = json - ) + return Price(newSubscriptionUnitWithPercent = it, _json = json) } } "package_with_allocation" -> { @@ -36153,7 +35919,7 @@ constructor( } ?.let { return Price( - newSubscriptionPackageWithAllocationPrice = it, + newSubscriptionPackageWithAllocation = it, _json = json ) } @@ -36167,7 +35933,7 @@ constructor( } ?.let { return Price( - newSubscriptionTierWithProrationPrice = it, + newSubscriptionTierWithProration = it, _json = json ) } @@ -36181,7 +35947,7 @@ constructor( } ?.let { return Price( - newSubscriptionUnitWithProrationPrice = it, + newSubscriptionUnitWithProration = it, _json = json ) } @@ -36195,7 +35961,7 @@ constructor( } ?.let { return Price( - newSubscriptionGroupedAllocationPrice = it, + newSubscriptionGroupedAllocation = it, _json = json ) } @@ -36209,7 +35975,7 @@ constructor( } ?.let { return Price( - newSubscriptionGroupedWithProratedMinimumPrice = it, + newSubscriptionGroupedWithProratedMinimum = it, _json = json ) } @@ -36223,7 +35989,7 @@ constructor( } ?.let { return Price( - newSubscriptionBulkWithProrationPrice = it, + newSubscriptionBulkWithProration = it, _json = json ) } @@ -36242,44 +36008,42 @@ constructor( provider: SerializerProvider ) { when { - value.newSubscriptionUnitPrice != null -> - generator.writeObject(value.newSubscriptionUnitPrice) - value.newSubscriptionPackagePrice != null -> - generator.writeObject(value.newSubscriptionPackagePrice) - value.newSubscriptionMatrixPrice != null -> - generator.writeObject(value.newSubscriptionMatrixPrice) - value.newSubscriptionTieredPrice != null -> - generator.writeObject(value.newSubscriptionTieredPrice) - value.newSubscriptionTieredBpsPrice != null -> - generator.writeObject(value.newSubscriptionTieredBpsPrice) - value.newSubscriptionBpsPrice != null -> - generator.writeObject(value.newSubscriptionBpsPrice) - value.newSubscriptionBulkBpsPrice != null -> - generator.writeObject(value.newSubscriptionBulkBpsPrice) - value.newSubscriptionBulkPrice != null -> - generator.writeObject(value.newSubscriptionBulkPrice) - value.newSubscriptionThresholdTotalAmountPrice != null -> - generator.writeObject(value.newSubscriptionThresholdTotalAmountPrice) - value.newSubscriptionTieredPackagePrice != null -> - generator.writeObject(value.newSubscriptionTieredPackagePrice) - value.newSubscriptionTieredWithMinimumPrice != null -> - generator.writeObject(value.newSubscriptionTieredWithMinimumPrice) - value.newSubscriptionUnitWithPercentPrice != null -> - generator.writeObject(value.newSubscriptionUnitWithPercentPrice) - value.newSubscriptionPackageWithAllocationPrice != null -> - generator.writeObject(value.newSubscriptionPackageWithAllocationPrice) - value.newSubscriptionTierWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionTierWithProrationPrice) - value.newSubscriptionUnitWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionUnitWithProrationPrice) - value.newSubscriptionGroupedAllocationPrice != null -> - generator.writeObject(value.newSubscriptionGroupedAllocationPrice) - value.newSubscriptionGroupedWithProratedMinimumPrice != null -> - generator.writeObject( - value.newSubscriptionGroupedWithProratedMinimumPrice - ) - value.newSubscriptionBulkWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionBulkWithProrationPrice) + value.newSubscriptionUnit != null -> + generator.writeObject(value.newSubscriptionUnit) + value.newSubscriptionPackage != null -> + generator.writeObject(value.newSubscriptionPackage) + value.newSubscriptionMatrix != null -> + generator.writeObject(value.newSubscriptionMatrix) + value.newSubscriptionTiered != null -> + generator.writeObject(value.newSubscriptionTiered) + value.newSubscriptionTieredBps != null -> + generator.writeObject(value.newSubscriptionTieredBps) + value.newSubscriptionBps != null -> + generator.writeObject(value.newSubscriptionBps) + value.newSubscriptionBulkBps != null -> + generator.writeObject(value.newSubscriptionBulkBps) + value.newSubscriptionBulk != null -> + generator.writeObject(value.newSubscriptionBulk) + value.newSubscriptionThresholdTotalAmount != null -> + generator.writeObject(value.newSubscriptionThresholdTotalAmount) + value.newSubscriptionTieredPackage != null -> + generator.writeObject(value.newSubscriptionTieredPackage) + value.newSubscriptionTieredWithMinimum != null -> + generator.writeObject(value.newSubscriptionTieredWithMinimum) + value.newSubscriptionUnitWithPercent != null -> + generator.writeObject(value.newSubscriptionUnitWithPercent) + value.newSubscriptionPackageWithAllocation != null -> + generator.writeObject(value.newSubscriptionPackageWithAllocation) + value.newSubscriptionTierWithProration != null -> + generator.writeObject(value.newSubscriptionTierWithProration) + value.newSubscriptionUnitWithProration != null -> + generator.writeObject(value.newSubscriptionUnitWithProration) + value.newSubscriptionGroupedAllocation != null -> + generator.writeObject(value.newSubscriptionGroupedAllocation) + value.newSubscriptionGroupedWithProratedMinimum != null -> + generator.writeObject(value.newSubscriptionGroupedWithProratedMinimum) + value.newSubscriptionBulkWithProration != null -> + generator.writeObject(value.newSubscriptionBulkWithProration) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Price") } 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 e66bbb9f..6502c865 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 @@ -752,20 +752,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1109,20 +1105,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1202,66 +1198,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1275,30 +1265,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1310,21 +1296,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1332,44 +1316,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1389,7 +1362,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1397,10 +1370,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1408,7 +1378,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1416,7 +1386,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1424,7 +1394,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1441,16 +1411,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3417,46 +3383,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3470,22 +3427,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3497,19 +3448,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3517,28 +3465,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3558,7 +3500,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3566,10 +3508,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3577,7 +3516,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3594,12 +3533,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5678,7 +5614,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5706,7 +5642,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5720,7 +5656,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5734,8 +5670,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5749,7 +5684,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5763,7 +5698,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5777,7 +5712,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5791,8 +5726,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5806,8 +5741,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5821,8 +5756,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5836,8 +5771,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5851,8 +5786,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5866,8 +5801,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5881,8 +5816,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5896,8 +5831,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5911,8 +5846,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5926,8 +5861,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5941,8 +5876,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5956,8 +5891,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5971,8 +5906,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5986,8 +5921,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6001,8 +5936,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6016,8 +5951,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6031,8 +5966,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchCostsResponse.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchCostsResponse.kt index bb2ea4ea..d3be7fa8 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchCostsResponse.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchCostsResponse.kt @@ -433,7 +433,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, @@ -462,7 +462,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, @@ -476,7 +476,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, @@ -490,8 +490,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, @@ -505,7 +504,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, @@ -519,8 +518,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = - price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, @@ -534,7 +532,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, @@ -548,8 +546,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, @@ -563,8 +561,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, @@ -578,8 +576,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, @@ -593,8 +591,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -608,8 +606,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -623,8 +621,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, @@ -638,8 +636,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, @@ -653,8 +651,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, @@ -668,8 +666,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, @@ -683,8 +681,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, @@ -698,8 +696,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, @@ -713,8 +711,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -728,8 +726,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, @@ -743,8 +741,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, @@ -758,8 +756,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, @@ -773,8 +771,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, @@ -788,8 +786,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * Price's contributions for the timeframe, excluding any minimums and discounts. 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 9c04bd60..6981337c 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 @@ -815,8 +815,8 @@ constructor( * The start date of the price interval. This is the date that the price will start * billing on the subscription. */ - fun startDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - startDate(StartDate.ofBillingCycleRelativeDate(billingCycleRelativeDate)) + fun startDate(billingCycleRelative: BillingCycleRelativeDate) = + startDate(StartDate.ofBillingCycleRelative(billingCycleRelative)) /** The definition of a new allocation price to create and add to the subscription. */ fun allocationPrice(allocationPrice: AllocationPrice?) = @@ -900,8 +900,8 @@ constructor( * The end date of the price interval. This is the date that the price will stop billing * on the subscription. */ - fun endDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - endDate(EndDate.ofBillingCycleRelativeDate(billingCycleRelativeDate)) + fun endDate(billingCycleRelative: BillingCycleRelativeDate) = + endDate(EndDate.ofBillingCycleRelative(billingCycleRelative)) /** The external price id of the price to add to the subscription. */ fun externalPriceId(externalPriceId: String?) = @@ -1018,159 +1018,125 @@ constructor( fun price(price: JsonField) = apply { this.price = price } /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingUnitPrice: Price.NewFloatingUnitPrice) = - price(Price.ofNewFloatingUnitPrice(newFloatingUnitPrice)) + fun price(newFloatingUnit: Price.NewFloatingUnitPrice) = + price(Price.ofNewFloatingUnit(newFloatingUnit)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingPackagePrice: Price.NewFloatingPackagePrice) = - price(Price.ofNewFloatingPackagePrice(newFloatingPackagePrice)) + fun price(newFloatingPackage: Price.NewFloatingPackagePrice) = + price(Price.ofNewFloatingPackage(newFloatingPackage)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingMatrixPrice: Price.NewFloatingMatrixPrice) = - price(Price.ofNewFloatingMatrixPrice(newFloatingMatrixPrice)) + fun price(newFloatingMatrix: Price.NewFloatingMatrixPrice) = + price(Price.ofNewFloatingMatrix(newFloatingMatrix)) /** The definition of a new price to create and add to the subscription. */ - fun price( - newFloatingMatrixWithAllocationPrice: Price.NewFloatingMatrixWithAllocationPrice - ) = - price( - Price.ofNewFloatingMatrixWithAllocationPrice( - newFloatingMatrixWithAllocationPrice - ) - ) + fun price(newFloatingMatrixWithAllocation: Price.NewFloatingMatrixWithAllocationPrice) = + price(Price.ofNewFloatingMatrixWithAllocation(newFloatingMatrixWithAllocation)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingTieredPrice: Price.NewFloatingTieredPrice) = - price(Price.ofNewFloatingTieredPrice(newFloatingTieredPrice)) + fun price(newFloatingTiered: Price.NewFloatingTieredPrice) = + price(Price.ofNewFloatingTiered(newFloatingTiered)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingTieredBpsPrice: Price.NewFloatingTieredBpsPrice) = - price(Price.ofNewFloatingTieredBpsPrice(newFloatingTieredBpsPrice)) + fun price(newFloatingTieredBps: Price.NewFloatingTieredBpsPrice) = + price(Price.ofNewFloatingTieredBps(newFloatingTieredBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingBpsPrice: Price.NewFloatingBpsPrice) = - price(Price.ofNewFloatingBpsPrice(newFloatingBpsPrice)) + fun price(newFloatingBps: Price.NewFloatingBpsPrice) = + price(Price.ofNewFloatingBps(newFloatingBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingBulkBpsPrice: Price.NewFloatingBulkBpsPrice) = - price(Price.ofNewFloatingBulkBpsPrice(newFloatingBulkBpsPrice)) + fun price(newFloatingBulkBps: Price.NewFloatingBulkBpsPrice) = + price(Price.ofNewFloatingBulkBps(newFloatingBulkBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingBulkPrice: Price.NewFloatingBulkPrice) = - price(Price.ofNewFloatingBulkPrice(newFloatingBulkPrice)) + fun price(newFloatingBulk: Price.NewFloatingBulkPrice) = + price(Price.ofNewFloatingBulk(newFloatingBulk)) /** The definition of a new price to create and add to the subscription. */ - fun price( - newFloatingThresholdTotalAmountPrice: Price.NewFloatingThresholdTotalAmountPrice - ) = - price( - Price.ofNewFloatingThresholdTotalAmountPrice( - newFloatingThresholdTotalAmountPrice - ) - ) + fun price(newFloatingThresholdTotalAmount: Price.NewFloatingThresholdTotalAmountPrice) = + price(Price.ofNewFloatingThresholdTotalAmount(newFloatingThresholdTotalAmount)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingTieredPackagePrice: Price.NewFloatingTieredPackagePrice) = - price(Price.ofNewFloatingTieredPackagePrice(newFloatingTieredPackagePrice)) + fun price(newFloatingTieredPackage: Price.NewFloatingTieredPackagePrice) = + price(Price.ofNewFloatingTieredPackage(newFloatingTieredPackage)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingGroupedTieredPrice: Price.NewFloatingGroupedTieredPrice) = - price(Price.ofNewFloatingGroupedTieredPrice(newFloatingGroupedTieredPrice)) + fun price(newFloatingGroupedTiered: Price.NewFloatingGroupedTieredPrice) = + price(Price.ofNewFloatingGroupedTiered(newFloatingGroupedTiered)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingMaxGroupTieredPrice: Price.NewFloatingMaxGroupTieredPrice) = - price(Price.ofNewFloatingMaxGroupTieredPrice(newFloatingMaxGroupTieredPrice)) + fun price( + newFloatingMaxGroupTieredPackage: Price.NewFloatingMaxGroupTieredPackagePrice + ) = price(Price.ofNewFloatingMaxGroupTieredPackage(newFloatingMaxGroupTieredPackage)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingTieredWithMinimumPrice: Price.NewFloatingTieredWithMinimumPrice) = - price(Price.ofNewFloatingTieredWithMinimumPrice(newFloatingTieredWithMinimumPrice)) + fun price(newFloatingTieredWithMinimum: Price.NewFloatingTieredWithMinimumPrice) = + price(Price.ofNewFloatingTieredWithMinimum(newFloatingTieredWithMinimum)) /** The definition of a new price to create and add to the subscription. */ fun price( - newFloatingPackageWithAllocationPrice: Price.NewFloatingPackageWithAllocationPrice - ) = - price( - Price.ofNewFloatingPackageWithAllocationPrice( - newFloatingPackageWithAllocationPrice - ) - ) + newFloatingPackageWithAllocation: Price.NewFloatingPackageWithAllocationPrice + ) = price(Price.ofNewFloatingPackageWithAllocation(newFloatingPackageWithAllocation)) /** The definition of a new price to create and add to the subscription. */ fun price( - newFloatingTieredPackageWithMinimumPrice: - Price.NewFloatingTieredPackageWithMinimumPrice + newFloatingTieredPackageWithMinimum: Price.NewFloatingTieredPackageWithMinimumPrice ) = price( - Price.ofNewFloatingTieredPackageWithMinimumPrice( - newFloatingTieredPackageWithMinimumPrice - ) + Price.ofNewFloatingTieredPackageWithMinimum(newFloatingTieredPackageWithMinimum) ) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingUnitWithPercentPrice: Price.NewFloatingUnitWithPercentPrice) = - price(Price.ofNewFloatingUnitWithPercentPrice(newFloatingUnitWithPercentPrice)) + fun price(newFloatingUnitWithPercent: Price.NewFloatingUnitWithPercentPrice) = + price(Price.ofNewFloatingUnitWithPercent(newFloatingUnitWithPercent)) /** The definition of a new price to create and add to the subscription. */ - fun price( - newFloatingTieredWithProrationPrice: Price.NewFloatingTieredWithProrationPrice - ) = - price( - Price.ofNewFloatingTieredWithProrationPrice(newFloatingTieredWithProrationPrice) - ) + fun price(newFloatingTieredWithProration: Price.NewFloatingTieredWithProrationPrice) = + price(Price.ofNewFloatingTieredWithProration(newFloatingTieredWithProration)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingUnitWithProrationPrice: Price.NewFloatingUnitWithProrationPrice) = - price(Price.ofNewFloatingUnitWithProrationPrice(newFloatingUnitWithProrationPrice)) + fun price(newFloatingUnitWithProration: Price.NewFloatingUnitWithProrationPrice) = + price(Price.ofNewFloatingUnitWithProration(newFloatingUnitWithProration)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingGroupedAllocationPrice: Price.NewFloatingGroupedAllocationPrice) = - price(Price.ofNewFloatingGroupedAllocationPrice(newFloatingGroupedAllocationPrice)) + fun price(newFloatingGroupedAllocation: Price.NewFloatingGroupedAllocationPrice) = + price(Price.ofNewFloatingGroupedAllocation(newFloatingGroupedAllocation)) /** The definition of a new price to create and add to the subscription. */ fun price( - newFloatingGroupedWithProratedMinimumPrice: + newFloatingGroupedWithProratedMinimum: Price.NewFloatingGroupedWithProratedMinimumPrice ) = price( - Price.ofNewFloatingGroupedWithProratedMinimumPrice( - newFloatingGroupedWithProratedMinimumPrice + Price.ofNewFloatingGroupedWithProratedMinimum( + newFloatingGroupedWithProratedMinimum ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newFloatingGroupedWithMeteredMinimumPrice: + newFloatingGroupedWithMeteredMinimum: Price.NewFloatingGroupedWithMeteredMinimumPrice ) = price( - Price.ofNewFloatingGroupedWithMeteredMinimumPrice( - newFloatingGroupedWithMeteredMinimumPrice + Price.ofNewFloatingGroupedWithMeteredMinimum( + newFloatingGroupedWithMeteredMinimum ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newFloatingMatrixWithDisplayNamePrice: Price.NewFloatingMatrixWithDisplayNamePrice - ) = - price( - Price.ofNewFloatingMatrixWithDisplayNamePrice( - newFloatingMatrixWithDisplayNamePrice - ) - ) + newFloatingMatrixWithDisplayName: Price.NewFloatingMatrixWithDisplayNamePrice + ) = price(Price.ofNewFloatingMatrixWithDisplayName(newFloatingMatrixWithDisplayName)) /** The definition of a new price to create and add to the subscription. */ - fun price(newFloatingBulkWithProrationPrice: Price.NewFloatingBulkWithProrationPrice) = - price(Price.ofNewFloatingBulkWithProrationPrice(newFloatingBulkWithProrationPrice)) + fun price(newFloatingBulkWithProration: Price.NewFloatingBulkWithProrationPrice) = + price(Price.ofNewFloatingBulkWithProration(newFloatingBulkWithProration)) /** The definition of a new price to create and add to the subscription. */ - fun price( - newFloatingGroupedTieredPackagePrice: Price.NewFloatingGroupedTieredPackagePrice - ) = - price( - Price.ofNewFloatingGroupedTieredPackagePrice( - newFloatingGroupedTieredPackagePrice - ) - ) + fun price(newFloatingGroupedTieredPackage: Price.NewFloatingGroupedTieredPackagePrice) = + price(Price.ofNewFloatingGroupedTieredPackage(newFloatingGroupedTieredPackage)) /** The id of the price to add to the subscription. */ fun priceId(priceId: String?) = priceId(JsonField.ofNullable(priceId)) @@ -1225,31 +1191,31 @@ constructor( class StartDate private constructor( private val dateTime: OffsetDateTime? = null, - private val billingCycleRelativeDate: BillingCycleRelativeDate? = null, + private val billingCycleRelative: BillingCycleRelativeDate? = null, private val _json: JsonValue? = null, ) { fun dateTime(): Optional = Optional.ofNullable(dateTime) - fun billingCycleRelativeDate(): Optional = - Optional.ofNullable(billingCycleRelativeDate) + fun billingCycleRelative(): Optional = + Optional.ofNullable(billingCycleRelative) fun isDateTime(): Boolean = dateTime != null - fun isBillingCycleRelativeDate(): Boolean = billingCycleRelativeDate != null + fun isBillingCycleRelative(): Boolean = billingCycleRelative != null fun asDateTime(): OffsetDateTime = dateTime.getOrThrow("dateTime") - fun asBillingCycleRelativeDate(): BillingCycleRelativeDate = - billingCycleRelativeDate.getOrThrow("billingCycleRelativeDate") + fun asBillingCycleRelative(): BillingCycleRelativeDate = + billingCycleRelative.getOrThrow("billingCycleRelative") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { dateTime != null -> visitor.visitDateTime(dateTime) - billingCycleRelativeDate != null -> - visitor.visitBillingCycleRelativeDate(billingCycleRelativeDate) + billingCycleRelative != null -> + visitor.visitBillingCycleRelative(billingCycleRelative) else -> visitor.unknown(_json) } } @@ -1265,8 +1231,8 @@ constructor( object : Visitor { override fun visitDateTime(dateTime: OffsetDateTime) {} - override fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate + override fun visitBillingCycleRelative( + billingCycleRelative: BillingCycleRelativeDate ) {} } ) @@ -1278,16 +1244,16 @@ constructor( return true } - return /* spotless:off */ other is StartDate && dateTime == other.dateTime && billingCycleRelativeDate == other.billingCycleRelativeDate /* spotless:on */ + return /* spotless:off */ other is StartDate && dateTime == other.dateTime && billingCycleRelative == other.billingCycleRelative /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelativeDate) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelative) /* spotless:on */ override fun toString(): String = when { dateTime != null -> "StartDate{dateTime=$dateTime}" - billingCycleRelativeDate != null -> - "StartDate{billingCycleRelativeDate=$billingCycleRelativeDate}" + billingCycleRelative != null -> + "StartDate{billingCycleRelative=$billingCycleRelative}" _json != null -> "StartDate{_unknown=$_json}" else -> throw IllegalStateException("Invalid StartDate") } @@ -1297,17 +1263,15 @@ constructor( @JvmStatic fun ofDateTime(dateTime: OffsetDateTime) = StartDate(dateTime = dateTime) @JvmStatic - fun ofBillingCycleRelativeDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - StartDate(billingCycleRelativeDate = billingCycleRelativeDate) + fun ofBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate) = + StartDate(billingCycleRelative = billingCycleRelative) } interface Visitor { fun visitDateTime(dateTime: OffsetDateTime): T - fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate - ): T + fun visitBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown StartDate: $json") @@ -1323,7 +1287,7 @@ constructor( return StartDate(dateTime = it, _json = json) } tryDeserialize(node, jacksonTypeRef())?.let { - return StartDate(billingCycleRelativeDate = it, _json = json) + return StartDate(billingCycleRelative = it, _json = json) } return StartDate(_json = json) @@ -1339,8 +1303,8 @@ constructor( ) { when { value.dateTime != null -> generator.writeObject(value.dateTime) - value.billingCycleRelativeDate != null -> - generator.writeObject(value.billingCycleRelativeDate) + value.billingCycleRelative != null -> + generator.writeObject(value.billingCycleRelative) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid StartDate") } @@ -2412,31 +2376,31 @@ constructor( class EndDate private constructor( private val dateTime: OffsetDateTime? = null, - private val billingCycleRelativeDate: BillingCycleRelativeDate? = null, + private val billingCycleRelative: BillingCycleRelativeDate? = null, private val _json: JsonValue? = null, ) { fun dateTime(): Optional = Optional.ofNullable(dateTime) - fun billingCycleRelativeDate(): Optional = - Optional.ofNullable(billingCycleRelativeDate) + fun billingCycleRelative(): Optional = + Optional.ofNullable(billingCycleRelative) fun isDateTime(): Boolean = dateTime != null - fun isBillingCycleRelativeDate(): Boolean = billingCycleRelativeDate != null + fun isBillingCycleRelative(): Boolean = billingCycleRelative != null fun asDateTime(): OffsetDateTime = dateTime.getOrThrow("dateTime") - fun asBillingCycleRelativeDate(): BillingCycleRelativeDate = - billingCycleRelativeDate.getOrThrow("billingCycleRelativeDate") + fun asBillingCycleRelative(): BillingCycleRelativeDate = + billingCycleRelative.getOrThrow("billingCycleRelative") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { dateTime != null -> visitor.visitDateTime(dateTime) - billingCycleRelativeDate != null -> - visitor.visitBillingCycleRelativeDate(billingCycleRelativeDate) + billingCycleRelative != null -> + visitor.visitBillingCycleRelative(billingCycleRelative) else -> visitor.unknown(_json) } } @@ -2452,8 +2416,8 @@ constructor( object : Visitor { override fun visitDateTime(dateTime: OffsetDateTime) {} - override fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate + override fun visitBillingCycleRelative( + billingCycleRelative: BillingCycleRelativeDate ) {} } ) @@ -2465,16 +2429,16 @@ constructor( return true } - return /* spotless:off */ other is EndDate && dateTime == other.dateTime && billingCycleRelativeDate == other.billingCycleRelativeDate /* spotless:on */ + return /* spotless:off */ other is EndDate && dateTime == other.dateTime && billingCycleRelative == other.billingCycleRelative /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelativeDate) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelative) /* spotless:on */ override fun toString(): String = when { dateTime != null -> "EndDate{dateTime=$dateTime}" - billingCycleRelativeDate != null -> - "EndDate{billingCycleRelativeDate=$billingCycleRelativeDate}" + billingCycleRelative != null -> + "EndDate{billingCycleRelative=$billingCycleRelative}" _json != null -> "EndDate{_unknown=$_json}" else -> throw IllegalStateException("Invalid EndDate") } @@ -2484,17 +2448,15 @@ constructor( @JvmStatic fun ofDateTime(dateTime: OffsetDateTime) = EndDate(dateTime = dateTime) @JvmStatic - fun ofBillingCycleRelativeDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - EndDate(billingCycleRelativeDate = billingCycleRelativeDate) + fun ofBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate) = + EndDate(billingCycleRelative = billingCycleRelative) } interface Visitor { fun visitDateTime(dateTime: OffsetDateTime): T - fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate - ): T + fun visitBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown EndDate: $json") @@ -2510,7 +2472,7 @@ constructor( return EndDate(dateTime = it, _json = json) } tryDeserialize(node, jacksonTypeRef())?.let { - return EndDate(billingCycleRelativeDate = it, _json = json) + return EndDate(billingCycleRelative = it, _json = json) } return EndDate(_json = json) @@ -2526,8 +2488,8 @@ constructor( ) { when { value.dateTime != null -> generator.writeObject(value.dateTime) - value.billingCycleRelativeDate != null -> - generator.writeObject(value.billingCycleRelativeDate) + value.billingCycleRelative != null -> + generator.writeObject(value.billingCycleRelative) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid EndDate") } @@ -2668,380 +2630,335 @@ constructor( @JsonSerialize(using = Price.Serializer::class) class Price private constructor( - private val newFloatingUnitPrice: NewFloatingUnitPrice? = null, - private val newFloatingPackagePrice: NewFloatingPackagePrice? = null, - private val newFloatingMatrixPrice: NewFloatingMatrixPrice? = null, - private val newFloatingMatrixWithAllocationPrice: - NewFloatingMatrixWithAllocationPrice? = + private val newFloatingUnit: NewFloatingUnitPrice? = null, + private val newFloatingPackage: NewFloatingPackagePrice? = null, + private val newFloatingMatrix: NewFloatingMatrixPrice? = null, + private val newFloatingMatrixWithAllocation: NewFloatingMatrixWithAllocationPrice? = null, - private val newFloatingTieredPrice: NewFloatingTieredPrice? = null, - private val newFloatingTieredBpsPrice: NewFloatingTieredBpsPrice? = null, - private val newFloatingBpsPrice: NewFloatingBpsPrice? = null, - private val newFloatingBulkBpsPrice: NewFloatingBulkBpsPrice? = null, - private val newFloatingBulkPrice: NewFloatingBulkPrice? = null, - private val newFloatingThresholdTotalAmountPrice: - NewFloatingThresholdTotalAmountPrice? = + private val newFloatingTiered: NewFloatingTieredPrice? = null, + private val newFloatingTieredBps: NewFloatingTieredBpsPrice? = null, + private val newFloatingBps: NewFloatingBpsPrice? = null, + private val newFloatingBulkBps: NewFloatingBulkBpsPrice? = null, + private val newFloatingBulk: NewFloatingBulkPrice? = null, + private val newFloatingThresholdTotalAmount: NewFloatingThresholdTotalAmountPrice? = null, - private val newFloatingTieredPackagePrice: NewFloatingTieredPackagePrice? = null, - private val newFloatingGroupedTieredPrice: NewFloatingGroupedTieredPrice? = null, - private val newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice? = null, - private val newFloatingTieredWithMinimumPrice: NewFloatingTieredWithMinimumPrice? = + private val newFloatingTieredPackage: NewFloatingTieredPackagePrice? = null, + private val newFloatingGroupedTiered: NewFloatingGroupedTieredPrice? = null, + private val newFloatingMaxGroupTieredPackage: NewFloatingMaxGroupTieredPackagePrice? = null, - private val newFloatingPackageWithAllocationPrice: - NewFloatingPackageWithAllocationPrice? = + private val newFloatingTieredWithMinimum: NewFloatingTieredWithMinimumPrice? = null, + private val newFloatingPackageWithAllocation: NewFloatingPackageWithAllocationPrice? = null, - private val newFloatingTieredPackageWithMinimumPrice: + private val newFloatingTieredPackageWithMinimum: NewFloatingTieredPackageWithMinimumPrice? = null, - private val newFloatingUnitWithPercentPrice: NewFloatingUnitWithPercentPrice? = null, - private val newFloatingTieredWithProrationPrice: NewFloatingTieredWithProrationPrice? = - null, - private val newFloatingUnitWithProrationPrice: NewFloatingUnitWithProrationPrice? = - null, - private val newFloatingGroupedAllocationPrice: NewFloatingGroupedAllocationPrice? = - null, - private val newFloatingGroupedWithProratedMinimumPrice: + private val newFloatingUnitWithPercent: NewFloatingUnitWithPercentPrice? = null, + private val newFloatingTieredWithProration: NewFloatingTieredWithProrationPrice? = null, + private val newFloatingUnitWithProration: NewFloatingUnitWithProrationPrice? = null, + private val newFloatingGroupedAllocation: NewFloatingGroupedAllocationPrice? = null, + private val newFloatingGroupedWithProratedMinimum: NewFloatingGroupedWithProratedMinimumPrice? = null, - private val newFloatingGroupedWithMeteredMinimumPrice: + private val newFloatingGroupedWithMeteredMinimum: NewFloatingGroupedWithMeteredMinimumPrice? = null, - private val newFloatingMatrixWithDisplayNamePrice: - NewFloatingMatrixWithDisplayNamePrice? = + private val newFloatingMatrixWithDisplayName: NewFloatingMatrixWithDisplayNamePrice? = null, - private val newFloatingBulkWithProrationPrice: NewFloatingBulkWithProrationPrice? = - null, - private val newFloatingGroupedTieredPackagePrice: - NewFloatingGroupedTieredPackagePrice? = + private val newFloatingBulkWithProration: NewFloatingBulkWithProrationPrice? = null, + private val newFloatingGroupedTieredPackage: NewFloatingGroupedTieredPackagePrice? = null, private val _json: JsonValue? = null, ) { - fun newFloatingUnitPrice(): Optional = - Optional.ofNullable(newFloatingUnitPrice) + fun newFloatingUnit(): Optional = + Optional.ofNullable(newFloatingUnit) - fun newFloatingPackagePrice(): Optional = - Optional.ofNullable(newFloatingPackagePrice) + fun newFloatingPackage(): Optional = + Optional.ofNullable(newFloatingPackage) - fun newFloatingMatrixPrice(): Optional = - Optional.ofNullable(newFloatingMatrixPrice) + fun newFloatingMatrix(): Optional = + Optional.ofNullable(newFloatingMatrix) - fun newFloatingMatrixWithAllocationPrice(): - Optional = - Optional.ofNullable(newFloatingMatrixWithAllocationPrice) + fun newFloatingMatrixWithAllocation(): Optional = + Optional.ofNullable(newFloatingMatrixWithAllocation) - fun newFloatingTieredPrice(): Optional = - Optional.ofNullable(newFloatingTieredPrice) + fun newFloatingTiered(): Optional = + Optional.ofNullable(newFloatingTiered) - fun newFloatingTieredBpsPrice(): Optional = - Optional.ofNullable(newFloatingTieredBpsPrice) + fun newFloatingTieredBps(): Optional = + Optional.ofNullable(newFloatingTieredBps) - fun newFloatingBpsPrice(): Optional = - Optional.ofNullable(newFloatingBpsPrice) + fun newFloatingBps(): Optional = + Optional.ofNullable(newFloatingBps) - fun newFloatingBulkBpsPrice(): Optional = - Optional.ofNullable(newFloatingBulkBpsPrice) + fun newFloatingBulkBps(): Optional = + Optional.ofNullable(newFloatingBulkBps) - fun newFloatingBulkPrice(): Optional = - Optional.ofNullable(newFloatingBulkPrice) + fun newFloatingBulk(): Optional = + Optional.ofNullable(newFloatingBulk) - fun newFloatingThresholdTotalAmountPrice(): - Optional = - Optional.ofNullable(newFloatingThresholdTotalAmountPrice) + fun newFloatingThresholdTotalAmount(): Optional = + Optional.ofNullable(newFloatingThresholdTotalAmount) - fun newFloatingTieredPackagePrice(): Optional = - Optional.ofNullable(newFloatingTieredPackagePrice) + fun newFloatingTieredPackage(): Optional = + Optional.ofNullable(newFloatingTieredPackage) - fun newFloatingGroupedTieredPrice(): Optional = - Optional.ofNullable(newFloatingGroupedTieredPrice) + fun newFloatingGroupedTiered(): Optional = + Optional.ofNullable(newFloatingGroupedTiered) - fun newFloatingMaxGroupTieredPrice(): Optional = - Optional.ofNullable(newFloatingMaxGroupTieredPrice) + fun newFloatingMaxGroupTieredPackage(): + Optional = + Optional.ofNullable(newFloatingMaxGroupTieredPackage) - fun newFloatingTieredWithMinimumPrice(): Optional = - Optional.ofNullable(newFloatingTieredWithMinimumPrice) + fun newFloatingTieredWithMinimum(): Optional = + Optional.ofNullable(newFloatingTieredWithMinimum) - fun newFloatingPackageWithAllocationPrice(): + fun newFloatingPackageWithAllocation(): Optional = - Optional.ofNullable(newFloatingPackageWithAllocationPrice) + Optional.ofNullable(newFloatingPackageWithAllocation) - fun newFloatingTieredPackageWithMinimumPrice(): + fun newFloatingTieredPackageWithMinimum(): Optional = - Optional.ofNullable(newFloatingTieredPackageWithMinimumPrice) + Optional.ofNullable(newFloatingTieredPackageWithMinimum) - fun newFloatingUnitWithPercentPrice(): Optional = - Optional.ofNullable(newFloatingUnitWithPercentPrice) + fun newFloatingUnitWithPercent(): Optional = + Optional.ofNullable(newFloatingUnitWithPercent) - fun newFloatingTieredWithProrationPrice(): - Optional = - Optional.ofNullable(newFloatingTieredWithProrationPrice) + fun newFloatingTieredWithProration(): Optional = + Optional.ofNullable(newFloatingTieredWithProration) - fun newFloatingUnitWithProrationPrice(): Optional = - Optional.ofNullable(newFloatingUnitWithProrationPrice) + fun newFloatingUnitWithProration(): Optional = + Optional.ofNullable(newFloatingUnitWithProration) - fun newFloatingGroupedAllocationPrice(): Optional = - Optional.ofNullable(newFloatingGroupedAllocationPrice) + fun newFloatingGroupedAllocation(): Optional = + Optional.ofNullable(newFloatingGroupedAllocation) - fun newFloatingGroupedWithProratedMinimumPrice(): + fun newFloatingGroupedWithProratedMinimum(): Optional = - Optional.ofNullable(newFloatingGroupedWithProratedMinimumPrice) + Optional.ofNullable(newFloatingGroupedWithProratedMinimum) - fun newFloatingGroupedWithMeteredMinimumPrice(): + fun newFloatingGroupedWithMeteredMinimum(): Optional = - Optional.ofNullable(newFloatingGroupedWithMeteredMinimumPrice) + Optional.ofNullable(newFloatingGroupedWithMeteredMinimum) - fun newFloatingMatrixWithDisplayNamePrice(): + fun newFloatingMatrixWithDisplayName(): Optional = - Optional.ofNullable(newFloatingMatrixWithDisplayNamePrice) + Optional.ofNullable(newFloatingMatrixWithDisplayName) - fun newFloatingBulkWithProrationPrice(): Optional = - Optional.ofNullable(newFloatingBulkWithProrationPrice) + fun newFloatingBulkWithProration(): Optional = + Optional.ofNullable(newFloatingBulkWithProration) - fun newFloatingGroupedTieredPackagePrice(): - Optional = - Optional.ofNullable(newFloatingGroupedTieredPackagePrice) + fun newFloatingGroupedTieredPackage(): Optional = + Optional.ofNullable(newFloatingGroupedTieredPackage) - fun isNewFloatingUnitPrice(): Boolean = newFloatingUnitPrice != null + fun isNewFloatingUnit(): Boolean = newFloatingUnit != null - fun isNewFloatingPackagePrice(): Boolean = newFloatingPackagePrice != null + fun isNewFloatingPackage(): Boolean = newFloatingPackage != null - fun isNewFloatingMatrixPrice(): Boolean = newFloatingMatrixPrice != null + fun isNewFloatingMatrix(): Boolean = newFloatingMatrix != null - fun isNewFloatingMatrixWithAllocationPrice(): Boolean = - newFloatingMatrixWithAllocationPrice != null + fun isNewFloatingMatrixWithAllocation(): Boolean = + newFloatingMatrixWithAllocation != null - fun isNewFloatingTieredPrice(): Boolean = newFloatingTieredPrice != null + fun isNewFloatingTiered(): Boolean = newFloatingTiered != null - fun isNewFloatingTieredBpsPrice(): Boolean = newFloatingTieredBpsPrice != null + fun isNewFloatingTieredBps(): Boolean = newFloatingTieredBps != null - fun isNewFloatingBpsPrice(): Boolean = newFloatingBpsPrice != null + fun isNewFloatingBps(): Boolean = newFloatingBps != null - fun isNewFloatingBulkBpsPrice(): Boolean = newFloatingBulkBpsPrice != null + fun isNewFloatingBulkBps(): Boolean = newFloatingBulkBps != null - fun isNewFloatingBulkPrice(): Boolean = newFloatingBulkPrice != null + fun isNewFloatingBulk(): Boolean = newFloatingBulk != null - fun isNewFloatingThresholdTotalAmountPrice(): Boolean = - newFloatingThresholdTotalAmountPrice != null + fun isNewFloatingThresholdTotalAmount(): Boolean = + newFloatingThresholdTotalAmount != null - fun isNewFloatingTieredPackagePrice(): Boolean = newFloatingTieredPackagePrice != null + fun isNewFloatingTieredPackage(): Boolean = newFloatingTieredPackage != null - fun isNewFloatingGroupedTieredPrice(): Boolean = newFloatingGroupedTieredPrice != null + fun isNewFloatingGroupedTiered(): Boolean = newFloatingGroupedTiered != null - fun isNewFloatingMaxGroupTieredPrice(): Boolean = newFloatingMaxGroupTieredPrice != null + fun isNewFloatingMaxGroupTieredPackage(): Boolean = + newFloatingMaxGroupTieredPackage != null - fun isNewFloatingTieredWithMinimumPrice(): Boolean = - newFloatingTieredWithMinimumPrice != null + fun isNewFloatingTieredWithMinimum(): Boolean = newFloatingTieredWithMinimum != null - fun isNewFloatingPackageWithAllocationPrice(): Boolean = - newFloatingPackageWithAllocationPrice != null + fun isNewFloatingPackageWithAllocation(): Boolean = + newFloatingPackageWithAllocation != null - fun isNewFloatingTieredPackageWithMinimumPrice(): Boolean = - newFloatingTieredPackageWithMinimumPrice != null + fun isNewFloatingTieredPackageWithMinimum(): Boolean = + newFloatingTieredPackageWithMinimum != null - fun isNewFloatingUnitWithPercentPrice(): Boolean = - newFloatingUnitWithPercentPrice != null + fun isNewFloatingUnitWithPercent(): Boolean = newFloatingUnitWithPercent != null - fun isNewFloatingTieredWithProrationPrice(): Boolean = - newFloatingTieredWithProrationPrice != null + fun isNewFloatingTieredWithProration(): Boolean = newFloatingTieredWithProration != null - fun isNewFloatingUnitWithProrationPrice(): Boolean = - newFloatingUnitWithProrationPrice != null + fun isNewFloatingUnitWithProration(): Boolean = newFloatingUnitWithProration != null - fun isNewFloatingGroupedAllocationPrice(): Boolean = - newFloatingGroupedAllocationPrice != null + fun isNewFloatingGroupedAllocation(): Boolean = newFloatingGroupedAllocation != null - fun isNewFloatingGroupedWithProratedMinimumPrice(): Boolean = - newFloatingGroupedWithProratedMinimumPrice != null + fun isNewFloatingGroupedWithProratedMinimum(): Boolean = + newFloatingGroupedWithProratedMinimum != null - fun isNewFloatingGroupedWithMeteredMinimumPrice(): Boolean = - newFloatingGroupedWithMeteredMinimumPrice != null + fun isNewFloatingGroupedWithMeteredMinimum(): Boolean = + newFloatingGroupedWithMeteredMinimum != null - fun isNewFloatingMatrixWithDisplayNamePrice(): Boolean = - newFloatingMatrixWithDisplayNamePrice != null + fun isNewFloatingMatrixWithDisplayName(): Boolean = + newFloatingMatrixWithDisplayName != null - fun isNewFloatingBulkWithProrationPrice(): Boolean = - newFloatingBulkWithProrationPrice != null + fun isNewFloatingBulkWithProration(): Boolean = newFloatingBulkWithProration != null - fun isNewFloatingGroupedTieredPackagePrice(): Boolean = - newFloatingGroupedTieredPackagePrice != null + fun isNewFloatingGroupedTieredPackage(): Boolean = + newFloatingGroupedTieredPackage != null - fun asNewFloatingUnitPrice(): NewFloatingUnitPrice = - newFloatingUnitPrice.getOrThrow("newFloatingUnitPrice") + fun asNewFloatingUnit(): NewFloatingUnitPrice = + newFloatingUnit.getOrThrow("newFloatingUnit") - fun asNewFloatingPackagePrice(): NewFloatingPackagePrice = - newFloatingPackagePrice.getOrThrow("newFloatingPackagePrice") + fun asNewFloatingPackage(): NewFloatingPackagePrice = + newFloatingPackage.getOrThrow("newFloatingPackage") - fun asNewFloatingMatrixPrice(): NewFloatingMatrixPrice = - newFloatingMatrixPrice.getOrThrow("newFloatingMatrixPrice") + fun asNewFloatingMatrix(): NewFloatingMatrixPrice = + newFloatingMatrix.getOrThrow("newFloatingMatrix") - fun asNewFloatingMatrixWithAllocationPrice(): NewFloatingMatrixWithAllocationPrice = - newFloatingMatrixWithAllocationPrice.getOrThrow( - "newFloatingMatrixWithAllocationPrice" - ) + fun asNewFloatingMatrixWithAllocation(): NewFloatingMatrixWithAllocationPrice = + newFloatingMatrixWithAllocation.getOrThrow("newFloatingMatrixWithAllocation") - fun asNewFloatingTieredPrice(): NewFloatingTieredPrice = - newFloatingTieredPrice.getOrThrow("newFloatingTieredPrice") + fun asNewFloatingTiered(): NewFloatingTieredPrice = + newFloatingTiered.getOrThrow("newFloatingTiered") - fun asNewFloatingTieredBpsPrice(): NewFloatingTieredBpsPrice = - newFloatingTieredBpsPrice.getOrThrow("newFloatingTieredBpsPrice") + fun asNewFloatingTieredBps(): NewFloatingTieredBpsPrice = + newFloatingTieredBps.getOrThrow("newFloatingTieredBps") - fun asNewFloatingBpsPrice(): NewFloatingBpsPrice = - newFloatingBpsPrice.getOrThrow("newFloatingBpsPrice") + fun asNewFloatingBps(): NewFloatingBpsPrice = + newFloatingBps.getOrThrow("newFloatingBps") - fun asNewFloatingBulkBpsPrice(): NewFloatingBulkBpsPrice = - newFloatingBulkBpsPrice.getOrThrow("newFloatingBulkBpsPrice") + fun asNewFloatingBulkBps(): NewFloatingBulkBpsPrice = + newFloatingBulkBps.getOrThrow("newFloatingBulkBps") - fun asNewFloatingBulkPrice(): NewFloatingBulkPrice = - newFloatingBulkPrice.getOrThrow("newFloatingBulkPrice") + fun asNewFloatingBulk(): NewFloatingBulkPrice = + newFloatingBulk.getOrThrow("newFloatingBulk") - fun asNewFloatingThresholdTotalAmountPrice(): NewFloatingThresholdTotalAmountPrice = - newFloatingThresholdTotalAmountPrice.getOrThrow( - "newFloatingThresholdTotalAmountPrice" - ) + fun asNewFloatingThresholdTotalAmount(): NewFloatingThresholdTotalAmountPrice = + newFloatingThresholdTotalAmount.getOrThrow("newFloatingThresholdTotalAmount") - fun asNewFloatingTieredPackagePrice(): NewFloatingTieredPackagePrice = - newFloatingTieredPackagePrice.getOrThrow("newFloatingTieredPackagePrice") + fun asNewFloatingTieredPackage(): NewFloatingTieredPackagePrice = + newFloatingTieredPackage.getOrThrow("newFloatingTieredPackage") - fun asNewFloatingGroupedTieredPrice(): NewFloatingGroupedTieredPrice = - newFloatingGroupedTieredPrice.getOrThrow("newFloatingGroupedTieredPrice") + fun asNewFloatingGroupedTiered(): NewFloatingGroupedTieredPrice = + newFloatingGroupedTiered.getOrThrow("newFloatingGroupedTiered") - fun asNewFloatingMaxGroupTieredPrice(): NewFloatingMaxGroupTieredPrice = - newFloatingMaxGroupTieredPrice.getOrThrow("newFloatingMaxGroupTieredPrice") + fun asNewFloatingMaxGroupTieredPackage(): NewFloatingMaxGroupTieredPackagePrice = + newFloatingMaxGroupTieredPackage.getOrThrow("newFloatingMaxGroupTieredPackage") - fun asNewFloatingTieredWithMinimumPrice(): NewFloatingTieredWithMinimumPrice = - newFloatingTieredWithMinimumPrice.getOrThrow("newFloatingTieredWithMinimumPrice") + fun asNewFloatingTieredWithMinimum(): NewFloatingTieredWithMinimumPrice = + newFloatingTieredWithMinimum.getOrThrow("newFloatingTieredWithMinimum") - fun asNewFloatingPackageWithAllocationPrice(): NewFloatingPackageWithAllocationPrice = - newFloatingPackageWithAllocationPrice.getOrThrow( - "newFloatingPackageWithAllocationPrice" - ) + fun asNewFloatingPackageWithAllocation(): NewFloatingPackageWithAllocationPrice = + newFloatingPackageWithAllocation.getOrThrow("newFloatingPackageWithAllocation") - fun asNewFloatingTieredPackageWithMinimumPrice(): - NewFloatingTieredPackageWithMinimumPrice = - newFloatingTieredPackageWithMinimumPrice.getOrThrow( - "newFloatingTieredPackageWithMinimumPrice" + fun asNewFloatingTieredPackageWithMinimum(): NewFloatingTieredPackageWithMinimumPrice = + newFloatingTieredPackageWithMinimum.getOrThrow( + "newFloatingTieredPackageWithMinimum" ) - fun asNewFloatingUnitWithPercentPrice(): NewFloatingUnitWithPercentPrice = - newFloatingUnitWithPercentPrice.getOrThrow("newFloatingUnitWithPercentPrice") + fun asNewFloatingUnitWithPercent(): NewFloatingUnitWithPercentPrice = + newFloatingUnitWithPercent.getOrThrow("newFloatingUnitWithPercent") - fun asNewFloatingTieredWithProrationPrice(): NewFloatingTieredWithProrationPrice = - newFloatingTieredWithProrationPrice.getOrThrow( - "newFloatingTieredWithProrationPrice" - ) + fun asNewFloatingTieredWithProration(): NewFloatingTieredWithProrationPrice = + newFloatingTieredWithProration.getOrThrow("newFloatingTieredWithProration") - fun asNewFloatingUnitWithProrationPrice(): NewFloatingUnitWithProrationPrice = - newFloatingUnitWithProrationPrice.getOrThrow("newFloatingUnitWithProrationPrice") + fun asNewFloatingUnitWithProration(): NewFloatingUnitWithProrationPrice = + newFloatingUnitWithProration.getOrThrow("newFloatingUnitWithProration") - fun asNewFloatingGroupedAllocationPrice(): NewFloatingGroupedAllocationPrice = - newFloatingGroupedAllocationPrice.getOrThrow("newFloatingGroupedAllocationPrice") + fun asNewFloatingGroupedAllocation(): NewFloatingGroupedAllocationPrice = + newFloatingGroupedAllocation.getOrThrow("newFloatingGroupedAllocation") - fun asNewFloatingGroupedWithProratedMinimumPrice(): + fun asNewFloatingGroupedWithProratedMinimum(): NewFloatingGroupedWithProratedMinimumPrice = - newFloatingGroupedWithProratedMinimumPrice.getOrThrow( - "newFloatingGroupedWithProratedMinimumPrice" + newFloatingGroupedWithProratedMinimum.getOrThrow( + "newFloatingGroupedWithProratedMinimum" ) - fun asNewFloatingGroupedWithMeteredMinimumPrice(): + fun asNewFloatingGroupedWithMeteredMinimum(): NewFloatingGroupedWithMeteredMinimumPrice = - newFloatingGroupedWithMeteredMinimumPrice.getOrThrow( - "newFloatingGroupedWithMeteredMinimumPrice" + newFloatingGroupedWithMeteredMinimum.getOrThrow( + "newFloatingGroupedWithMeteredMinimum" ) - fun asNewFloatingMatrixWithDisplayNamePrice(): NewFloatingMatrixWithDisplayNamePrice = - newFloatingMatrixWithDisplayNamePrice.getOrThrow( - "newFloatingMatrixWithDisplayNamePrice" - ) + fun asNewFloatingMatrixWithDisplayName(): NewFloatingMatrixWithDisplayNamePrice = + newFloatingMatrixWithDisplayName.getOrThrow("newFloatingMatrixWithDisplayName") - fun asNewFloatingBulkWithProrationPrice(): NewFloatingBulkWithProrationPrice = - newFloatingBulkWithProrationPrice.getOrThrow("newFloatingBulkWithProrationPrice") + fun asNewFloatingBulkWithProration(): NewFloatingBulkWithProrationPrice = + newFloatingBulkWithProration.getOrThrow("newFloatingBulkWithProration") - fun asNewFloatingGroupedTieredPackagePrice(): NewFloatingGroupedTieredPackagePrice = - newFloatingGroupedTieredPackagePrice.getOrThrow( - "newFloatingGroupedTieredPackagePrice" - ) + fun asNewFloatingGroupedTieredPackage(): NewFloatingGroupedTieredPackagePrice = + newFloatingGroupedTieredPackage.getOrThrow("newFloatingGroupedTieredPackage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newFloatingUnitPrice != null -> - visitor.visitNewFloatingUnitPrice(newFloatingUnitPrice) - newFloatingPackagePrice != null -> - visitor.visitNewFloatingPackagePrice(newFloatingPackagePrice) - newFloatingMatrixPrice != null -> - visitor.visitNewFloatingMatrixPrice(newFloatingMatrixPrice) - newFloatingMatrixWithAllocationPrice != null -> - visitor.visitNewFloatingMatrixWithAllocationPrice( - newFloatingMatrixWithAllocationPrice - ) - newFloatingTieredPrice != null -> - visitor.visitNewFloatingTieredPrice(newFloatingTieredPrice) - newFloatingTieredBpsPrice != null -> - visitor.visitNewFloatingTieredBpsPrice(newFloatingTieredBpsPrice) - newFloatingBpsPrice != null -> - visitor.visitNewFloatingBpsPrice(newFloatingBpsPrice) - newFloatingBulkBpsPrice != null -> - visitor.visitNewFloatingBulkBpsPrice(newFloatingBulkBpsPrice) - newFloatingBulkPrice != null -> - visitor.visitNewFloatingBulkPrice(newFloatingBulkPrice) - newFloatingThresholdTotalAmountPrice != null -> - visitor.visitNewFloatingThresholdTotalAmountPrice( - newFloatingThresholdTotalAmountPrice + newFloatingUnit != null -> visitor.visitNewFloatingUnit(newFloatingUnit) + newFloatingPackage != null -> + visitor.visitNewFloatingPackage(newFloatingPackage) + newFloatingMatrix != null -> visitor.visitNewFloatingMatrix(newFloatingMatrix) + newFloatingMatrixWithAllocation != null -> + visitor.visitNewFloatingMatrixWithAllocation( + newFloatingMatrixWithAllocation ) - newFloatingTieredPackagePrice != null -> - visitor.visitNewFloatingTieredPackagePrice(newFloatingTieredPackagePrice) - newFloatingGroupedTieredPrice != null -> - visitor.visitNewFloatingGroupedTieredPrice(newFloatingGroupedTieredPrice) - newFloatingMaxGroupTieredPrice != null -> - visitor.visitNewFloatingMaxGroupTieredPrice(newFloatingMaxGroupTieredPrice) - newFloatingTieredWithMinimumPrice != null -> - visitor.visitNewFloatingTieredWithMinimumPrice( - newFloatingTieredWithMinimumPrice + newFloatingTiered != null -> visitor.visitNewFloatingTiered(newFloatingTiered) + newFloatingTieredBps != null -> + visitor.visitNewFloatingTieredBps(newFloatingTieredBps) + newFloatingBps != null -> visitor.visitNewFloatingBps(newFloatingBps) + newFloatingBulkBps != null -> + visitor.visitNewFloatingBulkBps(newFloatingBulkBps) + newFloatingBulk != null -> visitor.visitNewFloatingBulk(newFloatingBulk) + newFloatingThresholdTotalAmount != null -> + visitor.visitNewFloatingThresholdTotalAmount( + newFloatingThresholdTotalAmount ) - newFloatingPackageWithAllocationPrice != null -> - visitor.visitNewFloatingPackageWithAllocationPrice( - newFloatingPackageWithAllocationPrice + newFloatingTieredPackage != null -> + visitor.visitNewFloatingTieredPackage(newFloatingTieredPackage) + newFloatingGroupedTiered != null -> + visitor.visitNewFloatingGroupedTiered(newFloatingGroupedTiered) + newFloatingMaxGroupTieredPackage != null -> + visitor.visitNewFloatingMaxGroupTieredPackage( + newFloatingMaxGroupTieredPackage ) - newFloatingTieredPackageWithMinimumPrice != null -> - visitor.visitNewFloatingTieredPackageWithMinimumPrice( - newFloatingTieredPackageWithMinimumPrice + newFloatingTieredWithMinimum != null -> + visitor.visitNewFloatingTieredWithMinimum(newFloatingTieredWithMinimum) + newFloatingPackageWithAllocation != null -> + visitor.visitNewFloatingPackageWithAllocation( + newFloatingPackageWithAllocation ) - newFloatingUnitWithPercentPrice != null -> - visitor.visitNewFloatingUnitWithPercentPrice( - newFloatingUnitWithPercentPrice + newFloatingTieredPackageWithMinimum != null -> + visitor.visitNewFloatingTieredPackageWithMinimum( + newFloatingTieredPackageWithMinimum ) - newFloatingTieredWithProrationPrice != null -> - visitor.visitNewFloatingTieredWithProrationPrice( - newFloatingTieredWithProrationPrice + newFloatingUnitWithPercent != null -> + visitor.visitNewFloatingUnitWithPercent(newFloatingUnitWithPercent) + newFloatingTieredWithProration != null -> + visitor.visitNewFloatingTieredWithProration(newFloatingTieredWithProration) + newFloatingUnitWithProration != null -> + visitor.visitNewFloatingUnitWithProration(newFloatingUnitWithProration) + newFloatingGroupedAllocation != null -> + visitor.visitNewFloatingGroupedAllocation(newFloatingGroupedAllocation) + newFloatingGroupedWithProratedMinimum != null -> + visitor.visitNewFloatingGroupedWithProratedMinimum( + newFloatingGroupedWithProratedMinimum ) - newFloatingUnitWithProrationPrice != null -> - visitor.visitNewFloatingUnitWithProrationPrice( - newFloatingUnitWithProrationPrice + newFloatingGroupedWithMeteredMinimum != null -> + visitor.visitNewFloatingGroupedWithMeteredMinimum( + newFloatingGroupedWithMeteredMinimum ) - newFloatingGroupedAllocationPrice != null -> - visitor.visitNewFloatingGroupedAllocationPrice( - newFloatingGroupedAllocationPrice + newFloatingMatrixWithDisplayName != null -> + visitor.visitNewFloatingMatrixWithDisplayName( + newFloatingMatrixWithDisplayName ) - newFloatingGroupedWithProratedMinimumPrice != null -> - visitor.visitNewFloatingGroupedWithProratedMinimumPrice( - newFloatingGroupedWithProratedMinimumPrice - ) - newFloatingGroupedWithMeteredMinimumPrice != null -> - visitor.visitNewFloatingGroupedWithMeteredMinimumPrice( - newFloatingGroupedWithMeteredMinimumPrice - ) - newFloatingMatrixWithDisplayNamePrice != null -> - visitor.visitNewFloatingMatrixWithDisplayNamePrice( - newFloatingMatrixWithDisplayNamePrice - ) - newFloatingBulkWithProrationPrice != null -> - visitor.visitNewFloatingBulkWithProrationPrice( - newFloatingBulkWithProrationPrice - ) - newFloatingGroupedTieredPackagePrice != null -> - visitor.visitNewFloatingGroupedTieredPackagePrice( - newFloatingGroupedTieredPackagePrice + newFloatingBulkWithProration != null -> + visitor.visitNewFloatingBulkWithProration(newFloatingBulkWithProration) + newFloatingGroupedTieredPackage != null -> + visitor.visitNewFloatingGroupedTieredPackage( + newFloatingGroupedTieredPackage ) else -> visitor.unknown(_json) } @@ -3056,162 +2973,151 @@ constructor( accept( object : Visitor { - override fun visitNewFloatingUnitPrice( - newFloatingUnitPrice: NewFloatingUnitPrice - ) { - newFloatingUnitPrice.validate() + override fun visitNewFloatingUnit(newFloatingUnit: NewFloatingUnitPrice) { + newFloatingUnit.validate() } - override fun visitNewFloatingPackagePrice( - newFloatingPackagePrice: NewFloatingPackagePrice + override fun visitNewFloatingPackage( + newFloatingPackage: NewFloatingPackagePrice ) { - newFloatingPackagePrice.validate() + newFloatingPackage.validate() } - override fun visitNewFloatingMatrixPrice( - newFloatingMatrixPrice: NewFloatingMatrixPrice + override fun visitNewFloatingMatrix( + newFloatingMatrix: NewFloatingMatrixPrice ) { - newFloatingMatrixPrice.validate() + newFloatingMatrix.validate() } - override fun visitNewFloatingMatrixWithAllocationPrice( - newFloatingMatrixWithAllocationPrice: - NewFloatingMatrixWithAllocationPrice + override fun visitNewFloatingMatrixWithAllocation( + newFloatingMatrixWithAllocation: NewFloatingMatrixWithAllocationPrice ) { - newFloatingMatrixWithAllocationPrice.validate() + newFloatingMatrixWithAllocation.validate() } - override fun visitNewFloatingTieredPrice( - newFloatingTieredPrice: NewFloatingTieredPrice + override fun visitNewFloatingTiered( + newFloatingTiered: NewFloatingTieredPrice ) { - newFloatingTieredPrice.validate() + newFloatingTiered.validate() } - override fun visitNewFloatingTieredBpsPrice( - newFloatingTieredBpsPrice: NewFloatingTieredBpsPrice + override fun visitNewFloatingTieredBps( + newFloatingTieredBps: NewFloatingTieredBpsPrice ) { - newFloatingTieredBpsPrice.validate() + newFloatingTieredBps.validate() } - override fun visitNewFloatingBpsPrice( - newFloatingBpsPrice: NewFloatingBpsPrice - ) { - newFloatingBpsPrice.validate() + override fun visitNewFloatingBps(newFloatingBps: NewFloatingBpsPrice) { + newFloatingBps.validate() } - override fun visitNewFloatingBulkBpsPrice( - newFloatingBulkBpsPrice: NewFloatingBulkBpsPrice + override fun visitNewFloatingBulkBps( + newFloatingBulkBps: NewFloatingBulkBpsPrice ) { - newFloatingBulkBpsPrice.validate() + newFloatingBulkBps.validate() } - override fun visitNewFloatingBulkPrice( - newFloatingBulkPrice: NewFloatingBulkPrice - ) { - newFloatingBulkPrice.validate() + override fun visitNewFloatingBulk(newFloatingBulk: NewFloatingBulkPrice) { + newFloatingBulk.validate() } - override fun visitNewFloatingThresholdTotalAmountPrice( - newFloatingThresholdTotalAmountPrice: - NewFloatingThresholdTotalAmountPrice + override fun visitNewFloatingThresholdTotalAmount( + newFloatingThresholdTotalAmount: NewFloatingThresholdTotalAmountPrice ) { - newFloatingThresholdTotalAmountPrice.validate() + newFloatingThresholdTotalAmount.validate() } - override fun visitNewFloatingTieredPackagePrice( - newFloatingTieredPackagePrice: NewFloatingTieredPackagePrice + override fun visitNewFloatingTieredPackage( + newFloatingTieredPackage: NewFloatingTieredPackagePrice ) { - newFloatingTieredPackagePrice.validate() + newFloatingTieredPackage.validate() } - override fun visitNewFloatingGroupedTieredPrice( - newFloatingGroupedTieredPrice: NewFloatingGroupedTieredPrice + override fun visitNewFloatingGroupedTiered( + newFloatingGroupedTiered: NewFloatingGroupedTieredPrice ) { - newFloatingGroupedTieredPrice.validate() + newFloatingGroupedTiered.validate() } - override fun visitNewFloatingMaxGroupTieredPrice( - newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice + override fun visitNewFloatingMaxGroupTieredPackage( + newFloatingMaxGroupTieredPackage: NewFloatingMaxGroupTieredPackagePrice ) { - newFloatingMaxGroupTieredPrice.validate() + newFloatingMaxGroupTieredPackage.validate() } - override fun visitNewFloatingTieredWithMinimumPrice( - newFloatingTieredWithMinimumPrice: NewFloatingTieredWithMinimumPrice + override fun visitNewFloatingTieredWithMinimum( + newFloatingTieredWithMinimum: NewFloatingTieredWithMinimumPrice ) { - newFloatingTieredWithMinimumPrice.validate() + newFloatingTieredWithMinimum.validate() } - override fun visitNewFloatingPackageWithAllocationPrice( - newFloatingPackageWithAllocationPrice: - NewFloatingPackageWithAllocationPrice + override fun visitNewFloatingPackageWithAllocation( + newFloatingPackageWithAllocation: NewFloatingPackageWithAllocationPrice ) { - newFloatingPackageWithAllocationPrice.validate() + newFloatingPackageWithAllocation.validate() } - override fun visitNewFloatingTieredPackageWithMinimumPrice( - newFloatingTieredPackageWithMinimumPrice: + override fun visitNewFloatingTieredPackageWithMinimum( + newFloatingTieredPackageWithMinimum: NewFloatingTieredPackageWithMinimumPrice ) { - newFloatingTieredPackageWithMinimumPrice.validate() + newFloatingTieredPackageWithMinimum.validate() } - override fun visitNewFloatingUnitWithPercentPrice( - newFloatingUnitWithPercentPrice: NewFloatingUnitWithPercentPrice + override fun visitNewFloatingUnitWithPercent( + newFloatingUnitWithPercent: NewFloatingUnitWithPercentPrice ) { - newFloatingUnitWithPercentPrice.validate() + newFloatingUnitWithPercent.validate() } - override fun visitNewFloatingTieredWithProrationPrice( - newFloatingTieredWithProrationPrice: NewFloatingTieredWithProrationPrice + override fun visitNewFloatingTieredWithProration( + newFloatingTieredWithProration: NewFloatingTieredWithProrationPrice ) { - newFloatingTieredWithProrationPrice.validate() + newFloatingTieredWithProration.validate() } - override fun visitNewFloatingUnitWithProrationPrice( - newFloatingUnitWithProrationPrice: NewFloatingUnitWithProrationPrice + override fun visitNewFloatingUnitWithProration( + newFloatingUnitWithProration: NewFloatingUnitWithProrationPrice ) { - newFloatingUnitWithProrationPrice.validate() + newFloatingUnitWithProration.validate() } - override fun visitNewFloatingGroupedAllocationPrice( - newFloatingGroupedAllocationPrice: NewFloatingGroupedAllocationPrice + override fun visitNewFloatingGroupedAllocation( + newFloatingGroupedAllocation: NewFloatingGroupedAllocationPrice ) { - newFloatingGroupedAllocationPrice.validate() + newFloatingGroupedAllocation.validate() } - override fun visitNewFloatingGroupedWithProratedMinimumPrice( - newFloatingGroupedWithProratedMinimumPrice: + override fun visitNewFloatingGroupedWithProratedMinimum( + newFloatingGroupedWithProratedMinimum: NewFloatingGroupedWithProratedMinimumPrice ) { - newFloatingGroupedWithProratedMinimumPrice.validate() + newFloatingGroupedWithProratedMinimum.validate() } - override fun visitNewFloatingGroupedWithMeteredMinimumPrice( - newFloatingGroupedWithMeteredMinimumPrice: + override fun visitNewFloatingGroupedWithMeteredMinimum( + newFloatingGroupedWithMeteredMinimum: NewFloatingGroupedWithMeteredMinimumPrice ) { - newFloatingGroupedWithMeteredMinimumPrice.validate() + newFloatingGroupedWithMeteredMinimum.validate() } - override fun visitNewFloatingMatrixWithDisplayNamePrice( - newFloatingMatrixWithDisplayNamePrice: - NewFloatingMatrixWithDisplayNamePrice + override fun visitNewFloatingMatrixWithDisplayName( + newFloatingMatrixWithDisplayName: NewFloatingMatrixWithDisplayNamePrice ) { - newFloatingMatrixWithDisplayNamePrice.validate() + newFloatingMatrixWithDisplayName.validate() } - override fun visitNewFloatingBulkWithProrationPrice( - newFloatingBulkWithProrationPrice: NewFloatingBulkWithProrationPrice + override fun visitNewFloatingBulkWithProration( + newFloatingBulkWithProration: NewFloatingBulkWithProrationPrice ) { - newFloatingBulkWithProrationPrice.validate() + newFloatingBulkWithProration.validate() } - override fun visitNewFloatingGroupedTieredPackagePrice( - newFloatingGroupedTieredPackagePrice: - NewFloatingGroupedTieredPackagePrice + override fun visitNewFloatingGroupedTieredPackage( + newFloatingGroupedTieredPackage: NewFloatingGroupedTieredPackagePrice ) { - newFloatingGroupedTieredPackagePrice.validate() + newFloatingGroupedTieredPackage.validate() } } ) @@ -3223,62 +3129,56 @@ constructor( return true } - return /* spotless:off */ other is Price && newFloatingUnitPrice == other.newFloatingUnitPrice && newFloatingPackagePrice == other.newFloatingPackagePrice && newFloatingMatrixPrice == other.newFloatingMatrixPrice && newFloatingMatrixWithAllocationPrice == other.newFloatingMatrixWithAllocationPrice && newFloatingTieredPrice == other.newFloatingTieredPrice && newFloatingTieredBpsPrice == other.newFloatingTieredBpsPrice && newFloatingBpsPrice == other.newFloatingBpsPrice && newFloatingBulkBpsPrice == other.newFloatingBulkBpsPrice && newFloatingBulkPrice == other.newFloatingBulkPrice && newFloatingThresholdTotalAmountPrice == other.newFloatingThresholdTotalAmountPrice && newFloatingTieredPackagePrice == other.newFloatingTieredPackagePrice && newFloatingGroupedTieredPrice == other.newFloatingGroupedTieredPrice && newFloatingMaxGroupTieredPrice == other.newFloatingMaxGroupTieredPrice && newFloatingTieredWithMinimumPrice == other.newFloatingTieredWithMinimumPrice && newFloatingPackageWithAllocationPrice == other.newFloatingPackageWithAllocationPrice && newFloatingTieredPackageWithMinimumPrice == other.newFloatingTieredPackageWithMinimumPrice && newFloatingUnitWithPercentPrice == other.newFloatingUnitWithPercentPrice && newFloatingTieredWithProrationPrice == other.newFloatingTieredWithProrationPrice && newFloatingUnitWithProrationPrice == other.newFloatingUnitWithProrationPrice && newFloatingGroupedAllocationPrice == other.newFloatingGroupedAllocationPrice && newFloatingGroupedWithProratedMinimumPrice == other.newFloatingGroupedWithProratedMinimumPrice && newFloatingGroupedWithMeteredMinimumPrice == other.newFloatingGroupedWithMeteredMinimumPrice && newFloatingMatrixWithDisplayNamePrice == other.newFloatingMatrixWithDisplayNamePrice && newFloatingBulkWithProrationPrice == other.newFloatingBulkWithProrationPrice && newFloatingGroupedTieredPackagePrice == other.newFloatingGroupedTieredPackagePrice /* spotless:on */ + return /* spotless:off */ other is Price && newFloatingUnit == other.newFloatingUnit && newFloatingPackage == other.newFloatingPackage && newFloatingMatrix == other.newFloatingMatrix && newFloatingMatrixWithAllocation == other.newFloatingMatrixWithAllocation && newFloatingTiered == other.newFloatingTiered && newFloatingTieredBps == other.newFloatingTieredBps && newFloatingBps == other.newFloatingBps && newFloatingBulkBps == other.newFloatingBulkBps && newFloatingBulk == other.newFloatingBulk && newFloatingThresholdTotalAmount == other.newFloatingThresholdTotalAmount && newFloatingTieredPackage == other.newFloatingTieredPackage && newFloatingGroupedTiered == other.newFloatingGroupedTiered && newFloatingMaxGroupTieredPackage == other.newFloatingMaxGroupTieredPackage && newFloatingTieredWithMinimum == other.newFloatingTieredWithMinimum && newFloatingPackageWithAllocation == other.newFloatingPackageWithAllocation && newFloatingTieredPackageWithMinimum == other.newFloatingTieredPackageWithMinimum && newFloatingUnitWithPercent == other.newFloatingUnitWithPercent && newFloatingTieredWithProration == other.newFloatingTieredWithProration && newFloatingUnitWithProration == other.newFloatingUnitWithProration && newFloatingGroupedAllocation == other.newFloatingGroupedAllocation && newFloatingGroupedWithProratedMinimum == other.newFloatingGroupedWithProratedMinimum && newFloatingGroupedWithMeteredMinimum == other.newFloatingGroupedWithMeteredMinimum && newFloatingMatrixWithDisplayName == other.newFloatingMatrixWithDisplayName && newFloatingBulkWithProration == other.newFloatingBulkWithProration && newFloatingGroupedTieredPackage == other.newFloatingGroupedTieredPackage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newFloatingUnitPrice, newFloatingPackagePrice, newFloatingMatrixPrice, newFloatingMatrixWithAllocationPrice, newFloatingTieredPrice, newFloatingTieredBpsPrice, newFloatingBpsPrice, newFloatingBulkBpsPrice, newFloatingBulkPrice, newFloatingThresholdTotalAmountPrice, newFloatingTieredPackagePrice, newFloatingGroupedTieredPrice, newFloatingMaxGroupTieredPrice, newFloatingTieredWithMinimumPrice, newFloatingPackageWithAllocationPrice, newFloatingTieredPackageWithMinimumPrice, newFloatingUnitWithPercentPrice, newFloatingTieredWithProrationPrice, newFloatingUnitWithProrationPrice, newFloatingGroupedAllocationPrice, newFloatingGroupedWithProratedMinimumPrice, newFloatingGroupedWithMeteredMinimumPrice, newFloatingMatrixWithDisplayNamePrice, newFloatingBulkWithProrationPrice, newFloatingGroupedTieredPackagePrice) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newFloatingUnit, newFloatingPackage, newFloatingMatrix, newFloatingMatrixWithAllocation, newFloatingTiered, newFloatingTieredBps, newFloatingBps, newFloatingBulkBps, newFloatingBulk, newFloatingThresholdTotalAmount, newFloatingTieredPackage, newFloatingGroupedTiered, newFloatingMaxGroupTieredPackage, newFloatingTieredWithMinimum, newFloatingPackageWithAllocation, newFloatingTieredPackageWithMinimum, newFloatingUnitWithPercent, newFloatingTieredWithProration, newFloatingUnitWithProration, newFloatingGroupedAllocation, newFloatingGroupedWithProratedMinimum, newFloatingGroupedWithMeteredMinimum, newFloatingMatrixWithDisplayName, newFloatingBulkWithProration, newFloatingGroupedTieredPackage) /* spotless:on */ override fun toString(): String = when { - newFloatingUnitPrice != null -> - "Price{newFloatingUnitPrice=$newFloatingUnitPrice}" - newFloatingPackagePrice != null -> - "Price{newFloatingPackagePrice=$newFloatingPackagePrice}" - newFloatingMatrixPrice != null -> - "Price{newFloatingMatrixPrice=$newFloatingMatrixPrice}" - newFloatingMatrixWithAllocationPrice != null -> - "Price{newFloatingMatrixWithAllocationPrice=$newFloatingMatrixWithAllocationPrice}" - newFloatingTieredPrice != null -> - "Price{newFloatingTieredPrice=$newFloatingTieredPrice}" - newFloatingTieredBpsPrice != null -> - "Price{newFloatingTieredBpsPrice=$newFloatingTieredBpsPrice}" - newFloatingBpsPrice != null -> "Price{newFloatingBpsPrice=$newFloatingBpsPrice}" - newFloatingBulkBpsPrice != null -> - "Price{newFloatingBulkBpsPrice=$newFloatingBulkBpsPrice}" - newFloatingBulkPrice != null -> - "Price{newFloatingBulkPrice=$newFloatingBulkPrice}" - newFloatingThresholdTotalAmountPrice != null -> - "Price{newFloatingThresholdTotalAmountPrice=$newFloatingThresholdTotalAmountPrice}" - newFloatingTieredPackagePrice != null -> - "Price{newFloatingTieredPackagePrice=$newFloatingTieredPackagePrice}" - newFloatingGroupedTieredPrice != null -> - "Price{newFloatingGroupedTieredPrice=$newFloatingGroupedTieredPrice}" - newFloatingMaxGroupTieredPrice != null -> - "Price{newFloatingMaxGroupTieredPrice=$newFloatingMaxGroupTieredPrice}" - newFloatingTieredWithMinimumPrice != null -> - "Price{newFloatingTieredWithMinimumPrice=$newFloatingTieredWithMinimumPrice}" - newFloatingPackageWithAllocationPrice != null -> - "Price{newFloatingPackageWithAllocationPrice=$newFloatingPackageWithAllocationPrice}" - newFloatingTieredPackageWithMinimumPrice != null -> - "Price{newFloatingTieredPackageWithMinimumPrice=$newFloatingTieredPackageWithMinimumPrice}" - newFloatingUnitWithPercentPrice != null -> - "Price{newFloatingUnitWithPercentPrice=$newFloatingUnitWithPercentPrice}" - newFloatingTieredWithProrationPrice != null -> - "Price{newFloatingTieredWithProrationPrice=$newFloatingTieredWithProrationPrice}" - newFloatingUnitWithProrationPrice != null -> - "Price{newFloatingUnitWithProrationPrice=$newFloatingUnitWithProrationPrice}" - newFloatingGroupedAllocationPrice != null -> - "Price{newFloatingGroupedAllocationPrice=$newFloatingGroupedAllocationPrice}" - newFloatingGroupedWithProratedMinimumPrice != null -> - "Price{newFloatingGroupedWithProratedMinimumPrice=$newFloatingGroupedWithProratedMinimumPrice}" - newFloatingGroupedWithMeteredMinimumPrice != null -> - "Price{newFloatingGroupedWithMeteredMinimumPrice=$newFloatingGroupedWithMeteredMinimumPrice}" - newFloatingMatrixWithDisplayNamePrice != null -> - "Price{newFloatingMatrixWithDisplayNamePrice=$newFloatingMatrixWithDisplayNamePrice}" - newFloatingBulkWithProrationPrice != null -> - "Price{newFloatingBulkWithProrationPrice=$newFloatingBulkWithProrationPrice}" - newFloatingGroupedTieredPackagePrice != null -> - "Price{newFloatingGroupedTieredPackagePrice=$newFloatingGroupedTieredPackagePrice}" + newFloatingUnit != null -> "Price{newFloatingUnit=$newFloatingUnit}" + newFloatingPackage != null -> "Price{newFloatingPackage=$newFloatingPackage}" + newFloatingMatrix != null -> "Price{newFloatingMatrix=$newFloatingMatrix}" + newFloatingMatrixWithAllocation != null -> + "Price{newFloatingMatrixWithAllocation=$newFloatingMatrixWithAllocation}" + newFloatingTiered != null -> "Price{newFloatingTiered=$newFloatingTiered}" + newFloatingTieredBps != null -> + "Price{newFloatingTieredBps=$newFloatingTieredBps}" + newFloatingBps != null -> "Price{newFloatingBps=$newFloatingBps}" + newFloatingBulkBps != null -> "Price{newFloatingBulkBps=$newFloatingBulkBps}" + newFloatingBulk != null -> "Price{newFloatingBulk=$newFloatingBulk}" + newFloatingThresholdTotalAmount != null -> + "Price{newFloatingThresholdTotalAmount=$newFloatingThresholdTotalAmount}" + newFloatingTieredPackage != null -> + "Price{newFloatingTieredPackage=$newFloatingTieredPackage}" + newFloatingGroupedTiered != null -> + "Price{newFloatingGroupedTiered=$newFloatingGroupedTiered}" + newFloatingMaxGroupTieredPackage != null -> + "Price{newFloatingMaxGroupTieredPackage=$newFloatingMaxGroupTieredPackage}" + newFloatingTieredWithMinimum != null -> + "Price{newFloatingTieredWithMinimum=$newFloatingTieredWithMinimum}" + newFloatingPackageWithAllocation != null -> + "Price{newFloatingPackageWithAllocation=$newFloatingPackageWithAllocation}" + newFloatingTieredPackageWithMinimum != null -> + "Price{newFloatingTieredPackageWithMinimum=$newFloatingTieredPackageWithMinimum}" + newFloatingUnitWithPercent != null -> + "Price{newFloatingUnitWithPercent=$newFloatingUnitWithPercent}" + newFloatingTieredWithProration != null -> + "Price{newFloatingTieredWithProration=$newFloatingTieredWithProration}" + newFloatingUnitWithProration != null -> + "Price{newFloatingUnitWithProration=$newFloatingUnitWithProration}" + newFloatingGroupedAllocation != null -> + "Price{newFloatingGroupedAllocation=$newFloatingGroupedAllocation}" + newFloatingGroupedWithProratedMinimum != null -> + "Price{newFloatingGroupedWithProratedMinimum=$newFloatingGroupedWithProratedMinimum}" + newFloatingGroupedWithMeteredMinimum != null -> + "Price{newFloatingGroupedWithMeteredMinimum=$newFloatingGroupedWithMeteredMinimum}" + newFloatingMatrixWithDisplayName != null -> + "Price{newFloatingMatrixWithDisplayName=$newFloatingMatrixWithDisplayName}" + newFloatingBulkWithProration != null -> + "Price{newFloatingBulkWithProration=$newFloatingBulkWithProration}" + newFloatingGroupedTieredPackage != null -> + "Price{newFloatingGroupedTieredPackage=$newFloatingGroupedTieredPackage}" _json != null -> "Price{_unknown=$_json}" else -> throw IllegalStateException("Invalid Price") } @@ -3286,249 +3186,216 @@ constructor( companion object { @JvmStatic - fun ofNewFloatingUnitPrice(newFloatingUnitPrice: NewFloatingUnitPrice) = - Price(newFloatingUnitPrice = newFloatingUnitPrice) + fun ofNewFloatingUnit(newFloatingUnit: NewFloatingUnitPrice) = + Price(newFloatingUnit = newFloatingUnit) @JvmStatic - fun ofNewFloatingPackagePrice(newFloatingPackagePrice: NewFloatingPackagePrice) = - Price(newFloatingPackagePrice = newFloatingPackagePrice) + fun ofNewFloatingPackage(newFloatingPackage: NewFloatingPackagePrice) = + Price(newFloatingPackage = newFloatingPackage) @JvmStatic - fun ofNewFloatingMatrixPrice(newFloatingMatrixPrice: NewFloatingMatrixPrice) = - Price(newFloatingMatrixPrice = newFloatingMatrixPrice) + fun ofNewFloatingMatrix(newFloatingMatrix: NewFloatingMatrixPrice) = + Price(newFloatingMatrix = newFloatingMatrix) @JvmStatic - fun ofNewFloatingMatrixWithAllocationPrice( - newFloatingMatrixWithAllocationPrice: NewFloatingMatrixWithAllocationPrice - ) = - Price( - newFloatingMatrixWithAllocationPrice = newFloatingMatrixWithAllocationPrice - ) + fun ofNewFloatingMatrixWithAllocation( + newFloatingMatrixWithAllocation: NewFloatingMatrixWithAllocationPrice + ) = Price(newFloatingMatrixWithAllocation = newFloatingMatrixWithAllocation) @JvmStatic - fun ofNewFloatingTieredPrice(newFloatingTieredPrice: NewFloatingTieredPrice) = - Price(newFloatingTieredPrice = newFloatingTieredPrice) + fun ofNewFloatingTiered(newFloatingTiered: NewFloatingTieredPrice) = + Price(newFloatingTiered = newFloatingTiered) @JvmStatic - fun ofNewFloatingTieredBpsPrice( - newFloatingTieredBpsPrice: NewFloatingTieredBpsPrice - ) = Price(newFloatingTieredBpsPrice = newFloatingTieredBpsPrice) + fun ofNewFloatingTieredBps(newFloatingTieredBps: NewFloatingTieredBpsPrice) = + Price(newFloatingTieredBps = newFloatingTieredBps) @JvmStatic - fun ofNewFloatingBpsPrice(newFloatingBpsPrice: NewFloatingBpsPrice) = - Price(newFloatingBpsPrice = newFloatingBpsPrice) + fun ofNewFloatingBps(newFloatingBps: NewFloatingBpsPrice) = + Price(newFloatingBps = newFloatingBps) @JvmStatic - fun ofNewFloatingBulkBpsPrice(newFloatingBulkBpsPrice: NewFloatingBulkBpsPrice) = - Price(newFloatingBulkBpsPrice = newFloatingBulkBpsPrice) + fun ofNewFloatingBulkBps(newFloatingBulkBps: NewFloatingBulkBpsPrice) = + Price(newFloatingBulkBps = newFloatingBulkBps) @JvmStatic - fun ofNewFloatingBulkPrice(newFloatingBulkPrice: NewFloatingBulkPrice) = - Price(newFloatingBulkPrice = newFloatingBulkPrice) + fun ofNewFloatingBulk(newFloatingBulk: NewFloatingBulkPrice) = + Price(newFloatingBulk = newFloatingBulk) @JvmStatic - fun ofNewFloatingThresholdTotalAmountPrice( - newFloatingThresholdTotalAmountPrice: NewFloatingThresholdTotalAmountPrice - ) = - Price( - newFloatingThresholdTotalAmountPrice = newFloatingThresholdTotalAmountPrice - ) + fun ofNewFloatingThresholdTotalAmount( + newFloatingThresholdTotalAmount: NewFloatingThresholdTotalAmountPrice + ) = Price(newFloatingThresholdTotalAmount = newFloatingThresholdTotalAmount) @JvmStatic - fun ofNewFloatingTieredPackagePrice( - newFloatingTieredPackagePrice: NewFloatingTieredPackagePrice - ) = Price(newFloatingTieredPackagePrice = newFloatingTieredPackagePrice) + fun ofNewFloatingTieredPackage( + newFloatingTieredPackage: NewFloatingTieredPackagePrice + ) = Price(newFloatingTieredPackage = newFloatingTieredPackage) @JvmStatic - fun ofNewFloatingGroupedTieredPrice( - newFloatingGroupedTieredPrice: NewFloatingGroupedTieredPrice - ) = Price(newFloatingGroupedTieredPrice = newFloatingGroupedTieredPrice) + fun ofNewFloatingGroupedTiered( + newFloatingGroupedTiered: NewFloatingGroupedTieredPrice + ) = Price(newFloatingGroupedTiered = newFloatingGroupedTiered) @JvmStatic - fun ofNewFloatingMaxGroupTieredPrice( - newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice - ) = Price(newFloatingMaxGroupTieredPrice = newFloatingMaxGroupTieredPrice) + fun ofNewFloatingMaxGroupTieredPackage( + newFloatingMaxGroupTieredPackage: NewFloatingMaxGroupTieredPackagePrice + ) = Price(newFloatingMaxGroupTieredPackage = newFloatingMaxGroupTieredPackage) @JvmStatic - fun ofNewFloatingTieredWithMinimumPrice( - newFloatingTieredWithMinimumPrice: NewFloatingTieredWithMinimumPrice - ) = Price(newFloatingTieredWithMinimumPrice = newFloatingTieredWithMinimumPrice) + fun ofNewFloatingTieredWithMinimum( + newFloatingTieredWithMinimum: NewFloatingTieredWithMinimumPrice + ) = Price(newFloatingTieredWithMinimum = newFloatingTieredWithMinimum) @JvmStatic - fun ofNewFloatingPackageWithAllocationPrice( - newFloatingPackageWithAllocationPrice: NewFloatingPackageWithAllocationPrice - ) = - Price( - newFloatingPackageWithAllocationPrice = - newFloatingPackageWithAllocationPrice - ) + fun ofNewFloatingPackageWithAllocation( + newFloatingPackageWithAllocation: NewFloatingPackageWithAllocationPrice + ) = Price(newFloatingPackageWithAllocation = newFloatingPackageWithAllocation) @JvmStatic - fun ofNewFloatingTieredPackageWithMinimumPrice( - newFloatingTieredPackageWithMinimumPrice: - NewFloatingTieredPackageWithMinimumPrice - ) = - Price( - newFloatingTieredPackageWithMinimumPrice = - newFloatingTieredPackageWithMinimumPrice - ) + fun ofNewFloatingTieredPackageWithMinimum( + newFloatingTieredPackageWithMinimum: NewFloatingTieredPackageWithMinimumPrice + ) = Price(newFloatingTieredPackageWithMinimum = newFloatingTieredPackageWithMinimum) @JvmStatic - fun ofNewFloatingUnitWithPercentPrice( - newFloatingUnitWithPercentPrice: NewFloatingUnitWithPercentPrice - ) = Price(newFloatingUnitWithPercentPrice = newFloatingUnitWithPercentPrice) + fun ofNewFloatingUnitWithPercent( + newFloatingUnitWithPercent: NewFloatingUnitWithPercentPrice + ) = Price(newFloatingUnitWithPercent = newFloatingUnitWithPercent) @JvmStatic - fun ofNewFloatingTieredWithProrationPrice( - newFloatingTieredWithProrationPrice: NewFloatingTieredWithProrationPrice - ) = Price(newFloatingTieredWithProrationPrice = newFloatingTieredWithProrationPrice) + fun ofNewFloatingTieredWithProration( + newFloatingTieredWithProration: NewFloatingTieredWithProrationPrice + ) = Price(newFloatingTieredWithProration = newFloatingTieredWithProration) @JvmStatic - fun ofNewFloatingUnitWithProrationPrice( - newFloatingUnitWithProrationPrice: NewFloatingUnitWithProrationPrice - ) = Price(newFloatingUnitWithProrationPrice = newFloatingUnitWithProrationPrice) + fun ofNewFloatingUnitWithProration( + newFloatingUnitWithProration: NewFloatingUnitWithProrationPrice + ) = Price(newFloatingUnitWithProration = newFloatingUnitWithProration) @JvmStatic - fun ofNewFloatingGroupedAllocationPrice( - newFloatingGroupedAllocationPrice: NewFloatingGroupedAllocationPrice - ) = Price(newFloatingGroupedAllocationPrice = newFloatingGroupedAllocationPrice) + fun ofNewFloatingGroupedAllocation( + newFloatingGroupedAllocation: NewFloatingGroupedAllocationPrice + ) = Price(newFloatingGroupedAllocation = newFloatingGroupedAllocation) @JvmStatic - fun ofNewFloatingGroupedWithProratedMinimumPrice( - newFloatingGroupedWithProratedMinimumPrice: + fun ofNewFloatingGroupedWithProratedMinimum( + newFloatingGroupedWithProratedMinimum: NewFloatingGroupedWithProratedMinimumPrice ) = Price( - newFloatingGroupedWithProratedMinimumPrice = - newFloatingGroupedWithProratedMinimumPrice + newFloatingGroupedWithProratedMinimum = + newFloatingGroupedWithProratedMinimum ) @JvmStatic - fun ofNewFloatingGroupedWithMeteredMinimumPrice( - newFloatingGroupedWithMeteredMinimumPrice: - NewFloatingGroupedWithMeteredMinimumPrice + fun ofNewFloatingGroupedWithMeteredMinimum( + newFloatingGroupedWithMeteredMinimum: NewFloatingGroupedWithMeteredMinimumPrice ) = Price( - newFloatingGroupedWithMeteredMinimumPrice = - newFloatingGroupedWithMeteredMinimumPrice + newFloatingGroupedWithMeteredMinimum = newFloatingGroupedWithMeteredMinimum ) @JvmStatic - fun ofNewFloatingMatrixWithDisplayNamePrice( - newFloatingMatrixWithDisplayNamePrice: NewFloatingMatrixWithDisplayNamePrice - ) = - Price( - newFloatingMatrixWithDisplayNamePrice = - newFloatingMatrixWithDisplayNamePrice - ) + fun ofNewFloatingMatrixWithDisplayName( + newFloatingMatrixWithDisplayName: NewFloatingMatrixWithDisplayNamePrice + ) = Price(newFloatingMatrixWithDisplayName = newFloatingMatrixWithDisplayName) @JvmStatic - fun ofNewFloatingBulkWithProrationPrice( - newFloatingBulkWithProrationPrice: NewFloatingBulkWithProrationPrice - ) = Price(newFloatingBulkWithProrationPrice = newFloatingBulkWithProrationPrice) + fun ofNewFloatingBulkWithProration( + newFloatingBulkWithProration: NewFloatingBulkWithProrationPrice + ) = Price(newFloatingBulkWithProration = newFloatingBulkWithProration) @JvmStatic - fun ofNewFloatingGroupedTieredPackagePrice( - newFloatingGroupedTieredPackagePrice: NewFloatingGroupedTieredPackagePrice - ) = - Price( - newFloatingGroupedTieredPackagePrice = newFloatingGroupedTieredPackagePrice - ) + fun ofNewFloatingGroupedTieredPackage( + newFloatingGroupedTieredPackage: NewFloatingGroupedTieredPackagePrice + ) = Price(newFloatingGroupedTieredPackage = newFloatingGroupedTieredPackage) } interface Visitor { - fun visitNewFloatingUnitPrice(newFloatingUnitPrice: NewFloatingUnitPrice): T + fun visitNewFloatingUnit(newFloatingUnit: NewFloatingUnitPrice): T - fun visitNewFloatingPackagePrice( - newFloatingPackagePrice: NewFloatingPackagePrice - ): T + fun visitNewFloatingPackage(newFloatingPackage: NewFloatingPackagePrice): T - fun visitNewFloatingMatrixPrice(newFloatingMatrixPrice: NewFloatingMatrixPrice): T + fun visitNewFloatingMatrix(newFloatingMatrix: NewFloatingMatrixPrice): T - fun visitNewFloatingMatrixWithAllocationPrice( - newFloatingMatrixWithAllocationPrice: NewFloatingMatrixWithAllocationPrice + fun visitNewFloatingMatrixWithAllocation( + newFloatingMatrixWithAllocation: NewFloatingMatrixWithAllocationPrice ): T - fun visitNewFloatingTieredPrice(newFloatingTieredPrice: NewFloatingTieredPrice): T + fun visitNewFloatingTiered(newFloatingTiered: NewFloatingTieredPrice): T - fun visitNewFloatingTieredBpsPrice( - newFloatingTieredBpsPrice: NewFloatingTieredBpsPrice - ): T + fun visitNewFloatingTieredBps(newFloatingTieredBps: NewFloatingTieredBpsPrice): T - fun visitNewFloatingBpsPrice(newFloatingBpsPrice: NewFloatingBpsPrice): T + fun visitNewFloatingBps(newFloatingBps: NewFloatingBpsPrice): T - fun visitNewFloatingBulkBpsPrice( - newFloatingBulkBpsPrice: NewFloatingBulkBpsPrice - ): T + fun visitNewFloatingBulkBps(newFloatingBulkBps: NewFloatingBulkBpsPrice): T - fun visitNewFloatingBulkPrice(newFloatingBulkPrice: NewFloatingBulkPrice): T + fun visitNewFloatingBulk(newFloatingBulk: NewFloatingBulkPrice): T - fun visitNewFloatingThresholdTotalAmountPrice( - newFloatingThresholdTotalAmountPrice: NewFloatingThresholdTotalAmountPrice + fun visitNewFloatingThresholdTotalAmount( + newFloatingThresholdTotalAmount: NewFloatingThresholdTotalAmountPrice ): T - fun visitNewFloatingTieredPackagePrice( - newFloatingTieredPackagePrice: NewFloatingTieredPackagePrice + fun visitNewFloatingTieredPackage( + newFloatingTieredPackage: NewFloatingTieredPackagePrice ): T - fun visitNewFloatingGroupedTieredPrice( - newFloatingGroupedTieredPrice: NewFloatingGroupedTieredPrice + fun visitNewFloatingGroupedTiered( + newFloatingGroupedTiered: NewFloatingGroupedTieredPrice ): T - fun visitNewFloatingMaxGroupTieredPrice( - newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice + fun visitNewFloatingMaxGroupTieredPackage( + newFloatingMaxGroupTieredPackage: NewFloatingMaxGroupTieredPackagePrice ): T - fun visitNewFloatingTieredWithMinimumPrice( - newFloatingTieredWithMinimumPrice: NewFloatingTieredWithMinimumPrice + fun visitNewFloatingTieredWithMinimum( + newFloatingTieredWithMinimum: NewFloatingTieredWithMinimumPrice ): T - fun visitNewFloatingPackageWithAllocationPrice( - newFloatingPackageWithAllocationPrice: NewFloatingPackageWithAllocationPrice + fun visitNewFloatingPackageWithAllocation( + newFloatingPackageWithAllocation: NewFloatingPackageWithAllocationPrice ): T - fun visitNewFloatingTieredPackageWithMinimumPrice( - newFloatingTieredPackageWithMinimumPrice: - NewFloatingTieredPackageWithMinimumPrice + fun visitNewFloatingTieredPackageWithMinimum( + newFloatingTieredPackageWithMinimum: NewFloatingTieredPackageWithMinimumPrice ): T - fun visitNewFloatingUnitWithPercentPrice( - newFloatingUnitWithPercentPrice: NewFloatingUnitWithPercentPrice + fun visitNewFloatingUnitWithPercent( + newFloatingUnitWithPercent: NewFloatingUnitWithPercentPrice ): T - fun visitNewFloatingTieredWithProrationPrice( - newFloatingTieredWithProrationPrice: NewFloatingTieredWithProrationPrice + fun visitNewFloatingTieredWithProration( + newFloatingTieredWithProration: NewFloatingTieredWithProrationPrice ): T - fun visitNewFloatingUnitWithProrationPrice( - newFloatingUnitWithProrationPrice: NewFloatingUnitWithProrationPrice + fun visitNewFloatingUnitWithProration( + newFloatingUnitWithProration: NewFloatingUnitWithProrationPrice ): T - fun visitNewFloatingGroupedAllocationPrice( - newFloatingGroupedAllocationPrice: NewFloatingGroupedAllocationPrice + fun visitNewFloatingGroupedAllocation( + newFloatingGroupedAllocation: NewFloatingGroupedAllocationPrice ): T - fun visitNewFloatingGroupedWithProratedMinimumPrice( - newFloatingGroupedWithProratedMinimumPrice: + fun visitNewFloatingGroupedWithProratedMinimum( + newFloatingGroupedWithProratedMinimum: NewFloatingGroupedWithProratedMinimumPrice ): T - fun visitNewFloatingGroupedWithMeteredMinimumPrice( - newFloatingGroupedWithMeteredMinimumPrice: - NewFloatingGroupedWithMeteredMinimumPrice + fun visitNewFloatingGroupedWithMeteredMinimum( + newFloatingGroupedWithMeteredMinimum: NewFloatingGroupedWithMeteredMinimumPrice ): T - fun visitNewFloatingMatrixWithDisplayNamePrice( - newFloatingMatrixWithDisplayNamePrice: NewFloatingMatrixWithDisplayNamePrice + fun visitNewFloatingMatrixWithDisplayName( + newFloatingMatrixWithDisplayName: NewFloatingMatrixWithDisplayNamePrice ): T - fun visitNewFloatingBulkWithProrationPrice( - newFloatingBulkWithProrationPrice: NewFloatingBulkWithProrationPrice + fun visitNewFloatingBulkWithProration( + newFloatingBulkWithProration: NewFloatingBulkWithProrationPrice ): T - fun visitNewFloatingGroupedTieredPackagePrice( - newFloatingGroupedTieredPackagePrice: NewFloatingGroupedTieredPackagePrice + fun visitNewFloatingGroupedTieredPackage( + newFloatingGroupedTieredPackage: NewFloatingGroupedTieredPackagePrice ): T fun unknown(json: JsonValue?): T { @@ -3549,7 +3416,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingUnitPrice = it, _json = json) + return Price(newFloatingUnit = it, _json = json) } } "package" -> { @@ -3557,7 +3424,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingPackagePrice = it, _json = json) + return Price(newFloatingPackage = it, _json = json) } } "matrix" -> { @@ -3565,7 +3432,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingMatrixPrice = it, _json = json) + return Price(newFloatingMatrix = it, _json = json) } } "matrix_with_allocation" -> { @@ -3576,10 +3443,7 @@ constructor( it.validate() } ?.let { - return Price( - newFloatingMatrixWithAllocationPrice = it, - _json = json - ) + return Price(newFloatingMatrixWithAllocation = it, _json = json) } } "tiered" -> { @@ -3587,7 +3451,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingTieredPrice = it, _json = json) + return Price(newFloatingTiered = it, _json = json) } } "tiered_bps" -> { @@ -3595,7 +3459,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingTieredBpsPrice = it, _json = json) + return Price(newFloatingTieredBps = it, _json = json) } } "bps" -> { @@ -3603,7 +3467,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingBpsPrice = it, _json = json) + return Price(newFloatingBps = it, _json = json) } } "bulk_bps" -> { @@ -3611,7 +3475,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingBulkBpsPrice = it, _json = json) + return Price(newFloatingBulkBps = it, _json = json) } } "bulk" -> { @@ -3619,7 +3483,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingBulkPrice = it, _json = json) + return Price(newFloatingBulk = it, _json = json) } } "threshold_total_amount" -> { @@ -3630,10 +3494,7 @@ constructor( it.validate() } ?.let { - return Price( - newFloatingThresholdTotalAmountPrice = it, - _json = json - ) + return Price(newFloatingThresholdTotalAmount = it, _json = json) } } "tiered_package" -> { @@ -3641,7 +3502,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingTieredPackagePrice = it, _json = json) + return Price(newFloatingTieredPackage = it, _json = json) } } "grouped_tiered" -> { @@ -3649,15 +3510,21 @@ constructor( it.validate() } ?.let { - return Price(newFloatingGroupedTieredPrice = it, _json = json) + return Price(newFloatingGroupedTiered = it, _json = json) } } - "max_group_tiered" -> { - tryDeserialize(node, jacksonTypeRef()) { + "max_group_tiered_package" -> { + tryDeserialize( + node, + jacksonTypeRef() + ) { it.validate() } ?.let { - return Price(newFloatingMaxGroupTieredPrice = it, _json = json) + return Price( + newFloatingMaxGroupTieredPackage = it, + _json = json + ) } } "tiered_with_minimum" -> { @@ -3668,10 +3535,7 @@ constructor( it.validate() } ?.let { - return Price( - newFloatingTieredWithMinimumPrice = it, - _json = json - ) + return Price(newFloatingTieredWithMinimum = it, _json = json) } } "package_with_allocation" -> { @@ -3683,7 +3547,7 @@ constructor( } ?.let { return Price( - newFloatingPackageWithAllocationPrice = it, + newFloatingPackageWithAllocation = it, _json = json ) } @@ -3697,7 +3561,7 @@ constructor( } ?.let { return Price( - newFloatingTieredPackageWithMinimumPrice = it, + newFloatingTieredPackageWithMinimum = it, _json = json ) } @@ -3710,7 +3574,7 @@ constructor( it.validate() } ?.let { - return Price(newFloatingUnitWithPercentPrice = it, _json = json) + return Price(newFloatingUnitWithPercent = it, _json = json) } } "tiered_with_proration" -> { @@ -3721,10 +3585,7 @@ constructor( it.validate() } ?.let { - return Price( - newFloatingTieredWithProrationPrice = it, - _json = json - ) + return Price(newFloatingTieredWithProration = it, _json = json) } } "unit_with_proration" -> { @@ -3735,10 +3596,7 @@ constructor( it.validate() } ?.let { - return Price( - newFloatingUnitWithProrationPrice = it, - _json = json - ) + return Price(newFloatingUnitWithProration = it, _json = json) } } "grouped_allocation" -> { @@ -3749,10 +3607,7 @@ constructor( it.validate() } ?.let { - return Price( - newFloatingGroupedAllocationPrice = it, - _json = json - ) + return Price(newFloatingGroupedAllocation = it, _json = json) } } "grouped_with_prorated_minimum" -> { @@ -3764,7 +3619,7 @@ constructor( } ?.let { return Price( - newFloatingGroupedWithProratedMinimumPrice = it, + newFloatingGroupedWithProratedMinimum = it, _json = json ) } @@ -3778,7 +3633,7 @@ constructor( } ?.let { return Price( - newFloatingGroupedWithMeteredMinimumPrice = it, + newFloatingGroupedWithMeteredMinimum = it, _json = json ) } @@ -3792,7 +3647,7 @@ constructor( } ?.let { return Price( - newFloatingMatrixWithDisplayNamePrice = it, + newFloatingMatrixWithDisplayName = it, _json = json ) } @@ -3805,10 +3660,7 @@ constructor( it.validate() } ?.let { - return Price( - newFloatingBulkWithProrationPrice = it, - _json = json - ) + return Price(newFloatingBulkWithProration = it, _json = json) } } "grouped_tiered_package" -> { @@ -3819,10 +3671,7 @@ constructor( it.validate() } ?.let { - return Price( - newFloatingGroupedTieredPackagePrice = it, - _json = json - ) + return Price(newFloatingGroupedTieredPackage = it, _json = json) } } } @@ -3839,56 +3688,55 @@ constructor( provider: SerializerProvider ) { when { - value.newFloatingUnitPrice != null -> - generator.writeObject(value.newFloatingUnitPrice) - value.newFloatingPackagePrice != null -> - generator.writeObject(value.newFloatingPackagePrice) - value.newFloatingMatrixPrice != null -> - generator.writeObject(value.newFloatingMatrixPrice) - value.newFloatingMatrixWithAllocationPrice != null -> - generator.writeObject(value.newFloatingMatrixWithAllocationPrice) - value.newFloatingTieredPrice != null -> - generator.writeObject(value.newFloatingTieredPrice) - value.newFloatingTieredBpsPrice != null -> - generator.writeObject(value.newFloatingTieredBpsPrice) - value.newFloatingBpsPrice != null -> - generator.writeObject(value.newFloatingBpsPrice) - value.newFloatingBulkBpsPrice != null -> - generator.writeObject(value.newFloatingBulkBpsPrice) - value.newFloatingBulkPrice != null -> - generator.writeObject(value.newFloatingBulkPrice) - value.newFloatingThresholdTotalAmountPrice != null -> - generator.writeObject(value.newFloatingThresholdTotalAmountPrice) - value.newFloatingTieredPackagePrice != null -> - generator.writeObject(value.newFloatingTieredPackagePrice) - value.newFloatingGroupedTieredPrice != null -> - generator.writeObject(value.newFloatingGroupedTieredPrice) - value.newFloatingMaxGroupTieredPrice != null -> - generator.writeObject(value.newFloatingMaxGroupTieredPrice) - value.newFloatingTieredWithMinimumPrice != null -> - generator.writeObject(value.newFloatingTieredWithMinimumPrice) - value.newFloatingPackageWithAllocationPrice != null -> - generator.writeObject(value.newFloatingPackageWithAllocationPrice) - value.newFloatingTieredPackageWithMinimumPrice != null -> - generator.writeObject(value.newFloatingTieredPackageWithMinimumPrice) - value.newFloatingUnitWithPercentPrice != null -> - generator.writeObject(value.newFloatingUnitWithPercentPrice) - value.newFloatingTieredWithProrationPrice != null -> - generator.writeObject(value.newFloatingTieredWithProrationPrice) - value.newFloatingUnitWithProrationPrice != null -> - generator.writeObject(value.newFloatingUnitWithProrationPrice) - value.newFloatingGroupedAllocationPrice != null -> - generator.writeObject(value.newFloatingGroupedAllocationPrice) - value.newFloatingGroupedWithProratedMinimumPrice != null -> - generator.writeObject(value.newFloatingGroupedWithProratedMinimumPrice) - value.newFloatingGroupedWithMeteredMinimumPrice != null -> - generator.writeObject(value.newFloatingGroupedWithMeteredMinimumPrice) - value.newFloatingMatrixWithDisplayNamePrice != null -> - generator.writeObject(value.newFloatingMatrixWithDisplayNamePrice) - value.newFloatingBulkWithProrationPrice != null -> - generator.writeObject(value.newFloatingBulkWithProrationPrice) - value.newFloatingGroupedTieredPackagePrice != null -> - generator.writeObject(value.newFloatingGroupedTieredPackagePrice) + value.newFloatingUnit != null -> + generator.writeObject(value.newFloatingUnit) + value.newFloatingPackage != null -> + generator.writeObject(value.newFloatingPackage) + value.newFloatingMatrix != null -> + generator.writeObject(value.newFloatingMatrix) + value.newFloatingMatrixWithAllocation != null -> + generator.writeObject(value.newFloatingMatrixWithAllocation) + value.newFloatingTiered != null -> + generator.writeObject(value.newFloatingTiered) + value.newFloatingTieredBps != null -> + generator.writeObject(value.newFloatingTieredBps) + value.newFloatingBps != null -> generator.writeObject(value.newFloatingBps) + value.newFloatingBulkBps != null -> + generator.writeObject(value.newFloatingBulkBps) + value.newFloatingBulk != null -> + generator.writeObject(value.newFloatingBulk) + value.newFloatingThresholdTotalAmount != null -> + generator.writeObject(value.newFloatingThresholdTotalAmount) + value.newFloatingTieredPackage != null -> + generator.writeObject(value.newFloatingTieredPackage) + value.newFloatingGroupedTiered != null -> + generator.writeObject(value.newFloatingGroupedTiered) + value.newFloatingMaxGroupTieredPackage != null -> + generator.writeObject(value.newFloatingMaxGroupTieredPackage) + value.newFloatingTieredWithMinimum != null -> + generator.writeObject(value.newFloatingTieredWithMinimum) + value.newFloatingPackageWithAllocation != null -> + generator.writeObject(value.newFloatingPackageWithAllocation) + value.newFloatingTieredPackageWithMinimum != null -> + generator.writeObject(value.newFloatingTieredPackageWithMinimum) + value.newFloatingUnitWithPercent != null -> + generator.writeObject(value.newFloatingUnitWithPercent) + value.newFloatingTieredWithProration != null -> + generator.writeObject(value.newFloatingTieredWithProration) + value.newFloatingUnitWithProration != null -> + generator.writeObject(value.newFloatingUnitWithProration) + value.newFloatingGroupedAllocation != null -> + generator.writeObject(value.newFloatingGroupedAllocation) + value.newFloatingGroupedWithProratedMinimum != null -> + generator.writeObject(value.newFloatingGroupedWithProratedMinimum) + value.newFloatingGroupedWithMeteredMinimum != null -> + generator.writeObject(value.newFloatingGroupedWithMeteredMinimum) + value.newFloatingMatrixWithDisplayName != null -> + generator.writeObject(value.newFloatingMatrixWithDisplayName) + value.newFloatingBulkWithProration != null -> + generator.writeObject(value.newFloatingBulkWithProration) + value.newFloatingGroupedTieredPackage != null -> + generator.writeObject(value.newFloatingGroupedTieredPackage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Price") } @@ -21162,7 +21010,7 @@ constructor( } @NoAutoDetect - class NewFloatingMaxGroupTieredPrice + class NewFloatingMaxGroupTieredPackagePrice @JsonCreator private constructor( @JsonProperty("cadence") @@ -21174,9 +21022,9 @@ constructor( @JsonProperty("item_id") @ExcludeMissing private val itemId: JsonField = JsonMissing.of(), - @JsonProperty("max_group_tiered_config") + @JsonProperty("max_group_tiered_package_config") @ExcludeMissing - private val maxGroupTieredConfig: JsonField = + private val maxGroupTieredPackageConfig: JsonField = JsonMissing.of(), @JsonProperty("model_type") @ExcludeMissing @@ -21226,8 +21074,8 @@ constructor( /** The id of the item the plan will be associated with. */ fun itemId(): String = itemId.getRequired("item_id") - fun maxGroupTieredConfig(): MaxGroupTieredConfig = - maxGroupTieredConfig.getRequired("max_group_tiered_config") + fun maxGroupTieredPackageConfig(): MaxGroupTieredPackageConfig = + maxGroupTieredPackageConfig.getRequired("max_group_tiered_package_config") fun modelType(): ModelType = modelType.getRequired("model_type") @@ -21306,9 +21154,10 @@ constructor( /** The id of the item the plan will be associated with. */ @JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField = itemId - @JsonProperty("max_group_tiered_config") + @JsonProperty("max_group_tiered_package_config") @ExcludeMissing - fun _maxGroupTieredConfig(): JsonField = maxGroupTieredConfig + fun _maxGroupTieredPackageConfig(): JsonField = + maxGroupTieredPackageConfig @JsonProperty("model_type") @ExcludeMissing @@ -21389,7 +21238,7 @@ constructor( private var validated: Boolean = false - fun validate(): NewFloatingMaxGroupTieredPrice = apply { + fun validate(): NewFloatingMaxGroupTieredPackagePrice = apply { if (validated) { return@apply } @@ -21397,7 +21246,7 @@ constructor( cadence() currency() itemId() - maxGroupTieredConfig().validate() + maxGroupTieredPackageConfig().validate() modelType() name() billableMetricId() @@ -21424,7 +21273,9 @@ constructor( private var cadence: JsonField? = null private var currency: JsonField? = null private var itemId: JsonField? = null - private var maxGroupTieredConfig: JsonField? = null + private var maxGroupTieredPackageConfig: + JsonField? = + null private var modelType: JsonField? = null private var name: JsonField? = null private var billableMetricId: JsonField = JsonMissing.of() @@ -21443,27 +21294,31 @@ constructor( @JvmSynthetic internal fun from( - newFloatingMaxGroupTieredPrice: NewFloatingMaxGroupTieredPrice + newFloatingMaxGroupTieredPackagePrice: NewFloatingMaxGroupTieredPackagePrice ) = apply { - cadence = newFloatingMaxGroupTieredPrice.cadence - currency = newFloatingMaxGroupTieredPrice.currency - itemId = newFloatingMaxGroupTieredPrice.itemId - maxGroupTieredConfig = newFloatingMaxGroupTieredPrice.maxGroupTieredConfig - modelType = newFloatingMaxGroupTieredPrice.modelType - name = newFloatingMaxGroupTieredPrice.name - billableMetricId = newFloatingMaxGroupTieredPrice.billableMetricId - billedInAdvance = newFloatingMaxGroupTieredPrice.billedInAdvance + cadence = newFloatingMaxGroupTieredPackagePrice.cadence + currency = newFloatingMaxGroupTieredPackagePrice.currency + itemId = newFloatingMaxGroupTieredPackagePrice.itemId + maxGroupTieredPackageConfig = + newFloatingMaxGroupTieredPackagePrice.maxGroupTieredPackageConfig + modelType = newFloatingMaxGroupTieredPackagePrice.modelType + name = newFloatingMaxGroupTieredPackagePrice.name + billableMetricId = newFloatingMaxGroupTieredPackagePrice.billableMetricId + billedInAdvance = newFloatingMaxGroupTieredPackagePrice.billedInAdvance billingCycleConfiguration = - newFloatingMaxGroupTieredPrice.billingCycleConfiguration - conversionRate = newFloatingMaxGroupTieredPrice.conversionRate - externalPriceId = newFloatingMaxGroupTieredPrice.externalPriceId - fixedPriceQuantity = newFloatingMaxGroupTieredPrice.fixedPriceQuantity - invoiceGroupingKey = newFloatingMaxGroupTieredPrice.invoiceGroupingKey + newFloatingMaxGroupTieredPackagePrice.billingCycleConfiguration + conversionRate = newFloatingMaxGroupTieredPackagePrice.conversionRate + externalPriceId = newFloatingMaxGroupTieredPackagePrice.externalPriceId + fixedPriceQuantity = + newFloatingMaxGroupTieredPackagePrice.fixedPriceQuantity + invoiceGroupingKey = + newFloatingMaxGroupTieredPackagePrice.invoiceGroupingKey invoicingCycleConfiguration = - newFloatingMaxGroupTieredPrice.invoicingCycleConfiguration - metadata = newFloatingMaxGroupTieredPrice.metadata + newFloatingMaxGroupTieredPackagePrice.invoicingCycleConfiguration + metadata = newFloatingMaxGroupTieredPackagePrice.metadata additionalProperties = - newFloatingMaxGroupTieredPrice.additionalProperties.toMutableMap() + newFloatingMaxGroupTieredPackagePrice.additionalProperties + .toMutableMap() } /** The cadence to bill for this price on. */ @@ -21484,12 +21339,13 @@ constructor( /** The id of the item the plan will be associated with. */ fun itemId(itemId: JsonField) = apply { this.itemId = itemId } - fun maxGroupTieredConfig(maxGroupTieredConfig: MaxGroupTieredConfig) = - maxGroupTieredConfig(JsonField.of(maxGroupTieredConfig)) + fun maxGroupTieredPackageConfig( + maxGroupTieredPackageConfig: MaxGroupTieredPackageConfig + ) = maxGroupTieredPackageConfig(JsonField.of(maxGroupTieredPackageConfig)) - fun maxGroupTieredConfig( - maxGroupTieredConfig: JsonField - ) = apply { this.maxGroupTieredConfig = maxGroupTieredConfig } + fun maxGroupTieredPackageConfig( + maxGroupTieredPackageConfig: JsonField + ) = apply { this.maxGroupTieredPackageConfig = maxGroupTieredPackageConfig } fun modelType(modelType: ModelType) = modelType(JsonField.of(modelType)) @@ -21731,12 +21587,15 @@ constructor( keys.forEach(::removeAdditionalProperty) } - fun build(): NewFloatingMaxGroupTieredPrice = - NewFloatingMaxGroupTieredPrice( + fun build(): NewFloatingMaxGroupTieredPackagePrice = + NewFloatingMaxGroupTieredPackagePrice( checkRequired("cadence", cadence), checkRequired("currency", currency), checkRequired("itemId", itemId), - checkRequired("maxGroupTieredConfig", maxGroupTieredConfig), + checkRequired( + "maxGroupTieredPackageConfig", + maxGroupTieredPackageConfig + ), checkRequired("modelType", modelType), checkRequired("name", name), billableMetricId, @@ -21836,7 +21695,7 @@ constructor( } @NoAutoDetect - class MaxGroupTieredConfig + class MaxGroupTieredPackageConfig @JsonCreator private constructor( @JsonAnySetter @@ -21849,7 +21708,7 @@ constructor( private var validated: Boolean = false - fun validate(): MaxGroupTieredConfig = apply { + fun validate(): MaxGroupTieredPackageConfig = apply { if (validated) { return@apply } @@ -21870,9 +21729,11 @@ constructor( mutableMapOf() @JvmSynthetic - internal fun from(maxGroupTieredConfig: MaxGroupTieredConfig) = apply { + internal fun from( + maxGroupTieredPackageConfig: MaxGroupTieredPackageConfig + ) = apply { additionalProperties = - maxGroupTieredConfig.additionalProperties.toMutableMap() + maxGroupTieredPackageConfig.additionalProperties.toMutableMap() } fun additionalProperties(additionalProperties: Map) = @@ -21897,8 +21758,8 @@ constructor( keys.forEach(::removeAdditionalProperty) } - fun build(): MaxGroupTieredConfig = - MaxGroupTieredConfig(additionalProperties.toImmutable()) + fun build(): MaxGroupTieredPackageConfig = + MaxGroupTieredPackageConfig(additionalProperties.toImmutable()) } override fun equals(other: Any?): Boolean { @@ -21906,7 +21767,7 @@ constructor( return true } - return /* spotless:off */ other is MaxGroupTieredConfig && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is MaxGroupTieredPackageConfig && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ @@ -21916,7 +21777,7 @@ constructor( override fun hashCode(): Int = hashCode override fun toString() = - "MaxGroupTieredConfig{additionalProperties=$additionalProperties}" + "MaxGroupTieredPackageConfig{additionalProperties=$additionalProperties}" } class ModelType @@ -21930,29 +21791,29 @@ constructor( companion object { - @JvmField val MAX_GROUP_TIERED = of("max_group_tiered") + @JvmField val MAX_GROUP_TIERED_PACKAGE = of("max_group_tiered_package") @JvmStatic fun of(value: String) = ModelType(JsonField.of(value)) } enum class Known { - MAX_GROUP_TIERED, + MAX_GROUP_TIERED_PACKAGE, } enum class Value { - MAX_GROUP_TIERED, + MAX_GROUP_TIERED_PACKAGE, _UNKNOWN, } fun value(): Value = when (this) { - MAX_GROUP_TIERED -> Value.MAX_GROUP_TIERED + MAX_GROUP_TIERED_PACKAGE -> Value.MAX_GROUP_TIERED_PACKAGE else -> Value._UNKNOWN } fun known(): Known = when (this) { - MAX_GROUP_TIERED -> Known.MAX_GROUP_TIERED + MAX_GROUP_TIERED_PACKAGE -> Known.MAX_GROUP_TIERED_PACKAGE else -> throw OrbInvalidDataException("Unknown ModelType: $value") } @@ -22455,17 +22316,17 @@ constructor( return true } - return /* spotless:off */ other is NewFloatingMaxGroupTieredPrice && cadence == other.cadence && currency == other.currency && itemId == other.itemId && maxGroupTieredConfig == other.maxGroupTieredConfig && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is NewFloatingMaxGroupTieredPackagePrice && cadence == other.cadence && currency == other.currency && itemId == other.itemId && maxGroupTieredPackageConfig == other.maxGroupTieredPackageConfig && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(cadence, currency, itemId, maxGroupTieredConfig, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(cadence, currency, itemId, maxGroupTieredPackageConfig, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "NewFloatingMaxGroupTieredPrice{cadence=$cadence, currency=$currency, itemId=$itemId, maxGroupTieredConfig=$maxGroupTieredConfig, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, additionalProperties=$additionalProperties}" + "NewFloatingMaxGroupTieredPackagePrice{cadence=$cadence, currency=$currency, itemId=$itemId, maxGroupTieredPackageConfig=$maxGroupTieredPackageConfig, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, additionalProperties=$additionalProperties}" } @NoAutoDetect @@ -38430,8 +38291,8 @@ constructor( * The start date of the adjustment interval. This is the date that the adjustment will * start affecting prices on the subscription. */ - fun startDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - startDate(StartDate.ofBillingCycleRelativeDate(billingCycleRelativeDate)) + fun startDate(billingCycleRelative: BillingCycleRelativeDate) = + startDate(StartDate.ofBillingCycleRelative(billingCycleRelative)) /** * The end date of the adjustment interval. This is the date that the adjustment will @@ -38461,8 +38322,8 @@ constructor( * The end date of the adjustment interval. This is the date that the adjustment will * stop affecting prices on the subscription. */ - fun endDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - endDate(EndDate.ofBillingCycleRelativeDate(billingCycleRelativeDate)) + fun endDate(billingCycleRelative: BillingCycleRelativeDate) = + endDate(EndDate.ofBillingCycleRelative(billingCycleRelative)) fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -40026,31 +39887,31 @@ constructor( class StartDate private constructor( private val dateTime: OffsetDateTime? = null, - private val billingCycleRelativeDate: BillingCycleRelativeDate? = null, + private val billingCycleRelative: BillingCycleRelativeDate? = null, private val _json: JsonValue? = null, ) { fun dateTime(): Optional = Optional.ofNullable(dateTime) - fun billingCycleRelativeDate(): Optional = - Optional.ofNullable(billingCycleRelativeDate) + fun billingCycleRelative(): Optional = + Optional.ofNullable(billingCycleRelative) fun isDateTime(): Boolean = dateTime != null - fun isBillingCycleRelativeDate(): Boolean = billingCycleRelativeDate != null + fun isBillingCycleRelative(): Boolean = billingCycleRelative != null fun asDateTime(): OffsetDateTime = dateTime.getOrThrow("dateTime") - fun asBillingCycleRelativeDate(): BillingCycleRelativeDate = - billingCycleRelativeDate.getOrThrow("billingCycleRelativeDate") + fun asBillingCycleRelative(): BillingCycleRelativeDate = + billingCycleRelative.getOrThrow("billingCycleRelative") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { dateTime != null -> visitor.visitDateTime(dateTime) - billingCycleRelativeDate != null -> - visitor.visitBillingCycleRelativeDate(billingCycleRelativeDate) + billingCycleRelative != null -> + visitor.visitBillingCycleRelative(billingCycleRelative) else -> visitor.unknown(_json) } } @@ -40066,8 +39927,8 @@ constructor( object : Visitor { override fun visitDateTime(dateTime: OffsetDateTime) {} - override fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate + override fun visitBillingCycleRelative( + billingCycleRelative: BillingCycleRelativeDate ) {} } ) @@ -40079,16 +39940,16 @@ constructor( return true } - return /* spotless:off */ other is StartDate && dateTime == other.dateTime && billingCycleRelativeDate == other.billingCycleRelativeDate /* spotless:on */ + return /* spotless:off */ other is StartDate && dateTime == other.dateTime && billingCycleRelative == other.billingCycleRelative /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelativeDate) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelative) /* spotless:on */ override fun toString(): String = when { dateTime != null -> "StartDate{dateTime=$dateTime}" - billingCycleRelativeDate != null -> - "StartDate{billingCycleRelativeDate=$billingCycleRelativeDate}" + billingCycleRelative != null -> + "StartDate{billingCycleRelative=$billingCycleRelative}" _json != null -> "StartDate{_unknown=$_json}" else -> throw IllegalStateException("Invalid StartDate") } @@ -40098,17 +39959,15 @@ constructor( @JvmStatic fun ofDateTime(dateTime: OffsetDateTime) = StartDate(dateTime = dateTime) @JvmStatic - fun ofBillingCycleRelativeDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - StartDate(billingCycleRelativeDate = billingCycleRelativeDate) + fun ofBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate) = + StartDate(billingCycleRelative = billingCycleRelative) } interface Visitor { fun visitDateTime(dateTime: OffsetDateTime): T - fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate - ): T + fun visitBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown StartDate: $json") @@ -40124,7 +39983,7 @@ constructor( return StartDate(dateTime = it, _json = json) } tryDeserialize(node, jacksonTypeRef())?.let { - return StartDate(billingCycleRelativeDate = it, _json = json) + return StartDate(billingCycleRelative = it, _json = json) } return StartDate(_json = json) @@ -40140,8 +39999,8 @@ constructor( ) { when { value.dateTime != null -> generator.writeObject(value.dateTime) - value.billingCycleRelativeDate != null -> - generator.writeObject(value.billingCycleRelativeDate) + value.billingCycleRelative != null -> + generator.writeObject(value.billingCycleRelative) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid StartDate") } @@ -40158,31 +40017,31 @@ constructor( class EndDate private constructor( private val dateTime: OffsetDateTime? = null, - private val billingCycleRelativeDate: BillingCycleRelativeDate? = null, + private val billingCycleRelative: BillingCycleRelativeDate? = null, private val _json: JsonValue? = null, ) { fun dateTime(): Optional = Optional.ofNullable(dateTime) - fun billingCycleRelativeDate(): Optional = - Optional.ofNullable(billingCycleRelativeDate) + fun billingCycleRelative(): Optional = + Optional.ofNullable(billingCycleRelative) fun isDateTime(): Boolean = dateTime != null - fun isBillingCycleRelativeDate(): Boolean = billingCycleRelativeDate != null + fun isBillingCycleRelative(): Boolean = billingCycleRelative != null fun asDateTime(): OffsetDateTime = dateTime.getOrThrow("dateTime") - fun asBillingCycleRelativeDate(): BillingCycleRelativeDate = - billingCycleRelativeDate.getOrThrow("billingCycleRelativeDate") + fun asBillingCycleRelative(): BillingCycleRelativeDate = + billingCycleRelative.getOrThrow("billingCycleRelative") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { dateTime != null -> visitor.visitDateTime(dateTime) - billingCycleRelativeDate != null -> - visitor.visitBillingCycleRelativeDate(billingCycleRelativeDate) + billingCycleRelative != null -> + visitor.visitBillingCycleRelative(billingCycleRelative) else -> visitor.unknown(_json) } } @@ -40198,8 +40057,8 @@ constructor( object : Visitor { override fun visitDateTime(dateTime: OffsetDateTime) {} - override fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate + override fun visitBillingCycleRelative( + billingCycleRelative: BillingCycleRelativeDate ) {} } ) @@ -40211,16 +40070,16 @@ constructor( return true } - return /* spotless:off */ other is EndDate && dateTime == other.dateTime && billingCycleRelativeDate == other.billingCycleRelativeDate /* spotless:on */ + return /* spotless:off */ other is EndDate && dateTime == other.dateTime && billingCycleRelative == other.billingCycleRelative /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelativeDate) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelative) /* spotless:on */ override fun toString(): String = when { dateTime != null -> "EndDate{dateTime=$dateTime}" - billingCycleRelativeDate != null -> - "EndDate{billingCycleRelativeDate=$billingCycleRelativeDate}" + billingCycleRelative != null -> + "EndDate{billingCycleRelative=$billingCycleRelative}" _json != null -> "EndDate{_unknown=$_json}" else -> throw IllegalStateException("Invalid EndDate") } @@ -40230,17 +40089,15 @@ constructor( @JvmStatic fun ofDateTime(dateTime: OffsetDateTime) = EndDate(dateTime = dateTime) @JvmStatic - fun ofBillingCycleRelativeDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - EndDate(billingCycleRelativeDate = billingCycleRelativeDate) + fun ofBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate) = + EndDate(billingCycleRelative = billingCycleRelative) } interface Visitor { fun visitDateTime(dateTime: OffsetDateTime): T - fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate - ): T + fun visitBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown EndDate: $json") @@ -40256,7 +40113,7 @@ constructor( return EndDate(dateTime = it, _json = json) } tryDeserialize(node, jacksonTypeRef())?.let { - return EndDate(billingCycleRelativeDate = it, _json = json) + return EndDate(billingCycleRelative = it, _json = json) } return EndDate(_json = json) @@ -40272,8 +40129,8 @@ constructor( ) { when { value.dateTime != null -> generator.writeObject(value.dateTime) - value.billingCycleRelativeDate != null -> - generator.writeObject(value.billingCycleRelativeDate) + value.billingCycleRelative != null -> + generator.writeObject(value.billingCycleRelative) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid EndDate") } @@ -40511,8 +40368,8 @@ constructor( * The updated end date of this price interval. If not specified, the start date will * not be updated. */ - fun endDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - endDate(EndDate.ofBillingCycleRelativeDate(billingCycleRelativeDate)) + fun endDate(billingCycleRelative: BillingCycleRelativeDate) = + endDate(EndDate.ofBillingCycleRelative(billingCycleRelative)) /** * A list of fixed fee quantity transitions to use for this price interval. Note that @@ -40586,8 +40443,8 @@ constructor( * The updated start date of this price interval. If not specified, the start date will * not be updated. */ - fun startDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - startDate(StartDate.ofBillingCycleRelativeDate(billingCycleRelativeDate)) + fun startDate(billingCycleRelative: BillingCycleRelativeDate) = + startDate(StartDate.ofBillingCycleRelative(billingCycleRelative)) fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -40628,31 +40485,31 @@ constructor( class EndDate private constructor( private val dateTime: OffsetDateTime? = null, - private val billingCycleRelativeDate: BillingCycleRelativeDate? = null, + private val billingCycleRelative: BillingCycleRelativeDate? = null, private val _json: JsonValue? = null, ) { fun dateTime(): Optional = Optional.ofNullable(dateTime) - fun billingCycleRelativeDate(): Optional = - Optional.ofNullable(billingCycleRelativeDate) + fun billingCycleRelative(): Optional = + Optional.ofNullable(billingCycleRelative) fun isDateTime(): Boolean = dateTime != null - fun isBillingCycleRelativeDate(): Boolean = billingCycleRelativeDate != null + fun isBillingCycleRelative(): Boolean = billingCycleRelative != null fun asDateTime(): OffsetDateTime = dateTime.getOrThrow("dateTime") - fun asBillingCycleRelativeDate(): BillingCycleRelativeDate = - billingCycleRelativeDate.getOrThrow("billingCycleRelativeDate") + fun asBillingCycleRelative(): BillingCycleRelativeDate = + billingCycleRelative.getOrThrow("billingCycleRelative") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { dateTime != null -> visitor.visitDateTime(dateTime) - billingCycleRelativeDate != null -> - visitor.visitBillingCycleRelativeDate(billingCycleRelativeDate) + billingCycleRelative != null -> + visitor.visitBillingCycleRelative(billingCycleRelative) else -> visitor.unknown(_json) } } @@ -40668,8 +40525,8 @@ constructor( object : Visitor { override fun visitDateTime(dateTime: OffsetDateTime) {} - override fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate + override fun visitBillingCycleRelative( + billingCycleRelative: BillingCycleRelativeDate ) {} } ) @@ -40681,16 +40538,16 @@ constructor( return true } - return /* spotless:off */ other is EndDate && dateTime == other.dateTime && billingCycleRelativeDate == other.billingCycleRelativeDate /* spotless:on */ + return /* spotless:off */ other is EndDate && dateTime == other.dateTime && billingCycleRelative == other.billingCycleRelative /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelativeDate) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelative) /* spotless:on */ override fun toString(): String = when { dateTime != null -> "EndDate{dateTime=$dateTime}" - billingCycleRelativeDate != null -> - "EndDate{billingCycleRelativeDate=$billingCycleRelativeDate}" + billingCycleRelative != null -> + "EndDate{billingCycleRelative=$billingCycleRelative}" _json != null -> "EndDate{_unknown=$_json}" else -> throw IllegalStateException("Invalid EndDate") } @@ -40700,17 +40557,15 @@ constructor( @JvmStatic fun ofDateTime(dateTime: OffsetDateTime) = EndDate(dateTime = dateTime) @JvmStatic - fun ofBillingCycleRelativeDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - EndDate(billingCycleRelativeDate = billingCycleRelativeDate) + fun ofBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate) = + EndDate(billingCycleRelative = billingCycleRelative) } interface Visitor { fun visitDateTime(dateTime: OffsetDateTime): T - fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate - ): T + fun visitBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown EndDate: $json") @@ -40726,7 +40581,7 @@ constructor( return EndDate(dateTime = it, _json = json) } tryDeserialize(node, jacksonTypeRef())?.let { - return EndDate(billingCycleRelativeDate = it, _json = json) + return EndDate(billingCycleRelative = it, _json = json) } return EndDate(_json = json) @@ -40742,8 +40597,8 @@ constructor( ) { when { value.dateTime != null -> generator.writeObject(value.dateTime) - value.billingCycleRelativeDate != null -> - generator.writeObject(value.billingCycleRelativeDate) + value.billingCycleRelative != null -> + generator.writeObject(value.billingCycleRelative) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid EndDate") } @@ -40888,31 +40743,31 @@ constructor( class StartDate private constructor( private val dateTime: OffsetDateTime? = null, - private val billingCycleRelativeDate: BillingCycleRelativeDate? = null, + private val billingCycleRelative: BillingCycleRelativeDate? = null, private val _json: JsonValue? = null, ) { fun dateTime(): Optional = Optional.ofNullable(dateTime) - fun billingCycleRelativeDate(): Optional = - Optional.ofNullable(billingCycleRelativeDate) + fun billingCycleRelative(): Optional = + Optional.ofNullable(billingCycleRelative) fun isDateTime(): Boolean = dateTime != null - fun isBillingCycleRelativeDate(): Boolean = billingCycleRelativeDate != null + fun isBillingCycleRelative(): Boolean = billingCycleRelative != null fun asDateTime(): OffsetDateTime = dateTime.getOrThrow("dateTime") - fun asBillingCycleRelativeDate(): BillingCycleRelativeDate = - billingCycleRelativeDate.getOrThrow("billingCycleRelativeDate") + fun asBillingCycleRelative(): BillingCycleRelativeDate = + billingCycleRelative.getOrThrow("billingCycleRelative") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { dateTime != null -> visitor.visitDateTime(dateTime) - billingCycleRelativeDate != null -> - visitor.visitBillingCycleRelativeDate(billingCycleRelativeDate) + billingCycleRelative != null -> + visitor.visitBillingCycleRelative(billingCycleRelative) else -> visitor.unknown(_json) } } @@ -40928,8 +40783,8 @@ constructor( object : Visitor { override fun visitDateTime(dateTime: OffsetDateTime) {} - override fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate + override fun visitBillingCycleRelative( + billingCycleRelative: BillingCycleRelativeDate ) {} } ) @@ -40941,16 +40796,16 @@ constructor( return true } - return /* spotless:off */ other is StartDate && dateTime == other.dateTime && billingCycleRelativeDate == other.billingCycleRelativeDate /* spotless:on */ + return /* spotless:off */ other is StartDate && dateTime == other.dateTime && billingCycleRelative == other.billingCycleRelative /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelativeDate) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelative) /* spotless:on */ override fun toString(): String = when { dateTime != null -> "StartDate{dateTime=$dateTime}" - billingCycleRelativeDate != null -> - "StartDate{billingCycleRelativeDate=$billingCycleRelativeDate}" + billingCycleRelative != null -> + "StartDate{billingCycleRelative=$billingCycleRelative}" _json != null -> "StartDate{_unknown=$_json}" else -> throw IllegalStateException("Invalid StartDate") } @@ -40960,17 +40815,15 @@ constructor( @JvmStatic fun ofDateTime(dateTime: OffsetDateTime) = StartDate(dateTime = dateTime) @JvmStatic - fun ofBillingCycleRelativeDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - StartDate(billingCycleRelativeDate = billingCycleRelativeDate) + fun ofBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate) = + StartDate(billingCycleRelative = billingCycleRelative) } interface Visitor { fun visitDateTime(dateTime: OffsetDateTime): T - fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate - ): T + fun visitBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown StartDate: $json") @@ -40986,7 +40839,7 @@ constructor( return StartDate(dateTime = it, _json = json) } tryDeserialize(node, jacksonTypeRef())?.let { - return StartDate(billingCycleRelativeDate = it, _json = json) + return StartDate(billingCycleRelative = it, _json = json) } return StartDate(_json = json) @@ -41002,8 +40855,8 @@ constructor( ) { when { value.dateTime != null -> generator.writeObject(value.dateTime) - value.billingCycleRelativeDate != null -> - generator.writeObject(value.billingCycleRelativeDate) + value.billingCycleRelative != null -> + generator.writeObject(value.billingCycleRelative) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid StartDate") } @@ -41158,8 +41011,8 @@ constructor( * The updated end date of this adjustment interval. If not specified, the start date * will not be updated. */ - fun endDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - endDate(EndDate.ofBillingCycleRelativeDate(billingCycleRelativeDate)) + fun endDate(billingCycleRelative: BillingCycleRelativeDate) = + endDate(EndDate.ofBillingCycleRelative(billingCycleRelative)) /** * The updated start date of this adjustment interval. If not specified, the start date @@ -41183,8 +41036,8 @@ constructor( * The updated start date of this adjustment interval. If not specified, the start date * will not be updated. */ - fun startDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - startDate(StartDate.ofBillingCycleRelativeDate(billingCycleRelativeDate)) + fun startDate(billingCycleRelative: BillingCycleRelativeDate) = + startDate(StartDate.ofBillingCycleRelative(billingCycleRelative)) fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -41223,31 +41076,31 @@ constructor( class EndDate private constructor( private val dateTime: OffsetDateTime? = null, - private val billingCycleRelativeDate: BillingCycleRelativeDate? = null, + private val billingCycleRelative: BillingCycleRelativeDate? = null, private val _json: JsonValue? = null, ) { fun dateTime(): Optional = Optional.ofNullable(dateTime) - fun billingCycleRelativeDate(): Optional = - Optional.ofNullable(billingCycleRelativeDate) + fun billingCycleRelative(): Optional = + Optional.ofNullable(billingCycleRelative) fun isDateTime(): Boolean = dateTime != null - fun isBillingCycleRelativeDate(): Boolean = billingCycleRelativeDate != null + fun isBillingCycleRelative(): Boolean = billingCycleRelative != null fun asDateTime(): OffsetDateTime = dateTime.getOrThrow("dateTime") - fun asBillingCycleRelativeDate(): BillingCycleRelativeDate = - billingCycleRelativeDate.getOrThrow("billingCycleRelativeDate") + fun asBillingCycleRelative(): BillingCycleRelativeDate = + billingCycleRelative.getOrThrow("billingCycleRelative") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { dateTime != null -> visitor.visitDateTime(dateTime) - billingCycleRelativeDate != null -> - visitor.visitBillingCycleRelativeDate(billingCycleRelativeDate) + billingCycleRelative != null -> + visitor.visitBillingCycleRelative(billingCycleRelative) else -> visitor.unknown(_json) } } @@ -41263,8 +41116,8 @@ constructor( object : Visitor { override fun visitDateTime(dateTime: OffsetDateTime) {} - override fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate + override fun visitBillingCycleRelative( + billingCycleRelative: BillingCycleRelativeDate ) {} } ) @@ -41276,16 +41129,16 @@ constructor( return true } - return /* spotless:off */ other is EndDate && dateTime == other.dateTime && billingCycleRelativeDate == other.billingCycleRelativeDate /* spotless:on */ + return /* spotless:off */ other is EndDate && dateTime == other.dateTime && billingCycleRelative == other.billingCycleRelative /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelativeDate) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelative) /* spotless:on */ override fun toString(): String = when { dateTime != null -> "EndDate{dateTime=$dateTime}" - billingCycleRelativeDate != null -> - "EndDate{billingCycleRelativeDate=$billingCycleRelativeDate}" + billingCycleRelative != null -> + "EndDate{billingCycleRelative=$billingCycleRelative}" _json != null -> "EndDate{_unknown=$_json}" else -> throw IllegalStateException("Invalid EndDate") } @@ -41295,17 +41148,15 @@ constructor( @JvmStatic fun ofDateTime(dateTime: OffsetDateTime) = EndDate(dateTime = dateTime) @JvmStatic - fun ofBillingCycleRelativeDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - EndDate(billingCycleRelativeDate = billingCycleRelativeDate) + fun ofBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate) = + EndDate(billingCycleRelative = billingCycleRelative) } interface Visitor { fun visitDateTime(dateTime: OffsetDateTime): T - fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate - ): T + fun visitBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown EndDate: $json") @@ -41321,7 +41172,7 @@ constructor( return EndDate(dateTime = it, _json = json) } tryDeserialize(node, jacksonTypeRef())?.let { - return EndDate(billingCycleRelativeDate = it, _json = json) + return EndDate(billingCycleRelative = it, _json = json) } return EndDate(_json = json) @@ -41337,8 +41188,8 @@ constructor( ) { when { value.dateTime != null -> generator.writeObject(value.dateTime) - value.billingCycleRelativeDate != null -> - generator.writeObject(value.billingCycleRelativeDate) + value.billingCycleRelative != null -> + generator.writeObject(value.billingCycleRelative) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid EndDate") } @@ -41355,31 +41206,31 @@ constructor( class StartDate private constructor( private val dateTime: OffsetDateTime? = null, - private val billingCycleRelativeDate: BillingCycleRelativeDate? = null, + private val billingCycleRelative: BillingCycleRelativeDate? = null, private val _json: JsonValue? = null, ) { fun dateTime(): Optional = Optional.ofNullable(dateTime) - fun billingCycleRelativeDate(): Optional = - Optional.ofNullable(billingCycleRelativeDate) + fun billingCycleRelative(): Optional = + Optional.ofNullable(billingCycleRelative) fun isDateTime(): Boolean = dateTime != null - fun isBillingCycleRelativeDate(): Boolean = billingCycleRelativeDate != null + fun isBillingCycleRelative(): Boolean = billingCycleRelative != null fun asDateTime(): OffsetDateTime = dateTime.getOrThrow("dateTime") - fun asBillingCycleRelativeDate(): BillingCycleRelativeDate = - billingCycleRelativeDate.getOrThrow("billingCycleRelativeDate") + fun asBillingCycleRelative(): BillingCycleRelativeDate = + billingCycleRelative.getOrThrow("billingCycleRelative") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { dateTime != null -> visitor.visitDateTime(dateTime) - billingCycleRelativeDate != null -> - visitor.visitBillingCycleRelativeDate(billingCycleRelativeDate) + billingCycleRelative != null -> + visitor.visitBillingCycleRelative(billingCycleRelative) else -> visitor.unknown(_json) } } @@ -41395,8 +41246,8 @@ constructor( object : Visitor { override fun visitDateTime(dateTime: OffsetDateTime) {} - override fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate + override fun visitBillingCycleRelative( + billingCycleRelative: BillingCycleRelativeDate ) {} } ) @@ -41408,16 +41259,16 @@ constructor( return true } - return /* spotless:off */ other is StartDate && dateTime == other.dateTime && billingCycleRelativeDate == other.billingCycleRelativeDate /* spotless:on */ + return /* spotless:off */ other is StartDate && dateTime == other.dateTime && billingCycleRelative == other.billingCycleRelative /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelativeDate) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dateTime, billingCycleRelative) /* spotless:on */ override fun toString(): String = when { dateTime != null -> "StartDate{dateTime=$dateTime}" - billingCycleRelativeDate != null -> - "StartDate{billingCycleRelativeDate=$billingCycleRelativeDate}" + billingCycleRelative != null -> + "StartDate{billingCycleRelative=$billingCycleRelative}" _json != null -> "StartDate{_unknown=$_json}" else -> throw IllegalStateException("Invalid StartDate") } @@ -41427,17 +41278,15 @@ constructor( @JvmStatic fun ofDateTime(dateTime: OffsetDateTime) = StartDate(dateTime = dateTime) @JvmStatic - fun ofBillingCycleRelativeDate(billingCycleRelativeDate: BillingCycleRelativeDate) = - StartDate(billingCycleRelativeDate = billingCycleRelativeDate) + fun ofBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate) = + StartDate(billingCycleRelative = billingCycleRelative) } interface Visitor { fun visitDateTime(dateTime: OffsetDateTime): T - fun visitBillingCycleRelativeDate( - billingCycleRelativeDate: BillingCycleRelativeDate - ): T + fun visitBillingCycleRelative(billingCycleRelative: BillingCycleRelativeDate): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown StartDate: $json") @@ -41453,7 +41302,7 @@ constructor( return StartDate(dateTime = it, _json = json) } tryDeserialize(node, jacksonTypeRef())?.let { - return StartDate(billingCycleRelativeDate = it, _json = json) + return StartDate(billingCycleRelative = it, _json = json) } return StartDate(_json = json) @@ -41469,8 +41318,8 @@ constructor( ) { when { value.dateTime != null -> generator.writeObject(value.dateTime) - value.billingCycleRelativeDate != null -> - generator.writeObject(value.billingCycleRelativeDate) + value.billingCycleRelative != null -> + generator.writeObject(value.billingCycleRelative) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid StartDate") } 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 fbfc51fe..c63bad47 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 @@ -761,20 +761,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1118,20 +1114,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1211,66 +1207,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1284,30 +1274,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1319,21 +1305,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1341,44 +1325,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1398,7 +1371,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1406,10 +1379,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1417,7 +1387,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1425,7 +1395,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1433,7 +1403,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1450,16 +1420,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3426,46 +3392,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3479,22 +3436,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3506,19 +3457,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3526,28 +3474,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3567,7 +3509,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3575,10 +3517,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3586,7 +3525,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3603,12 +3542,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5687,7 +5623,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5715,7 +5651,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5729,7 +5665,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5743,8 +5679,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5758,7 +5693,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5772,7 +5707,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5786,7 +5721,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5800,8 +5735,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5815,8 +5750,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5830,8 +5765,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5845,8 +5780,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5860,8 +5795,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5875,8 +5810,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5890,8 +5825,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5905,8 +5840,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5920,8 +5855,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5935,8 +5870,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5950,8 +5885,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5965,8 +5900,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5980,8 +5915,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5995,8 +5930,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6010,8 +5945,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6025,8 +5960,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6040,8 +5975,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeParams.kt index 7d66a4f0..22045d45 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeParams.kt @@ -4745,131 +4745,99 @@ constructor( fun price(price: JsonField) = apply { this.price = price } /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionUnitPrice: Price.NewSubscriptionUnitPrice) = - price(Price.ofNewSubscriptionUnitPrice(newSubscriptionUnitPrice)) + fun price(newSubscriptionUnit: Price.NewSubscriptionUnitPrice) = + price(Price.ofNewSubscriptionUnit(newSubscriptionUnit)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionPackagePrice: Price.NewSubscriptionPackagePrice) = - price(Price.ofNewSubscriptionPackagePrice(newSubscriptionPackagePrice)) + fun price(newSubscriptionPackage: Price.NewSubscriptionPackagePrice) = + price(Price.ofNewSubscriptionPackage(newSubscriptionPackage)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionMatrixPrice: Price.NewSubscriptionMatrixPrice) = - price(Price.ofNewSubscriptionMatrixPrice(newSubscriptionMatrixPrice)) + fun price(newSubscriptionMatrix: Price.NewSubscriptionMatrixPrice) = + price(Price.ofNewSubscriptionMatrix(newSubscriptionMatrix)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredPrice: Price.NewSubscriptionTieredPrice) = - price(Price.ofNewSubscriptionTieredPrice(newSubscriptionTieredPrice)) + fun price(newSubscriptionTiered: Price.NewSubscriptionTieredPrice) = + price(Price.ofNewSubscriptionTiered(newSubscriptionTiered)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredBpsPrice: Price.NewSubscriptionTieredBpsPrice) = - price(Price.ofNewSubscriptionTieredBpsPrice(newSubscriptionTieredBpsPrice)) + fun price(newSubscriptionTieredBps: Price.NewSubscriptionTieredBpsPrice) = + price(Price.ofNewSubscriptionTieredBps(newSubscriptionTieredBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBpsPrice: Price.NewSubscriptionBpsPrice) = - price(Price.ofNewSubscriptionBpsPrice(newSubscriptionBpsPrice)) + fun price(newSubscriptionBps: Price.NewSubscriptionBpsPrice) = + price(Price.ofNewSubscriptionBps(newSubscriptionBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBulkBpsPrice: Price.NewSubscriptionBulkBpsPrice) = - price(Price.ofNewSubscriptionBulkBpsPrice(newSubscriptionBulkBpsPrice)) + fun price(newSubscriptionBulkBps: Price.NewSubscriptionBulkBpsPrice) = + price(Price.ofNewSubscriptionBulkBps(newSubscriptionBulkBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBulkPrice: Price.NewSubscriptionBulkPrice) = - price(Price.ofNewSubscriptionBulkPrice(newSubscriptionBulkPrice)) + fun price(newSubscriptionBulk: Price.NewSubscriptionBulkPrice) = + price(Price.ofNewSubscriptionBulk(newSubscriptionBulk)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionThresholdTotalAmountPrice: - Price.NewSubscriptionThresholdTotalAmountPrice + newSubscriptionThresholdTotalAmount: Price.NewSubscriptionThresholdTotalAmountPrice ) = price( - Price.ofNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice - ) + Price.ofNewSubscriptionThresholdTotalAmount(newSubscriptionThresholdTotalAmount) ) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredPackagePrice: Price.NewSubscriptionTieredPackagePrice) = - price(Price.ofNewSubscriptionTieredPackagePrice(newSubscriptionTieredPackagePrice)) + fun price(newSubscriptionTieredPackage: Price.NewSubscriptionTieredPackagePrice) = + price(Price.ofNewSubscriptionTieredPackage(newSubscriptionTieredPackage)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionTieredWithMinimumPrice: Price.NewSubscriptionTieredWithMinimumPrice - ) = - price( - Price.ofNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice - ) - ) + newSubscriptionTieredWithMinimum: Price.NewSubscriptionTieredWithMinimumPrice + ) = price(Price.ofNewSubscriptionTieredWithMinimum(newSubscriptionTieredWithMinimum)) /** The definition of a new price to create and add to the subscription. */ - fun price( - newSubscriptionUnitWithPercentPrice: Price.NewSubscriptionUnitWithPercentPrice - ) = - price( - Price.ofNewSubscriptionUnitWithPercentPrice(newSubscriptionUnitWithPercentPrice) - ) + fun price(newSubscriptionUnitWithPercent: Price.NewSubscriptionUnitWithPercentPrice) = + price(Price.ofNewSubscriptionUnitWithPercent(newSubscriptionUnitWithPercent)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionPackageWithAllocationPrice: + newSubscriptionPackageWithAllocation: Price.NewSubscriptionPackageWithAllocationPrice ) = price( - Price.ofNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice + Price.ofNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionTierWithProrationPrice: Price.NewSubscriptionTierWithProrationPrice - ) = - price( - Price.ofNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice - ) - ) + newSubscriptionTierWithProration: Price.NewSubscriptionTierWithProrationPrice + ) = price(Price.ofNewSubscriptionTierWithProration(newSubscriptionTierWithProration)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionUnitWithProrationPrice: Price.NewSubscriptionUnitWithProrationPrice - ) = - price( - Price.ofNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice - ) - ) + newSubscriptionUnitWithProration: Price.NewSubscriptionUnitWithProrationPrice + ) = price(Price.ofNewSubscriptionUnitWithProration(newSubscriptionUnitWithProration)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionGroupedAllocationPrice: Price.NewSubscriptionGroupedAllocationPrice - ) = - price( - Price.ofNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice - ) - ) + newSubscriptionGroupedAllocation: Price.NewSubscriptionGroupedAllocationPrice + ) = price(Price.ofNewSubscriptionGroupedAllocation(newSubscriptionGroupedAllocation)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionGroupedWithProratedMinimumPrice: + newSubscriptionGroupedWithProratedMinimum: Price.NewSubscriptionGroupedWithProratedMinimumPrice ) = price( - Price.ofNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice + Price.ofNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionBulkWithProrationPrice: Price.NewSubscriptionBulkWithProrationPrice - ) = - price( - Price.ofNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice - ) - ) + newSubscriptionBulkWithProration: Price.NewSubscriptionBulkWithProrationPrice + ) = price(Price.ofNewSubscriptionBulkWithProration(newSubscriptionBulkWithProration)) /** The id of the price to add to the subscription. */ fun priceId(priceId: String?) = priceId(JsonField.ofNullable(priceId)) @@ -5239,288 +5207,261 @@ constructor( @JsonSerialize(using = Price.Serializer::class) class Price private constructor( - private val newSubscriptionUnitPrice: NewSubscriptionUnitPrice? = null, - private val newSubscriptionPackagePrice: NewSubscriptionPackagePrice? = null, - private val newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice? = null, - private val newSubscriptionTieredPrice: NewSubscriptionTieredPrice? = null, - private val newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice? = null, - private val newSubscriptionBpsPrice: NewSubscriptionBpsPrice? = null, - private val newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice? = null, - private val newSubscriptionBulkPrice: NewSubscriptionBulkPrice? = null, - private val newSubscriptionThresholdTotalAmountPrice: + private val newSubscriptionUnit: NewSubscriptionUnitPrice? = null, + private val newSubscriptionPackage: NewSubscriptionPackagePrice? = null, + private val newSubscriptionMatrix: NewSubscriptionMatrixPrice? = null, + private val newSubscriptionTiered: NewSubscriptionTieredPrice? = null, + private val newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice? = null, + private val newSubscriptionBps: NewSubscriptionBpsPrice? = null, + private val newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice? = null, + private val newSubscriptionBulk: NewSubscriptionBulkPrice? = null, + private val newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice? = null, - private val newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice? = - null, - private val newSubscriptionTieredWithMinimumPrice: - NewSubscriptionTieredWithMinimumPrice? = + private val newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice? = null, + private val newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice? = null, - private val newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice? = - null, - private val newSubscriptionPackageWithAllocationPrice: + private val newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice? = null, + private val newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice? = null, - private val newSubscriptionTierWithProrationPrice: - NewSubscriptionTierWithProrationPrice? = + private val newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice? = null, - private val newSubscriptionUnitWithProrationPrice: - NewSubscriptionUnitWithProrationPrice? = + private val newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice? = null, - private val newSubscriptionGroupedAllocationPrice: - NewSubscriptionGroupedAllocationPrice? = + private val newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice? = null, - private val newSubscriptionGroupedWithProratedMinimumPrice: + private val newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice? = null, - private val newSubscriptionBulkWithProrationPrice: - NewSubscriptionBulkWithProrationPrice? = + private val newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice? = null, private val _json: JsonValue? = null, ) { - fun newSubscriptionUnitPrice(): Optional = - Optional.ofNullable(newSubscriptionUnitPrice) + fun newSubscriptionUnit(): Optional = + Optional.ofNullable(newSubscriptionUnit) - fun newSubscriptionPackagePrice(): Optional = - Optional.ofNullable(newSubscriptionPackagePrice) + fun newSubscriptionPackage(): Optional = + Optional.ofNullable(newSubscriptionPackage) - fun newSubscriptionMatrixPrice(): Optional = - Optional.ofNullable(newSubscriptionMatrixPrice) + fun newSubscriptionMatrix(): Optional = + Optional.ofNullable(newSubscriptionMatrix) - fun newSubscriptionTieredPrice(): Optional = - Optional.ofNullable(newSubscriptionTieredPrice) + fun newSubscriptionTiered(): Optional = + Optional.ofNullable(newSubscriptionTiered) - fun newSubscriptionTieredBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionTieredBpsPrice) + fun newSubscriptionTieredBps(): Optional = + Optional.ofNullable(newSubscriptionTieredBps) - fun newSubscriptionBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionBpsPrice) + fun newSubscriptionBps(): Optional = + Optional.ofNullable(newSubscriptionBps) - fun newSubscriptionBulkBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionBulkBpsPrice) + fun newSubscriptionBulkBps(): Optional = + Optional.ofNullable(newSubscriptionBulkBps) - fun newSubscriptionBulkPrice(): Optional = - Optional.ofNullable(newSubscriptionBulkPrice) + fun newSubscriptionBulk(): Optional = + Optional.ofNullable(newSubscriptionBulk) - fun newSubscriptionThresholdTotalAmountPrice(): + fun newSubscriptionThresholdTotalAmount(): Optional = - Optional.ofNullable(newSubscriptionThresholdTotalAmountPrice) + Optional.ofNullable(newSubscriptionThresholdTotalAmount) - fun newSubscriptionTieredPackagePrice(): Optional = - Optional.ofNullable(newSubscriptionTieredPackagePrice) + fun newSubscriptionTieredPackage(): Optional = + Optional.ofNullable(newSubscriptionTieredPackage) - fun newSubscriptionTieredWithMinimumPrice(): + fun newSubscriptionTieredWithMinimum(): Optional = - Optional.ofNullable(newSubscriptionTieredWithMinimumPrice) + Optional.ofNullable(newSubscriptionTieredWithMinimum) - fun newSubscriptionUnitWithPercentPrice(): - Optional = - Optional.ofNullable(newSubscriptionUnitWithPercentPrice) + fun newSubscriptionUnitWithPercent(): Optional = + Optional.ofNullable(newSubscriptionUnitWithPercent) - fun newSubscriptionPackageWithAllocationPrice(): + fun newSubscriptionPackageWithAllocation(): Optional = - Optional.ofNullable(newSubscriptionPackageWithAllocationPrice) + Optional.ofNullable(newSubscriptionPackageWithAllocation) - fun newSubscriptionTierWithProrationPrice(): + fun newSubscriptionTierWithProration(): Optional = - Optional.ofNullable(newSubscriptionTierWithProrationPrice) + Optional.ofNullable(newSubscriptionTierWithProration) - fun newSubscriptionUnitWithProrationPrice(): + fun newSubscriptionUnitWithProration(): Optional = - Optional.ofNullable(newSubscriptionUnitWithProrationPrice) + Optional.ofNullable(newSubscriptionUnitWithProration) - fun newSubscriptionGroupedAllocationPrice(): + fun newSubscriptionGroupedAllocation(): Optional = - Optional.ofNullable(newSubscriptionGroupedAllocationPrice) + Optional.ofNullable(newSubscriptionGroupedAllocation) - fun newSubscriptionGroupedWithProratedMinimumPrice(): + fun newSubscriptionGroupedWithProratedMinimum(): Optional = - Optional.ofNullable(newSubscriptionGroupedWithProratedMinimumPrice) + Optional.ofNullable(newSubscriptionGroupedWithProratedMinimum) - fun newSubscriptionBulkWithProrationPrice(): + fun newSubscriptionBulkWithProration(): Optional = - Optional.ofNullable(newSubscriptionBulkWithProrationPrice) + Optional.ofNullable(newSubscriptionBulkWithProration) - fun isNewSubscriptionUnitPrice(): Boolean = newSubscriptionUnitPrice != null + fun isNewSubscriptionUnit(): Boolean = newSubscriptionUnit != null - fun isNewSubscriptionPackagePrice(): Boolean = newSubscriptionPackagePrice != null + fun isNewSubscriptionPackage(): Boolean = newSubscriptionPackage != null - fun isNewSubscriptionMatrixPrice(): Boolean = newSubscriptionMatrixPrice != null + fun isNewSubscriptionMatrix(): Boolean = newSubscriptionMatrix != null - fun isNewSubscriptionTieredPrice(): Boolean = newSubscriptionTieredPrice != null + fun isNewSubscriptionTiered(): Boolean = newSubscriptionTiered != null - fun isNewSubscriptionTieredBpsPrice(): Boolean = newSubscriptionTieredBpsPrice != null + fun isNewSubscriptionTieredBps(): Boolean = newSubscriptionTieredBps != null - fun isNewSubscriptionBpsPrice(): Boolean = newSubscriptionBpsPrice != null + fun isNewSubscriptionBps(): Boolean = newSubscriptionBps != null - fun isNewSubscriptionBulkBpsPrice(): Boolean = newSubscriptionBulkBpsPrice != null + fun isNewSubscriptionBulkBps(): Boolean = newSubscriptionBulkBps != null - fun isNewSubscriptionBulkPrice(): Boolean = newSubscriptionBulkPrice != null + fun isNewSubscriptionBulk(): Boolean = newSubscriptionBulk != null - fun isNewSubscriptionThresholdTotalAmountPrice(): Boolean = - newSubscriptionThresholdTotalAmountPrice != null + fun isNewSubscriptionThresholdTotalAmount(): Boolean = + newSubscriptionThresholdTotalAmount != null - fun isNewSubscriptionTieredPackagePrice(): Boolean = - newSubscriptionTieredPackagePrice != null + fun isNewSubscriptionTieredPackage(): Boolean = newSubscriptionTieredPackage != null - fun isNewSubscriptionTieredWithMinimumPrice(): Boolean = - newSubscriptionTieredWithMinimumPrice != null + fun isNewSubscriptionTieredWithMinimum(): Boolean = + newSubscriptionTieredWithMinimum != null - fun isNewSubscriptionUnitWithPercentPrice(): Boolean = - newSubscriptionUnitWithPercentPrice != null + fun isNewSubscriptionUnitWithPercent(): Boolean = newSubscriptionUnitWithPercent != null - fun isNewSubscriptionPackageWithAllocationPrice(): Boolean = - newSubscriptionPackageWithAllocationPrice != null + fun isNewSubscriptionPackageWithAllocation(): Boolean = + newSubscriptionPackageWithAllocation != null - fun isNewSubscriptionTierWithProrationPrice(): Boolean = - newSubscriptionTierWithProrationPrice != null + fun isNewSubscriptionTierWithProration(): Boolean = + newSubscriptionTierWithProration != null - fun isNewSubscriptionUnitWithProrationPrice(): Boolean = - newSubscriptionUnitWithProrationPrice != null + fun isNewSubscriptionUnitWithProration(): Boolean = + newSubscriptionUnitWithProration != null - fun isNewSubscriptionGroupedAllocationPrice(): Boolean = - newSubscriptionGroupedAllocationPrice != null + fun isNewSubscriptionGroupedAllocation(): Boolean = + newSubscriptionGroupedAllocation != null - fun isNewSubscriptionGroupedWithProratedMinimumPrice(): Boolean = - newSubscriptionGroupedWithProratedMinimumPrice != null + fun isNewSubscriptionGroupedWithProratedMinimum(): Boolean = + newSubscriptionGroupedWithProratedMinimum != null - fun isNewSubscriptionBulkWithProrationPrice(): Boolean = - newSubscriptionBulkWithProrationPrice != null + fun isNewSubscriptionBulkWithProration(): Boolean = + newSubscriptionBulkWithProration != null - fun asNewSubscriptionUnitPrice(): NewSubscriptionUnitPrice = - newSubscriptionUnitPrice.getOrThrow("newSubscriptionUnitPrice") + fun asNewSubscriptionUnit(): NewSubscriptionUnitPrice = + newSubscriptionUnit.getOrThrow("newSubscriptionUnit") - fun asNewSubscriptionPackagePrice(): NewSubscriptionPackagePrice = - newSubscriptionPackagePrice.getOrThrow("newSubscriptionPackagePrice") + fun asNewSubscriptionPackage(): NewSubscriptionPackagePrice = + newSubscriptionPackage.getOrThrow("newSubscriptionPackage") - fun asNewSubscriptionMatrixPrice(): NewSubscriptionMatrixPrice = - newSubscriptionMatrixPrice.getOrThrow("newSubscriptionMatrixPrice") + fun asNewSubscriptionMatrix(): NewSubscriptionMatrixPrice = + newSubscriptionMatrix.getOrThrow("newSubscriptionMatrix") - fun asNewSubscriptionTieredPrice(): NewSubscriptionTieredPrice = - newSubscriptionTieredPrice.getOrThrow("newSubscriptionTieredPrice") + fun asNewSubscriptionTiered(): NewSubscriptionTieredPrice = + newSubscriptionTiered.getOrThrow("newSubscriptionTiered") - fun asNewSubscriptionTieredBpsPrice(): NewSubscriptionTieredBpsPrice = - newSubscriptionTieredBpsPrice.getOrThrow("newSubscriptionTieredBpsPrice") + fun asNewSubscriptionTieredBps(): NewSubscriptionTieredBpsPrice = + newSubscriptionTieredBps.getOrThrow("newSubscriptionTieredBps") - fun asNewSubscriptionBpsPrice(): NewSubscriptionBpsPrice = - newSubscriptionBpsPrice.getOrThrow("newSubscriptionBpsPrice") + fun asNewSubscriptionBps(): NewSubscriptionBpsPrice = + newSubscriptionBps.getOrThrow("newSubscriptionBps") - fun asNewSubscriptionBulkBpsPrice(): NewSubscriptionBulkBpsPrice = - newSubscriptionBulkBpsPrice.getOrThrow("newSubscriptionBulkBpsPrice") + fun asNewSubscriptionBulkBps(): NewSubscriptionBulkBpsPrice = + newSubscriptionBulkBps.getOrThrow("newSubscriptionBulkBps") - fun asNewSubscriptionBulkPrice(): NewSubscriptionBulkPrice = - newSubscriptionBulkPrice.getOrThrow("newSubscriptionBulkPrice") + fun asNewSubscriptionBulk(): NewSubscriptionBulkPrice = + newSubscriptionBulk.getOrThrow("newSubscriptionBulk") - fun asNewSubscriptionThresholdTotalAmountPrice(): - NewSubscriptionThresholdTotalAmountPrice = - newSubscriptionThresholdTotalAmountPrice.getOrThrow( - "newSubscriptionThresholdTotalAmountPrice" + fun asNewSubscriptionThresholdTotalAmount(): NewSubscriptionThresholdTotalAmountPrice = + newSubscriptionThresholdTotalAmount.getOrThrow( + "newSubscriptionThresholdTotalAmount" ) - fun asNewSubscriptionTieredPackagePrice(): NewSubscriptionTieredPackagePrice = - newSubscriptionTieredPackagePrice.getOrThrow("newSubscriptionTieredPackagePrice") + fun asNewSubscriptionTieredPackage(): NewSubscriptionTieredPackagePrice = + newSubscriptionTieredPackage.getOrThrow("newSubscriptionTieredPackage") - fun asNewSubscriptionTieredWithMinimumPrice(): NewSubscriptionTieredWithMinimumPrice = - newSubscriptionTieredWithMinimumPrice.getOrThrow( - "newSubscriptionTieredWithMinimumPrice" - ) + fun asNewSubscriptionTieredWithMinimum(): NewSubscriptionTieredWithMinimumPrice = + newSubscriptionTieredWithMinimum.getOrThrow("newSubscriptionTieredWithMinimum") - fun asNewSubscriptionUnitWithPercentPrice(): NewSubscriptionUnitWithPercentPrice = - newSubscriptionUnitWithPercentPrice.getOrThrow( - "newSubscriptionUnitWithPercentPrice" - ) + fun asNewSubscriptionUnitWithPercent(): NewSubscriptionUnitWithPercentPrice = + newSubscriptionUnitWithPercent.getOrThrow("newSubscriptionUnitWithPercent") - fun asNewSubscriptionPackageWithAllocationPrice(): + fun asNewSubscriptionPackageWithAllocation(): NewSubscriptionPackageWithAllocationPrice = - newSubscriptionPackageWithAllocationPrice.getOrThrow( - "newSubscriptionPackageWithAllocationPrice" + newSubscriptionPackageWithAllocation.getOrThrow( + "newSubscriptionPackageWithAllocation" ) - fun asNewSubscriptionTierWithProrationPrice(): NewSubscriptionTierWithProrationPrice = - newSubscriptionTierWithProrationPrice.getOrThrow( - "newSubscriptionTierWithProrationPrice" - ) + fun asNewSubscriptionTierWithProration(): NewSubscriptionTierWithProrationPrice = + newSubscriptionTierWithProration.getOrThrow("newSubscriptionTierWithProration") - fun asNewSubscriptionUnitWithProrationPrice(): NewSubscriptionUnitWithProrationPrice = - newSubscriptionUnitWithProrationPrice.getOrThrow( - "newSubscriptionUnitWithProrationPrice" - ) + fun asNewSubscriptionUnitWithProration(): NewSubscriptionUnitWithProrationPrice = + newSubscriptionUnitWithProration.getOrThrow("newSubscriptionUnitWithProration") - fun asNewSubscriptionGroupedAllocationPrice(): NewSubscriptionGroupedAllocationPrice = - newSubscriptionGroupedAllocationPrice.getOrThrow( - "newSubscriptionGroupedAllocationPrice" - ) + fun asNewSubscriptionGroupedAllocation(): NewSubscriptionGroupedAllocationPrice = + newSubscriptionGroupedAllocation.getOrThrow("newSubscriptionGroupedAllocation") - fun asNewSubscriptionGroupedWithProratedMinimumPrice(): + fun asNewSubscriptionGroupedWithProratedMinimum(): NewSubscriptionGroupedWithProratedMinimumPrice = - newSubscriptionGroupedWithProratedMinimumPrice.getOrThrow( - "newSubscriptionGroupedWithProratedMinimumPrice" + newSubscriptionGroupedWithProratedMinimum.getOrThrow( + "newSubscriptionGroupedWithProratedMinimum" ) - fun asNewSubscriptionBulkWithProrationPrice(): NewSubscriptionBulkWithProrationPrice = - newSubscriptionBulkWithProrationPrice.getOrThrow( - "newSubscriptionBulkWithProrationPrice" - ) + fun asNewSubscriptionBulkWithProration(): NewSubscriptionBulkWithProrationPrice = + newSubscriptionBulkWithProration.getOrThrow("newSubscriptionBulkWithProration") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newSubscriptionUnitPrice != null -> - visitor.visitNewSubscriptionUnitPrice(newSubscriptionUnitPrice) - newSubscriptionPackagePrice != null -> - visitor.visitNewSubscriptionPackagePrice(newSubscriptionPackagePrice) - newSubscriptionMatrixPrice != null -> - visitor.visitNewSubscriptionMatrixPrice(newSubscriptionMatrixPrice) - newSubscriptionTieredPrice != null -> - visitor.visitNewSubscriptionTieredPrice(newSubscriptionTieredPrice) - newSubscriptionTieredBpsPrice != null -> - visitor.visitNewSubscriptionTieredBpsPrice(newSubscriptionTieredBpsPrice) - newSubscriptionBpsPrice != null -> - visitor.visitNewSubscriptionBpsPrice(newSubscriptionBpsPrice) - newSubscriptionBulkBpsPrice != null -> - visitor.visitNewSubscriptionBulkBpsPrice(newSubscriptionBulkBpsPrice) - newSubscriptionBulkPrice != null -> - visitor.visitNewSubscriptionBulkPrice(newSubscriptionBulkPrice) - newSubscriptionThresholdTotalAmountPrice != null -> - visitor.visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice + newSubscriptionUnit != null -> + visitor.visitNewSubscriptionUnit(newSubscriptionUnit) + newSubscriptionPackage != null -> + visitor.visitNewSubscriptionPackage(newSubscriptionPackage) + newSubscriptionMatrix != null -> + visitor.visitNewSubscriptionMatrix(newSubscriptionMatrix) + newSubscriptionTiered != null -> + visitor.visitNewSubscriptionTiered(newSubscriptionTiered) + newSubscriptionTieredBps != null -> + visitor.visitNewSubscriptionTieredBps(newSubscriptionTieredBps) + newSubscriptionBps != null -> + visitor.visitNewSubscriptionBps(newSubscriptionBps) + newSubscriptionBulkBps != null -> + visitor.visitNewSubscriptionBulkBps(newSubscriptionBulkBps) + newSubscriptionBulk != null -> + visitor.visitNewSubscriptionBulk(newSubscriptionBulk) + newSubscriptionThresholdTotalAmount != null -> + visitor.visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount ) - newSubscriptionTieredPackagePrice != null -> - visitor.visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice + newSubscriptionTieredPackage != null -> + visitor.visitNewSubscriptionTieredPackage(newSubscriptionTieredPackage) + newSubscriptionTieredWithMinimum != null -> + visitor.visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum ) - newSubscriptionTieredWithMinimumPrice != null -> - visitor.visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice + newSubscriptionUnitWithPercent != null -> + visitor.visitNewSubscriptionUnitWithPercent(newSubscriptionUnitWithPercent) + newSubscriptionPackageWithAllocation != null -> + visitor.visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation ) - newSubscriptionUnitWithPercentPrice != null -> - visitor.visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice + newSubscriptionTierWithProration != null -> + visitor.visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration ) - newSubscriptionPackageWithAllocationPrice != null -> - visitor.visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice + newSubscriptionUnitWithProration != null -> + visitor.visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration ) - newSubscriptionTierWithProrationPrice != null -> - visitor.visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice + newSubscriptionGroupedAllocation != null -> + visitor.visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation ) - newSubscriptionUnitWithProrationPrice != null -> - visitor.visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice + newSubscriptionGroupedWithProratedMinimum != null -> + visitor.visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum ) - newSubscriptionGroupedAllocationPrice != null -> - visitor.visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice - ) - newSubscriptionGroupedWithProratedMinimumPrice != null -> - visitor.visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice - ) - newSubscriptionBulkWithProrationPrice != null -> - visitor.visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice + newSubscriptionBulkWithProration != null -> + visitor.visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration ) else -> visitor.unknown(_json) } @@ -5535,120 +5476,115 @@ constructor( accept( object : Visitor { - override fun visitNewSubscriptionUnitPrice( - newSubscriptionUnitPrice: NewSubscriptionUnitPrice + override fun visitNewSubscriptionUnit( + newSubscriptionUnit: NewSubscriptionUnitPrice ) { - newSubscriptionUnitPrice.validate() + newSubscriptionUnit.validate() } - override fun visitNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice + override fun visitNewSubscriptionPackage( + newSubscriptionPackage: NewSubscriptionPackagePrice ) { - newSubscriptionPackagePrice.validate() + newSubscriptionPackage.validate() } - override fun visitNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice + override fun visitNewSubscriptionMatrix( + newSubscriptionMatrix: NewSubscriptionMatrixPrice ) { - newSubscriptionMatrixPrice.validate() + newSubscriptionMatrix.validate() } - override fun visitNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice + override fun visitNewSubscriptionTiered( + newSubscriptionTiered: NewSubscriptionTieredPrice ) { - newSubscriptionTieredPrice.validate() + newSubscriptionTiered.validate() } - override fun visitNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice + override fun visitNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice ) { - newSubscriptionTieredBpsPrice.validate() + newSubscriptionTieredBps.validate() } - override fun visitNewSubscriptionBpsPrice( - newSubscriptionBpsPrice: NewSubscriptionBpsPrice + override fun visitNewSubscriptionBps( + newSubscriptionBps: NewSubscriptionBpsPrice ) { - newSubscriptionBpsPrice.validate() + newSubscriptionBps.validate() } - override fun visitNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice + override fun visitNewSubscriptionBulkBps( + newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice ) { - newSubscriptionBulkBpsPrice.validate() + newSubscriptionBulkBps.validate() } - override fun visitNewSubscriptionBulkPrice( - newSubscriptionBulkPrice: NewSubscriptionBulkPrice + override fun visitNewSubscriptionBulk( + newSubscriptionBulk: NewSubscriptionBulkPrice ) { - newSubscriptionBulkPrice.validate() + newSubscriptionBulk.validate() } - override fun visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: + override fun visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice ) { - newSubscriptionThresholdTotalAmountPrice.validate() + newSubscriptionThresholdTotalAmount.validate() } - override fun visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice + override fun visitNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice ) { - newSubscriptionTieredPackagePrice.validate() + newSubscriptionTieredPackage.validate() } - override fun visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: - NewSubscriptionTieredWithMinimumPrice + override fun visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice ) { - newSubscriptionTieredWithMinimumPrice.validate() + newSubscriptionTieredWithMinimum.validate() } - override fun visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice + override fun visitNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice ) { - newSubscriptionUnitWithPercentPrice.validate() + newSubscriptionUnitWithPercent.validate() } - override fun visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: + override fun visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ) { - newSubscriptionPackageWithAllocationPrice.validate() + newSubscriptionPackageWithAllocation.validate() } - override fun visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: - NewSubscriptionTierWithProrationPrice + override fun visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice ) { - newSubscriptionTierWithProrationPrice.validate() + newSubscriptionTierWithProration.validate() } - override fun visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: - NewSubscriptionUnitWithProrationPrice + override fun visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice ) { - newSubscriptionUnitWithProrationPrice.validate() + newSubscriptionUnitWithProration.validate() } - override fun visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: - NewSubscriptionGroupedAllocationPrice + override fun visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice ) { - newSubscriptionGroupedAllocationPrice.validate() + newSubscriptionGroupedAllocation.validate() } - override fun visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + override fun visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ) { - newSubscriptionGroupedWithProratedMinimumPrice.validate() + newSubscriptionGroupedWithProratedMinimum.validate() } - override fun visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: - NewSubscriptionBulkWithProrationPrice + override fun visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice ) { - newSubscriptionBulkWithProrationPrice.validate() + newSubscriptionBulkWithProration.validate() } } ) @@ -5660,49 +5596,46 @@ constructor( return true } - return /* spotless:off */ other is Price && newSubscriptionUnitPrice == other.newSubscriptionUnitPrice && newSubscriptionPackagePrice == other.newSubscriptionPackagePrice && newSubscriptionMatrixPrice == other.newSubscriptionMatrixPrice && newSubscriptionTieredPrice == other.newSubscriptionTieredPrice && newSubscriptionTieredBpsPrice == other.newSubscriptionTieredBpsPrice && newSubscriptionBpsPrice == other.newSubscriptionBpsPrice && newSubscriptionBulkBpsPrice == other.newSubscriptionBulkBpsPrice && newSubscriptionBulkPrice == other.newSubscriptionBulkPrice && newSubscriptionThresholdTotalAmountPrice == other.newSubscriptionThresholdTotalAmountPrice && newSubscriptionTieredPackagePrice == other.newSubscriptionTieredPackagePrice && newSubscriptionTieredWithMinimumPrice == other.newSubscriptionTieredWithMinimumPrice && newSubscriptionUnitWithPercentPrice == other.newSubscriptionUnitWithPercentPrice && newSubscriptionPackageWithAllocationPrice == other.newSubscriptionPackageWithAllocationPrice && newSubscriptionTierWithProrationPrice == other.newSubscriptionTierWithProrationPrice && newSubscriptionUnitWithProrationPrice == other.newSubscriptionUnitWithProrationPrice && newSubscriptionGroupedAllocationPrice == other.newSubscriptionGroupedAllocationPrice && newSubscriptionGroupedWithProratedMinimumPrice == other.newSubscriptionGroupedWithProratedMinimumPrice && newSubscriptionBulkWithProrationPrice == other.newSubscriptionBulkWithProrationPrice /* spotless:on */ + return /* spotless:off */ other is Price && newSubscriptionUnit == other.newSubscriptionUnit && newSubscriptionPackage == other.newSubscriptionPackage && newSubscriptionMatrix == other.newSubscriptionMatrix && newSubscriptionTiered == other.newSubscriptionTiered && newSubscriptionTieredBps == other.newSubscriptionTieredBps && newSubscriptionBps == other.newSubscriptionBps && newSubscriptionBulkBps == other.newSubscriptionBulkBps && newSubscriptionBulk == other.newSubscriptionBulk && newSubscriptionThresholdTotalAmount == other.newSubscriptionThresholdTotalAmount && newSubscriptionTieredPackage == other.newSubscriptionTieredPackage && newSubscriptionTieredWithMinimum == other.newSubscriptionTieredWithMinimum && newSubscriptionUnitWithPercent == other.newSubscriptionUnitWithPercent && newSubscriptionPackageWithAllocation == other.newSubscriptionPackageWithAllocation && newSubscriptionTierWithProration == other.newSubscriptionTierWithProration && newSubscriptionUnitWithProration == other.newSubscriptionUnitWithProration && newSubscriptionGroupedAllocation == other.newSubscriptionGroupedAllocation && newSubscriptionGroupedWithProratedMinimum == other.newSubscriptionGroupedWithProratedMinimum && newSubscriptionBulkWithProration == other.newSubscriptionBulkWithProration /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newSubscriptionUnitPrice, newSubscriptionPackagePrice, newSubscriptionMatrixPrice, newSubscriptionTieredPrice, newSubscriptionTieredBpsPrice, newSubscriptionBpsPrice, newSubscriptionBulkBpsPrice, newSubscriptionBulkPrice, newSubscriptionThresholdTotalAmountPrice, newSubscriptionTieredPackagePrice, newSubscriptionTieredWithMinimumPrice, newSubscriptionUnitWithPercentPrice, newSubscriptionPackageWithAllocationPrice, newSubscriptionTierWithProrationPrice, newSubscriptionUnitWithProrationPrice, newSubscriptionGroupedAllocationPrice, newSubscriptionGroupedWithProratedMinimumPrice, newSubscriptionBulkWithProrationPrice) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newSubscriptionUnit, newSubscriptionPackage, newSubscriptionMatrix, newSubscriptionTiered, newSubscriptionTieredBps, newSubscriptionBps, newSubscriptionBulkBps, newSubscriptionBulk, newSubscriptionThresholdTotalAmount, newSubscriptionTieredPackage, newSubscriptionTieredWithMinimum, newSubscriptionUnitWithPercent, newSubscriptionPackageWithAllocation, newSubscriptionTierWithProration, newSubscriptionUnitWithProration, newSubscriptionGroupedAllocation, newSubscriptionGroupedWithProratedMinimum, newSubscriptionBulkWithProration) /* spotless:on */ override fun toString(): String = when { - newSubscriptionUnitPrice != null -> - "Price{newSubscriptionUnitPrice=$newSubscriptionUnitPrice}" - newSubscriptionPackagePrice != null -> - "Price{newSubscriptionPackagePrice=$newSubscriptionPackagePrice}" - newSubscriptionMatrixPrice != null -> - "Price{newSubscriptionMatrixPrice=$newSubscriptionMatrixPrice}" - newSubscriptionTieredPrice != null -> - "Price{newSubscriptionTieredPrice=$newSubscriptionTieredPrice}" - newSubscriptionTieredBpsPrice != null -> - "Price{newSubscriptionTieredBpsPrice=$newSubscriptionTieredBpsPrice}" - newSubscriptionBpsPrice != null -> - "Price{newSubscriptionBpsPrice=$newSubscriptionBpsPrice}" - newSubscriptionBulkBpsPrice != null -> - "Price{newSubscriptionBulkBpsPrice=$newSubscriptionBulkBpsPrice}" - newSubscriptionBulkPrice != null -> - "Price{newSubscriptionBulkPrice=$newSubscriptionBulkPrice}" - newSubscriptionThresholdTotalAmountPrice != null -> - "Price{newSubscriptionThresholdTotalAmountPrice=$newSubscriptionThresholdTotalAmountPrice}" - newSubscriptionTieredPackagePrice != null -> - "Price{newSubscriptionTieredPackagePrice=$newSubscriptionTieredPackagePrice}" - newSubscriptionTieredWithMinimumPrice != null -> - "Price{newSubscriptionTieredWithMinimumPrice=$newSubscriptionTieredWithMinimumPrice}" - newSubscriptionUnitWithPercentPrice != null -> - "Price{newSubscriptionUnitWithPercentPrice=$newSubscriptionUnitWithPercentPrice}" - newSubscriptionPackageWithAllocationPrice != null -> - "Price{newSubscriptionPackageWithAllocationPrice=$newSubscriptionPackageWithAllocationPrice}" - newSubscriptionTierWithProrationPrice != null -> - "Price{newSubscriptionTierWithProrationPrice=$newSubscriptionTierWithProrationPrice}" - newSubscriptionUnitWithProrationPrice != null -> - "Price{newSubscriptionUnitWithProrationPrice=$newSubscriptionUnitWithProrationPrice}" - newSubscriptionGroupedAllocationPrice != null -> - "Price{newSubscriptionGroupedAllocationPrice=$newSubscriptionGroupedAllocationPrice}" - newSubscriptionGroupedWithProratedMinimumPrice != null -> - "Price{newSubscriptionGroupedWithProratedMinimumPrice=$newSubscriptionGroupedWithProratedMinimumPrice}" - newSubscriptionBulkWithProrationPrice != null -> - "Price{newSubscriptionBulkWithProrationPrice=$newSubscriptionBulkWithProrationPrice}" + newSubscriptionUnit != null -> "Price{newSubscriptionUnit=$newSubscriptionUnit}" + newSubscriptionPackage != null -> + "Price{newSubscriptionPackage=$newSubscriptionPackage}" + newSubscriptionMatrix != null -> + "Price{newSubscriptionMatrix=$newSubscriptionMatrix}" + newSubscriptionTiered != null -> + "Price{newSubscriptionTiered=$newSubscriptionTiered}" + newSubscriptionTieredBps != null -> + "Price{newSubscriptionTieredBps=$newSubscriptionTieredBps}" + newSubscriptionBps != null -> "Price{newSubscriptionBps=$newSubscriptionBps}" + newSubscriptionBulkBps != null -> + "Price{newSubscriptionBulkBps=$newSubscriptionBulkBps}" + newSubscriptionBulk != null -> "Price{newSubscriptionBulk=$newSubscriptionBulk}" + newSubscriptionThresholdTotalAmount != null -> + "Price{newSubscriptionThresholdTotalAmount=$newSubscriptionThresholdTotalAmount}" + newSubscriptionTieredPackage != null -> + "Price{newSubscriptionTieredPackage=$newSubscriptionTieredPackage}" + newSubscriptionTieredWithMinimum != null -> + "Price{newSubscriptionTieredWithMinimum=$newSubscriptionTieredWithMinimum}" + newSubscriptionUnitWithPercent != null -> + "Price{newSubscriptionUnitWithPercent=$newSubscriptionUnitWithPercent}" + newSubscriptionPackageWithAllocation != null -> + "Price{newSubscriptionPackageWithAllocation=$newSubscriptionPackageWithAllocation}" + newSubscriptionTierWithProration != null -> + "Price{newSubscriptionTierWithProration=$newSubscriptionTierWithProration}" + newSubscriptionUnitWithProration != null -> + "Price{newSubscriptionUnitWithProration=$newSubscriptionUnitWithProration}" + newSubscriptionGroupedAllocation != null -> + "Price{newSubscriptionGroupedAllocation=$newSubscriptionGroupedAllocation}" + newSubscriptionGroupedWithProratedMinimum != null -> + "Price{newSubscriptionGroupedWithProratedMinimum=$newSubscriptionGroupedWithProratedMinimum}" + newSubscriptionBulkWithProration != null -> + "Price{newSubscriptionBulkWithProration=$newSubscriptionBulkWithProration}" _json != null -> "Price{_unknown=$_json}" else -> throw IllegalStateException("Invalid Price") } @@ -5710,203 +5643,160 @@ constructor( companion object { @JvmStatic - fun ofNewSubscriptionUnitPrice(newSubscriptionUnitPrice: NewSubscriptionUnitPrice) = - Price(newSubscriptionUnitPrice = newSubscriptionUnitPrice) + fun ofNewSubscriptionUnit(newSubscriptionUnit: NewSubscriptionUnitPrice) = + Price(newSubscriptionUnit = newSubscriptionUnit) @JvmStatic - fun ofNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice - ) = Price(newSubscriptionPackagePrice = newSubscriptionPackagePrice) + fun ofNewSubscriptionPackage(newSubscriptionPackage: NewSubscriptionPackagePrice) = + Price(newSubscriptionPackage = newSubscriptionPackage) @JvmStatic - fun ofNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice - ) = Price(newSubscriptionMatrixPrice = newSubscriptionMatrixPrice) + fun ofNewSubscriptionMatrix(newSubscriptionMatrix: NewSubscriptionMatrixPrice) = + Price(newSubscriptionMatrix = newSubscriptionMatrix) @JvmStatic - fun ofNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice - ) = Price(newSubscriptionTieredPrice = newSubscriptionTieredPrice) + fun ofNewSubscriptionTiered(newSubscriptionTiered: NewSubscriptionTieredPrice) = + Price(newSubscriptionTiered = newSubscriptionTiered) @JvmStatic - fun ofNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice - ) = Price(newSubscriptionTieredBpsPrice = newSubscriptionTieredBpsPrice) + fun ofNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice + ) = Price(newSubscriptionTieredBps = newSubscriptionTieredBps) @JvmStatic - fun ofNewSubscriptionBpsPrice(newSubscriptionBpsPrice: NewSubscriptionBpsPrice) = - Price(newSubscriptionBpsPrice = newSubscriptionBpsPrice) + fun ofNewSubscriptionBps(newSubscriptionBps: NewSubscriptionBpsPrice) = + Price(newSubscriptionBps = newSubscriptionBps) @JvmStatic - fun ofNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice - ) = Price(newSubscriptionBulkBpsPrice = newSubscriptionBulkBpsPrice) + fun ofNewSubscriptionBulkBps(newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice) = + Price(newSubscriptionBulkBps = newSubscriptionBulkBps) @JvmStatic - fun ofNewSubscriptionBulkPrice(newSubscriptionBulkPrice: NewSubscriptionBulkPrice) = - Price(newSubscriptionBulkPrice = newSubscriptionBulkPrice) + fun ofNewSubscriptionBulk(newSubscriptionBulk: NewSubscriptionBulkPrice) = + Price(newSubscriptionBulk = newSubscriptionBulk) @JvmStatic - fun ofNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: - NewSubscriptionThresholdTotalAmountPrice - ) = - Price( - newSubscriptionThresholdTotalAmountPrice = - newSubscriptionThresholdTotalAmountPrice - ) + fun ofNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice + ) = Price(newSubscriptionThresholdTotalAmount = newSubscriptionThresholdTotalAmount) @JvmStatic - fun ofNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice - ) = Price(newSubscriptionTieredPackagePrice = newSubscriptionTieredPackagePrice) + fun ofNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice + ) = Price(newSubscriptionTieredPackage = newSubscriptionTieredPackage) @JvmStatic - fun ofNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: NewSubscriptionTieredWithMinimumPrice - ) = - Price( - newSubscriptionTieredWithMinimumPrice = - newSubscriptionTieredWithMinimumPrice - ) + fun ofNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice + ) = Price(newSubscriptionTieredWithMinimum = newSubscriptionTieredWithMinimum) @JvmStatic - fun ofNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice - ) = Price(newSubscriptionUnitWithPercentPrice = newSubscriptionUnitWithPercentPrice) + fun ofNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice + ) = Price(newSubscriptionUnitWithPercent = newSubscriptionUnitWithPercent) @JvmStatic - fun ofNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: - NewSubscriptionPackageWithAllocationPrice + fun ofNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ) = Price( - newSubscriptionPackageWithAllocationPrice = - newSubscriptionPackageWithAllocationPrice + newSubscriptionPackageWithAllocation = newSubscriptionPackageWithAllocation ) @JvmStatic - fun ofNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: NewSubscriptionTierWithProrationPrice - ) = - Price( - newSubscriptionTierWithProrationPrice = - newSubscriptionTierWithProrationPrice - ) + fun ofNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice + ) = Price(newSubscriptionTierWithProration = newSubscriptionTierWithProration) @JvmStatic - fun ofNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: NewSubscriptionUnitWithProrationPrice - ) = - Price( - newSubscriptionUnitWithProrationPrice = - newSubscriptionUnitWithProrationPrice - ) + fun ofNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice + ) = Price(newSubscriptionUnitWithProration = newSubscriptionUnitWithProration) @JvmStatic - fun ofNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: NewSubscriptionGroupedAllocationPrice - ) = - Price( - newSubscriptionGroupedAllocationPrice = - newSubscriptionGroupedAllocationPrice - ) + fun ofNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice + ) = Price(newSubscriptionGroupedAllocation = newSubscriptionGroupedAllocation) @JvmStatic - fun ofNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + fun ofNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ) = Price( - newSubscriptionGroupedWithProratedMinimumPrice = - newSubscriptionGroupedWithProratedMinimumPrice + newSubscriptionGroupedWithProratedMinimum = + newSubscriptionGroupedWithProratedMinimum ) @JvmStatic - fun ofNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: NewSubscriptionBulkWithProrationPrice - ) = - Price( - newSubscriptionBulkWithProrationPrice = - newSubscriptionBulkWithProrationPrice - ) + fun ofNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice + ) = Price(newSubscriptionBulkWithProration = newSubscriptionBulkWithProration) } interface Visitor { - fun visitNewSubscriptionUnitPrice( - newSubscriptionUnitPrice: NewSubscriptionUnitPrice - ): T + fun visitNewSubscriptionUnit(newSubscriptionUnit: NewSubscriptionUnitPrice): T - fun visitNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice + fun visitNewSubscriptionPackage( + newSubscriptionPackage: NewSubscriptionPackagePrice ): T - fun visitNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice - ): T + fun visitNewSubscriptionMatrix(newSubscriptionMatrix: NewSubscriptionMatrixPrice): T - fun visitNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice - ): T + fun visitNewSubscriptionTiered(newSubscriptionTiered: NewSubscriptionTieredPrice): T - fun visitNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice + fun visitNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice ): T - fun visitNewSubscriptionBpsPrice( - newSubscriptionBpsPrice: NewSubscriptionBpsPrice - ): T + fun visitNewSubscriptionBps(newSubscriptionBps: NewSubscriptionBpsPrice): T - fun visitNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice + fun visitNewSubscriptionBulkBps( + newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice ): T - fun visitNewSubscriptionBulkPrice( - newSubscriptionBulkPrice: NewSubscriptionBulkPrice - ): T + fun visitNewSubscriptionBulk(newSubscriptionBulk: NewSubscriptionBulkPrice): T - fun visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: - NewSubscriptionThresholdTotalAmountPrice + fun visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice ): T - fun visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice + fun visitNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice ): T - fun visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: NewSubscriptionTieredWithMinimumPrice + fun visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice ): T - fun visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice + fun visitNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice ): T - fun visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: - NewSubscriptionPackageWithAllocationPrice + fun visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ): T - fun visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: NewSubscriptionTierWithProrationPrice + fun visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice ): T - fun visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: NewSubscriptionUnitWithProrationPrice + fun visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice ): T - fun visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: NewSubscriptionGroupedAllocationPrice + fun visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice ): T - fun visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + fun visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ): T - fun visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: NewSubscriptionBulkWithProrationPrice + fun visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice ): T fun unknown(json: JsonValue?): T { @@ -5927,7 +5817,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionUnitPrice = it, _json = json) + return Price(newSubscriptionUnit = it, _json = json) } } "package" -> { @@ -5935,7 +5825,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionPackagePrice = it, _json = json) + return Price(newSubscriptionPackage = it, _json = json) } } "matrix" -> { @@ -5943,7 +5833,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionMatrixPrice = it, _json = json) + return Price(newSubscriptionMatrix = it, _json = json) } } "tiered" -> { @@ -5951,7 +5841,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionTieredPrice = it, _json = json) + return Price(newSubscriptionTiered = it, _json = json) } } "tiered_bps" -> { @@ -5959,7 +5849,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionTieredBpsPrice = it, _json = json) + return Price(newSubscriptionTieredBps = it, _json = json) } } "bps" -> { @@ -5967,7 +5857,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBpsPrice = it, _json = json) + return Price(newSubscriptionBps = it, _json = json) } } "bulk_bps" -> { @@ -5975,7 +5865,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBulkBpsPrice = it, _json = json) + return Price(newSubscriptionBulkBps = it, _json = json) } } "bulk" -> { @@ -5983,7 +5873,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBulkPrice = it, _json = json) + return Price(newSubscriptionBulk = it, _json = json) } } "threshold_total_amount" -> { @@ -5995,7 +5885,7 @@ constructor( } ?.let { return Price( - newSubscriptionThresholdTotalAmountPrice = it, + newSubscriptionThresholdTotalAmount = it, _json = json ) } @@ -6008,10 +5898,7 @@ constructor( it.validate() } ?.let { - return Price( - newSubscriptionTieredPackagePrice = it, - _json = json - ) + return Price(newSubscriptionTieredPackage = it, _json = json) } } "tiered_with_minimum" -> { @@ -6023,7 +5910,7 @@ constructor( } ?.let { return Price( - newSubscriptionTieredWithMinimumPrice = it, + newSubscriptionTieredWithMinimum = it, _json = json ) } @@ -6036,10 +5923,7 @@ constructor( it.validate() } ?.let { - return Price( - newSubscriptionUnitWithPercentPrice = it, - _json = json - ) + return Price(newSubscriptionUnitWithPercent = it, _json = json) } } "package_with_allocation" -> { @@ -6051,7 +5935,7 @@ constructor( } ?.let { return Price( - newSubscriptionPackageWithAllocationPrice = it, + newSubscriptionPackageWithAllocation = it, _json = json ) } @@ -6065,7 +5949,7 @@ constructor( } ?.let { return Price( - newSubscriptionTierWithProrationPrice = it, + newSubscriptionTierWithProration = it, _json = json ) } @@ -6079,7 +5963,7 @@ constructor( } ?.let { return Price( - newSubscriptionUnitWithProrationPrice = it, + newSubscriptionUnitWithProration = it, _json = json ) } @@ -6093,7 +5977,7 @@ constructor( } ?.let { return Price( - newSubscriptionGroupedAllocationPrice = it, + newSubscriptionGroupedAllocation = it, _json = json ) } @@ -6107,7 +5991,7 @@ constructor( } ?.let { return Price( - newSubscriptionGroupedWithProratedMinimumPrice = it, + newSubscriptionGroupedWithProratedMinimum = it, _json = json ) } @@ -6121,7 +6005,7 @@ constructor( } ?.let { return Price( - newSubscriptionBulkWithProrationPrice = it, + newSubscriptionBulkWithProration = it, _json = json ) } @@ -6140,44 +6024,42 @@ constructor( provider: SerializerProvider ) { when { - value.newSubscriptionUnitPrice != null -> - generator.writeObject(value.newSubscriptionUnitPrice) - value.newSubscriptionPackagePrice != null -> - generator.writeObject(value.newSubscriptionPackagePrice) - value.newSubscriptionMatrixPrice != null -> - generator.writeObject(value.newSubscriptionMatrixPrice) - value.newSubscriptionTieredPrice != null -> - generator.writeObject(value.newSubscriptionTieredPrice) - value.newSubscriptionTieredBpsPrice != null -> - generator.writeObject(value.newSubscriptionTieredBpsPrice) - value.newSubscriptionBpsPrice != null -> - generator.writeObject(value.newSubscriptionBpsPrice) - value.newSubscriptionBulkBpsPrice != null -> - generator.writeObject(value.newSubscriptionBulkBpsPrice) - value.newSubscriptionBulkPrice != null -> - generator.writeObject(value.newSubscriptionBulkPrice) - value.newSubscriptionThresholdTotalAmountPrice != null -> - generator.writeObject(value.newSubscriptionThresholdTotalAmountPrice) - value.newSubscriptionTieredPackagePrice != null -> - generator.writeObject(value.newSubscriptionTieredPackagePrice) - value.newSubscriptionTieredWithMinimumPrice != null -> - generator.writeObject(value.newSubscriptionTieredWithMinimumPrice) - value.newSubscriptionUnitWithPercentPrice != null -> - generator.writeObject(value.newSubscriptionUnitWithPercentPrice) - value.newSubscriptionPackageWithAllocationPrice != null -> - generator.writeObject(value.newSubscriptionPackageWithAllocationPrice) - value.newSubscriptionTierWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionTierWithProrationPrice) - value.newSubscriptionUnitWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionUnitWithProrationPrice) - value.newSubscriptionGroupedAllocationPrice != null -> - generator.writeObject(value.newSubscriptionGroupedAllocationPrice) - value.newSubscriptionGroupedWithProratedMinimumPrice != null -> - generator.writeObject( - value.newSubscriptionGroupedWithProratedMinimumPrice - ) - value.newSubscriptionBulkWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionBulkWithProrationPrice) + value.newSubscriptionUnit != null -> + generator.writeObject(value.newSubscriptionUnit) + value.newSubscriptionPackage != null -> + generator.writeObject(value.newSubscriptionPackage) + value.newSubscriptionMatrix != null -> + generator.writeObject(value.newSubscriptionMatrix) + value.newSubscriptionTiered != null -> + generator.writeObject(value.newSubscriptionTiered) + value.newSubscriptionTieredBps != null -> + generator.writeObject(value.newSubscriptionTieredBps) + value.newSubscriptionBps != null -> + generator.writeObject(value.newSubscriptionBps) + value.newSubscriptionBulkBps != null -> + generator.writeObject(value.newSubscriptionBulkBps) + value.newSubscriptionBulk != null -> + generator.writeObject(value.newSubscriptionBulk) + value.newSubscriptionThresholdTotalAmount != null -> + generator.writeObject(value.newSubscriptionThresholdTotalAmount) + value.newSubscriptionTieredPackage != null -> + generator.writeObject(value.newSubscriptionTieredPackage) + value.newSubscriptionTieredWithMinimum != null -> + generator.writeObject(value.newSubscriptionTieredWithMinimum) + value.newSubscriptionUnitWithPercent != null -> + generator.writeObject(value.newSubscriptionUnitWithPercent) + value.newSubscriptionPackageWithAllocation != null -> + generator.writeObject(value.newSubscriptionPackageWithAllocation) + value.newSubscriptionTierWithProration != null -> + generator.writeObject(value.newSubscriptionTierWithProration) + value.newSubscriptionUnitWithProration != null -> + generator.writeObject(value.newSubscriptionUnitWithProration) + value.newSubscriptionGroupedAllocation != null -> + generator.writeObject(value.newSubscriptionGroupedAllocation) + value.newSubscriptionGroupedWithProratedMinimum != null -> + generator.writeObject(value.newSubscriptionGroupedWithProratedMinimum) + value.newSubscriptionBulkWithProration != null -> + generator.writeObject(value.newSubscriptionBulkWithProration) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Price") } @@ -34714,131 +34596,99 @@ constructor( fun price(price: JsonField) = apply { this.price = price } /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionUnitPrice: Price.NewSubscriptionUnitPrice) = - price(Price.ofNewSubscriptionUnitPrice(newSubscriptionUnitPrice)) + fun price(newSubscriptionUnit: Price.NewSubscriptionUnitPrice) = + price(Price.ofNewSubscriptionUnit(newSubscriptionUnit)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionPackagePrice: Price.NewSubscriptionPackagePrice) = - price(Price.ofNewSubscriptionPackagePrice(newSubscriptionPackagePrice)) + fun price(newSubscriptionPackage: Price.NewSubscriptionPackagePrice) = + price(Price.ofNewSubscriptionPackage(newSubscriptionPackage)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionMatrixPrice: Price.NewSubscriptionMatrixPrice) = - price(Price.ofNewSubscriptionMatrixPrice(newSubscriptionMatrixPrice)) + fun price(newSubscriptionMatrix: Price.NewSubscriptionMatrixPrice) = + price(Price.ofNewSubscriptionMatrix(newSubscriptionMatrix)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredPrice: Price.NewSubscriptionTieredPrice) = - price(Price.ofNewSubscriptionTieredPrice(newSubscriptionTieredPrice)) + fun price(newSubscriptionTiered: Price.NewSubscriptionTieredPrice) = + price(Price.ofNewSubscriptionTiered(newSubscriptionTiered)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredBpsPrice: Price.NewSubscriptionTieredBpsPrice) = - price(Price.ofNewSubscriptionTieredBpsPrice(newSubscriptionTieredBpsPrice)) + fun price(newSubscriptionTieredBps: Price.NewSubscriptionTieredBpsPrice) = + price(Price.ofNewSubscriptionTieredBps(newSubscriptionTieredBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBpsPrice: Price.NewSubscriptionBpsPrice) = - price(Price.ofNewSubscriptionBpsPrice(newSubscriptionBpsPrice)) + fun price(newSubscriptionBps: Price.NewSubscriptionBpsPrice) = + price(Price.ofNewSubscriptionBps(newSubscriptionBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBulkBpsPrice: Price.NewSubscriptionBulkBpsPrice) = - price(Price.ofNewSubscriptionBulkBpsPrice(newSubscriptionBulkBpsPrice)) + fun price(newSubscriptionBulkBps: Price.NewSubscriptionBulkBpsPrice) = + price(Price.ofNewSubscriptionBulkBps(newSubscriptionBulkBps)) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionBulkPrice: Price.NewSubscriptionBulkPrice) = - price(Price.ofNewSubscriptionBulkPrice(newSubscriptionBulkPrice)) + fun price(newSubscriptionBulk: Price.NewSubscriptionBulkPrice) = + price(Price.ofNewSubscriptionBulk(newSubscriptionBulk)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionThresholdTotalAmountPrice: - Price.NewSubscriptionThresholdTotalAmountPrice + newSubscriptionThresholdTotalAmount: Price.NewSubscriptionThresholdTotalAmountPrice ) = price( - Price.ofNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice - ) + Price.ofNewSubscriptionThresholdTotalAmount(newSubscriptionThresholdTotalAmount) ) /** The definition of a new price to create and add to the subscription. */ - fun price(newSubscriptionTieredPackagePrice: Price.NewSubscriptionTieredPackagePrice) = - price(Price.ofNewSubscriptionTieredPackagePrice(newSubscriptionTieredPackagePrice)) + fun price(newSubscriptionTieredPackage: Price.NewSubscriptionTieredPackagePrice) = + price(Price.ofNewSubscriptionTieredPackage(newSubscriptionTieredPackage)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionTieredWithMinimumPrice: Price.NewSubscriptionTieredWithMinimumPrice - ) = - price( - Price.ofNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice - ) - ) + newSubscriptionTieredWithMinimum: Price.NewSubscriptionTieredWithMinimumPrice + ) = price(Price.ofNewSubscriptionTieredWithMinimum(newSubscriptionTieredWithMinimum)) /** The definition of a new price to create and add to the subscription. */ - fun price( - newSubscriptionUnitWithPercentPrice: Price.NewSubscriptionUnitWithPercentPrice - ) = - price( - Price.ofNewSubscriptionUnitWithPercentPrice(newSubscriptionUnitWithPercentPrice) - ) + fun price(newSubscriptionUnitWithPercent: Price.NewSubscriptionUnitWithPercentPrice) = + price(Price.ofNewSubscriptionUnitWithPercent(newSubscriptionUnitWithPercent)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionPackageWithAllocationPrice: + newSubscriptionPackageWithAllocation: Price.NewSubscriptionPackageWithAllocationPrice ) = price( - Price.ofNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice + Price.ofNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionTierWithProrationPrice: Price.NewSubscriptionTierWithProrationPrice - ) = - price( - Price.ofNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice - ) - ) + newSubscriptionTierWithProration: Price.NewSubscriptionTierWithProrationPrice + ) = price(Price.ofNewSubscriptionTierWithProration(newSubscriptionTierWithProration)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionUnitWithProrationPrice: Price.NewSubscriptionUnitWithProrationPrice - ) = - price( - Price.ofNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice - ) - ) + newSubscriptionUnitWithProration: Price.NewSubscriptionUnitWithProrationPrice + ) = price(Price.ofNewSubscriptionUnitWithProration(newSubscriptionUnitWithProration)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionGroupedAllocationPrice: Price.NewSubscriptionGroupedAllocationPrice - ) = - price( - Price.ofNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice - ) - ) + newSubscriptionGroupedAllocation: Price.NewSubscriptionGroupedAllocationPrice + ) = price(Price.ofNewSubscriptionGroupedAllocation(newSubscriptionGroupedAllocation)) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionGroupedWithProratedMinimumPrice: + newSubscriptionGroupedWithProratedMinimum: Price.NewSubscriptionGroupedWithProratedMinimumPrice ) = price( - Price.ofNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice + Price.ofNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum ) ) /** The definition of a new price to create and add to the subscription. */ fun price( - newSubscriptionBulkWithProrationPrice: Price.NewSubscriptionBulkWithProrationPrice - ) = - price( - Price.ofNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice - ) - ) + newSubscriptionBulkWithProration: Price.NewSubscriptionBulkWithProrationPrice + ) = price(Price.ofNewSubscriptionBulkWithProration(newSubscriptionBulkWithProration)) /** The id of the price to add to the subscription. */ fun priceId(priceId: String?) = priceId(JsonField.ofNullable(priceId)) @@ -35184,288 +35034,261 @@ constructor( @JsonSerialize(using = Price.Serializer::class) class Price private constructor( - private val newSubscriptionUnitPrice: NewSubscriptionUnitPrice? = null, - private val newSubscriptionPackagePrice: NewSubscriptionPackagePrice? = null, - private val newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice? = null, - private val newSubscriptionTieredPrice: NewSubscriptionTieredPrice? = null, - private val newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice? = null, - private val newSubscriptionBpsPrice: NewSubscriptionBpsPrice? = null, - private val newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice? = null, - private val newSubscriptionBulkPrice: NewSubscriptionBulkPrice? = null, - private val newSubscriptionThresholdTotalAmountPrice: + private val newSubscriptionUnit: NewSubscriptionUnitPrice? = null, + private val newSubscriptionPackage: NewSubscriptionPackagePrice? = null, + private val newSubscriptionMatrix: NewSubscriptionMatrixPrice? = null, + private val newSubscriptionTiered: NewSubscriptionTieredPrice? = null, + private val newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice? = null, + private val newSubscriptionBps: NewSubscriptionBpsPrice? = null, + private val newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice? = null, + private val newSubscriptionBulk: NewSubscriptionBulkPrice? = null, + private val newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice? = null, - private val newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice? = - null, - private val newSubscriptionTieredWithMinimumPrice: - NewSubscriptionTieredWithMinimumPrice? = + private val newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice? = null, + private val newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice? = null, - private val newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice? = - null, - private val newSubscriptionPackageWithAllocationPrice: + private val newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice? = null, + private val newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice? = null, - private val newSubscriptionTierWithProrationPrice: - NewSubscriptionTierWithProrationPrice? = + private val newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice? = null, - private val newSubscriptionUnitWithProrationPrice: - NewSubscriptionUnitWithProrationPrice? = + private val newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice? = null, - private val newSubscriptionGroupedAllocationPrice: - NewSubscriptionGroupedAllocationPrice? = + private val newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice? = null, - private val newSubscriptionGroupedWithProratedMinimumPrice: + private val newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice? = null, - private val newSubscriptionBulkWithProrationPrice: - NewSubscriptionBulkWithProrationPrice? = + private val newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice? = null, private val _json: JsonValue? = null, ) { - fun newSubscriptionUnitPrice(): Optional = - Optional.ofNullable(newSubscriptionUnitPrice) + fun newSubscriptionUnit(): Optional = + Optional.ofNullable(newSubscriptionUnit) - fun newSubscriptionPackagePrice(): Optional = - Optional.ofNullable(newSubscriptionPackagePrice) + fun newSubscriptionPackage(): Optional = + Optional.ofNullable(newSubscriptionPackage) - fun newSubscriptionMatrixPrice(): Optional = - Optional.ofNullable(newSubscriptionMatrixPrice) + fun newSubscriptionMatrix(): Optional = + Optional.ofNullable(newSubscriptionMatrix) - fun newSubscriptionTieredPrice(): Optional = - Optional.ofNullable(newSubscriptionTieredPrice) + fun newSubscriptionTiered(): Optional = + Optional.ofNullable(newSubscriptionTiered) - fun newSubscriptionTieredBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionTieredBpsPrice) + fun newSubscriptionTieredBps(): Optional = + Optional.ofNullable(newSubscriptionTieredBps) - fun newSubscriptionBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionBpsPrice) + fun newSubscriptionBps(): Optional = + Optional.ofNullable(newSubscriptionBps) - fun newSubscriptionBulkBpsPrice(): Optional = - Optional.ofNullable(newSubscriptionBulkBpsPrice) + fun newSubscriptionBulkBps(): Optional = + Optional.ofNullable(newSubscriptionBulkBps) - fun newSubscriptionBulkPrice(): Optional = - Optional.ofNullable(newSubscriptionBulkPrice) + fun newSubscriptionBulk(): Optional = + Optional.ofNullable(newSubscriptionBulk) - fun newSubscriptionThresholdTotalAmountPrice(): + fun newSubscriptionThresholdTotalAmount(): Optional = - Optional.ofNullable(newSubscriptionThresholdTotalAmountPrice) + Optional.ofNullable(newSubscriptionThresholdTotalAmount) - fun newSubscriptionTieredPackagePrice(): Optional = - Optional.ofNullable(newSubscriptionTieredPackagePrice) + fun newSubscriptionTieredPackage(): Optional = + Optional.ofNullable(newSubscriptionTieredPackage) - fun newSubscriptionTieredWithMinimumPrice(): + fun newSubscriptionTieredWithMinimum(): Optional = - Optional.ofNullable(newSubscriptionTieredWithMinimumPrice) + Optional.ofNullable(newSubscriptionTieredWithMinimum) - fun newSubscriptionUnitWithPercentPrice(): - Optional = - Optional.ofNullable(newSubscriptionUnitWithPercentPrice) + fun newSubscriptionUnitWithPercent(): Optional = + Optional.ofNullable(newSubscriptionUnitWithPercent) - fun newSubscriptionPackageWithAllocationPrice(): + fun newSubscriptionPackageWithAllocation(): Optional = - Optional.ofNullable(newSubscriptionPackageWithAllocationPrice) + Optional.ofNullable(newSubscriptionPackageWithAllocation) - fun newSubscriptionTierWithProrationPrice(): + fun newSubscriptionTierWithProration(): Optional = - Optional.ofNullable(newSubscriptionTierWithProrationPrice) + Optional.ofNullable(newSubscriptionTierWithProration) - fun newSubscriptionUnitWithProrationPrice(): + fun newSubscriptionUnitWithProration(): Optional = - Optional.ofNullable(newSubscriptionUnitWithProrationPrice) + Optional.ofNullable(newSubscriptionUnitWithProration) - fun newSubscriptionGroupedAllocationPrice(): + fun newSubscriptionGroupedAllocation(): Optional = - Optional.ofNullable(newSubscriptionGroupedAllocationPrice) + Optional.ofNullable(newSubscriptionGroupedAllocation) - fun newSubscriptionGroupedWithProratedMinimumPrice(): + fun newSubscriptionGroupedWithProratedMinimum(): Optional = - Optional.ofNullable(newSubscriptionGroupedWithProratedMinimumPrice) + Optional.ofNullable(newSubscriptionGroupedWithProratedMinimum) - fun newSubscriptionBulkWithProrationPrice(): + fun newSubscriptionBulkWithProration(): Optional = - Optional.ofNullable(newSubscriptionBulkWithProrationPrice) + Optional.ofNullable(newSubscriptionBulkWithProration) - fun isNewSubscriptionUnitPrice(): Boolean = newSubscriptionUnitPrice != null + fun isNewSubscriptionUnit(): Boolean = newSubscriptionUnit != null - fun isNewSubscriptionPackagePrice(): Boolean = newSubscriptionPackagePrice != null + fun isNewSubscriptionPackage(): Boolean = newSubscriptionPackage != null - fun isNewSubscriptionMatrixPrice(): Boolean = newSubscriptionMatrixPrice != null + fun isNewSubscriptionMatrix(): Boolean = newSubscriptionMatrix != null - fun isNewSubscriptionTieredPrice(): Boolean = newSubscriptionTieredPrice != null + fun isNewSubscriptionTiered(): Boolean = newSubscriptionTiered != null - fun isNewSubscriptionTieredBpsPrice(): Boolean = newSubscriptionTieredBpsPrice != null + fun isNewSubscriptionTieredBps(): Boolean = newSubscriptionTieredBps != null - fun isNewSubscriptionBpsPrice(): Boolean = newSubscriptionBpsPrice != null + fun isNewSubscriptionBps(): Boolean = newSubscriptionBps != null - fun isNewSubscriptionBulkBpsPrice(): Boolean = newSubscriptionBulkBpsPrice != null + fun isNewSubscriptionBulkBps(): Boolean = newSubscriptionBulkBps != null - fun isNewSubscriptionBulkPrice(): Boolean = newSubscriptionBulkPrice != null + fun isNewSubscriptionBulk(): Boolean = newSubscriptionBulk != null - fun isNewSubscriptionThresholdTotalAmountPrice(): Boolean = - newSubscriptionThresholdTotalAmountPrice != null + fun isNewSubscriptionThresholdTotalAmount(): Boolean = + newSubscriptionThresholdTotalAmount != null - fun isNewSubscriptionTieredPackagePrice(): Boolean = - newSubscriptionTieredPackagePrice != null + fun isNewSubscriptionTieredPackage(): Boolean = newSubscriptionTieredPackage != null - fun isNewSubscriptionTieredWithMinimumPrice(): Boolean = - newSubscriptionTieredWithMinimumPrice != null + fun isNewSubscriptionTieredWithMinimum(): Boolean = + newSubscriptionTieredWithMinimum != null - fun isNewSubscriptionUnitWithPercentPrice(): Boolean = - newSubscriptionUnitWithPercentPrice != null + fun isNewSubscriptionUnitWithPercent(): Boolean = newSubscriptionUnitWithPercent != null - fun isNewSubscriptionPackageWithAllocationPrice(): Boolean = - newSubscriptionPackageWithAllocationPrice != null + fun isNewSubscriptionPackageWithAllocation(): Boolean = + newSubscriptionPackageWithAllocation != null - fun isNewSubscriptionTierWithProrationPrice(): Boolean = - newSubscriptionTierWithProrationPrice != null + fun isNewSubscriptionTierWithProration(): Boolean = + newSubscriptionTierWithProration != null - fun isNewSubscriptionUnitWithProrationPrice(): Boolean = - newSubscriptionUnitWithProrationPrice != null + fun isNewSubscriptionUnitWithProration(): Boolean = + newSubscriptionUnitWithProration != null - fun isNewSubscriptionGroupedAllocationPrice(): Boolean = - newSubscriptionGroupedAllocationPrice != null + fun isNewSubscriptionGroupedAllocation(): Boolean = + newSubscriptionGroupedAllocation != null - fun isNewSubscriptionGroupedWithProratedMinimumPrice(): Boolean = - newSubscriptionGroupedWithProratedMinimumPrice != null + fun isNewSubscriptionGroupedWithProratedMinimum(): Boolean = + newSubscriptionGroupedWithProratedMinimum != null - fun isNewSubscriptionBulkWithProrationPrice(): Boolean = - newSubscriptionBulkWithProrationPrice != null + fun isNewSubscriptionBulkWithProration(): Boolean = + newSubscriptionBulkWithProration != null - fun asNewSubscriptionUnitPrice(): NewSubscriptionUnitPrice = - newSubscriptionUnitPrice.getOrThrow("newSubscriptionUnitPrice") + fun asNewSubscriptionUnit(): NewSubscriptionUnitPrice = + newSubscriptionUnit.getOrThrow("newSubscriptionUnit") - fun asNewSubscriptionPackagePrice(): NewSubscriptionPackagePrice = - newSubscriptionPackagePrice.getOrThrow("newSubscriptionPackagePrice") + fun asNewSubscriptionPackage(): NewSubscriptionPackagePrice = + newSubscriptionPackage.getOrThrow("newSubscriptionPackage") - fun asNewSubscriptionMatrixPrice(): NewSubscriptionMatrixPrice = - newSubscriptionMatrixPrice.getOrThrow("newSubscriptionMatrixPrice") + fun asNewSubscriptionMatrix(): NewSubscriptionMatrixPrice = + newSubscriptionMatrix.getOrThrow("newSubscriptionMatrix") - fun asNewSubscriptionTieredPrice(): NewSubscriptionTieredPrice = - newSubscriptionTieredPrice.getOrThrow("newSubscriptionTieredPrice") + fun asNewSubscriptionTiered(): NewSubscriptionTieredPrice = + newSubscriptionTiered.getOrThrow("newSubscriptionTiered") - fun asNewSubscriptionTieredBpsPrice(): NewSubscriptionTieredBpsPrice = - newSubscriptionTieredBpsPrice.getOrThrow("newSubscriptionTieredBpsPrice") + fun asNewSubscriptionTieredBps(): NewSubscriptionTieredBpsPrice = + newSubscriptionTieredBps.getOrThrow("newSubscriptionTieredBps") - fun asNewSubscriptionBpsPrice(): NewSubscriptionBpsPrice = - newSubscriptionBpsPrice.getOrThrow("newSubscriptionBpsPrice") + fun asNewSubscriptionBps(): NewSubscriptionBpsPrice = + newSubscriptionBps.getOrThrow("newSubscriptionBps") - fun asNewSubscriptionBulkBpsPrice(): NewSubscriptionBulkBpsPrice = - newSubscriptionBulkBpsPrice.getOrThrow("newSubscriptionBulkBpsPrice") + fun asNewSubscriptionBulkBps(): NewSubscriptionBulkBpsPrice = + newSubscriptionBulkBps.getOrThrow("newSubscriptionBulkBps") - fun asNewSubscriptionBulkPrice(): NewSubscriptionBulkPrice = - newSubscriptionBulkPrice.getOrThrow("newSubscriptionBulkPrice") + fun asNewSubscriptionBulk(): NewSubscriptionBulkPrice = + newSubscriptionBulk.getOrThrow("newSubscriptionBulk") - fun asNewSubscriptionThresholdTotalAmountPrice(): - NewSubscriptionThresholdTotalAmountPrice = - newSubscriptionThresholdTotalAmountPrice.getOrThrow( - "newSubscriptionThresholdTotalAmountPrice" + fun asNewSubscriptionThresholdTotalAmount(): NewSubscriptionThresholdTotalAmountPrice = + newSubscriptionThresholdTotalAmount.getOrThrow( + "newSubscriptionThresholdTotalAmount" ) - fun asNewSubscriptionTieredPackagePrice(): NewSubscriptionTieredPackagePrice = - newSubscriptionTieredPackagePrice.getOrThrow("newSubscriptionTieredPackagePrice") + fun asNewSubscriptionTieredPackage(): NewSubscriptionTieredPackagePrice = + newSubscriptionTieredPackage.getOrThrow("newSubscriptionTieredPackage") - fun asNewSubscriptionTieredWithMinimumPrice(): NewSubscriptionTieredWithMinimumPrice = - newSubscriptionTieredWithMinimumPrice.getOrThrow( - "newSubscriptionTieredWithMinimumPrice" - ) + fun asNewSubscriptionTieredWithMinimum(): NewSubscriptionTieredWithMinimumPrice = + newSubscriptionTieredWithMinimum.getOrThrow("newSubscriptionTieredWithMinimum") - fun asNewSubscriptionUnitWithPercentPrice(): NewSubscriptionUnitWithPercentPrice = - newSubscriptionUnitWithPercentPrice.getOrThrow( - "newSubscriptionUnitWithPercentPrice" - ) + fun asNewSubscriptionUnitWithPercent(): NewSubscriptionUnitWithPercentPrice = + newSubscriptionUnitWithPercent.getOrThrow("newSubscriptionUnitWithPercent") - fun asNewSubscriptionPackageWithAllocationPrice(): + fun asNewSubscriptionPackageWithAllocation(): NewSubscriptionPackageWithAllocationPrice = - newSubscriptionPackageWithAllocationPrice.getOrThrow( - "newSubscriptionPackageWithAllocationPrice" + newSubscriptionPackageWithAllocation.getOrThrow( + "newSubscriptionPackageWithAllocation" ) - fun asNewSubscriptionTierWithProrationPrice(): NewSubscriptionTierWithProrationPrice = - newSubscriptionTierWithProrationPrice.getOrThrow( - "newSubscriptionTierWithProrationPrice" - ) + fun asNewSubscriptionTierWithProration(): NewSubscriptionTierWithProrationPrice = + newSubscriptionTierWithProration.getOrThrow("newSubscriptionTierWithProration") - fun asNewSubscriptionUnitWithProrationPrice(): NewSubscriptionUnitWithProrationPrice = - newSubscriptionUnitWithProrationPrice.getOrThrow( - "newSubscriptionUnitWithProrationPrice" - ) + fun asNewSubscriptionUnitWithProration(): NewSubscriptionUnitWithProrationPrice = + newSubscriptionUnitWithProration.getOrThrow("newSubscriptionUnitWithProration") - fun asNewSubscriptionGroupedAllocationPrice(): NewSubscriptionGroupedAllocationPrice = - newSubscriptionGroupedAllocationPrice.getOrThrow( - "newSubscriptionGroupedAllocationPrice" - ) + fun asNewSubscriptionGroupedAllocation(): NewSubscriptionGroupedAllocationPrice = + newSubscriptionGroupedAllocation.getOrThrow("newSubscriptionGroupedAllocation") - fun asNewSubscriptionGroupedWithProratedMinimumPrice(): + fun asNewSubscriptionGroupedWithProratedMinimum(): NewSubscriptionGroupedWithProratedMinimumPrice = - newSubscriptionGroupedWithProratedMinimumPrice.getOrThrow( - "newSubscriptionGroupedWithProratedMinimumPrice" + newSubscriptionGroupedWithProratedMinimum.getOrThrow( + "newSubscriptionGroupedWithProratedMinimum" ) - fun asNewSubscriptionBulkWithProrationPrice(): NewSubscriptionBulkWithProrationPrice = - newSubscriptionBulkWithProrationPrice.getOrThrow( - "newSubscriptionBulkWithProrationPrice" - ) + fun asNewSubscriptionBulkWithProration(): NewSubscriptionBulkWithProrationPrice = + newSubscriptionBulkWithProration.getOrThrow("newSubscriptionBulkWithProration") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - newSubscriptionUnitPrice != null -> - visitor.visitNewSubscriptionUnitPrice(newSubscriptionUnitPrice) - newSubscriptionPackagePrice != null -> - visitor.visitNewSubscriptionPackagePrice(newSubscriptionPackagePrice) - newSubscriptionMatrixPrice != null -> - visitor.visitNewSubscriptionMatrixPrice(newSubscriptionMatrixPrice) - newSubscriptionTieredPrice != null -> - visitor.visitNewSubscriptionTieredPrice(newSubscriptionTieredPrice) - newSubscriptionTieredBpsPrice != null -> - visitor.visitNewSubscriptionTieredBpsPrice(newSubscriptionTieredBpsPrice) - newSubscriptionBpsPrice != null -> - visitor.visitNewSubscriptionBpsPrice(newSubscriptionBpsPrice) - newSubscriptionBulkBpsPrice != null -> - visitor.visitNewSubscriptionBulkBpsPrice(newSubscriptionBulkBpsPrice) - newSubscriptionBulkPrice != null -> - visitor.visitNewSubscriptionBulkPrice(newSubscriptionBulkPrice) - newSubscriptionThresholdTotalAmountPrice != null -> - visitor.visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice + newSubscriptionUnit != null -> + visitor.visitNewSubscriptionUnit(newSubscriptionUnit) + newSubscriptionPackage != null -> + visitor.visitNewSubscriptionPackage(newSubscriptionPackage) + newSubscriptionMatrix != null -> + visitor.visitNewSubscriptionMatrix(newSubscriptionMatrix) + newSubscriptionTiered != null -> + visitor.visitNewSubscriptionTiered(newSubscriptionTiered) + newSubscriptionTieredBps != null -> + visitor.visitNewSubscriptionTieredBps(newSubscriptionTieredBps) + newSubscriptionBps != null -> + visitor.visitNewSubscriptionBps(newSubscriptionBps) + newSubscriptionBulkBps != null -> + visitor.visitNewSubscriptionBulkBps(newSubscriptionBulkBps) + newSubscriptionBulk != null -> + visitor.visitNewSubscriptionBulk(newSubscriptionBulk) + newSubscriptionThresholdTotalAmount != null -> + visitor.visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount ) - newSubscriptionTieredPackagePrice != null -> - visitor.visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice + newSubscriptionTieredPackage != null -> + visitor.visitNewSubscriptionTieredPackage(newSubscriptionTieredPackage) + newSubscriptionTieredWithMinimum != null -> + visitor.visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum ) - newSubscriptionTieredWithMinimumPrice != null -> - visitor.visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice + newSubscriptionUnitWithPercent != null -> + visitor.visitNewSubscriptionUnitWithPercent(newSubscriptionUnitWithPercent) + newSubscriptionPackageWithAllocation != null -> + visitor.visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation ) - newSubscriptionUnitWithPercentPrice != null -> - visitor.visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice + newSubscriptionTierWithProration != null -> + visitor.visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration ) - newSubscriptionPackageWithAllocationPrice != null -> - visitor.visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice + newSubscriptionUnitWithProration != null -> + visitor.visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration ) - newSubscriptionTierWithProrationPrice != null -> - visitor.visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice + newSubscriptionGroupedAllocation != null -> + visitor.visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation ) - newSubscriptionUnitWithProrationPrice != null -> - visitor.visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice + newSubscriptionGroupedWithProratedMinimum != null -> + visitor.visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum ) - newSubscriptionGroupedAllocationPrice != null -> - visitor.visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice - ) - newSubscriptionGroupedWithProratedMinimumPrice != null -> - visitor.visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice - ) - newSubscriptionBulkWithProrationPrice != null -> - visitor.visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice + newSubscriptionBulkWithProration != null -> + visitor.visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration ) else -> visitor.unknown(_json) } @@ -35480,120 +35303,115 @@ constructor( accept( object : Visitor { - override fun visitNewSubscriptionUnitPrice( - newSubscriptionUnitPrice: NewSubscriptionUnitPrice + override fun visitNewSubscriptionUnit( + newSubscriptionUnit: NewSubscriptionUnitPrice ) { - newSubscriptionUnitPrice.validate() + newSubscriptionUnit.validate() } - override fun visitNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice + override fun visitNewSubscriptionPackage( + newSubscriptionPackage: NewSubscriptionPackagePrice ) { - newSubscriptionPackagePrice.validate() + newSubscriptionPackage.validate() } - override fun visitNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice + override fun visitNewSubscriptionMatrix( + newSubscriptionMatrix: NewSubscriptionMatrixPrice ) { - newSubscriptionMatrixPrice.validate() + newSubscriptionMatrix.validate() } - override fun visitNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice + override fun visitNewSubscriptionTiered( + newSubscriptionTiered: NewSubscriptionTieredPrice ) { - newSubscriptionTieredPrice.validate() + newSubscriptionTiered.validate() } - override fun visitNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice + override fun visitNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice ) { - newSubscriptionTieredBpsPrice.validate() + newSubscriptionTieredBps.validate() } - override fun visitNewSubscriptionBpsPrice( - newSubscriptionBpsPrice: NewSubscriptionBpsPrice + override fun visitNewSubscriptionBps( + newSubscriptionBps: NewSubscriptionBpsPrice ) { - newSubscriptionBpsPrice.validate() + newSubscriptionBps.validate() } - override fun visitNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice + override fun visitNewSubscriptionBulkBps( + newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice ) { - newSubscriptionBulkBpsPrice.validate() + newSubscriptionBulkBps.validate() } - override fun visitNewSubscriptionBulkPrice( - newSubscriptionBulkPrice: NewSubscriptionBulkPrice + override fun visitNewSubscriptionBulk( + newSubscriptionBulk: NewSubscriptionBulkPrice ) { - newSubscriptionBulkPrice.validate() + newSubscriptionBulk.validate() } - override fun visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: + override fun visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice ) { - newSubscriptionThresholdTotalAmountPrice.validate() + newSubscriptionThresholdTotalAmount.validate() } - override fun visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice + override fun visitNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice ) { - newSubscriptionTieredPackagePrice.validate() + newSubscriptionTieredPackage.validate() } - override fun visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: - NewSubscriptionTieredWithMinimumPrice + override fun visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice ) { - newSubscriptionTieredWithMinimumPrice.validate() + newSubscriptionTieredWithMinimum.validate() } - override fun visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice + override fun visitNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice ) { - newSubscriptionUnitWithPercentPrice.validate() + newSubscriptionUnitWithPercent.validate() } - override fun visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: + override fun visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ) { - newSubscriptionPackageWithAllocationPrice.validate() + newSubscriptionPackageWithAllocation.validate() } - override fun visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: - NewSubscriptionTierWithProrationPrice + override fun visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice ) { - newSubscriptionTierWithProrationPrice.validate() + newSubscriptionTierWithProration.validate() } - override fun visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: - NewSubscriptionUnitWithProrationPrice + override fun visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice ) { - newSubscriptionUnitWithProrationPrice.validate() + newSubscriptionUnitWithProration.validate() } - override fun visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: - NewSubscriptionGroupedAllocationPrice + override fun visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice ) { - newSubscriptionGroupedAllocationPrice.validate() + newSubscriptionGroupedAllocation.validate() } - override fun visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + override fun visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ) { - newSubscriptionGroupedWithProratedMinimumPrice.validate() + newSubscriptionGroupedWithProratedMinimum.validate() } - override fun visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: - NewSubscriptionBulkWithProrationPrice + override fun visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice ) { - newSubscriptionBulkWithProrationPrice.validate() + newSubscriptionBulkWithProration.validate() } } ) @@ -35605,49 +35423,46 @@ constructor( return true } - return /* spotless:off */ other is Price && newSubscriptionUnitPrice == other.newSubscriptionUnitPrice && newSubscriptionPackagePrice == other.newSubscriptionPackagePrice && newSubscriptionMatrixPrice == other.newSubscriptionMatrixPrice && newSubscriptionTieredPrice == other.newSubscriptionTieredPrice && newSubscriptionTieredBpsPrice == other.newSubscriptionTieredBpsPrice && newSubscriptionBpsPrice == other.newSubscriptionBpsPrice && newSubscriptionBulkBpsPrice == other.newSubscriptionBulkBpsPrice && newSubscriptionBulkPrice == other.newSubscriptionBulkPrice && newSubscriptionThresholdTotalAmountPrice == other.newSubscriptionThresholdTotalAmountPrice && newSubscriptionTieredPackagePrice == other.newSubscriptionTieredPackagePrice && newSubscriptionTieredWithMinimumPrice == other.newSubscriptionTieredWithMinimumPrice && newSubscriptionUnitWithPercentPrice == other.newSubscriptionUnitWithPercentPrice && newSubscriptionPackageWithAllocationPrice == other.newSubscriptionPackageWithAllocationPrice && newSubscriptionTierWithProrationPrice == other.newSubscriptionTierWithProrationPrice && newSubscriptionUnitWithProrationPrice == other.newSubscriptionUnitWithProrationPrice && newSubscriptionGroupedAllocationPrice == other.newSubscriptionGroupedAllocationPrice && newSubscriptionGroupedWithProratedMinimumPrice == other.newSubscriptionGroupedWithProratedMinimumPrice && newSubscriptionBulkWithProrationPrice == other.newSubscriptionBulkWithProrationPrice /* spotless:on */ + return /* spotless:off */ other is Price && newSubscriptionUnit == other.newSubscriptionUnit && newSubscriptionPackage == other.newSubscriptionPackage && newSubscriptionMatrix == other.newSubscriptionMatrix && newSubscriptionTiered == other.newSubscriptionTiered && newSubscriptionTieredBps == other.newSubscriptionTieredBps && newSubscriptionBps == other.newSubscriptionBps && newSubscriptionBulkBps == other.newSubscriptionBulkBps && newSubscriptionBulk == other.newSubscriptionBulk && newSubscriptionThresholdTotalAmount == other.newSubscriptionThresholdTotalAmount && newSubscriptionTieredPackage == other.newSubscriptionTieredPackage && newSubscriptionTieredWithMinimum == other.newSubscriptionTieredWithMinimum && newSubscriptionUnitWithPercent == other.newSubscriptionUnitWithPercent && newSubscriptionPackageWithAllocation == other.newSubscriptionPackageWithAllocation && newSubscriptionTierWithProration == other.newSubscriptionTierWithProration && newSubscriptionUnitWithProration == other.newSubscriptionUnitWithProration && newSubscriptionGroupedAllocation == other.newSubscriptionGroupedAllocation && newSubscriptionGroupedWithProratedMinimum == other.newSubscriptionGroupedWithProratedMinimum && newSubscriptionBulkWithProration == other.newSubscriptionBulkWithProration /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(newSubscriptionUnitPrice, newSubscriptionPackagePrice, newSubscriptionMatrixPrice, newSubscriptionTieredPrice, newSubscriptionTieredBpsPrice, newSubscriptionBpsPrice, newSubscriptionBulkBpsPrice, newSubscriptionBulkPrice, newSubscriptionThresholdTotalAmountPrice, newSubscriptionTieredPackagePrice, newSubscriptionTieredWithMinimumPrice, newSubscriptionUnitWithPercentPrice, newSubscriptionPackageWithAllocationPrice, newSubscriptionTierWithProrationPrice, newSubscriptionUnitWithProrationPrice, newSubscriptionGroupedAllocationPrice, newSubscriptionGroupedWithProratedMinimumPrice, newSubscriptionBulkWithProrationPrice) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(newSubscriptionUnit, newSubscriptionPackage, newSubscriptionMatrix, newSubscriptionTiered, newSubscriptionTieredBps, newSubscriptionBps, newSubscriptionBulkBps, newSubscriptionBulk, newSubscriptionThresholdTotalAmount, newSubscriptionTieredPackage, newSubscriptionTieredWithMinimum, newSubscriptionUnitWithPercent, newSubscriptionPackageWithAllocation, newSubscriptionTierWithProration, newSubscriptionUnitWithProration, newSubscriptionGroupedAllocation, newSubscriptionGroupedWithProratedMinimum, newSubscriptionBulkWithProration) /* spotless:on */ override fun toString(): String = when { - newSubscriptionUnitPrice != null -> - "Price{newSubscriptionUnitPrice=$newSubscriptionUnitPrice}" - newSubscriptionPackagePrice != null -> - "Price{newSubscriptionPackagePrice=$newSubscriptionPackagePrice}" - newSubscriptionMatrixPrice != null -> - "Price{newSubscriptionMatrixPrice=$newSubscriptionMatrixPrice}" - newSubscriptionTieredPrice != null -> - "Price{newSubscriptionTieredPrice=$newSubscriptionTieredPrice}" - newSubscriptionTieredBpsPrice != null -> - "Price{newSubscriptionTieredBpsPrice=$newSubscriptionTieredBpsPrice}" - newSubscriptionBpsPrice != null -> - "Price{newSubscriptionBpsPrice=$newSubscriptionBpsPrice}" - newSubscriptionBulkBpsPrice != null -> - "Price{newSubscriptionBulkBpsPrice=$newSubscriptionBulkBpsPrice}" - newSubscriptionBulkPrice != null -> - "Price{newSubscriptionBulkPrice=$newSubscriptionBulkPrice}" - newSubscriptionThresholdTotalAmountPrice != null -> - "Price{newSubscriptionThresholdTotalAmountPrice=$newSubscriptionThresholdTotalAmountPrice}" - newSubscriptionTieredPackagePrice != null -> - "Price{newSubscriptionTieredPackagePrice=$newSubscriptionTieredPackagePrice}" - newSubscriptionTieredWithMinimumPrice != null -> - "Price{newSubscriptionTieredWithMinimumPrice=$newSubscriptionTieredWithMinimumPrice}" - newSubscriptionUnitWithPercentPrice != null -> - "Price{newSubscriptionUnitWithPercentPrice=$newSubscriptionUnitWithPercentPrice}" - newSubscriptionPackageWithAllocationPrice != null -> - "Price{newSubscriptionPackageWithAllocationPrice=$newSubscriptionPackageWithAllocationPrice}" - newSubscriptionTierWithProrationPrice != null -> - "Price{newSubscriptionTierWithProrationPrice=$newSubscriptionTierWithProrationPrice}" - newSubscriptionUnitWithProrationPrice != null -> - "Price{newSubscriptionUnitWithProrationPrice=$newSubscriptionUnitWithProrationPrice}" - newSubscriptionGroupedAllocationPrice != null -> - "Price{newSubscriptionGroupedAllocationPrice=$newSubscriptionGroupedAllocationPrice}" - newSubscriptionGroupedWithProratedMinimumPrice != null -> - "Price{newSubscriptionGroupedWithProratedMinimumPrice=$newSubscriptionGroupedWithProratedMinimumPrice}" - newSubscriptionBulkWithProrationPrice != null -> - "Price{newSubscriptionBulkWithProrationPrice=$newSubscriptionBulkWithProrationPrice}" + newSubscriptionUnit != null -> "Price{newSubscriptionUnit=$newSubscriptionUnit}" + newSubscriptionPackage != null -> + "Price{newSubscriptionPackage=$newSubscriptionPackage}" + newSubscriptionMatrix != null -> + "Price{newSubscriptionMatrix=$newSubscriptionMatrix}" + newSubscriptionTiered != null -> + "Price{newSubscriptionTiered=$newSubscriptionTiered}" + newSubscriptionTieredBps != null -> + "Price{newSubscriptionTieredBps=$newSubscriptionTieredBps}" + newSubscriptionBps != null -> "Price{newSubscriptionBps=$newSubscriptionBps}" + newSubscriptionBulkBps != null -> + "Price{newSubscriptionBulkBps=$newSubscriptionBulkBps}" + newSubscriptionBulk != null -> "Price{newSubscriptionBulk=$newSubscriptionBulk}" + newSubscriptionThresholdTotalAmount != null -> + "Price{newSubscriptionThresholdTotalAmount=$newSubscriptionThresholdTotalAmount}" + newSubscriptionTieredPackage != null -> + "Price{newSubscriptionTieredPackage=$newSubscriptionTieredPackage}" + newSubscriptionTieredWithMinimum != null -> + "Price{newSubscriptionTieredWithMinimum=$newSubscriptionTieredWithMinimum}" + newSubscriptionUnitWithPercent != null -> + "Price{newSubscriptionUnitWithPercent=$newSubscriptionUnitWithPercent}" + newSubscriptionPackageWithAllocation != null -> + "Price{newSubscriptionPackageWithAllocation=$newSubscriptionPackageWithAllocation}" + newSubscriptionTierWithProration != null -> + "Price{newSubscriptionTierWithProration=$newSubscriptionTierWithProration}" + newSubscriptionUnitWithProration != null -> + "Price{newSubscriptionUnitWithProration=$newSubscriptionUnitWithProration}" + newSubscriptionGroupedAllocation != null -> + "Price{newSubscriptionGroupedAllocation=$newSubscriptionGroupedAllocation}" + newSubscriptionGroupedWithProratedMinimum != null -> + "Price{newSubscriptionGroupedWithProratedMinimum=$newSubscriptionGroupedWithProratedMinimum}" + newSubscriptionBulkWithProration != null -> + "Price{newSubscriptionBulkWithProration=$newSubscriptionBulkWithProration}" _json != null -> "Price{_unknown=$_json}" else -> throw IllegalStateException("Invalid Price") } @@ -35655,203 +35470,160 @@ constructor( companion object { @JvmStatic - fun ofNewSubscriptionUnitPrice(newSubscriptionUnitPrice: NewSubscriptionUnitPrice) = - Price(newSubscriptionUnitPrice = newSubscriptionUnitPrice) + fun ofNewSubscriptionUnit(newSubscriptionUnit: NewSubscriptionUnitPrice) = + Price(newSubscriptionUnit = newSubscriptionUnit) @JvmStatic - fun ofNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice - ) = Price(newSubscriptionPackagePrice = newSubscriptionPackagePrice) + fun ofNewSubscriptionPackage(newSubscriptionPackage: NewSubscriptionPackagePrice) = + Price(newSubscriptionPackage = newSubscriptionPackage) @JvmStatic - fun ofNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice - ) = Price(newSubscriptionMatrixPrice = newSubscriptionMatrixPrice) + fun ofNewSubscriptionMatrix(newSubscriptionMatrix: NewSubscriptionMatrixPrice) = + Price(newSubscriptionMatrix = newSubscriptionMatrix) @JvmStatic - fun ofNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice - ) = Price(newSubscriptionTieredPrice = newSubscriptionTieredPrice) + fun ofNewSubscriptionTiered(newSubscriptionTiered: NewSubscriptionTieredPrice) = + Price(newSubscriptionTiered = newSubscriptionTiered) @JvmStatic - fun ofNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice - ) = Price(newSubscriptionTieredBpsPrice = newSubscriptionTieredBpsPrice) + fun ofNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice + ) = Price(newSubscriptionTieredBps = newSubscriptionTieredBps) @JvmStatic - fun ofNewSubscriptionBpsPrice(newSubscriptionBpsPrice: NewSubscriptionBpsPrice) = - Price(newSubscriptionBpsPrice = newSubscriptionBpsPrice) + fun ofNewSubscriptionBps(newSubscriptionBps: NewSubscriptionBpsPrice) = + Price(newSubscriptionBps = newSubscriptionBps) @JvmStatic - fun ofNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice - ) = Price(newSubscriptionBulkBpsPrice = newSubscriptionBulkBpsPrice) + fun ofNewSubscriptionBulkBps(newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice) = + Price(newSubscriptionBulkBps = newSubscriptionBulkBps) @JvmStatic - fun ofNewSubscriptionBulkPrice(newSubscriptionBulkPrice: NewSubscriptionBulkPrice) = - Price(newSubscriptionBulkPrice = newSubscriptionBulkPrice) + fun ofNewSubscriptionBulk(newSubscriptionBulk: NewSubscriptionBulkPrice) = + Price(newSubscriptionBulk = newSubscriptionBulk) @JvmStatic - fun ofNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: - NewSubscriptionThresholdTotalAmountPrice - ) = - Price( - newSubscriptionThresholdTotalAmountPrice = - newSubscriptionThresholdTotalAmountPrice - ) + fun ofNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice + ) = Price(newSubscriptionThresholdTotalAmount = newSubscriptionThresholdTotalAmount) @JvmStatic - fun ofNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice - ) = Price(newSubscriptionTieredPackagePrice = newSubscriptionTieredPackagePrice) + fun ofNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice + ) = Price(newSubscriptionTieredPackage = newSubscriptionTieredPackage) @JvmStatic - fun ofNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: NewSubscriptionTieredWithMinimumPrice - ) = - Price( - newSubscriptionTieredWithMinimumPrice = - newSubscriptionTieredWithMinimumPrice - ) + fun ofNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice + ) = Price(newSubscriptionTieredWithMinimum = newSubscriptionTieredWithMinimum) @JvmStatic - fun ofNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice - ) = Price(newSubscriptionUnitWithPercentPrice = newSubscriptionUnitWithPercentPrice) + fun ofNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice + ) = Price(newSubscriptionUnitWithPercent = newSubscriptionUnitWithPercent) @JvmStatic - fun ofNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: - NewSubscriptionPackageWithAllocationPrice + fun ofNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ) = Price( - newSubscriptionPackageWithAllocationPrice = - newSubscriptionPackageWithAllocationPrice + newSubscriptionPackageWithAllocation = newSubscriptionPackageWithAllocation ) @JvmStatic - fun ofNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: NewSubscriptionTierWithProrationPrice - ) = - Price( - newSubscriptionTierWithProrationPrice = - newSubscriptionTierWithProrationPrice - ) + fun ofNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice + ) = Price(newSubscriptionTierWithProration = newSubscriptionTierWithProration) @JvmStatic - fun ofNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: NewSubscriptionUnitWithProrationPrice - ) = - Price( - newSubscriptionUnitWithProrationPrice = - newSubscriptionUnitWithProrationPrice - ) + fun ofNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice + ) = Price(newSubscriptionUnitWithProration = newSubscriptionUnitWithProration) @JvmStatic - fun ofNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: NewSubscriptionGroupedAllocationPrice - ) = - Price( - newSubscriptionGroupedAllocationPrice = - newSubscriptionGroupedAllocationPrice - ) + fun ofNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice + ) = Price(newSubscriptionGroupedAllocation = newSubscriptionGroupedAllocation) @JvmStatic - fun ofNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + fun ofNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ) = Price( - newSubscriptionGroupedWithProratedMinimumPrice = - newSubscriptionGroupedWithProratedMinimumPrice + newSubscriptionGroupedWithProratedMinimum = + newSubscriptionGroupedWithProratedMinimum ) @JvmStatic - fun ofNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: NewSubscriptionBulkWithProrationPrice - ) = - Price( - newSubscriptionBulkWithProrationPrice = - newSubscriptionBulkWithProrationPrice - ) + fun ofNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice + ) = Price(newSubscriptionBulkWithProration = newSubscriptionBulkWithProration) } interface Visitor { - fun visitNewSubscriptionUnitPrice( - newSubscriptionUnitPrice: NewSubscriptionUnitPrice - ): T + fun visitNewSubscriptionUnit(newSubscriptionUnit: NewSubscriptionUnitPrice): T - fun visitNewSubscriptionPackagePrice( - newSubscriptionPackagePrice: NewSubscriptionPackagePrice + fun visitNewSubscriptionPackage( + newSubscriptionPackage: NewSubscriptionPackagePrice ): T - fun visitNewSubscriptionMatrixPrice( - newSubscriptionMatrixPrice: NewSubscriptionMatrixPrice - ): T + fun visitNewSubscriptionMatrix(newSubscriptionMatrix: NewSubscriptionMatrixPrice): T - fun visitNewSubscriptionTieredPrice( - newSubscriptionTieredPrice: NewSubscriptionTieredPrice - ): T + fun visitNewSubscriptionTiered(newSubscriptionTiered: NewSubscriptionTieredPrice): T - fun visitNewSubscriptionTieredBpsPrice( - newSubscriptionTieredBpsPrice: NewSubscriptionTieredBpsPrice + fun visitNewSubscriptionTieredBps( + newSubscriptionTieredBps: NewSubscriptionTieredBpsPrice ): T - fun visitNewSubscriptionBpsPrice( - newSubscriptionBpsPrice: NewSubscriptionBpsPrice - ): T + fun visitNewSubscriptionBps(newSubscriptionBps: NewSubscriptionBpsPrice): T - fun visitNewSubscriptionBulkBpsPrice( - newSubscriptionBulkBpsPrice: NewSubscriptionBulkBpsPrice + fun visitNewSubscriptionBulkBps( + newSubscriptionBulkBps: NewSubscriptionBulkBpsPrice ): T - fun visitNewSubscriptionBulkPrice( - newSubscriptionBulkPrice: NewSubscriptionBulkPrice - ): T + fun visitNewSubscriptionBulk(newSubscriptionBulk: NewSubscriptionBulkPrice): T - fun visitNewSubscriptionThresholdTotalAmountPrice( - newSubscriptionThresholdTotalAmountPrice: - NewSubscriptionThresholdTotalAmountPrice + fun visitNewSubscriptionThresholdTotalAmount( + newSubscriptionThresholdTotalAmount: NewSubscriptionThresholdTotalAmountPrice ): T - fun visitNewSubscriptionTieredPackagePrice( - newSubscriptionTieredPackagePrice: NewSubscriptionTieredPackagePrice + fun visitNewSubscriptionTieredPackage( + newSubscriptionTieredPackage: NewSubscriptionTieredPackagePrice ): T - fun visitNewSubscriptionTieredWithMinimumPrice( - newSubscriptionTieredWithMinimumPrice: NewSubscriptionTieredWithMinimumPrice + fun visitNewSubscriptionTieredWithMinimum( + newSubscriptionTieredWithMinimum: NewSubscriptionTieredWithMinimumPrice ): T - fun visitNewSubscriptionUnitWithPercentPrice( - newSubscriptionUnitWithPercentPrice: NewSubscriptionUnitWithPercentPrice + fun visitNewSubscriptionUnitWithPercent( + newSubscriptionUnitWithPercent: NewSubscriptionUnitWithPercentPrice ): T - fun visitNewSubscriptionPackageWithAllocationPrice( - newSubscriptionPackageWithAllocationPrice: - NewSubscriptionPackageWithAllocationPrice + fun visitNewSubscriptionPackageWithAllocation( + newSubscriptionPackageWithAllocation: NewSubscriptionPackageWithAllocationPrice ): T - fun visitNewSubscriptionTierWithProrationPrice( - newSubscriptionTierWithProrationPrice: NewSubscriptionTierWithProrationPrice + fun visitNewSubscriptionTierWithProration( + newSubscriptionTierWithProration: NewSubscriptionTierWithProrationPrice ): T - fun visitNewSubscriptionUnitWithProrationPrice( - newSubscriptionUnitWithProrationPrice: NewSubscriptionUnitWithProrationPrice + fun visitNewSubscriptionUnitWithProration( + newSubscriptionUnitWithProration: NewSubscriptionUnitWithProrationPrice ): T - fun visitNewSubscriptionGroupedAllocationPrice( - newSubscriptionGroupedAllocationPrice: NewSubscriptionGroupedAllocationPrice + fun visitNewSubscriptionGroupedAllocation( + newSubscriptionGroupedAllocation: NewSubscriptionGroupedAllocationPrice ): T - fun visitNewSubscriptionGroupedWithProratedMinimumPrice( - newSubscriptionGroupedWithProratedMinimumPrice: + fun visitNewSubscriptionGroupedWithProratedMinimum( + newSubscriptionGroupedWithProratedMinimum: NewSubscriptionGroupedWithProratedMinimumPrice ): T - fun visitNewSubscriptionBulkWithProrationPrice( - newSubscriptionBulkWithProrationPrice: NewSubscriptionBulkWithProrationPrice + fun visitNewSubscriptionBulkWithProration( + newSubscriptionBulkWithProration: NewSubscriptionBulkWithProrationPrice ): T fun unknown(json: JsonValue?): T { @@ -35872,7 +35644,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionUnitPrice = it, _json = json) + return Price(newSubscriptionUnit = it, _json = json) } } "package" -> { @@ -35880,7 +35652,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionPackagePrice = it, _json = json) + return Price(newSubscriptionPackage = it, _json = json) } } "matrix" -> { @@ -35888,7 +35660,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionMatrixPrice = it, _json = json) + return Price(newSubscriptionMatrix = it, _json = json) } } "tiered" -> { @@ -35896,7 +35668,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionTieredPrice = it, _json = json) + return Price(newSubscriptionTiered = it, _json = json) } } "tiered_bps" -> { @@ -35904,7 +35676,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionTieredBpsPrice = it, _json = json) + return Price(newSubscriptionTieredBps = it, _json = json) } } "bps" -> { @@ -35912,7 +35684,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBpsPrice = it, _json = json) + return Price(newSubscriptionBps = it, _json = json) } } "bulk_bps" -> { @@ -35920,7 +35692,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBulkBpsPrice = it, _json = json) + return Price(newSubscriptionBulkBps = it, _json = json) } } "bulk" -> { @@ -35928,7 +35700,7 @@ constructor( it.validate() } ?.let { - return Price(newSubscriptionBulkPrice = it, _json = json) + return Price(newSubscriptionBulk = it, _json = json) } } "threshold_total_amount" -> { @@ -35940,7 +35712,7 @@ constructor( } ?.let { return Price( - newSubscriptionThresholdTotalAmountPrice = it, + newSubscriptionThresholdTotalAmount = it, _json = json ) } @@ -35953,10 +35725,7 @@ constructor( it.validate() } ?.let { - return Price( - newSubscriptionTieredPackagePrice = it, - _json = json - ) + return Price(newSubscriptionTieredPackage = it, _json = json) } } "tiered_with_minimum" -> { @@ -35968,7 +35737,7 @@ constructor( } ?.let { return Price( - newSubscriptionTieredWithMinimumPrice = it, + newSubscriptionTieredWithMinimum = it, _json = json ) } @@ -35981,10 +35750,7 @@ constructor( it.validate() } ?.let { - return Price( - newSubscriptionUnitWithPercentPrice = it, - _json = json - ) + return Price(newSubscriptionUnitWithPercent = it, _json = json) } } "package_with_allocation" -> { @@ -35996,7 +35762,7 @@ constructor( } ?.let { return Price( - newSubscriptionPackageWithAllocationPrice = it, + newSubscriptionPackageWithAllocation = it, _json = json ) } @@ -36010,7 +35776,7 @@ constructor( } ?.let { return Price( - newSubscriptionTierWithProrationPrice = it, + newSubscriptionTierWithProration = it, _json = json ) } @@ -36024,7 +35790,7 @@ constructor( } ?.let { return Price( - newSubscriptionUnitWithProrationPrice = it, + newSubscriptionUnitWithProration = it, _json = json ) } @@ -36038,7 +35804,7 @@ constructor( } ?.let { return Price( - newSubscriptionGroupedAllocationPrice = it, + newSubscriptionGroupedAllocation = it, _json = json ) } @@ -36052,7 +35818,7 @@ constructor( } ?.let { return Price( - newSubscriptionGroupedWithProratedMinimumPrice = it, + newSubscriptionGroupedWithProratedMinimum = it, _json = json ) } @@ -36066,7 +35832,7 @@ constructor( } ?.let { return Price( - newSubscriptionBulkWithProrationPrice = it, + newSubscriptionBulkWithProration = it, _json = json ) } @@ -36085,44 +35851,42 @@ constructor( provider: SerializerProvider ) { when { - value.newSubscriptionUnitPrice != null -> - generator.writeObject(value.newSubscriptionUnitPrice) - value.newSubscriptionPackagePrice != null -> - generator.writeObject(value.newSubscriptionPackagePrice) - value.newSubscriptionMatrixPrice != null -> - generator.writeObject(value.newSubscriptionMatrixPrice) - value.newSubscriptionTieredPrice != null -> - generator.writeObject(value.newSubscriptionTieredPrice) - value.newSubscriptionTieredBpsPrice != null -> - generator.writeObject(value.newSubscriptionTieredBpsPrice) - value.newSubscriptionBpsPrice != null -> - generator.writeObject(value.newSubscriptionBpsPrice) - value.newSubscriptionBulkBpsPrice != null -> - generator.writeObject(value.newSubscriptionBulkBpsPrice) - value.newSubscriptionBulkPrice != null -> - generator.writeObject(value.newSubscriptionBulkPrice) - value.newSubscriptionThresholdTotalAmountPrice != null -> - generator.writeObject(value.newSubscriptionThresholdTotalAmountPrice) - value.newSubscriptionTieredPackagePrice != null -> - generator.writeObject(value.newSubscriptionTieredPackagePrice) - value.newSubscriptionTieredWithMinimumPrice != null -> - generator.writeObject(value.newSubscriptionTieredWithMinimumPrice) - value.newSubscriptionUnitWithPercentPrice != null -> - generator.writeObject(value.newSubscriptionUnitWithPercentPrice) - value.newSubscriptionPackageWithAllocationPrice != null -> - generator.writeObject(value.newSubscriptionPackageWithAllocationPrice) - value.newSubscriptionTierWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionTierWithProrationPrice) - value.newSubscriptionUnitWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionUnitWithProrationPrice) - value.newSubscriptionGroupedAllocationPrice != null -> - generator.writeObject(value.newSubscriptionGroupedAllocationPrice) - value.newSubscriptionGroupedWithProratedMinimumPrice != null -> - generator.writeObject( - value.newSubscriptionGroupedWithProratedMinimumPrice - ) - value.newSubscriptionBulkWithProrationPrice != null -> - generator.writeObject(value.newSubscriptionBulkWithProrationPrice) + value.newSubscriptionUnit != null -> + generator.writeObject(value.newSubscriptionUnit) + value.newSubscriptionPackage != null -> + generator.writeObject(value.newSubscriptionPackage) + value.newSubscriptionMatrix != null -> + generator.writeObject(value.newSubscriptionMatrix) + value.newSubscriptionTiered != null -> + generator.writeObject(value.newSubscriptionTiered) + value.newSubscriptionTieredBps != null -> + generator.writeObject(value.newSubscriptionTieredBps) + value.newSubscriptionBps != null -> + generator.writeObject(value.newSubscriptionBps) + value.newSubscriptionBulkBps != null -> + generator.writeObject(value.newSubscriptionBulkBps) + value.newSubscriptionBulk != null -> + generator.writeObject(value.newSubscriptionBulk) + value.newSubscriptionThresholdTotalAmount != null -> + generator.writeObject(value.newSubscriptionThresholdTotalAmount) + value.newSubscriptionTieredPackage != null -> + generator.writeObject(value.newSubscriptionTieredPackage) + value.newSubscriptionTieredWithMinimum != null -> + generator.writeObject(value.newSubscriptionTieredWithMinimum) + value.newSubscriptionUnitWithPercent != null -> + generator.writeObject(value.newSubscriptionUnitWithPercent) + value.newSubscriptionPackageWithAllocation != null -> + generator.writeObject(value.newSubscriptionPackageWithAllocation) + value.newSubscriptionTierWithProration != null -> + generator.writeObject(value.newSubscriptionTierWithProration) + value.newSubscriptionUnitWithProration != null -> + generator.writeObject(value.newSubscriptionUnitWithProration) + value.newSubscriptionGroupedAllocation != null -> + generator.writeObject(value.newSubscriptionGroupedAllocation) + value.newSubscriptionGroupedWithProratedMinimum != null -> + generator.writeObject(value.newSubscriptionGroupedWithProratedMinimum) + value.newSubscriptionBulkWithProration != null -> + generator.writeObject(value.newSubscriptionBulkWithProration) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Price") } 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 015a2c7a..6be5815a 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 @@ -762,20 +762,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1119,20 +1115,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1212,66 +1208,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1285,30 +1275,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1320,21 +1306,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1342,44 +1326,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1399,7 +1372,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1407,10 +1380,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1418,7 +1388,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1426,7 +1396,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1434,7 +1404,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1451,16 +1421,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3427,46 +3393,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3480,22 +3437,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3507,19 +3458,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3527,28 +3475,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3568,7 +3510,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3576,10 +3518,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3587,7 +3526,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3604,12 +3543,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5688,7 +5624,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5716,7 +5652,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5730,7 +5666,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5744,8 +5680,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5759,7 +5694,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5773,7 +5708,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5787,7 +5722,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5801,8 +5736,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5816,8 +5751,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5831,8 +5766,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5846,8 +5781,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5861,8 +5796,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5876,8 +5811,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5891,8 +5826,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5906,8 +5841,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5921,8 +5856,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5936,8 +5871,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5951,8 +5886,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5966,8 +5901,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5981,8 +5916,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5996,8 +5931,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6011,8 +5946,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6026,8 +5961,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6041,8 +5976,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for 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 c57382c6..4410fe0d 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 @@ -759,20 +759,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1116,20 +1112,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1209,66 +1205,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1282,30 +1272,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1317,21 +1303,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1339,44 +1323,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1396,7 +1369,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1404,10 +1377,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1415,7 +1385,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1423,7 +1393,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1431,7 +1401,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1448,16 +1418,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3424,46 +3390,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3477,22 +3434,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3504,19 +3455,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3524,28 +3472,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3565,7 +3507,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3573,10 +3515,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3584,7 +3523,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3601,12 +3540,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5685,7 +5621,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5713,7 +5649,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5727,7 +5663,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5741,8 +5677,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5756,7 +5691,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5770,7 +5705,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5784,7 +5719,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5798,8 +5733,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5813,8 +5748,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5828,8 +5763,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5843,8 +5778,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5858,8 +5793,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5873,8 +5808,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5888,8 +5823,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5903,8 +5838,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5918,8 +5853,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5933,8 +5868,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5948,8 +5883,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5963,8 +5898,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5978,8 +5913,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5993,8 +5928,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6008,8 +5943,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6023,8 +5958,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6038,8 +5973,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for 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 0d95f294..3a6734c9 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 @@ -768,20 +768,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1125,20 +1121,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1218,66 +1214,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1291,30 +1281,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1326,21 +1312,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1348,44 +1332,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1405,7 +1378,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1413,10 +1386,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1424,7 +1394,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1432,7 +1402,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1440,7 +1410,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1457,16 +1427,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3433,46 +3399,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3486,22 +3443,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3513,19 +3464,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3533,28 +3481,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3574,7 +3516,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3582,10 +3524,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3593,7 +3532,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3610,12 +3549,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5694,7 +5630,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5722,7 +5658,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5736,7 +5672,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5750,8 +5686,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5765,7 +5700,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5779,7 +5714,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5793,7 +5728,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5807,8 +5742,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5822,8 +5757,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5837,8 +5772,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5852,8 +5787,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5867,8 +5802,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5882,8 +5817,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5897,8 +5832,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5912,8 +5847,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5927,8 +5862,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5942,8 +5877,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5957,8 +5892,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5972,8 +5907,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5987,8 +5922,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6002,8 +5937,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6017,8 +5952,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6032,8 +5967,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6047,8 +5982,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for 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 5ecc6143..3378896d 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 @@ -776,20 +776,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1133,20 +1129,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1226,66 +1222,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1299,30 +1289,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1334,21 +1320,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1356,44 +1340,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1413,7 +1386,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1421,10 +1394,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1432,7 +1402,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1440,7 +1410,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1448,7 +1418,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1465,16 +1435,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3441,46 +3407,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3494,22 +3451,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3521,19 +3472,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3541,28 +3489,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3582,7 +3524,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3590,10 +3532,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3601,7 +3540,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3618,12 +3557,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5702,7 +5638,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5730,7 +5666,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5744,7 +5680,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5758,8 +5694,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5773,7 +5708,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5787,7 +5722,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5801,7 +5736,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5815,8 +5750,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5830,8 +5765,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5845,8 +5780,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5860,8 +5795,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5875,8 +5810,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5890,8 +5825,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5905,8 +5840,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5920,8 +5855,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5935,8 +5870,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5950,8 +5885,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5965,8 +5900,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5980,8 +5915,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5995,8 +5930,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6010,8 +5945,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6025,8 +5960,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6040,8 +5975,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6055,8 +5990,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for 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 4e7aee52..e33793de 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 @@ -772,20 +772,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1129,20 +1125,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1222,66 +1218,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1295,30 +1285,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1330,21 +1316,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1352,44 +1336,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1409,7 +1382,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1417,10 +1390,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1428,7 +1398,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1436,7 +1406,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1444,7 +1414,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1461,16 +1431,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3437,46 +3403,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3490,22 +3447,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3517,19 +3468,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3537,28 +3485,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3578,7 +3520,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3586,10 +3528,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3597,7 +3536,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3614,12 +3553,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5698,7 +5634,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5726,7 +5662,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5740,7 +5676,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5754,8 +5690,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5769,7 +5704,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5783,7 +5718,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5797,7 +5732,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5811,8 +5746,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5826,8 +5761,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5841,8 +5776,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5856,8 +5791,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5871,8 +5806,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5886,8 +5821,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5901,8 +5836,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5916,8 +5851,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5931,8 +5866,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5946,8 +5881,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5961,8 +5896,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5976,8 +5911,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5991,8 +5926,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6006,8 +5941,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6021,8 +5956,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6036,8 +5971,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6051,8 +5986,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for 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 186a24b1..20323a47 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 @@ -768,20 +768,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1125,20 +1121,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1218,66 +1214,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1291,30 +1281,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1326,21 +1312,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1348,44 +1332,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1405,7 +1378,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1413,10 +1386,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1424,7 +1394,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1432,7 +1402,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1440,7 +1410,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1457,16 +1427,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3433,46 +3399,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3486,22 +3443,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3513,19 +3464,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3533,28 +3481,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3574,7 +3516,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3582,10 +3524,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3593,7 +3532,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3610,12 +3549,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5694,7 +5630,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5722,7 +5658,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5736,7 +5672,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5750,8 +5686,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5765,7 +5700,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5779,7 +5714,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5793,7 +5728,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5807,8 +5742,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5822,8 +5757,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5837,8 +5772,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5852,8 +5787,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5867,8 +5802,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5882,8 +5817,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5897,8 +5832,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5912,8 +5847,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5927,8 +5862,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5942,8 +5877,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5957,8 +5892,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5972,8 +5907,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5987,8 +5922,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6002,8 +5937,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6017,8 +5952,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6032,8 +5967,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6047,8 +5982,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for 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 e899ab34..5423501c 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 @@ -759,20 +759,16 @@ private constructor( } /** The discount intervals for this subscription. */ - fun addDiscountInterval(amountDiscountInterval: DiscountInterval.AmountDiscountInterval) = - addDiscountInterval(DiscountInterval.ofAmountDiscountInterval(amountDiscountInterval)) + fun addDiscountInterval(amount: DiscountInterval.AmountDiscountInterval) = + addDiscountInterval(DiscountInterval.ofAmount(amount)) /** The discount intervals for this subscription. */ - fun addDiscountInterval( - percentageDiscountInterval: DiscountInterval.PercentageDiscountInterval - ) = - addDiscountInterval( - DiscountInterval.ofPercentageDiscountInterval(percentageDiscountInterval) - ) + fun addDiscountInterval(percentage: DiscountInterval.PercentageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofPercentage(percentage)) /** The discount intervals for this subscription. */ - fun addDiscountInterval(usageDiscountInterval: DiscountInterval.UsageDiscountInterval) = - addDiscountInterval(DiscountInterval.ofUsageDiscountInterval(usageDiscountInterval)) + fun addDiscountInterval(usage: DiscountInterval.UsageDiscountInterval) = + addDiscountInterval(DiscountInterval.ofUsage(usage)) /** The date Orb stops billing for this subscription. */ fun endDate(endDate: OffsetDateTime?) = endDate(JsonField.ofNullable(endDate)) @@ -1116,20 +1112,20 @@ private constructor( this.adjustment = adjustment } - fun adjustment(amountDiscountAdjustment: Adjustment.AmountDiscountAdjustment) = - adjustment(Adjustment.ofAmountDiscountAdjustment(amountDiscountAdjustment)) + fun adjustment(amountDiscount: Adjustment.AmountDiscountAdjustment) = + adjustment(Adjustment.ofAmountDiscount(amountDiscount)) - fun adjustment(percentageDiscountAdjustment: Adjustment.PercentageDiscountAdjustment) = - adjustment(Adjustment.ofPercentageDiscountAdjustment(percentageDiscountAdjustment)) + fun adjustment(percentageDiscount: Adjustment.PercentageDiscountAdjustment) = + adjustment(Adjustment.ofPercentageDiscount(percentageDiscount)) - fun adjustment(usageDiscountAdjustment: Adjustment.UsageDiscountAdjustment) = - adjustment(Adjustment.ofUsageDiscountAdjustment(usageDiscountAdjustment)) + fun adjustment(usageDiscount: Adjustment.UsageDiscountAdjustment) = + adjustment(Adjustment.ofUsageDiscount(usageDiscount)) - fun adjustment(minimumAdjustment: Adjustment.MinimumAdjustment) = - adjustment(Adjustment.ofMinimumAdjustment(minimumAdjustment)) + fun adjustment(minimum: Adjustment.MinimumAdjustment) = + adjustment(Adjustment.ofMinimum(minimum)) - fun adjustment(maximumAdjustment: Adjustment.MaximumAdjustment) = - adjustment(Adjustment.ofMaximumAdjustment(maximumAdjustment)) + fun adjustment(maximum: Adjustment.MaximumAdjustment) = + adjustment(Adjustment.ofMaximum(maximum)) /** The price interval IDs that this adjustment applies to. */ fun appliesToPriceIntervalIds(appliesToPriceIntervalIds: List) = @@ -1209,66 +1205,60 @@ private constructor( @JsonSerialize(using = Adjustment.Serializer::class) class Adjustment private constructor( - private val amountDiscountAdjustment: AmountDiscountAdjustment? = null, - private val percentageDiscountAdjustment: PercentageDiscountAdjustment? = null, - private val usageDiscountAdjustment: UsageDiscountAdjustment? = null, - private val minimumAdjustment: MinimumAdjustment? = null, - private val maximumAdjustment: MaximumAdjustment? = null, + private val amountDiscount: AmountDiscountAdjustment? = null, + private val percentageDiscount: PercentageDiscountAdjustment? = null, + private val usageDiscount: UsageDiscountAdjustment? = null, + private val minimum: MinimumAdjustment? = null, + private val maximum: MaximumAdjustment? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountAdjustment(): Optional = - Optional.ofNullable(amountDiscountAdjustment) + fun amountDiscount(): Optional = + Optional.ofNullable(amountDiscount) - fun percentageDiscountAdjustment(): Optional = - Optional.ofNullable(percentageDiscountAdjustment) + fun percentageDiscount(): Optional = + Optional.ofNullable(percentageDiscount) - fun usageDiscountAdjustment(): Optional = - Optional.ofNullable(usageDiscountAdjustment) + fun usageDiscount(): Optional = + Optional.ofNullable(usageDiscount) - fun minimumAdjustment(): Optional = - Optional.ofNullable(minimumAdjustment) + fun minimum(): Optional = Optional.ofNullable(minimum) - fun maximumAdjustment(): Optional = - Optional.ofNullable(maximumAdjustment) + fun maximum(): Optional = Optional.ofNullable(maximum) - fun isAmountDiscountAdjustment(): Boolean = amountDiscountAdjustment != null + fun isAmountDiscount(): Boolean = amountDiscount != null - fun isPercentageDiscountAdjustment(): Boolean = percentageDiscountAdjustment != null + fun isPercentageDiscount(): Boolean = percentageDiscount != null - fun isUsageDiscountAdjustment(): Boolean = usageDiscountAdjustment != null + fun isUsageDiscount(): Boolean = usageDiscount != null - fun isMinimumAdjustment(): Boolean = minimumAdjustment != null + fun isMinimum(): Boolean = minimum != null - fun isMaximumAdjustment(): Boolean = maximumAdjustment != null + fun isMaximum(): Boolean = maximum != null - fun asAmountDiscountAdjustment(): AmountDiscountAdjustment = - amountDiscountAdjustment.getOrThrow("amountDiscountAdjustment") + fun asAmountDiscount(): AmountDiscountAdjustment = + amountDiscount.getOrThrow("amountDiscount") - fun asPercentageDiscountAdjustment(): PercentageDiscountAdjustment = - percentageDiscountAdjustment.getOrThrow("percentageDiscountAdjustment") + fun asPercentageDiscount(): PercentageDiscountAdjustment = + percentageDiscount.getOrThrow("percentageDiscount") - fun asUsageDiscountAdjustment(): UsageDiscountAdjustment = - usageDiscountAdjustment.getOrThrow("usageDiscountAdjustment") + fun asUsageDiscount(): UsageDiscountAdjustment = + usageDiscount.getOrThrow("usageDiscount") - fun asMinimumAdjustment(): MinimumAdjustment = - minimumAdjustment.getOrThrow("minimumAdjustment") + fun asMinimum(): MinimumAdjustment = minimum.getOrThrow("minimum") - fun asMaximumAdjustment(): MaximumAdjustment = - maximumAdjustment.getOrThrow("maximumAdjustment") + fun asMaximum(): MaximumAdjustment = maximum.getOrThrow("maximum") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountAdjustment != null -> - visitor.visitAmountDiscountAdjustment(amountDiscountAdjustment) - percentageDiscountAdjustment != null -> - visitor.visitPercentageDiscountAdjustment(percentageDiscountAdjustment) - usageDiscountAdjustment != null -> - visitor.visitUsageDiscountAdjustment(usageDiscountAdjustment) - minimumAdjustment != null -> visitor.visitMinimumAdjustment(minimumAdjustment) - maximumAdjustment != null -> visitor.visitMaximumAdjustment(maximumAdjustment) + amountDiscount != null -> visitor.visitAmountDiscount(amountDiscount) + percentageDiscount != null -> + visitor.visitPercentageDiscount(percentageDiscount) + usageDiscount != null -> visitor.visitUsageDiscount(usageDiscount) + minimum != null -> visitor.visitMinimum(minimum) + maximum != null -> visitor.visitMaximum(maximum) else -> visitor.unknown(_json) } } @@ -1282,30 +1272,26 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ) { - amountDiscountAdjustment.validate() + override fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment) { + amountDiscount.validate() } - override fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment + override fun visitPercentageDiscount( + percentageDiscount: PercentageDiscountAdjustment ) { - percentageDiscountAdjustment.validate() + percentageDiscount.validate() } - override fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ) { - usageDiscountAdjustment.validate() + override fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment) { + usageDiscount.validate() } - override fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment) { - minimumAdjustment.validate() + override fun visitMinimum(minimum: MinimumAdjustment) { + minimum.validate() } - override fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment) { - maximumAdjustment.validate() + override fun visitMaximum(maximum: MaximumAdjustment) { + maximum.validate() } } ) @@ -1317,21 +1303,19 @@ private constructor( return true } - return /* spotless:off */ other is Adjustment && amountDiscountAdjustment == other.amountDiscountAdjustment && percentageDiscountAdjustment == other.percentageDiscountAdjustment && usageDiscountAdjustment == other.usageDiscountAdjustment && minimumAdjustment == other.minimumAdjustment && maximumAdjustment == other.maximumAdjustment /* spotless:on */ + return /* spotless:off */ other is Adjustment && amountDiscount == other.amountDiscount && percentageDiscount == other.percentageDiscount && usageDiscount == other.usageDiscount && minimum == other.minimum && maximum == other.maximum /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountAdjustment, percentageDiscountAdjustment, usageDiscountAdjustment, minimumAdjustment, maximumAdjustment) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscount, percentageDiscount, usageDiscount, minimum, maximum) /* spotless:on */ override fun toString(): String = when { - amountDiscountAdjustment != null -> - "Adjustment{amountDiscountAdjustment=$amountDiscountAdjustment}" - percentageDiscountAdjustment != null -> - "Adjustment{percentageDiscountAdjustment=$percentageDiscountAdjustment}" - usageDiscountAdjustment != null -> - "Adjustment{usageDiscountAdjustment=$usageDiscountAdjustment}" - minimumAdjustment != null -> "Adjustment{minimumAdjustment=$minimumAdjustment}" - maximumAdjustment != null -> "Adjustment{maximumAdjustment=$maximumAdjustment}" + amountDiscount != null -> "Adjustment{amountDiscount=$amountDiscount}" + percentageDiscount != null -> + "Adjustment{percentageDiscount=$percentageDiscount}" + usageDiscount != null -> "Adjustment{usageDiscount=$usageDiscount}" + minimum != null -> "Adjustment{minimum=$minimum}" + maximum != null -> "Adjustment{maximum=$maximum}" _json != null -> "Adjustment{_unknown=$_json}" else -> throw IllegalStateException("Invalid Adjustment") } @@ -1339,44 +1323,33 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountAdjustment(amountDiscountAdjustment: AmountDiscountAdjustment) = - Adjustment(amountDiscountAdjustment = amountDiscountAdjustment) + fun ofAmountDiscount(amountDiscount: AmountDiscountAdjustment) = + Adjustment(amountDiscount = amountDiscount) @JvmStatic - fun ofPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ) = Adjustment(percentageDiscountAdjustment = percentageDiscountAdjustment) + fun ofPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment) = + Adjustment(percentageDiscount = percentageDiscount) @JvmStatic - fun ofUsageDiscountAdjustment(usageDiscountAdjustment: UsageDiscountAdjustment) = - Adjustment(usageDiscountAdjustment = usageDiscountAdjustment) + fun ofUsageDiscount(usageDiscount: UsageDiscountAdjustment) = + Adjustment(usageDiscount = usageDiscount) - @JvmStatic - fun ofMinimumAdjustment(minimumAdjustment: MinimumAdjustment) = - Adjustment(minimumAdjustment = minimumAdjustment) + @JvmStatic fun ofMinimum(minimum: MinimumAdjustment) = Adjustment(minimum = minimum) - @JvmStatic - fun ofMaximumAdjustment(maximumAdjustment: MaximumAdjustment) = - Adjustment(maximumAdjustment = maximumAdjustment) + @JvmStatic fun ofMaximum(maximum: MaximumAdjustment) = Adjustment(maximum = maximum) } interface Visitor { - fun visitAmountDiscountAdjustment( - amountDiscountAdjustment: AmountDiscountAdjustment - ): T + fun visitAmountDiscount(amountDiscount: AmountDiscountAdjustment): T - fun visitPercentageDiscountAdjustment( - percentageDiscountAdjustment: PercentageDiscountAdjustment - ): T + fun visitPercentageDiscount(percentageDiscount: PercentageDiscountAdjustment): T - fun visitUsageDiscountAdjustment( - usageDiscountAdjustment: UsageDiscountAdjustment - ): T + fun visitUsageDiscount(usageDiscount: UsageDiscountAdjustment): T - fun visitMinimumAdjustment(minimumAdjustment: MinimumAdjustment): T + fun visitMinimum(minimum: MinimumAdjustment): T - fun visitMaximumAdjustment(maximumAdjustment: MaximumAdjustment): T + fun visitMaximum(maximum: MaximumAdjustment): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown Adjustment: $json") @@ -1396,7 +1369,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(amountDiscountAdjustment = it, _json = json) + return Adjustment(amountDiscount = it, _json = json) } } "percentage_discount" -> { @@ -1404,10 +1377,7 @@ private constructor( it.validate() } ?.let { - return Adjustment( - percentageDiscountAdjustment = it, - _json = json - ) + return Adjustment(percentageDiscount = it, _json = json) } } "usage_discount" -> { @@ -1415,7 +1385,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(usageDiscountAdjustment = it, _json = json) + return Adjustment(usageDiscount = it, _json = json) } } "minimum" -> { @@ -1423,7 +1393,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(minimumAdjustment = it, _json = json) + return Adjustment(minimum = it, _json = json) } } "maximum" -> { @@ -1431,7 +1401,7 @@ private constructor( it.validate() } ?.let { - return Adjustment(maximumAdjustment = it, _json = json) + return Adjustment(maximum = it, _json = json) } } } @@ -1448,16 +1418,12 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountAdjustment != null -> - generator.writeObject(value.amountDiscountAdjustment) - value.percentageDiscountAdjustment != null -> - generator.writeObject(value.percentageDiscountAdjustment) - value.usageDiscountAdjustment != null -> - generator.writeObject(value.usageDiscountAdjustment) - value.minimumAdjustment != null -> - generator.writeObject(value.minimumAdjustment) - value.maximumAdjustment != null -> - generator.writeObject(value.maximumAdjustment) + value.amountDiscount != null -> generator.writeObject(value.amountDiscount) + value.percentageDiscount != null -> + generator.writeObject(value.percentageDiscount) + value.usageDiscount != null -> generator.writeObject(value.usageDiscount) + value.minimum != null -> generator.writeObject(value.minimum) + value.maximum != null -> generator.writeObject(value.maximum) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Adjustment") } @@ -3424,46 +3390,37 @@ private constructor( @JsonSerialize(using = DiscountInterval.Serializer::class) class DiscountInterval private constructor( - private val amountDiscountInterval: AmountDiscountInterval? = null, - private val percentageDiscountInterval: PercentageDiscountInterval? = null, - private val usageDiscountInterval: UsageDiscountInterval? = null, + private val amount: AmountDiscountInterval? = null, + private val percentage: PercentageDiscountInterval? = null, + private val usage: UsageDiscountInterval? = null, private val _json: JsonValue? = null, ) { - fun amountDiscountInterval(): Optional = - Optional.ofNullable(amountDiscountInterval) + fun amount(): Optional = Optional.ofNullable(amount) - fun percentageDiscountInterval(): Optional = - Optional.ofNullable(percentageDiscountInterval) + fun percentage(): Optional = Optional.ofNullable(percentage) - fun usageDiscountInterval(): Optional = - Optional.ofNullable(usageDiscountInterval) + fun usage(): Optional = Optional.ofNullable(usage) - fun isAmountDiscountInterval(): Boolean = amountDiscountInterval != null + fun isAmount(): Boolean = amount != null - fun isPercentageDiscountInterval(): Boolean = percentageDiscountInterval != null + fun isPercentage(): Boolean = percentage != null - fun isUsageDiscountInterval(): Boolean = usageDiscountInterval != null + fun isUsage(): Boolean = usage != null - fun asAmountDiscountInterval(): AmountDiscountInterval = - amountDiscountInterval.getOrThrow("amountDiscountInterval") + fun asAmount(): AmountDiscountInterval = amount.getOrThrow("amount") - fun asPercentageDiscountInterval(): PercentageDiscountInterval = - percentageDiscountInterval.getOrThrow("percentageDiscountInterval") + fun asPercentage(): PercentageDiscountInterval = percentage.getOrThrow("percentage") - fun asUsageDiscountInterval(): UsageDiscountInterval = - usageDiscountInterval.getOrThrow("usageDiscountInterval") + fun asUsage(): UsageDiscountInterval = usage.getOrThrow("usage") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - amountDiscountInterval != null -> - visitor.visitAmountDiscountInterval(amountDiscountInterval) - percentageDiscountInterval != null -> - visitor.visitPercentageDiscountInterval(percentageDiscountInterval) - usageDiscountInterval != null -> - visitor.visitUsageDiscountInterval(usageDiscountInterval) + amount != null -> visitor.visitAmount(amount) + percentage != null -> visitor.visitPercentage(percentage) + usage != null -> visitor.visitUsage(usage) else -> visitor.unknown(_json) } } @@ -3477,22 +3434,16 @@ private constructor( accept( object : Visitor { - override fun visitAmountDiscountInterval( - amountDiscountInterval: AmountDiscountInterval - ) { - amountDiscountInterval.validate() + override fun visitAmount(amount: AmountDiscountInterval) { + amount.validate() } - override fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) { - percentageDiscountInterval.validate() + override fun visitPercentage(percentage: PercentageDiscountInterval) { + percentage.validate() } - override fun visitUsageDiscountInterval( - usageDiscountInterval: UsageDiscountInterval - ) { - usageDiscountInterval.validate() + override fun visitUsage(usage: UsageDiscountInterval) { + usage.validate() } } ) @@ -3504,19 +3455,16 @@ private constructor( return true } - return /* spotless:off */ other is DiscountInterval && amountDiscountInterval == other.amountDiscountInterval && percentageDiscountInterval == other.percentageDiscountInterval && usageDiscountInterval == other.usageDiscountInterval /* spotless:on */ + return /* spotless:off */ other is DiscountInterval && amount == other.amount && percentage == other.percentage && usage == other.usage /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(amountDiscountInterval, percentageDiscountInterval, usageDiscountInterval) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(amount, percentage, usage) /* spotless:on */ override fun toString(): String = when { - amountDiscountInterval != null -> - "DiscountInterval{amountDiscountInterval=$amountDiscountInterval}" - percentageDiscountInterval != null -> - "DiscountInterval{percentageDiscountInterval=$percentageDiscountInterval}" - usageDiscountInterval != null -> - "DiscountInterval{usageDiscountInterval=$usageDiscountInterval}" + amount != null -> "DiscountInterval{amount=$amount}" + percentage != null -> "DiscountInterval{percentage=$percentage}" + usage != null -> "DiscountInterval{usage=$usage}" _json != null -> "DiscountInterval{_unknown=$_json}" else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -3524,28 +3472,22 @@ private constructor( companion object { @JvmStatic - fun ofAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval) = - DiscountInterval(amountDiscountInterval = amountDiscountInterval) + fun ofAmount(amount: AmountDiscountInterval) = DiscountInterval(amount = amount) @JvmStatic - fun ofPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ) = DiscountInterval(percentageDiscountInterval = percentageDiscountInterval) + fun ofPercentage(percentage: PercentageDiscountInterval) = + DiscountInterval(percentage = percentage) - @JvmStatic - fun ofUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval) = - DiscountInterval(usageDiscountInterval = usageDiscountInterval) + @JvmStatic fun ofUsage(usage: UsageDiscountInterval) = DiscountInterval(usage = usage) } interface Visitor { - fun visitAmountDiscountInterval(amountDiscountInterval: AmountDiscountInterval): T + fun visitAmount(amount: AmountDiscountInterval): T - fun visitPercentageDiscountInterval( - percentageDiscountInterval: PercentageDiscountInterval - ): T + fun visitPercentage(percentage: PercentageDiscountInterval): T - fun visitUsageDiscountInterval(usageDiscountInterval: UsageDiscountInterval): T + fun visitUsage(usage: UsageDiscountInterval): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown DiscountInterval: $json") @@ -3565,7 +3507,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(amountDiscountInterval = it, _json = json) + return DiscountInterval(amount = it, _json = json) } } "percentage" -> { @@ -3573,10 +3515,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval( - percentageDiscountInterval = it, - _json = json - ) + return DiscountInterval(percentage = it, _json = json) } } "usage" -> { @@ -3584,7 +3523,7 @@ private constructor( it.validate() } ?.let { - return DiscountInterval(usageDiscountInterval = it, _json = json) + return DiscountInterval(usage = it, _json = json) } } } @@ -3601,12 +3540,9 @@ private constructor( provider: SerializerProvider ) { when { - value.amountDiscountInterval != null -> - generator.writeObject(value.amountDiscountInterval) - value.percentageDiscountInterval != null -> - generator.writeObject(value.percentageDiscountInterval) - value.usageDiscountInterval != null -> - generator.writeObject(value.usageDiscountInterval) + value.amount != null -> generator.writeObject(value.amount) + value.percentage != null -> generator.writeObject(value.percentage) + value.usage != null -> generator.writeObject(value.usage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid DiscountInterval") } @@ -5685,7 +5621,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitPrice: Price.UnitPrice) = price(Price.ofUnitPrice(unitPrice)) + fun price(unit: Price.UnitPrice) = price(Price.ofUnit(unit)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5713,7 +5649,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixPrice: Price.MatrixPrice) = price(Price.ofMatrixPrice(matrixPrice)) + fun price(matrix: Price.MatrixPrice) = price(Price.ofMatrix(matrix)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5727,7 +5663,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPrice: Price.TieredPrice) = price(Price.ofTieredPrice(tieredPrice)) + fun price(tiered: Price.TieredPrice) = price(Price.ofTiered(tiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5741,8 +5677,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredBpsPrice: Price.TieredBpsPrice) = - price(Price.ofTieredBpsPrice(tieredBpsPrice)) + fun price(tieredBps: Price.TieredBpsPrice) = price(Price.ofTieredBps(tieredBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5756,7 +5691,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bpsPrice: Price.BpsPrice) = price(Price.ofBpsPrice(bpsPrice)) + fun price(bps: Price.BpsPrice) = price(Price.ofBps(bps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5770,7 +5705,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkBpsPrice: Price.BulkBpsPrice) = price(Price.ofBulkBpsPrice(bulkBpsPrice)) + fun price(bulkBps: Price.BulkBpsPrice) = price(Price.ofBulkBps(bulkBps)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5784,7 +5719,7 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkPrice: Price.BulkPrice) = price(Price.ofBulkPrice(bulkPrice)) + fun price(bulk: Price.BulkPrice) = price(Price.ofBulk(bulk)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5798,8 +5733,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(thresholdTotalAmountPrice: Price.ThresholdTotalAmountPrice) = - price(Price.ofThresholdTotalAmountPrice(thresholdTotalAmountPrice)) + fun price(thresholdTotalAmount: Price.ThresholdTotalAmountPrice) = + price(Price.ofThresholdTotalAmount(thresholdTotalAmount)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5813,8 +5748,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackagePrice: Price.TieredPackagePrice) = - price(Price.ofTieredPackagePrice(tieredPackagePrice)) + fun price(tieredPackage: Price.TieredPackagePrice) = + price(Price.ofTieredPackage(tieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5828,8 +5763,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPrice: Price.GroupedTieredPrice) = - price(Price.ofGroupedTieredPrice(groupedTieredPrice)) + fun price(groupedTiered: Price.GroupedTieredPrice) = + price(Price.ofGroupedTiered(groupedTiered)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5843,8 +5778,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithMinimumPrice: Price.TieredWithMinimumPrice) = - price(Price.ofTieredWithMinimumPrice(tieredWithMinimumPrice)) + fun price(tieredWithMinimum: Price.TieredWithMinimumPrice) = + price(Price.ofTieredWithMinimum(tieredWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5858,8 +5793,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredPackageWithMinimumPrice: Price.TieredPackageWithMinimumPrice) = - price(Price.ofTieredPackageWithMinimumPrice(tieredPackageWithMinimumPrice)) + fun price(tieredPackageWithMinimum: Price.TieredPackageWithMinimumPrice) = + price(Price.ofTieredPackageWithMinimum(tieredPackageWithMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5873,8 +5808,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(packageWithAllocationPrice: Price.PackageWithAllocationPrice) = - price(Price.ofPackageWithAllocationPrice(packageWithAllocationPrice)) + fun price(packageWithAllocation: Price.PackageWithAllocationPrice) = + price(Price.ofPackageWithAllocation(packageWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5888,8 +5823,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithPercentPrice: Price.UnitWithPercentPrice) = - price(Price.ofUnitWithPercentPrice(unitWithPercentPrice)) + fun price(unitWithPercent: Price.UnitWithPercentPrice) = + price(Price.ofUnitWithPercent(unitWithPercent)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5903,8 +5838,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithAllocationPrice: Price.MatrixWithAllocationPrice) = - price(Price.ofMatrixWithAllocationPrice(matrixWithAllocationPrice)) + fun price(matrixWithAllocation: Price.MatrixWithAllocationPrice) = + price(Price.ofMatrixWithAllocation(matrixWithAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5918,8 +5853,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(tieredWithProrationPrice: Price.TieredWithProrationPrice) = - price(Price.ofTieredWithProrationPrice(tieredWithProrationPrice)) + fun price(tieredWithProration: Price.TieredWithProrationPrice) = + price(Price.ofTieredWithProration(tieredWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5933,8 +5868,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(unitWithProrationPrice: Price.UnitWithProrationPrice) = - price(Price.ofUnitWithProrationPrice(unitWithProrationPrice)) + fun price(unitWithProration: Price.UnitWithProrationPrice) = + price(Price.ofUnitWithProration(unitWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5948,8 +5883,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedAllocationPrice: Price.GroupedAllocationPrice) = - price(Price.ofGroupedAllocationPrice(groupedAllocationPrice)) + fun price(groupedAllocation: Price.GroupedAllocationPrice) = + price(Price.ofGroupedAllocation(groupedAllocation)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5963,8 +5898,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithProratedMinimumPrice: Price.GroupedWithProratedMinimumPrice) = - price(Price.ofGroupedWithProratedMinimumPrice(groupedWithProratedMinimumPrice)) + fun price(groupedWithProratedMinimum: Price.GroupedWithProratedMinimumPrice) = + price(Price.ofGroupedWithProratedMinimum(groupedWithProratedMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5978,8 +5913,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedWithMeteredMinimumPrice: Price.GroupedWithMeteredMinimumPrice) = - price(Price.ofGroupedWithMeteredMinimumPrice(groupedWithMeteredMinimumPrice)) + fun price(groupedWithMeteredMinimum: Price.GroupedWithMeteredMinimumPrice) = + price(Price.ofGroupedWithMeteredMinimum(groupedWithMeteredMinimum)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -5993,8 +5928,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(matrixWithDisplayNamePrice: Price.MatrixWithDisplayNamePrice) = - price(Price.ofMatrixWithDisplayNamePrice(matrixWithDisplayNamePrice)) + fun price(matrixWithDisplayName: Price.MatrixWithDisplayNamePrice) = + price(Price.ofMatrixWithDisplayName(matrixWithDisplayName)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6008,8 +5943,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(bulkWithProrationPrice: Price.BulkWithProrationPrice) = - price(Price.ofBulkWithProrationPrice(bulkWithProrationPrice)) + fun price(bulkWithProration: Price.BulkWithProrationPrice) = + price(Price.ofBulkWithProration(bulkWithProration)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6023,8 +5958,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) = - price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice)) + fun price(groupedTieredPackage: Price.GroupedTieredPackagePrice) = + price(Price.ofGroupedTieredPackage(groupedTieredPackage)) /** * The Price resource represents a price that can be billed on a subscription, resulting @@ -6038,8 +5973,8 @@ private constructor( * For more on the types of prices, see * [the core concepts documentation](/core-concepts#plan-and-price) */ - fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) = - price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice)) + fun price(maxGroupTieredPackage: Price.MaxGroupTieredPackagePrice) = + price(Price.ofMaxGroupTieredPackage(maxGroupTieredPackage)) /** * The start date of the price interval. This is the date that Orb starts billing for diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUsage.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUsage.kt index 57f2b25e..849d787f 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUsage.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionUsage.kt @@ -34,35 +34,29 @@ import java.util.Optional @JsonSerialize(using = SubscriptionUsage.Serializer::class) class SubscriptionUsage private constructor( - private val ungroupedSubscriptionUsage: UngroupedSubscriptionUsage? = null, - private val groupedSubscriptionUsage: GroupedSubscriptionUsage? = null, + private val ungrouped: UngroupedSubscriptionUsage? = null, + private val grouped: GroupedSubscriptionUsage? = null, private val _json: JsonValue? = null, ) { - fun ungroupedSubscriptionUsage(): Optional = - Optional.ofNullable(ungroupedSubscriptionUsage) + fun ungrouped(): Optional = Optional.ofNullable(ungrouped) - fun groupedSubscriptionUsage(): Optional = - Optional.ofNullable(groupedSubscriptionUsage) + fun grouped(): Optional = Optional.ofNullable(grouped) - fun isUngroupedSubscriptionUsage(): Boolean = ungroupedSubscriptionUsage != null + fun isUngrouped(): Boolean = ungrouped != null - fun isGroupedSubscriptionUsage(): Boolean = groupedSubscriptionUsage != null + fun isGrouped(): Boolean = grouped != null - fun asUngroupedSubscriptionUsage(): UngroupedSubscriptionUsage = - ungroupedSubscriptionUsage.getOrThrow("ungroupedSubscriptionUsage") + fun asUngrouped(): UngroupedSubscriptionUsage = ungrouped.getOrThrow("ungrouped") - fun asGroupedSubscriptionUsage(): GroupedSubscriptionUsage = - groupedSubscriptionUsage.getOrThrow("groupedSubscriptionUsage") + fun asGrouped(): GroupedSubscriptionUsage = grouped.getOrThrow("grouped") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { - ungroupedSubscriptionUsage != null -> - visitor.visitUngroupedSubscriptionUsage(ungroupedSubscriptionUsage) - groupedSubscriptionUsage != null -> - visitor.visitGroupedSubscriptionUsage(groupedSubscriptionUsage) + ungrouped != null -> visitor.visitUngrouped(ungrouped) + grouped != null -> visitor.visitGrouped(grouped) else -> visitor.unknown(_json) } } @@ -76,16 +70,12 @@ private constructor( accept( object : Visitor { - override fun visitUngroupedSubscriptionUsage( - ungroupedSubscriptionUsage: UngroupedSubscriptionUsage - ) { - ungroupedSubscriptionUsage.validate() + override fun visitUngrouped(ungrouped: UngroupedSubscriptionUsage) { + ungrouped.validate() } - override fun visitGroupedSubscriptionUsage( - groupedSubscriptionUsage: GroupedSubscriptionUsage - ) { - groupedSubscriptionUsage.validate() + override fun visitGrouped(grouped: GroupedSubscriptionUsage) { + grouped.validate() } } ) @@ -97,17 +87,15 @@ private constructor( return true } - return /* spotless:off */ other is SubscriptionUsage && ungroupedSubscriptionUsage == other.ungroupedSubscriptionUsage && groupedSubscriptionUsage == other.groupedSubscriptionUsage /* spotless:on */ + return /* spotless:off */ other is SubscriptionUsage && ungrouped == other.ungrouped && grouped == other.grouped /* spotless:on */ } - override fun hashCode(): Int = /* spotless:off */ Objects.hash(ungroupedSubscriptionUsage, groupedSubscriptionUsage) /* spotless:on */ + override fun hashCode(): Int = /* spotless:off */ Objects.hash(ungrouped, grouped) /* spotless:on */ override fun toString(): String = when { - ungroupedSubscriptionUsage != null -> - "SubscriptionUsage{ungroupedSubscriptionUsage=$ungroupedSubscriptionUsage}" - groupedSubscriptionUsage != null -> - "SubscriptionUsage{groupedSubscriptionUsage=$groupedSubscriptionUsage}" + ungrouped != null -> "SubscriptionUsage{ungrouped=$ungrouped}" + grouped != null -> "SubscriptionUsage{grouped=$grouped}" _json != null -> "SubscriptionUsage{_unknown=$_json}" else -> throw IllegalStateException("Invalid SubscriptionUsage") } @@ -115,21 +103,18 @@ private constructor( companion object { @JvmStatic - fun ofUngroupedSubscriptionUsage(ungroupedSubscriptionUsage: UngroupedSubscriptionUsage) = - SubscriptionUsage(ungroupedSubscriptionUsage = ungroupedSubscriptionUsage) + fun ofUngrouped(ungrouped: UngroupedSubscriptionUsage) = + SubscriptionUsage(ungrouped = ungrouped) @JvmStatic - fun ofGroupedSubscriptionUsage(groupedSubscriptionUsage: GroupedSubscriptionUsage) = - SubscriptionUsage(groupedSubscriptionUsage = groupedSubscriptionUsage) + fun ofGrouped(grouped: GroupedSubscriptionUsage) = SubscriptionUsage(grouped = grouped) } interface Visitor { - fun visitUngroupedSubscriptionUsage( - ungroupedSubscriptionUsage: UngroupedSubscriptionUsage - ): T + fun visitUngrouped(ungrouped: UngroupedSubscriptionUsage): T - fun visitGroupedSubscriptionUsage(groupedSubscriptionUsage: GroupedSubscriptionUsage): T + fun visitGrouped(grouped: GroupedSubscriptionUsage): T fun unknown(json: JsonValue?): T { throw OrbInvalidDataException("Unknown SubscriptionUsage: $json") @@ -143,11 +128,11 @@ private constructor( tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return SubscriptionUsage(ungroupedSubscriptionUsage = it, _json = json) + return SubscriptionUsage(ungrouped = it, _json = json) } tryDeserialize(node, jacksonTypeRef()) { it.validate() } ?.let { - return SubscriptionUsage(groupedSubscriptionUsage = it, _json = json) + return SubscriptionUsage(grouped = it, _json = json) } return SubscriptionUsage(_json = json) @@ -162,10 +147,8 @@ private constructor( provider: SerializerProvider ) { when { - value.ungroupedSubscriptionUsage != null -> - generator.writeObject(value.ungroupedSubscriptionUsage) - value.groupedSubscriptionUsage != null -> - generator.writeObject(value.groupedSubscriptionUsage) + value.ungrouped != null -> generator.writeObject(value.ungrouped) + value.grouped != null -> generator.writeObject(value.grouped) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid SubscriptionUsage") } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponCreateParamsTest.kt index 3f7a7132..1c738f37 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponCreateParamsTest.kt @@ -46,7 +46,7 @@ class CouponCreateParamsTest { assertThat(body).isNotNull assertThat(body.discount()) .isEqualTo( - CouponCreateParams.Discount.ofNewCouponPercentageDiscount( + CouponCreateParams.Discount.ofNewCouponPercentage( CouponCreateParams.Discount.NewCouponPercentageDiscount.builder() .discountType( CouponCreateParams.Discount.NewCouponPercentageDiscount.DiscountType @@ -80,7 +80,7 @@ class CouponCreateParamsTest { assertThat(body).isNotNull assertThat(body.discount()) .isEqualTo( - CouponCreateParams.Discount.ofNewCouponPercentageDiscount( + CouponCreateParams.Discount.ofNewCouponPercentage( CouponCreateParams.Discount.NewCouponPercentageDiscount.builder() .discountType( CouponCreateParams.Discount.NewCouponPercentageDiscount.DiscountType diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponTest.kt index eb531cb4..b56e5895 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponTest.kt @@ -33,7 +33,7 @@ class CouponTest { assertThat(coupon.archivedAt()).contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) assertThat(coupon.discount()) .isEqualTo( - Coupon.Discount.ofPercentageDiscount( + Coupon.Discount.ofPercentage( PercentageDiscount.builder() .addAppliesToPriceId("h74gfhdjvn7ujokd") .addAppliesToPriceId("7hfgtgjnbvc3ujkl") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreateParamsTest.kt index 5b743c77..1cbfa634 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreateParamsTest.kt @@ -210,7 +210,7 @@ class CustomerCreateParamsTest { ) assertThat(body.taxConfiguration()) .contains( - CustomerCreateParams.TaxConfiguration.ofNewAvalaraTaxConfiguration( + CustomerCreateParams.TaxConfiguration.ofNewAvalara( CustomerCreateParams.TaxConfiguration.NewAvalaraTaxConfiguration.builder() .taxExempt(true) .taxProvider( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParamsTest.kt index 3386e5bd..34704946 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParamsTest.kt @@ -226,7 +226,7 @@ class CustomerUpdateByExternalIdParamsTest { ) assertThat(body.taxConfiguration()) .contains( - CustomerUpdateByExternalIdParams.TaxConfiguration.ofNewAvalaraTaxConfiguration( + CustomerUpdateByExternalIdParams.TaxConfiguration.ofNewAvalara( CustomerUpdateByExternalIdParams.TaxConfiguration.NewAvalaraTaxConfiguration .builder() .taxExempt(true) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateParamsTest.kt index 6c42c0cb..b59bbc81 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateParamsTest.kt @@ -210,7 +210,7 @@ class CustomerUpdateParamsTest { ) assertThat(body.taxConfiguration()) .contains( - CustomerUpdateParams.TaxConfiguration.ofNewAvalaraTaxConfiguration( + CustomerUpdateParams.TaxConfiguration.ofNewAvalara( CustomerUpdateParams.TaxConfiguration.NewAvalaraTaxConfiguration.builder() .taxExempt(true) .taxProvider( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceCreateParamsTest.kt index 37a7560f..87f47af3 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceCreateParamsTest.kt @@ -119,7 +119,7 @@ class InvoiceCreateParamsTest { assertThat(body.customerId()).contains("4khy3nwzktxv7") assertThat(body.discount()) .contains( - Discount.ofPercentageDiscount( + Discount.ofPercentage( PercentageDiscount.builder() .addAppliesToPriceId("h74gfhdjvn7ujokd") .addAppliesToPriceId("7hfgtgjnbvc3ujkl") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponseTest.kt index 491fccf8..666acb5c 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponseTest.kt @@ -397,7 +397,7 @@ class InvoiceFetchUpcomingResponseTest { .isEqualTo(JsonValue.from(mapOf())) assertThat(invoiceFetchUpcomingResponse.discounts()) .containsExactly( - InvoiceLevelDiscount.ofPercentageDiscount( + InvoiceLevelDiscount.ofPercentage( PercentageDiscount.builder() .addAppliesToPriceId("h74gfhdjvn7ujokd") .addAppliesToPriceId("7hfgtgjnbvc3ujkl") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponseTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponseTest.kt index c829c672..5ae2bccc 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponseTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponseTest.kt @@ -150,7 +150,7 @@ class InvoiceLineItemCreateResponseTest { assertThat(invoiceLineItemCreateResponse.amount()).isEqualTo("7.00") assertThat(invoiceLineItemCreateResponse.discount()) .contains( - Discount.ofPercentageDiscount( + Discount.ofPercentage( PercentageDiscount.builder() .addAppliesToPriceId("h74gfhdjvn7ujokd") .addAppliesToPriceId("7hfgtgjnbvc3ujkl") @@ -182,7 +182,7 @@ class InvoiceLineItemCreateResponseTest { assertThat(invoiceLineItemCreateResponse.name()).isEqualTo("Fixed Fee") assertThat(invoiceLineItemCreateResponse.price()) .contains( - Price.ofUnitPrice( + Price.ofUnit( Price.UnitPrice.builder() .id("id") .billableMetric(Price.UnitPrice.BillableMetric.builder().id("id").build()) @@ -258,7 +258,7 @@ class InvoiceLineItemCreateResponseTest { .isEqualTo(OffsetDateTime.parse("2022-02-01T08:00:00+00:00")) assertThat(invoiceLineItemCreateResponse.subLineItems()) .containsExactly( - InvoiceLineItemCreateResponse.SubLineItem.ofMatrixSubLineItem( + InvoiceLineItemCreateResponse.SubLineItem.ofMatrix( InvoiceLineItemCreateResponse.SubLineItem.MatrixSubLineItem.builder() .amount("9.00") .grouping( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceTest.kt index 1c4fb4fd..4819c450 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceTest.kt @@ -64,7 +64,7 @@ class InvoiceTest { .description("An optional description") .endingBalance("22.00") .invoice( - Invoice.CustomerBalanceTransaction.Invoice.builder() + Invoice.CustomerBalanceTransaction.InnerInvoice.builder() .id("gXcsPTVyC4YZa3Sc") .build() ) @@ -346,7 +346,7 @@ class InvoiceTest { .description("An optional description") .endingBalance("22.00") .invoice( - Invoice.CustomerBalanceTransaction.Invoice.builder() + Invoice.CustomerBalanceTransaction.InnerInvoice.builder() .id("gXcsPTVyC4YZa3Sc") .build() ) @@ -365,7 +365,7 @@ class InvoiceTest { assertThat(invoice._discount()).isEqualTo(JsonValue.from(mapOf())) assertThat(invoice.discounts()) .containsExactly( - InvoiceLevelDiscount.ofPercentageDiscount( + InvoiceLevelDiscount.ofPercentage( PercentageDiscount.builder() .addAppliesToPriceId("h74gfhdjvn7ujokd") .addAppliesToPriceId("7hfgtgjnbvc3ujkl") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanCreateParamsTest.kt index 551c86f3..828216fb 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanCreateParamsTest.kt @@ -143,7 +143,7 @@ class PlanCreateParamsTest { assertThat(body.prices()) .isEqualTo( listOf( - PlanCreateParams.Price.ofNewPlanUnitPrice( + PlanCreateParams.Price.ofNewPlanUnit( PlanCreateParams.Price.NewPlanUnitPrice.builder() .cadence(PlanCreateParams.Price.NewPlanUnitPrice.Cadence.ANNUAL) .itemId("item_id") @@ -233,7 +233,7 @@ class PlanCreateParamsTest { assertThat(body.prices()) .isEqualTo( listOf( - PlanCreateParams.Price.ofNewPlanUnitPrice( + PlanCreateParams.Price.ofNewPlanUnit( PlanCreateParams.Price.NewPlanUnitPrice.builder() .cadence(PlanCreateParams.Price.NewPlanUnitPrice.Cadence.ANNUAL) .itemId("item_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanTest.kt index 89492a63..088a971d 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanTest.kt @@ -194,7 +194,7 @@ class PlanTest { assertThat(plan.id()).isEqualTo("id") assertThat(plan.adjustments()) .containsExactly( - Plan.Adjustment.ofAmountDiscountAdjustment( + Plan.Adjustment.ofAmountDiscount( Plan.Adjustment.AmountDiscountAdjustment.builder() .id("id") .adjustmentType( @@ -223,7 +223,7 @@ class PlanTest { assertThat(plan.description()).isEqualTo("description") assertThat(plan.discount()) .contains( - Discount.ofPercentageDiscount( + Discount.ofPercentage( PercentageDiscount.builder() .addAppliesToPriceId("h74gfhdjvn7ujokd") .addAppliesToPriceId("7hfgtgjnbvc3ujkl") @@ -295,7 +295,7 @@ class PlanTest { ) assertThat(plan.prices()) .containsExactly( - Price.ofUnitPrice( + Price.ofUnit( Price.UnitPrice.builder() .id("id") .billableMetric(Price.UnitPrice.BillableMetric.builder().id("id").build()) 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 33943517..4e88c671 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 @@ -591,7 +591,7 @@ class SubscriptionCancelResponseTest { assertThat(subscriptionCancelResponse.defaultInvoiceMemo()).contains("default_invoice_memo") assertThat(subscriptionCancelResponse.discountIntervals()) .containsExactly( - SubscriptionCancelResponse.DiscountInterval.ofAmountDiscountInterval( + SubscriptionCancelResponse.DiscountInterval.ofAmount( SubscriptionCancelResponse.DiscountInterval.AmountDiscountInterval.builder() .amountDiscount("amount_discount") .addAppliesToPriceId("string") 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 cc91310e..a190b163 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 @@ -591,7 +591,7 @@ class SubscriptionCreateResponseTest { assertThat(subscriptionCreateResponse.defaultInvoiceMemo()).contains("default_invoice_memo") assertThat(subscriptionCreateResponse.discountIntervals()) .containsExactly( - SubscriptionCreateResponse.DiscountInterval.ofAmountDiscountInterval( + SubscriptionCreateResponse.DiscountInterval.ofAmount( SubscriptionCreateResponse.DiscountInterval.AmountDiscountInterval.builder() .amountDiscount("amount_discount") .addAppliesToPriceId("string") 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 8ae1b012..f8294462 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 @@ -595,7 +595,7 @@ class SubscriptionPriceIntervalsResponseTest { .contains("default_invoice_memo") assertThat(subscriptionPriceIntervalsResponse.discountIntervals()) .containsExactly( - SubscriptionPriceIntervalsResponse.DiscountInterval.ofAmountDiscountInterval( + SubscriptionPriceIntervalsResponse.DiscountInterval.ofAmount( SubscriptionPriceIntervalsResponse.DiscountInterval.AmountDiscountInterval .builder() .amountDiscount("amount_discount") 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 4a05b2ac..b90ea49a 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 @@ -596,7 +596,7 @@ class SubscriptionSchedulePlanChangeResponseTest { .contains("default_invoice_memo") assertThat(subscriptionSchedulePlanChangeResponse.discountIntervals()) .containsExactly( - SubscriptionSchedulePlanChangeResponse.DiscountInterval.ofAmountDiscountInterval( + SubscriptionSchedulePlanChangeResponse.DiscountInterval.ofAmount( SubscriptionSchedulePlanChangeResponse.DiscountInterval.AmountDiscountInterval .builder() .amountDiscount("amount_discount") 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 baeef5b0..16ef7d4e 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 @@ -585,7 +585,7 @@ class SubscriptionTest { assertThat(subscription.defaultInvoiceMemo()).contains("default_invoice_memo") assertThat(subscription.discountIntervals()) .containsExactly( - Subscription.DiscountInterval.ofAmountDiscountInterval( + Subscription.DiscountInterval.ofAmount( Subscription.DiscountInterval.AmountDiscountInterval.builder() .amountDiscount("amount_discount") .addAppliesToPriceId("string") 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 74b77abf..0b2570c6 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 @@ -594,7 +594,7 @@ class SubscriptionTriggerPhaseResponseTest { .contains("default_invoice_memo") assertThat(subscriptionTriggerPhaseResponse.discountIntervals()) .containsExactly( - SubscriptionTriggerPhaseResponse.DiscountInterval.ofAmountDiscountInterval( + SubscriptionTriggerPhaseResponse.DiscountInterval.ofAmount( SubscriptionTriggerPhaseResponse.DiscountInterval.AmountDiscountInterval .builder() .amountDiscount("amount_discount") 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 1fd5ecae..9bf1dfad 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 @@ -599,24 +599,23 @@ class SubscriptionUnscheduleCancellationResponseTest { .contains("default_invoice_memo") assertThat(subscriptionUnscheduleCancellationResponse.discountIntervals()) .containsExactly( - SubscriptionUnscheduleCancellationResponse.DiscountInterval - .ofAmountDiscountInterval( - SubscriptionUnscheduleCancellationResponse.DiscountInterval - .AmountDiscountInterval - .builder() - .amountDiscount("amount_discount") - .addAppliesToPriceId("string") - .addAppliesToPriceIntervalId("string") - .discountType( - SubscriptionUnscheduleCancellationResponse.DiscountInterval - .AmountDiscountInterval - .DiscountType - .AMOUNT - ) - .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) + SubscriptionUnscheduleCancellationResponse.DiscountInterval.ofAmount( + SubscriptionUnscheduleCancellationResponse.DiscountInterval + .AmountDiscountInterval + .builder() + .amountDiscount("amount_discount") + .addAppliesToPriceId("string") + .addAppliesToPriceIntervalId("string") + .discountType( + SubscriptionUnscheduleCancellationResponse.DiscountInterval + .AmountDiscountInterval + .DiscountType + .AMOUNT + ) + .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) ) assertThat(subscriptionUnscheduleCancellationResponse.endDate()) .contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) 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 8fbe9c8f..5f74f994 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 @@ -619,25 +619,23 @@ class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponseTest { .contains("default_invoice_memo") assertThat(subscriptionUnscheduleFixedFeeQuantityUpdatesResponse.discountIntervals()) .containsExactly( - SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.DiscountInterval - .ofAmountDiscountInterval( - SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.DiscountInterval - .AmountDiscountInterval - .builder() - .amountDiscount("amount_discount") - .addAppliesToPriceId("string") - .addAppliesToPriceIntervalId("string") - .discountType( - SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse - .DiscountInterval - .AmountDiscountInterval - .DiscountType - .AMOUNT - ) - .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) + SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.DiscountInterval.ofAmount( + SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.DiscountInterval + .AmountDiscountInterval + .builder() + .amountDiscount("amount_discount") + .addAppliesToPriceId("string") + .addAppliesToPriceIntervalId("string") + .discountType( + SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.DiscountInterval + .AmountDiscountInterval + .DiscountType + .AMOUNT + ) + .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) ) assertThat(subscriptionUnscheduleFixedFeeQuantityUpdatesResponse.endDate()) .contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) 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 f4b82639..08bcf5a3 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 @@ -607,24 +607,23 @@ class SubscriptionUnschedulePendingPlanChangesResponseTest { .contains("default_invoice_memo") assertThat(subscriptionUnschedulePendingPlanChangesResponse.discountIntervals()) .containsExactly( - SubscriptionUnschedulePendingPlanChangesResponse.DiscountInterval - .ofAmountDiscountInterval( - SubscriptionUnschedulePendingPlanChangesResponse.DiscountInterval - .AmountDiscountInterval - .builder() - .amountDiscount("amount_discount") - .addAppliesToPriceId("string") - .addAppliesToPriceIntervalId("string") - .discountType( - SubscriptionUnschedulePendingPlanChangesResponse.DiscountInterval - .AmountDiscountInterval - .DiscountType - .AMOUNT - ) - .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) + SubscriptionUnschedulePendingPlanChangesResponse.DiscountInterval.ofAmount( + SubscriptionUnschedulePendingPlanChangesResponse.DiscountInterval + .AmountDiscountInterval + .builder() + .amountDiscount("amount_discount") + .addAppliesToPriceId("string") + .addAppliesToPriceIntervalId("string") + .discountType( + SubscriptionUnschedulePendingPlanChangesResponse.DiscountInterval + .AmountDiscountInterval + .DiscountType + .AMOUNT + ) + .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) ) assertThat(subscriptionUnschedulePendingPlanChangesResponse.endDate()) .contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) 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 4676bfae..0d3232af 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 @@ -599,24 +599,23 @@ class SubscriptionUpdateFixedFeeQuantityResponseTest { .contains("default_invoice_memo") assertThat(subscriptionUpdateFixedFeeQuantityResponse.discountIntervals()) .containsExactly( - SubscriptionUpdateFixedFeeQuantityResponse.DiscountInterval - .ofAmountDiscountInterval( - SubscriptionUpdateFixedFeeQuantityResponse.DiscountInterval - .AmountDiscountInterval - .builder() - .amountDiscount("amount_discount") - .addAppliesToPriceId("string") - .addAppliesToPriceIntervalId("string") - .discountType( - SubscriptionUpdateFixedFeeQuantityResponse.DiscountInterval - .AmountDiscountInterval - .DiscountType - .AMOUNT - ) - .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) + SubscriptionUpdateFixedFeeQuantityResponse.DiscountInterval.ofAmount( + SubscriptionUpdateFixedFeeQuantityResponse.DiscountInterval + .AmountDiscountInterval + .builder() + .amountDiscount("amount_discount") + .addAppliesToPriceId("string") + .addAppliesToPriceIntervalId("string") + .discountType( + SubscriptionUpdateFixedFeeQuantityResponse.DiscountInterval + .AmountDiscountInterval + .DiscountType + .AMOUNT + ) + .endDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .startDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) ) assertThat(subscriptionUpdateFixedFeeQuantityResponse.endDate()) .contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) 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 3eff6e4e..72b3ee81 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 @@ -593,7 +593,7 @@ class SubscriptionUpdateTrialResponseTest { .contains("default_invoice_memo") assertThat(subscriptionUpdateTrialResponse.discountIntervals()) .containsExactly( - SubscriptionUpdateTrialResponse.DiscountInterval.ofAmountDiscountInterval( + SubscriptionUpdateTrialResponse.DiscountInterval.ofAmount( SubscriptionUpdateTrialResponse.DiscountInterval.AmountDiscountInterval .builder() .amountDiscount("amount_discount")