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 @@
-[](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.25.0)
+[](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