diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 045a06e9d..7951156ff 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.340.0"
+ ".": "0.341.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 7badc572d..bfdb060b4 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 214
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-911c3719c8d84e1119e71e0cf93ae1f2c52f42529e56671731f07273feb5ac88.yml
-openapi_spec_hash: 462c4c10440c2f87e0624d8c25a89b75
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fed69da53ddecc70b62e9a7331c3b561ef0a14c385d4ac5a03d74177c2ea21cd.yml
+openapi_spec_hash: 0a90c512d3fd1348b78af6f98435c31a
config_hash: a143293c5450ae8f52acad08f3102575
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8b3afd1cd..68cb97fc9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.341.0 (2025-09-26)
+
+Full Changelog: [v0.340.0...v0.341.0](https://github.com/Increase/increase-java/compare/v0.340.0...v0.341.0)
+
+### Features
+
+* **api:** api update ([0c7fc19](https://github.com/Increase/increase-java/commit/0c7fc191283b0046bef4d67f200dae86dc221665))
+
## 0.340.0 (2025-09-26)
Full Changelog: [v0.339.0...v0.340.0](https://github.com/Increase/increase-java/compare/v0.339.0...v0.340.0)
diff --git a/README.md b/README.md
index 95fcac810..cb3b91e7a 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.340.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.340.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.341.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.341.0)
@@ -13,7 +13,7 @@ The Increase Java SDK is similar to the Increase Kotlin SDK but with minor diffe
-The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.340.0).
+The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.341.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d
### Gradle
```kotlin
-implementation("com.increase.api:increase-java:0.340.0")
+implementation("com.increase.api:increase-java:0.341.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.340.0")
com.increase.api
increase-java
- 0.340.0
+ 0.341.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 6c0252329..ffa596231 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.340.0" // x-release-please-version
+ version = "0.341.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileCreateParams.kt
index ac0ede321..e32f9bc73 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileCreateParams.kt
@@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
-import com.increase.api.core.Enum
import com.increase.api.core.ExcludeMissing
import com.increase.api.core.JsonField
import com.increase.api.core.JsonMissing
@@ -69,40 +68,6 @@ private constructor(
*/
fun programId(): String = body.programId()
- /**
- * The color of the text on the back of the card. Defaults to "black".
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun backColor(): Optional = body.backColor()
-
- /**
- * A reference ID provided by the fulfillment provider for the card stock used. Only used if
- * you've ordered card stock separately.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun cardStockReference(): Optional = body.cardStockReference()
-
- /**
- * A reference ID provided by the fulfillment provider for the carrier stock used. Only used if
- * you've ordered carrier stock separately.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun carrierStockReference(): Optional = body.carrierStockReference()
-
- /**
- * The color of the design on the front of the card. Defaults to "black".
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun frontColor(): Optional = body.frontColor()
-
/**
* Text printed on the front of the card. Reach out to
* [support@increase.com](mailto:support@increase.com) for more information.
@@ -149,36 +114,6 @@ private constructor(
*/
fun _programId(): JsonField = body._programId()
- /**
- * Returns the raw JSON value of [backColor].
- *
- * Unlike [backColor], this method doesn't throw if the JSON field has an unexpected type.
- */
- fun _backColor(): JsonField = body._backColor()
-
- /**
- * Returns the raw JSON value of [cardStockReference].
- *
- * Unlike [cardStockReference], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- fun _cardStockReference(): JsonField = body._cardStockReference()
-
- /**
- * Returns the raw JSON value of [carrierStockReference].
- *
- * Unlike [carrierStockReference], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- fun _carrierStockReference(): JsonField = body._carrierStockReference()
-
- /**
- * Returns the raw JSON value of [frontColor].
- *
- * Unlike [frontColor], this method doesn't throw if the JSON field has an unexpected type.
- */
- fun _frontColor(): JsonField = body._frontColor()
-
/**
* Returns the raw JSON value of [frontText].
*
@@ -314,68 +249,6 @@ private constructor(
*/
fun programId(programId: JsonField) = apply { body.programId(programId) }
- /** The color of the text on the back of the card. Defaults to "black". */
- fun backColor(backColor: BackColor) = apply { body.backColor(backColor) }
-
- /**
- * Sets [Builder.backColor] to an arbitrary JSON value.
- *
- * You should usually call [Builder.backColor] with a well-typed [BackColor] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun backColor(backColor: JsonField) = apply { body.backColor(backColor) }
-
- /**
- * A reference ID provided by the fulfillment provider for the card stock used. Only used if
- * you've ordered card stock separately.
- */
- fun cardStockReference(cardStockReference: String) = apply {
- body.cardStockReference(cardStockReference)
- }
-
- /**
- * Sets [Builder.cardStockReference] to an arbitrary JSON value.
- *
- * You should usually call [Builder.cardStockReference] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun cardStockReference(cardStockReference: JsonField) = apply {
- body.cardStockReference(cardStockReference)
- }
-
- /**
- * A reference ID provided by the fulfillment provider for the carrier stock used. Only used
- * if you've ordered carrier stock separately.
- */
- fun carrierStockReference(carrierStockReference: String) = apply {
- body.carrierStockReference(carrierStockReference)
- }
-
- /**
- * Sets [Builder.carrierStockReference] to an arbitrary JSON value.
- *
- * You should usually call [Builder.carrierStockReference] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun carrierStockReference(carrierStockReference: JsonField) = apply {
- body.carrierStockReference(carrierStockReference)
- }
-
- /** The color of the design on the front of the card. Defaults to "black". */
- fun frontColor(frontColor: FrontColor) = apply { body.frontColor(frontColor) }
-
- /**
- * Sets [Builder.frontColor] to an arbitrary JSON value.
- *
- * You should usually call [Builder.frontColor] with a well-typed [FrontColor] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun frontColor(frontColor: JsonField) = apply { body.frontColor(frontColor) }
-
/**
* Text printed on the front of the card. Reach out to
* [support@increase.com](mailto:support@increase.com) for more information.
@@ -546,10 +419,6 @@ private constructor(
private val description: JsonField,
private val frontImageFileId: JsonField,
private val programId: JsonField,
- private val backColor: JsonField,
- private val cardStockReference: JsonField,
- private val carrierStockReference: JsonField,
- private val frontColor: JsonField,
private val frontText: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -571,18 +440,6 @@ private constructor(
@JsonProperty("program_id")
@ExcludeMissing
programId: JsonField = JsonMissing.of(),
- @JsonProperty("back_color")
- @ExcludeMissing
- backColor: JsonField = JsonMissing.of(),
- @JsonProperty("card_stock_reference")
- @ExcludeMissing
- cardStockReference: JsonField = JsonMissing.of(),
- @JsonProperty("carrier_stock_reference")
- @ExcludeMissing
- carrierStockReference: JsonField = JsonMissing.of(),
- @JsonProperty("front_color")
- @ExcludeMissing
- frontColor: JsonField = JsonMissing.of(),
@JsonProperty("front_text")
@ExcludeMissing
frontText: JsonField = JsonMissing.of(),
@@ -592,10 +449,6 @@ private constructor(
description,
frontImageFileId,
programId,
- backColor,
- cardStockReference,
- carrierStockReference,
- frontColor,
frontText,
mutableMapOf(),
)
@@ -640,42 +493,6 @@ private constructor(
*/
fun programId(): String = programId.getRequired("program_id")
- /**
- * The color of the text on the back of the card. Defaults to "black".
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun backColor(): Optional = backColor.getOptional("back_color")
-
- /**
- * A reference ID provided by the fulfillment provider for the card stock used. Only used if
- * you've ordered card stock separately.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun cardStockReference(): Optional =
- cardStockReference.getOptional("card_stock_reference")
-
- /**
- * A reference ID provided by the fulfillment provider for the carrier stock used. Only used
- * if you've ordered carrier stock separately.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun carrierStockReference(): Optional =
- carrierStockReference.getOptional("carrier_stock_reference")
-
- /**
- * The color of the design on the front of the card. Defaults to "black".
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun frontColor(): Optional = frontColor.getOptional("front_color")
-
/**
* Text printed on the front of the card. Reach out to
* [support@increase.com](mailto:support@increase.com) for more information.
@@ -731,44 +548,6 @@ private constructor(
*/
@JsonProperty("program_id") @ExcludeMissing fun _programId(): JsonField = programId
- /**
- * Returns the raw JSON value of [backColor].
- *
- * Unlike [backColor], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("back_color")
- @ExcludeMissing
- fun _backColor(): JsonField = backColor
-
- /**
- * Returns the raw JSON value of [cardStockReference].
- *
- * Unlike [cardStockReference], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @JsonProperty("card_stock_reference")
- @ExcludeMissing
- fun _cardStockReference(): JsonField = cardStockReference
-
- /**
- * Returns the raw JSON value of [carrierStockReference].
- *
- * Unlike [carrierStockReference], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @JsonProperty("carrier_stock_reference")
- @ExcludeMissing
- fun _carrierStockReference(): JsonField = carrierStockReference
-
- /**
- * Returns the raw JSON value of [frontColor].
- *
- * Unlike [frontColor], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("front_color")
- @ExcludeMissing
- fun _frontColor(): JsonField = frontColor
-
/**
* Returns the raw JSON value of [frontText].
*
@@ -815,10 +594,6 @@ private constructor(
private var description: JsonField? = null
private var frontImageFileId: JsonField? = null
private var programId: JsonField? = null
- private var backColor: JsonField = JsonMissing.of()
- private var cardStockReference: JsonField = JsonMissing.of()
- private var carrierStockReference: JsonField = JsonMissing.of()
- private var frontColor: JsonField = JsonMissing.of()
private var frontText: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@@ -829,10 +604,6 @@ private constructor(
description = body.description
frontImageFileId = body.frontImageFileId
programId = body.programId
- backColor = body.backColor
- cardStockReference = body.cardStockReference
- carrierStockReference = body.carrierStockReference
- frontColor = body.frontColor
frontText = body.frontText
additionalProperties = body.additionalProperties.toMutableMap()
}
@@ -907,68 +678,6 @@ private constructor(
*/
fun programId(programId: JsonField) = apply { this.programId = programId }
- /** The color of the text on the back of the card. Defaults to "black". */
- fun backColor(backColor: BackColor) = backColor(JsonField.of(backColor))
-
- /**
- * Sets [Builder.backColor] to an arbitrary JSON value.
- *
- * You should usually call [Builder.backColor] with a well-typed [BackColor] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun backColor(backColor: JsonField) = apply { this.backColor = backColor }
-
- /**
- * A reference ID provided by the fulfillment provider for the card stock used. Only
- * used if you've ordered card stock separately.
- */
- fun cardStockReference(cardStockReference: String) =
- cardStockReference(JsonField.of(cardStockReference))
-
- /**
- * Sets [Builder.cardStockReference] to an arbitrary JSON value.
- *
- * You should usually call [Builder.cardStockReference] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun cardStockReference(cardStockReference: JsonField) = apply {
- this.cardStockReference = cardStockReference
- }
-
- /**
- * A reference ID provided by the fulfillment provider for the carrier stock used. Only
- * used if you've ordered carrier stock separately.
- */
- fun carrierStockReference(carrierStockReference: String) =
- carrierStockReference(JsonField.of(carrierStockReference))
-
- /**
- * Sets [Builder.carrierStockReference] to an arbitrary JSON value.
- *
- * You should usually call [Builder.carrierStockReference] with a well-typed [String]
- * value instead. This method is primarily for setting the field to an undocumented or
- * not yet supported value.
- */
- fun carrierStockReference(carrierStockReference: JsonField) = apply {
- this.carrierStockReference = carrierStockReference
- }
-
- /** The color of the design on the front of the card. Defaults to "black". */
- fun frontColor(frontColor: FrontColor) = frontColor(JsonField.of(frontColor))
-
- /**
- * Sets [Builder.frontColor] to an arbitrary JSON value.
- *
- * You should usually call [Builder.frontColor] with a well-typed [FrontColor] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun frontColor(frontColor: JsonField) = apply {
- this.frontColor = frontColor
- }
-
/**
* Text printed on the front of the card. Reach out to
* [support@increase.com](mailto:support@increase.com) for more information.
@@ -1026,10 +735,6 @@ private constructor(
checkRequired("description", description),
checkRequired("frontImageFileId", frontImageFileId),
checkRequired("programId", programId),
- backColor,
- cardStockReference,
- carrierStockReference,
- frontColor,
frontText,
additionalProperties.toMutableMap(),
)
@@ -1047,10 +752,6 @@ private constructor(
description()
frontImageFileId()
programId()
- backColor().ifPresent { it.validate() }
- cardStockReference()
- carrierStockReference()
- frontColor().ifPresent { it.validate() }
frontText().ifPresent { it.validate() }
validated = true
}
@@ -1076,10 +777,6 @@ private constructor(
(if (description.asKnown().isPresent) 1 else 0) +
(if (frontImageFileId.asKnown().isPresent) 1 else 0) +
(if (programId.asKnown().isPresent) 1 else 0) +
- (backColor.asKnown().getOrNull()?.validity() ?: 0) +
- (if (cardStockReference.asKnown().isPresent) 1 else 0) +
- (if (carrierStockReference.asKnown().isPresent) 1 else 0) +
- (frontColor.asKnown().getOrNull()?.validity() ?: 0) +
(frontText.asKnown().getOrNull()?.validity() ?: 0)
override fun equals(other: Any?): Boolean {
@@ -1093,10 +790,6 @@ private constructor(
description == other.description &&
frontImageFileId == other.frontImageFileId &&
programId == other.programId &&
- backColor == other.backColor &&
- cardStockReference == other.cardStockReference &&
- carrierStockReference == other.carrierStockReference &&
- frontColor == other.frontColor &&
frontText == other.frontText &&
additionalProperties == other.additionalProperties
}
@@ -1108,10 +801,6 @@ private constructor(
description,
frontImageFileId,
programId,
- backColor,
- cardStockReference,
- carrierStockReference,
- frontColor,
frontText,
additionalProperties,
)
@@ -1120,279 +809,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{carrierImageFileId=$carrierImageFileId, contactPhone=$contactPhone, description=$description, frontImageFileId=$frontImageFileId, programId=$programId, backColor=$backColor, cardStockReference=$cardStockReference, carrierStockReference=$carrierStockReference, frontColor=$frontColor, frontText=$frontText, additionalProperties=$additionalProperties}"
- }
-
- /** The color of the text on the back of the card. Defaults to "black". */
- class BackColor @JsonCreator private constructor(private val value: JsonField) : Enum {
-
- /**
- * Returns this class instance's raw value.
- *
- * This is usually only useful if this instance was deserialized from data that doesn't
- * match any known member, and you want to know that value. For example, if the SDK is on an
- * older version than the API, then the API may respond with new members that the SDK is
- * unaware of.
- */
- @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
-
- companion object {
-
- /** Black personalization color. */
- @JvmField val BLACK = of("black")
-
- /** White personalization color. */
- @JvmField val WHITE = of("white")
-
- @JvmStatic fun of(value: String) = BackColor(JsonField.of(value))
- }
-
- /** An enum containing [BackColor]'s known values. */
- enum class Known {
- /** Black personalization color. */
- BLACK,
- /** White personalization color. */
- WHITE,
- }
-
- /**
- * An enum containing [BackColor]'s known values, as well as an [_UNKNOWN] member.
- *
- * An instance of [BackColor] can contain an unknown value in a couple of cases:
- * - It was deserialized from data that doesn't match any known member. For example, if the
- * SDK is on an older version than the API, then the API may respond with new members that
- * the SDK is unaware of.
- * - It was constructed with an arbitrary value using the [of] method.
- */
- enum class Value {
- /** Black personalization color. */
- BLACK,
- /** White personalization color. */
- WHITE,
- /**
- * An enum member indicating that [BackColor] was instantiated with an unknown value.
- */
- _UNKNOWN,
- }
-
- /**
- * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
- * if the class was instantiated with an unknown value.
- *
- * Use the [known] method instead if you're certain the value is always known or if you want
- * to throw for the unknown case.
- */
- fun value(): Value =
- when (this) {
- BLACK -> Value.BLACK
- WHITE -> Value.WHITE
- else -> Value._UNKNOWN
- }
-
- /**
- * Returns an enum member corresponding to this class instance's value.
- *
- * Use the [value] method instead if you're uncertain the value is always known and don't
- * want to throw for the unknown case.
- *
- * @throws IncreaseInvalidDataException if this class instance's value is a not a known
- * member.
- */
- fun known(): Known =
- when (this) {
- BLACK -> Known.BLACK
- WHITE -> Known.WHITE
- else -> throw IncreaseInvalidDataException("Unknown BackColor: $value")
- }
-
- /**
- * Returns this class instance's primitive wire representation.
- *
- * This differs from the [toString] method because that method is primarily for debugging
- * and generally doesn't throw.
- *
- * @throws IncreaseInvalidDataException if this class instance's value does not have the
- * expected primitive type.
- */
- fun asString(): String =
- _value().asString().orElseThrow {
- IncreaseInvalidDataException("Value is not a String")
- }
-
- private var validated: Boolean = false
-
- fun validate(): BackColor = apply {
- if (validated) {
- return@apply
- }
-
- known()
- validated = true
- }
-
- fun isValid(): Boolean =
- try {
- validate()
- true
- } catch (e: IncreaseInvalidDataException) {
- false
- }
-
- /**
- * Returns a score indicating how many valid values are contained in this object
- * recursively.
- *
- * Used for best match union deserialization.
- */
- @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is BackColor && value == other.value
- }
-
- override fun hashCode() = value.hashCode()
-
- override fun toString() = value.toString()
- }
-
- /** The color of the design on the front of the card. Defaults to "black". */
- class FrontColor @JsonCreator private constructor(private val value: JsonField) : Enum {
-
- /**
- * Returns this class instance's raw value.
- *
- * This is usually only useful if this instance was deserialized from data that doesn't
- * match any known member, and you want to know that value. For example, if the SDK is on an
- * older version than the API, then the API may respond with new members that the SDK is
- * unaware of.
- */
- @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
-
- companion object {
-
- /** Black personalization color. */
- @JvmField val BLACK = of("black")
-
- /** White personalization color. */
- @JvmField val WHITE = of("white")
-
- @JvmStatic fun of(value: String) = FrontColor(JsonField.of(value))
- }
-
- /** An enum containing [FrontColor]'s known values. */
- enum class Known {
- /** Black personalization color. */
- BLACK,
- /** White personalization color. */
- WHITE,
- }
-
- /**
- * An enum containing [FrontColor]'s known values, as well as an [_UNKNOWN] member.
- *
- * An instance of [FrontColor] can contain an unknown value in a couple of cases:
- * - It was deserialized from data that doesn't match any known member. For example, if the
- * SDK is on an older version than the API, then the API may respond with new members that
- * the SDK is unaware of.
- * - It was constructed with an arbitrary value using the [of] method.
- */
- enum class Value {
- /** Black personalization color. */
- BLACK,
- /** White personalization color. */
- WHITE,
- /**
- * An enum member indicating that [FrontColor] was instantiated with an unknown value.
- */
- _UNKNOWN,
- }
-
- /**
- * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
- * if the class was instantiated with an unknown value.
- *
- * Use the [known] method instead if you're certain the value is always known or if you want
- * to throw for the unknown case.
- */
- fun value(): Value =
- when (this) {
- BLACK -> Value.BLACK
- WHITE -> Value.WHITE
- else -> Value._UNKNOWN
- }
-
- /**
- * Returns an enum member corresponding to this class instance's value.
- *
- * Use the [value] method instead if you're uncertain the value is always known and don't
- * want to throw for the unknown case.
- *
- * @throws IncreaseInvalidDataException if this class instance's value is a not a known
- * member.
- */
- fun known(): Known =
- when (this) {
- BLACK -> Known.BLACK
- WHITE -> Known.WHITE
- else -> throw IncreaseInvalidDataException("Unknown FrontColor: $value")
- }
-
- /**
- * Returns this class instance's primitive wire representation.
- *
- * This differs from the [toString] method because that method is primarily for debugging
- * and generally doesn't throw.
- *
- * @throws IncreaseInvalidDataException if this class instance's value does not have the
- * expected primitive type.
- */
- fun asString(): String =
- _value().asString().orElseThrow {
- IncreaseInvalidDataException("Value is not a String")
- }
-
- private var validated: Boolean = false
-
- fun validate(): FrontColor = apply {
- if (validated) {
- return@apply
- }
-
- known()
- validated = true
- }
-
- fun isValid(): Boolean =
- try {
- validate()
- true
- } catch (e: IncreaseInvalidDataException) {
- false
- }
-
- /**
- * Returns a score indicating how many valid values are contained in this object
- * recursively.
- *
- * Used for best match union deserialization.
- */
- @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is FrontColor && value == other.value
- }
-
- override fun hashCode() = value.hashCode()
-
- override fun toString() = value.toString()
+ "Body{carrierImageFileId=$carrierImageFileId, contactPhone=$contactPhone, description=$description, frontImageFileId=$frontImageFileId, programId=$programId, frontText=$frontText, additionalProperties=$additionalProperties}"
}
/**
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileCreateParamsTest.kt
index 0f81afc9e..b758a5dbc 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileCreateParamsTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileCreateParamsTest.kt
@@ -15,10 +15,6 @@ internal class PhysicalCardProfileCreateParamsTest {
.description("My Card Profile")
.frontImageFileId("file_o6aex13wm1jcc36sgcj1")
.programId("program_i2v2os4mwza1oetokh9i")
- .backColor(PhysicalCardProfileCreateParams.BackColor.BLACK)
- .cardStockReference("x")
- .carrierStockReference("x")
- .frontColor(PhysicalCardProfileCreateParams.FrontColor.BLACK)
.frontText(
PhysicalCardProfileCreateParams.FrontText.builder().line1("x").line2("x").build()
)
@@ -34,10 +30,6 @@ internal class PhysicalCardProfileCreateParamsTest {
.description("My Card Profile")
.frontImageFileId("file_o6aex13wm1jcc36sgcj1")
.programId("program_i2v2os4mwza1oetokh9i")
- .backColor(PhysicalCardProfileCreateParams.BackColor.BLACK)
- .cardStockReference("x")
- .carrierStockReference("x")
- .frontColor(PhysicalCardProfileCreateParams.FrontColor.BLACK)
.frontText(
PhysicalCardProfileCreateParams.FrontText.builder()
.line1("x")
@@ -53,10 +45,6 @@ internal class PhysicalCardProfileCreateParamsTest {
assertThat(body.description()).isEqualTo("My Card Profile")
assertThat(body.frontImageFileId()).isEqualTo("file_o6aex13wm1jcc36sgcj1")
assertThat(body.programId()).isEqualTo("program_i2v2os4mwza1oetokh9i")
- assertThat(body.backColor()).contains(PhysicalCardProfileCreateParams.BackColor.BLACK)
- assertThat(body.cardStockReference()).contains("x")
- assertThat(body.carrierStockReference()).contains("x")
- assertThat(body.frontColor()).contains(PhysicalCardProfileCreateParams.FrontColor.BLACK)
assertThat(body.frontText())
.contains(
PhysicalCardProfileCreateParams.FrontText.builder().line1("x").line2("x").build()
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncTest.kt
index 8908876f9..56233a018 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncTest.kt
@@ -29,10 +29,6 @@ internal class PhysicalCardProfileServiceAsyncTest {
.description("My Card Profile")
.frontImageFileId("file_o6aex13wm1jcc36sgcj1")
.programId("program_i2v2os4mwza1oetokh9i")
- .backColor(PhysicalCardProfileCreateParams.BackColor.BLACK)
- .cardStockReference("x")
- .carrierStockReference("x")
- .frontColor(PhysicalCardProfileCreateParams.FrontColor.BLACK)
.frontText(
PhysicalCardProfileCreateParams.FrontText.builder()
.line1("x")
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceTest.kt
index 52433f2af..318ef8435 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceTest.kt
@@ -29,10 +29,6 @@ internal class PhysicalCardProfileServiceTest {
.description("My Card Profile")
.frontImageFileId("file_o6aex13wm1jcc36sgcj1")
.programId("program_i2v2os4mwza1oetokh9i")
- .backColor(PhysicalCardProfileCreateParams.BackColor.BLACK)
- .cardStockReference("x")
- .carrierStockReference("x")
- .frontColor(PhysicalCardProfileCreateParams.FrontColor.BLACK)
.frontText(
PhysicalCardProfileCreateParams.FrontText.builder()
.line1("x")