diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index fb22e464d..1f7dbf48e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.363.0"
+ ".": "0.364.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 9a6f8ba02..973bfab07 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 229
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7a6340375b0e06648ff3e7e4b8aa1527b71df0c7a3d793738ba6fe20eef6f624.yml
-openapi_spec_hash: 3cb2076c8a4870d3b17d02780a295172
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fadbd087449a336a91be2645c64e2fe1e81e0f52d9810ab5f830af7e1c727138.yml
+openapi_spec_hash: 7e44d91e713fb44925a3565b882248d7
config_hash: ca1425272e17fa23d4466d33492334fa
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 156b8f838..33862e465 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.364.0 (2025-11-18)
+
+Full Changelog: [v0.363.0...v0.364.0](https://github.com/Increase/increase-java/compare/v0.363.0...v0.364.0)
+
+### Features
+
+* **api:** api update ([a599fef](https://github.com/Increase/increase-java/commit/a599fef94a136294594254d03fe329998fdd7257))
+
## 0.363.0 (2025-11-14)
Full Changelog: [v0.362.0...v0.363.0](https://github.com/Increase/increase-java/compare/v0.362.0...v0.363.0)
diff --git a/README.md b/README.md
index d93897e0e..33a8c8757 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.363.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.363.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.364.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.364.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.363.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.364.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.363.0")
+implementation("com.increase.api:increase-java:0.364.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.363.0")
com.increase.api
increase-java
- 0.363.0
+ 0.364.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 7cad86e06..79c56d6c8 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.363.0" // x-release-please-version
+ version = "0.364.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransfer.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransfer.kt
index ffbc11dbb..38886662f 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransfer.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransfer.kt
@@ -26,13 +26,11 @@ private constructor(
private val id: JsonField,
private val acceptance: JsonField,
private val accountId: JsonField,
- private val amount: JsonField,
private val approval: JsonField,
private val businessApplicationIdentifier: JsonField,
private val cancellation: JsonField,
private val createdAt: JsonField,
private val createdBy: JsonField,
- private val currency: JsonField,
private val decline: JsonField,
private val idempotencyKey: JsonField,
private val merchantCategoryCode: JsonField,
@@ -41,6 +39,7 @@ private constructor(
private val merchantNamePrefix: JsonField,
private val merchantPostalCode: JsonField,
private val merchantState: JsonField,
+ private val presentmentAmount: JsonField,
private val recipientName: JsonField,
private val senderAddressCity: JsonField,
private val senderAddressLine1: JsonField,
@@ -61,7 +60,6 @@ private constructor(
@ExcludeMissing
acceptance: JsonField = JsonMissing.of(),
@JsonProperty("account_id") @ExcludeMissing accountId: JsonField = JsonMissing.of(),
- @JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(),
@JsonProperty("approval") @ExcludeMissing approval: JsonField = JsonMissing.of(),
@JsonProperty("business_application_identifier")
@ExcludeMissing
@@ -75,7 +73,6 @@ private constructor(
@JsonProperty("created_by")
@ExcludeMissing
createdBy: JsonField = JsonMissing.of(),
- @JsonProperty("currency") @ExcludeMissing currency: JsonField = JsonMissing.of(),
@JsonProperty("decline") @ExcludeMissing decline: JsonField = JsonMissing.of(),
@JsonProperty("idempotency_key")
@ExcludeMissing
@@ -98,6 +95,9 @@ private constructor(
@JsonProperty("merchant_state")
@ExcludeMissing
merchantState: JsonField = JsonMissing.of(),
+ @JsonProperty("presentment_amount")
+ @ExcludeMissing
+ presentmentAmount: JsonField = JsonMissing.of(),
@JsonProperty("recipient_name")
@ExcludeMissing
recipientName: JsonField = JsonMissing.of(),
@@ -128,13 +128,11 @@ private constructor(
id,
acceptance,
accountId,
- amount,
approval,
businessApplicationIdentifier,
cancellation,
createdAt,
createdBy,
- currency,
decline,
idempotencyKey,
merchantCategoryCode,
@@ -143,6 +141,7 @@ private constructor(
merchantNamePrefix,
merchantPostalCode,
merchantState,
+ presentmentAmount,
recipientName,
senderAddressCity,
senderAddressLine1,
@@ -180,14 +179,6 @@ private constructor(
*/
fun accountId(): String = accountId.getRequired("account_id")
- /**
- * The transfer amount in USD cents.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
- */
- fun amount(): Long = amount.getRequired("amount")
-
/**
* If your account requires approvals for transfers and the transfer was approved, this will
* contain details of the approval.
@@ -234,14 +225,6 @@ private constructor(
*/
fun createdBy(): Optional = createdBy.getOptional("created_by")
- /**
- * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
- */
- fun currency(): Currency = currency.getRequired("currency")
-
/**
* If the transfer is rejected by the card network or the destination financial institution,
* this will contain supplemental details.
@@ -314,6 +297,16 @@ private constructor(
*/
fun merchantState(): String = merchantState.getRequired("merchant_state")
+ /**
+ * The amount that was transferred. The receiving bank will have converted this to the
+ * cardholder's currency. The amount that is applied to your Increase account matches the
+ * currency of your account.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun presentmentAmount(): PresentmentAmount = presentmentAmount.getRequired("presentment_amount")
+
/**
* The name of the funds recipient.
*
@@ -420,13 +413,6 @@ private constructor(
*/
@JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField = accountId
- /**
- * Returns the raw JSON value of [amount].
- *
- * Unlike [amount], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField = amount
-
/**
* Returns the raw JSON value of [approval].
*
@@ -470,13 +456,6 @@ private constructor(
*/
@JsonProperty("created_by") @ExcludeMissing fun _createdBy(): JsonField = createdBy
- /**
- * Returns the raw JSON value of [currency].
- *
- * Unlike [currency], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("currency") @ExcludeMissing fun _currency(): JsonField = currency
-
/**
* Returns the raw JSON value of [decline].
*
@@ -551,6 +530,16 @@ private constructor(
@ExcludeMissing
fun _merchantState(): JsonField = merchantState
+ /**
+ * Returns the raw JSON value of [presentmentAmount].
+ *
+ * Unlike [presentmentAmount], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("presentment_amount")
+ @ExcludeMissing
+ fun _presentmentAmount(): JsonField = presentmentAmount
+
/**
* Returns the raw JSON value of [recipientName].
*
@@ -662,13 +651,11 @@ private constructor(
* .id()
* .acceptance()
* .accountId()
- * .amount()
* .approval()
* .businessApplicationIdentifier()
* .cancellation()
* .createdAt()
* .createdBy()
- * .currency()
* .decline()
* .idempotencyKey()
* .merchantCategoryCode()
@@ -677,6 +664,7 @@ private constructor(
* .merchantNamePrefix()
* .merchantPostalCode()
* .merchantState()
+ * .presentmentAmount()
* .recipientName()
* .senderAddressCity()
* .senderAddressLine1()
@@ -698,13 +686,11 @@ private constructor(
private var id: JsonField? = null
private var acceptance: JsonField? = null
private var accountId: JsonField? = null
- private var amount: JsonField? = null
private var approval: JsonField? = null
private var businessApplicationIdentifier: JsonField? = null
private var cancellation: JsonField? = null
private var createdAt: JsonField? = null
private var createdBy: JsonField? = null
- private var currency: JsonField? = null
private var decline: JsonField? = null
private var idempotencyKey: JsonField? = null
private var merchantCategoryCode: JsonField? = null
@@ -713,6 +699,7 @@ private constructor(
private var merchantNamePrefix: JsonField? = null
private var merchantPostalCode: JsonField? = null
private var merchantState: JsonField? = null
+ private var presentmentAmount: JsonField? = null
private var recipientName: JsonField? = null
private var senderAddressCity: JsonField? = null
private var senderAddressLine1: JsonField? = null
@@ -730,13 +717,11 @@ private constructor(
id = cardPushTransfer.id
acceptance = cardPushTransfer.acceptance
accountId = cardPushTransfer.accountId
- amount = cardPushTransfer.amount
approval = cardPushTransfer.approval
businessApplicationIdentifier = cardPushTransfer.businessApplicationIdentifier
cancellation = cardPushTransfer.cancellation
createdAt = cardPushTransfer.createdAt
createdBy = cardPushTransfer.createdBy
- currency = cardPushTransfer.currency
decline = cardPushTransfer.decline
idempotencyKey = cardPushTransfer.idempotencyKey
merchantCategoryCode = cardPushTransfer.merchantCategoryCode
@@ -745,6 +730,7 @@ private constructor(
merchantNamePrefix = cardPushTransfer.merchantNamePrefix
merchantPostalCode = cardPushTransfer.merchantPostalCode
merchantState = cardPushTransfer.merchantState
+ presentmentAmount = cardPushTransfer.presentmentAmount
recipientName = cardPushTransfer.recipientName
senderAddressCity = cardPushTransfer.senderAddressCity
senderAddressLine1 = cardPushTransfer.senderAddressLine1
@@ -799,17 +785,6 @@ private constructor(
*/
fun accountId(accountId: JsonField) = apply { this.accountId = accountId }
- /** The transfer amount in USD cents. */
- fun amount(amount: Long) = amount(JsonField.of(amount))
-
- /**
- * Sets [Builder.amount] to an arbitrary JSON value.
- *
- * You should usually call [Builder.amount] with a well-typed [Long] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun amount(amount: JsonField) = apply { this.amount = amount }
-
/**
* If your account requires approvals for transfers and the transfer was approved, this will
* contain details of the approval.
@@ -900,20 +875,6 @@ private constructor(
*/
fun createdBy(createdBy: JsonField) = apply { this.createdBy = createdBy }
- /**
- * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency.
- */
- fun currency(currency: Currency) = currency(JsonField.of(currency))
-
- /**
- * Sets [Builder.currency] to an arbitrary JSON value.
- *
- * You should usually call [Builder.currency] with a well-typed [Currency] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun currency(currency: JsonField) = apply { this.currency = currency }
-
/**
* If the transfer is rejected by the card network or the destination financial institution,
* this will contain supplemental details.
@@ -1054,6 +1015,25 @@ private constructor(
this.merchantState = merchantState
}
+ /**
+ * The amount that was transferred. The receiving bank will have converted this to the
+ * cardholder's currency. The amount that is applied to your Increase account matches the
+ * currency of your account.
+ */
+ fun presentmentAmount(presentmentAmount: PresentmentAmount) =
+ presentmentAmount(JsonField.of(presentmentAmount))
+
+ /**
+ * Sets [Builder.presentmentAmount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.presentmentAmount] with a well-typed [PresentmentAmount]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun presentmentAmount(presentmentAmount: JsonField) = apply {
+ this.presentmentAmount = presentmentAmount
+ }
+
/** The name of the funds recipient. */
fun recipientName(recipientName: String) = recipientName(JsonField.of(recipientName))
@@ -1227,13 +1207,11 @@ private constructor(
* .id()
* .acceptance()
* .accountId()
- * .amount()
* .approval()
* .businessApplicationIdentifier()
* .cancellation()
* .createdAt()
* .createdBy()
- * .currency()
* .decline()
* .idempotencyKey()
* .merchantCategoryCode()
@@ -1242,6 +1220,7 @@ private constructor(
* .merchantNamePrefix()
* .merchantPostalCode()
* .merchantState()
+ * .presentmentAmount()
* .recipientName()
* .senderAddressCity()
* .senderAddressLine1()
@@ -1261,13 +1240,11 @@ private constructor(
checkRequired("id", id),
checkRequired("acceptance", acceptance),
checkRequired("accountId", accountId),
- checkRequired("amount", amount),
checkRequired("approval", approval),
checkRequired("businessApplicationIdentifier", businessApplicationIdentifier),
checkRequired("cancellation", cancellation),
checkRequired("createdAt", createdAt),
checkRequired("createdBy", createdBy),
- checkRequired("currency", currency),
checkRequired("decline", decline),
checkRequired("idempotencyKey", idempotencyKey),
checkRequired("merchantCategoryCode", merchantCategoryCode),
@@ -1276,6 +1253,7 @@ private constructor(
checkRequired("merchantNamePrefix", merchantNamePrefix),
checkRequired("merchantPostalCode", merchantPostalCode),
checkRequired("merchantState", merchantState),
+ checkRequired("presentmentAmount", presentmentAmount),
checkRequired("recipientName", recipientName),
checkRequired("senderAddressCity", senderAddressCity),
checkRequired("senderAddressLine1", senderAddressLine1),
@@ -1300,13 +1278,11 @@ private constructor(
id()
acceptance().ifPresent { it.validate() }
accountId()
- amount()
approval().ifPresent { it.validate() }
businessApplicationIdentifier().validate()
cancellation().ifPresent { it.validate() }
createdAt()
createdBy().ifPresent { it.validate() }
- currency().validate()
decline().ifPresent { it.validate() }
idempotencyKey()
merchantCategoryCode()
@@ -1315,6 +1291,7 @@ private constructor(
merchantNamePrefix()
merchantPostalCode()
merchantState()
+ presentmentAmount().validate()
recipientName()
senderAddressCity()
senderAddressLine1()
@@ -1346,13 +1323,11 @@ private constructor(
(if (id.asKnown().isPresent) 1 else 0) +
(acceptance.asKnown().getOrNull()?.validity() ?: 0) +
(if (accountId.asKnown().isPresent) 1 else 0) +
- (if (amount.asKnown().isPresent) 1 else 0) +
(approval.asKnown().getOrNull()?.validity() ?: 0) +
(businessApplicationIdentifier.asKnown().getOrNull()?.validity() ?: 0) +
(cancellation.asKnown().getOrNull()?.validity() ?: 0) +
(if (createdAt.asKnown().isPresent) 1 else 0) +
(createdBy.asKnown().getOrNull()?.validity() ?: 0) +
- (currency.asKnown().getOrNull()?.validity() ?: 0) +
(decline.asKnown().getOrNull()?.validity() ?: 0) +
(if (idempotencyKey.asKnown().isPresent) 1 else 0) +
(if (merchantCategoryCode.asKnown().isPresent) 1 else 0) +
@@ -1361,6 +1336,7 @@ private constructor(
(if (merchantNamePrefix.asKnown().isPresent) 1 else 0) +
(if (merchantPostalCode.asKnown().isPresent) 1 else 0) +
(if (merchantState.asKnown().isPresent) 1 else 0) +
+ (presentmentAmount.asKnown().getOrNull()?.validity() ?: 0) +
(if (recipientName.asKnown().isPresent) 1 else 0) +
(if (senderAddressCity.asKnown().isPresent) 1 else 0) +
(if (senderAddressLine1.asKnown().isPresent) 1 else 0) +
@@ -1382,6 +1358,7 @@ private constructor(
private val authorizationIdentificationResponse: JsonField,
private val cardVerificationValue2Result: JsonField,
private val networkTransactionIdentifier: JsonField,
+ private val settlementAmount: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -1400,11 +1377,15 @@ private constructor(
@JsonProperty("network_transaction_identifier")
@ExcludeMissing
networkTransactionIdentifier: JsonField = JsonMissing.of(),
+ @JsonProperty("settlement_amount")
+ @ExcludeMissing
+ settlementAmount: JsonField = JsonMissing.of(),
) : this(
acceptedAt,
authorizationIdentificationResponse,
cardVerificationValue2Result,
networkTransactionIdentifier,
+ settlementAmount,
mutableMapOf(),
)
@@ -1444,6 +1425,14 @@ private constructor(
fun networkTransactionIdentifier(): Optional =
networkTransactionIdentifier.getOptional("network_transaction_identifier")
+ /**
+ * The transfer amount in USD cents.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun settlementAmount(): Long = settlementAmount.getRequired("settlement_amount")
+
/**
* Returns the raw JSON value of [acceptedAt].
*
@@ -1485,6 +1474,16 @@ private constructor(
@ExcludeMissing
fun _networkTransactionIdentifier(): JsonField = networkTransactionIdentifier
+ /**
+ * Returns the raw JSON value of [settlementAmount].
+ *
+ * Unlike [settlementAmount], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("settlement_amount")
+ @ExcludeMissing
+ fun _settlementAmount(): JsonField = settlementAmount
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -1508,6 +1507,7 @@ private constructor(
* .authorizationIdentificationResponse()
* .cardVerificationValue2Result()
* .networkTransactionIdentifier()
+ * .settlementAmount()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -1521,6 +1521,7 @@ private constructor(
private var cardVerificationValue2Result: JsonField? =
null
private var networkTransactionIdentifier: JsonField? = null
+ private var settlementAmount: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -1529,6 +1530,7 @@ private constructor(
authorizationIdentificationResponse = acceptance.authorizationIdentificationResponse
cardVerificationValue2Result = acceptance.cardVerificationValue2Result
networkTransactionIdentifier = acceptance.networkTransactionIdentifier
+ settlementAmount = acceptance.settlementAmount
additionalProperties = acceptance.additionalProperties.toMutableMap()
}
@@ -1615,6 +1617,21 @@ private constructor(
this.networkTransactionIdentifier = networkTransactionIdentifier
}
+ /** The transfer amount in USD cents. */
+ fun settlementAmount(settlementAmount: Long) =
+ settlementAmount(JsonField.of(settlementAmount))
+
+ /**
+ * Sets [Builder.settlementAmount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.settlementAmount] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun settlementAmount(settlementAmount: JsonField) = apply {
+ this.settlementAmount = settlementAmount
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -1645,6 +1662,7 @@ private constructor(
* .authorizationIdentificationResponse()
* .cardVerificationValue2Result()
* .networkTransactionIdentifier()
+ * .settlementAmount()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -1658,6 +1676,7 @@ private constructor(
),
checkRequired("cardVerificationValue2Result", cardVerificationValue2Result),
checkRequired("networkTransactionIdentifier", networkTransactionIdentifier),
+ checkRequired("settlementAmount", settlementAmount),
additionalProperties.toMutableMap(),
)
}
@@ -1673,6 +1692,7 @@ private constructor(
authorizationIdentificationResponse()
cardVerificationValue2Result().ifPresent { it.validate() }
networkTransactionIdentifier()
+ settlementAmount()
validated = true
}
@@ -1695,7 +1715,8 @@ private constructor(
(if (acceptedAt.asKnown().isPresent) 1 else 0) +
(if (authorizationIdentificationResponse.asKnown().isPresent) 1 else 0) +
(cardVerificationValue2Result.asKnown().getOrNull()?.validity() ?: 0) +
- (if (networkTransactionIdentifier.asKnown().isPresent) 1 else 0)
+ (if (networkTransactionIdentifier.asKnown().isPresent) 1 else 0) +
+ (if (settlementAmount.asKnown().isPresent) 1 else 0)
/** The result of the Card Verification Value 2 match. */
class CardVerificationValue2Result
@@ -1851,6 +1872,7 @@ private constructor(
authorizationIdentificationResponse == other.authorizationIdentificationResponse &&
cardVerificationValue2Result == other.cardVerificationValue2Result &&
networkTransactionIdentifier == other.networkTransactionIdentifier &&
+ settlementAmount == other.settlementAmount &&
additionalProperties == other.additionalProperties
}
@@ -1860,6 +1882,7 @@ private constructor(
authorizationIdentificationResponse,
cardVerificationValue2Result,
networkTransactionIdentifier,
+ settlementAmount,
additionalProperties,
)
}
@@ -1867,7 +1890,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Acceptance{acceptedAt=$acceptedAt, authorizationIdentificationResponse=$authorizationIdentificationResponse, cardVerificationValue2Result=$cardVerificationValue2Result, networkTransactionIdentifier=$networkTransactionIdentifier, additionalProperties=$additionalProperties}"
+ "Acceptance{acceptedAt=$acceptedAt, authorizationIdentificationResponse=$authorizationIdentificationResponse, cardVerificationValue2Result=$cardVerificationValue2Result, networkTransactionIdentifier=$networkTransactionIdentifier, settlementAmount=$settlementAmount, additionalProperties=$additionalProperties}"
}
/**
@@ -3528,131 +3551,6 @@ private constructor(
"CreatedBy{apiKey=$apiKey, category=$category, oauthApplication=$oauthApplication, user=$user, additionalProperties=$additionalProperties}"
}
- /** The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency. */
- class Currency @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 {
-
- /** US Dollar (USD) */
- @JvmField val USD = of("USD")
-
- @JvmStatic fun of(value: String) = Currency(JsonField.of(value))
- }
-
- /** An enum containing [Currency]'s known values. */
- enum class Known {
- /** US Dollar (USD) */
- USD
- }
-
- /**
- * An enum containing [Currency]'s known values, as well as an [_UNKNOWN] member.
- *
- * An instance of [Currency] 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 {
- /** US Dollar (USD) */
- USD,
- /** An enum member indicating that [Currency] 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) {
- USD -> Value.USD
- 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) {
- USD -> Known.USD
- else -> throw IncreaseInvalidDataException("Unknown Currency: $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(): Currency = 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 Currency && value == other.value
- }
-
- override fun hashCode() = value.hashCode()
-
- override fun toString() = value.toString()
- }
-
/**
* If the transfer is rejected by the card network or the destination financial institution,
* this will contain supplemental details.
@@ -4544,6 +4442,1774 @@ private constructor(
"Decline{declinedAt=$declinedAt, networkTransactionIdentifier=$networkTransactionIdentifier, reason=$reason, additionalProperties=$additionalProperties}"
}
+ /**
+ * The amount that was transferred. The receiving bank will have converted this to the
+ * cardholder's currency. The amount that is applied to your Increase account matches the
+ * currency of your account.
+ */
+ class PresentmentAmount
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val currency: JsonField,
+ private val value: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("currency")
+ @ExcludeMissing
+ currency: JsonField = JsonMissing.of(),
+ @JsonProperty("value") @ExcludeMissing value: JsonField = JsonMissing.of(),
+ ) : this(currency, value, mutableMapOf())
+
+ /**
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun currency(): Currency = currency.getRequired("currency")
+
+ /**
+ * The amount value represented as a string containing a decimal number in major units (so
+ * e.g., "12.34" for $12.34).
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun value(): String = value.getRequired("value")
+
+ /**
+ * Returns the raw JSON value of [currency].
+ *
+ * Unlike [currency], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("currency") @ExcludeMissing fun _currency(): JsonField = currency
+
+ /**
+ * Returns the raw JSON value of [value].
+ *
+ * Unlike [value], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("value") @ExcludeMissing fun _value(): JsonField = value
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [PresentmentAmount].
+ *
+ * The following fields are required:
+ * ```java
+ * .currency()
+ * .value()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [PresentmentAmount]. */
+ class Builder internal constructor() {
+
+ private var currency: JsonField? = null
+ private var value: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(presentmentAmount: PresentmentAmount) = apply {
+ currency = presentmentAmount.currency
+ value = presentmentAmount.value
+ additionalProperties = presentmentAmount.additionalProperties.toMutableMap()
+ }
+
+ /** The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */
+ fun currency(currency: Currency) = currency(JsonField.of(currency))
+
+ /**
+ * Sets [Builder.currency] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.currency] with a well-typed [Currency] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun currency(currency: JsonField) = apply { this.currency = currency }
+
+ /**
+ * The amount value represented as a string containing a decimal number in major units
+ * (so e.g., "12.34" for $12.34).
+ */
+ fun value(value: String) = value(JsonField.of(value))
+
+ /**
+ * Sets [Builder.value] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.value] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun value(value: JsonField) = apply { this.value = value }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [PresentmentAmount].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .currency()
+ * .value()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): PresentmentAmount =
+ PresentmentAmount(
+ checkRequired("currency", currency),
+ checkRequired("value", value),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): PresentmentAmount = apply {
+ if (validated) {
+ return@apply
+ }
+
+ currency().validate()
+ value()
+ 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 =
+ (currency.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (value.asKnown().isPresent) 1 else 0)
+
+ /** The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */
+ class Currency @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 {
+
+ /** AFN */
+ @JvmField val AFN = of("AFN")
+
+ /** EUR */
+ @JvmField val EUR = of("EUR")
+
+ /** ALL */
+ @JvmField val ALL = of("ALL")
+
+ /** DZD */
+ @JvmField val DZD = of("DZD")
+
+ /** USD */
+ @JvmField val USD = of("USD")
+
+ /** AOA */
+ @JvmField val AOA = of("AOA")
+
+ /** ARS */
+ @JvmField val ARS = of("ARS")
+
+ /** AMD */
+ @JvmField val AMD = of("AMD")
+
+ /** AWG */
+ @JvmField val AWG = of("AWG")
+
+ /** AUD */
+ @JvmField val AUD = of("AUD")
+
+ /** AZN */
+ @JvmField val AZN = of("AZN")
+
+ /** BSD */
+ @JvmField val BSD = of("BSD")
+
+ /** BHD */
+ @JvmField val BHD = of("BHD")
+
+ /** BDT */
+ @JvmField val BDT = of("BDT")
+
+ /** BBD */
+ @JvmField val BBD = of("BBD")
+
+ /** BYN */
+ @JvmField val BYN = of("BYN")
+
+ /** BZD */
+ @JvmField val BZD = of("BZD")
+
+ /** BMD */
+ @JvmField val BMD = of("BMD")
+
+ /** INR */
+ @JvmField val INR = of("INR")
+
+ /** BTN */
+ @JvmField val BTN = of("BTN")
+
+ /** BOB */
+ @JvmField val BOB = of("BOB")
+
+ /** BOV */
+ @JvmField val BOV = of("BOV")
+
+ /** BAM */
+ @JvmField val BAM = of("BAM")
+
+ /** BWP */
+ @JvmField val BWP = of("BWP")
+
+ /** NOK */
+ @JvmField val NOK = of("NOK")
+
+ /** BRL */
+ @JvmField val BRL = of("BRL")
+
+ /** BND */
+ @JvmField val BND = of("BND")
+
+ /** BGN */
+ @JvmField val BGN = of("BGN")
+
+ /** BIF */
+ @JvmField val BIF = of("BIF")
+
+ /** CVE */
+ @JvmField val CVE = of("CVE")
+
+ /** KHR */
+ @JvmField val KHR = of("KHR")
+
+ /** CAD */
+ @JvmField val CAD = of("CAD")
+
+ /** KYD */
+ @JvmField val KYD = of("KYD")
+
+ /** CLP */
+ @JvmField val CLP = of("CLP")
+
+ /** CLF */
+ @JvmField val CLF = of("CLF")
+
+ /** CNY */
+ @JvmField val CNY = of("CNY")
+
+ /** COP */
+ @JvmField val COP = of("COP")
+
+ /** COU */
+ @JvmField val COU = of("COU")
+
+ /** KMF */
+ @JvmField val KMF = of("KMF")
+
+ /** CDF */
+ @JvmField val CDF = of("CDF")
+
+ /** NZD */
+ @JvmField val NZD = of("NZD")
+
+ /** CRC */
+ @JvmField val CRC = of("CRC")
+
+ /** CUP */
+ @JvmField val CUP = of("CUP")
+
+ /** CZK */
+ @JvmField val CZK = of("CZK")
+
+ /** DKK */
+ @JvmField val DKK = of("DKK")
+
+ /** DJF */
+ @JvmField val DJF = of("DJF")
+
+ /** DOP */
+ @JvmField val DOP = of("DOP")
+
+ /** EGP */
+ @JvmField val EGP = of("EGP")
+
+ /** SVC */
+ @JvmField val SVC = of("SVC")
+
+ /** ERN */
+ @JvmField val ERN = of("ERN")
+
+ /** SZL */
+ @JvmField val SZL = of("SZL")
+
+ /** ETB */
+ @JvmField val ETB = of("ETB")
+
+ /** FKP */
+ @JvmField val FKP = of("FKP")
+
+ /** FJD */
+ @JvmField val FJD = of("FJD")
+
+ /** GMD */
+ @JvmField val GMD = of("GMD")
+
+ /** GEL */
+ @JvmField val GEL = of("GEL")
+
+ /** GHS */
+ @JvmField val GHS = of("GHS")
+
+ /** GIP */
+ @JvmField val GIP = of("GIP")
+
+ /** GTQ */
+ @JvmField val GTQ = of("GTQ")
+
+ /** GBP */
+ @JvmField val GBP = of("GBP")
+
+ /** GNF */
+ @JvmField val GNF = of("GNF")
+
+ /** GYD */
+ @JvmField val GYD = of("GYD")
+
+ /** HTG */
+ @JvmField val HTG = of("HTG")
+
+ /** HNL */
+ @JvmField val HNL = of("HNL")
+
+ /** HKD */
+ @JvmField val HKD = of("HKD")
+
+ /** HUF */
+ @JvmField val HUF = of("HUF")
+
+ /** ISK */
+ @JvmField val ISK = of("ISK")
+
+ /** IDR */
+ @JvmField val IDR = of("IDR")
+
+ /** IRR */
+ @JvmField val IRR = of("IRR")
+
+ /** IQD */
+ @JvmField val IQD = of("IQD")
+
+ /** ILS */
+ @JvmField val ILS = of("ILS")
+
+ /** JMD */
+ @JvmField val JMD = of("JMD")
+
+ /** JPY */
+ @JvmField val JPY = of("JPY")
+
+ /** JOD */
+ @JvmField val JOD = of("JOD")
+
+ /** KZT */
+ @JvmField val KZT = of("KZT")
+
+ /** KES */
+ @JvmField val KES = of("KES")
+
+ /** KPW */
+ @JvmField val KPW = of("KPW")
+
+ /** KRW */
+ @JvmField val KRW = of("KRW")
+
+ /** KWD */
+ @JvmField val KWD = of("KWD")
+
+ /** KGS */
+ @JvmField val KGS = of("KGS")
+
+ /** LAK */
+ @JvmField val LAK = of("LAK")
+
+ /** LBP */
+ @JvmField val LBP = of("LBP")
+
+ /** LSL */
+ @JvmField val LSL = of("LSL")
+
+ /** ZAR */
+ @JvmField val ZAR = of("ZAR")
+
+ /** LRD */
+ @JvmField val LRD = of("LRD")
+
+ /** LYD */
+ @JvmField val LYD = of("LYD")
+
+ /** CHF */
+ @JvmField val CHF = of("CHF")
+
+ /** MOP */
+ @JvmField val MOP = of("MOP")
+
+ /** MKD */
+ @JvmField val MKD = of("MKD")
+
+ /** MGA */
+ @JvmField val MGA = of("MGA")
+
+ /** MWK */
+ @JvmField val MWK = of("MWK")
+
+ /** MYR */
+ @JvmField val MYR = of("MYR")
+
+ /** MVR */
+ @JvmField val MVR = of("MVR")
+
+ /** MRU */
+ @JvmField val MRU = of("MRU")
+
+ /** MUR */
+ @JvmField val MUR = of("MUR")
+
+ /** MXN */
+ @JvmField val MXN = of("MXN")
+
+ /** MXV */
+ @JvmField val MXV = of("MXV")
+
+ /** MDL */
+ @JvmField val MDL = of("MDL")
+
+ /** MNT */
+ @JvmField val MNT = of("MNT")
+
+ /** MAD */
+ @JvmField val MAD = of("MAD")
+
+ /** MZN */
+ @JvmField val MZN = of("MZN")
+
+ /** MMK */
+ @JvmField val MMK = of("MMK")
+
+ /** NAD */
+ @JvmField val NAD = of("NAD")
+
+ /** NPR */
+ @JvmField val NPR = of("NPR")
+
+ /** NIO */
+ @JvmField val NIO = of("NIO")
+
+ /** NGN */
+ @JvmField val NGN = of("NGN")
+
+ /** OMR */
+ @JvmField val OMR = of("OMR")
+
+ /** PKR */
+ @JvmField val PKR = of("PKR")
+
+ /** PAB */
+ @JvmField val PAB = of("PAB")
+
+ /** PGK */
+ @JvmField val PGK = of("PGK")
+
+ /** PYG */
+ @JvmField val PYG = of("PYG")
+
+ /** PEN */
+ @JvmField val PEN = of("PEN")
+
+ /** PHP */
+ @JvmField val PHP = of("PHP")
+
+ /** PLN */
+ @JvmField val PLN = of("PLN")
+
+ /** QAR */
+ @JvmField val QAR = of("QAR")
+
+ /** RON */
+ @JvmField val RON = of("RON")
+
+ /** RUB */
+ @JvmField val RUB = of("RUB")
+
+ /** RWF */
+ @JvmField val RWF = of("RWF")
+
+ /** SHP */
+ @JvmField val SHP = of("SHP")
+
+ /** WST */
+ @JvmField val WST = of("WST")
+
+ /** STN */
+ @JvmField val STN = of("STN")
+
+ /** SAR */
+ @JvmField val SAR = of("SAR")
+
+ /** RSD */
+ @JvmField val RSD = of("RSD")
+
+ /** SCR */
+ @JvmField val SCR = of("SCR")
+
+ /** SLE */
+ @JvmField val SLE = of("SLE")
+
+ /** SGD */
+ @JvmField val SGD = of("SGD")
+
+ /** SBD */
+ @JvmField val SBD = of("SBD")
+
+ /** SOS */
+ @JvmField val SOS = of("SOS")
+
+ /** SSP */
+ @JvmField val SSP = of("SSP")
+
+ /** LKR */
+ @JvmField val LKR = of("LKR")
+
+ /** SDG */
+ @JvmField val SDG = of("SDG")
+
+ /** SRD */
+ @JvmField val SRD = of("SRD")
+
+ /** SEK */
+ @JvmField val SEK = of("SEK")
+
+ /** CHE */
+ @JvmField val CHE = of("CHE")
+
+ /** CHW */
+ @JvmField val CHW = of("CHW")
+
+ /** SYP */
+ @JvmField val SYP = of("SYP")
+
+ /** TWD */
+ @JvmField val TWD = of("TWD")
+
+ /** TJS */
+ @JvmField val TJS = of("TJS")
+
+ /** TZS */
+ @JvmField val TZS = of("TZS")
+
+ /** THB */
+ @JvmField val THB = of("THB")
+
+ /** TOP */
+ @JvmField val TOP = of("TOP")
+
+ /** TTD */
+ @JvmField val TTD = of("TTD")
+
+ /** TND */
+ @JvmField val TND = of("TND")
+
+ /** TRY */
+ @JvmField val TRY = of("TRY")
+
+ /** TMT */
+ @JvmField val TMT = of("TMT")
+
+ /** UGX */
+ @JvmField val UGX = of("UGX")
+
+ /** UAH */
+ @JvmField val UAH = of("UAH")
+
+ /** AED */
+ @JvmField val AED = of("AED")
+
+ /** USN */
+ @JvmField val USN = of("USN")
+
+ /** UYU */
+ @JvmField val UYU = of("UYU")
+
+ /** UYI */
+ @JvmField val UYI = of("UYI")
+
+ /** UYW */
+ @JvmField val UYW = of("UYW")
+
+ /** UZS */
+ @JvmField val UZS = of("UZS")
+
+ /** VUV */
+ @JvmField val VUV = of("VUV")
+
+ /** VES */
+ @JvmField val VES = of("VES")
+
+ /** VED */
+ @JvmField val VED = of("VED")
+
+ /** VND */
+ @JvmField val VND = of("VND")
+
+ /** YER */
+ @JvmField val YER = of("YER")
+
+ /** ZMW */
+ @JvmField val ZMW = of("ZMW")
+
+ /** ZWG */
+ @JvmField val ZWG = of("ZWG")
+
+ @JvmStatic fun of(value: String) = Currency(JsonField.of(value))
+ }
+
+ /** An enum containing [Currency]'s known values. */
+ enum class Known {
+ /** AFN */
+ AFN,
+ /** EUR */
+ EUR,
+ /** ALL */
+ ALL,
+ /** DZD */
+ DZD,
+ /** USD */
+ USD,
+ /** AOA */
+ AOA,
+ /** ARS */
+ ARS,
+ /** AMD */
+ AMD,
+ /** AWG */
+ AWG,
+ /** AUD */
+ AUD,
+ /** AZN */
+ AZN,
+ /** BSD */
+ BSD,
+ /** BHD */
+ BHD,
+ /** BDT */
+ BDT,
+ /** BBD */
+ BBD,
+ /** BYN */
+ BYN,
+ /** BZD */
+ BZD,
+ /** BMD */
+ BMD,
+ /** INR */
+ INR,
+ /** BTN */
+ BTN,
+ /** BOB */
+ BOB,
+ /** BOV */
+ BOV,
+ /** BAM */
+ BAM,
+ /** BWP */
+ BWP,
+ /** NOK */
+ NOK,
+ /** BRL */
+ BRL,
+ /** BND */
+ BND,
+ /** BGN */
+ BGN,
+ /** BIF */
+ BIF,
+ /** CVE */
+ CVE,
+ /** KHR */
+ KHR,
+ /** CAD */
+ CAD,
+ /** KYD */
+ KYD,
+ /** CLP */
+ CLP,
+ /** CLF */
+ CLF,
+ /** CNY */
+ CNY,
+ /** COP */
+ COP,
+ /** COU */
+ COU,
+ /** KMF */
+ KMF,
+ /** CDF */
+ CDF,
+ /** NZD */
+ NZD,
+ /** CRC */
+ CRC,
+ /** CUP */
+ CUP,
+ /** CZK */
+ CZK,
+ /** DKK */
+ DKK,
+ /** DJF */
+ DJF,
+ /** DOP */
+ DOP,
+ /** EGP */
+ EGP,
+ /** SVC */
+ SVC,
+ /** ERN */
+ ERN,
+ /** SZL */
+ SZL,
+ /** ETB */
+ ETB,
+ /** FKP */
+ FKP,
+ /** FJD */
+ FJD,
+ /** GMD */
+ GMD,
+ /** GEL */
+ GEL,
+ /** GHS */
+ GHS,
+ /** GIP */
+ GIP,
+ /** GTQ */
+ GTQ,
+ /** GBP */
+ GBP,
+ /** GNF */
+ GNF,
+ /** GYD */
+ GYD,
+ /** HTG */
+ HTG,
+ /** HNL */
+ HNL,
+ /** HKD */
+ HKD,
+ /** HUF */
+ HUF,
+ /** ISK */
+ ISK,
+ /** IDR */
+ IDR,
+ /** IRR */
+ IRR,
+ /** IQD */
+ IQD,
+ /** ILS */
+ ILS,
+ /** JMD */
+ JMD,
+ /** JPY */
+ JPY,
+ /** JOD */
+ JOD,
+ /** KZT */
+ KZT,
+ /** KES */
+ KES,
+ /** KPW */
+ KPW,
+ /** KRW */
+ KRW,
+ /** KWD */
+ KWD,
+ /** KGS */
+ KGS,
+ /** LAK */
+ LAK,
+ /** LBP */
+ LBP,
+ /** LSL */
+ LSL,
+ /** ZAR */
+ ZAR,
+ /** LRD */
+ LRD,
+ /** LYD */
+ LYD,
+ /** CHF */
+ CHF,
+ /** MOP */
+ MOP,
+ /** MKD */
+ MKD,
+ /** MGA */
+ MGA,
+ /** MWK */
+ MWK,
+ /** MYR */
+ MYR,
+ /** MVR */
+ MVR,
+ /** MRU */
+ MRU,
+ /** MUR */
+ MUR,
+ /** MXN */
+ MXN,
+ /** MXV */
+ MXV,
+ /** MDL */
+ MDL,
+ /** MNT */
+ MNT,
+ /** MAD */
+ MAD,
+ /** MZN */
+ MZN,
+ /** MMK */
+ MMK,
+ /** NAD */
+ NAD,
+ /** NPR */
+ NPR,
+ /** NIO */
+ NIO,
+ /** NGN */
+ NGN,
+ /** OMR */
+ OMR,
+ /** PKR */
+ PKR,
+ /** PAB */
+ PAB,
+ /** PGK */
+ PGK,
+ /** PYG */
+ PYG,
+ /** PEN */
+ PEN,
+ /** PHP */
+ PHP,
+ /** PLN */
+ PLN,
+ /** QAR */
+ QAR,
+ /** RON */
+ RON,
+ /** RUB */
+ RUB,
+ /** RWF */
+ RWF,
+ /** SHP */
+ SHP,
+ /** WST */
+ WST,
+ /** STN */
+ STN,
+ /** SAR */
+ SAR,
+ /** RSD */
+ RSD,
+ /** SCR */
+ SCR,
+ /** SLE */
+ SLE,
+ /** SGD */
+ SGD,
+ /** SBD */
+ SBD,
+ /** SOS */
+ SOS,
+ /** SSP */
+ SSP,
+ /** LKR */
+ LKR,
+ /** SDG */
+ SDG,
+ /** SRD */
+ SRD,
+ /** SEK */
+ SEK,
+ /** CHE */
+ CHE,
+ /** CHW */
+ CHW,
+ /** SYP */
+ SYP,
+ /** TWD */
+ TWD,
+ /** TJS */
+ TJS,
+ /** TZS */
+ TZS,
+ /** THB */
+ THB,
+ /** TOP */
+ TOP,
+ /** TTD */
+ TTD,
+ /** TND */
+ TND,
+ /** TRY */
+ TRY,
+ /** TMT */
+ TMT,
+ /** UGX */
+ UGX,
+ /** UAH */
+ UAH,
+ /** AED */
+ AED,
+ /** USN */
+ USN,
+ /** UYU */
+ UYU,
+ /** UYI */
+ UYI,
+ /** UYW */
+ UYW,
+ /** UZS */
+ UZS,
+ /** VUV */
+ VUV,
+ /** VES */
+ VES,
+ /** VED */
+ VED,
+ /** VND */
+ VND,
+ /** YER */
+ YER,
+ /** ZMW */
+ ZMW,
+ /** ZWG */
+ ZWG,
+ }
+
+ /**
+ * An enum containing [Currency]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Currency] 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 {
+ /** AFN */
+ AFN,
+ /** EUR */
+ EUR,
+ /** ALL */
+ ALL,
+ /** DZD */
+ DZD,
+ /** USD */
+ USD,
+ /** AOA */
+ AOA,
+ /** ARS */
+ ARS,
+ /** AMD */
+ AMD,
+ /** AWG */
+ AWG,
+ /** AUD */
+ AUD,
+ /** AZN */
+ AZN,
+ /** BSD */
+ BSD,
+ /** BHD */
+ BHD,
+ /** BDT */
+ BDT,
+ /** BBD */
+ BBD,
+ /** BYN */
+ BYN,
+ /** BZD */
+ BZD,
+ /** BMD */
+ BMD,
+ /** INR */
+ INR,
+ /** BTN */
+ BTN,
+ /** BOB */
+ BOB,
+ /** BOV */
+ BOV,
+ /** BAM */
+ BAM,
+ /** BWP */
+ BWP,
+ /** NOK */
+ NOK,
+ /** BRL */
+ BRL,
+ /** BND */
+ BND,
+ /** BGN */
+ BGN,
+ /** BIF */
+ BIF,
+ /** CVE */
+ CVE,
+ /** KHR */
+ KHR,
+ /** CAD */
+ CAD,
+ /** KYD */
+ KYD,
+ /** CLP */
+ CLP,
+ /** CLF */
+ CLF,
+ /** CNY */
+ CNY,
+ /** COP */
+ COP,
+ /** COU */
+ COU,
+ /** KMF */
+ KMF,
+ /** CDF */
+ CDF,
+ /** NZD */
+ NZD,
+ /** CRC */
+ CRC,
+ /** CUP */
+ CUP,
+ /** CZK */
+ CZK,
+ /** DKK */
+ DKK,
+ /** DJF */
+ DJF,
+ /** DOP */
+ DOP,
+ /** EGP */
+ EGP,
+ /** SVC */
+ SVC,
+ /** ERN */
+ ERN,
+ /** SZL */
+ SZL,
+ /** ETB */
+ ETB,
+ /** FKP */
+ FKP,
+ /** FJD */
+ FJD,
+ /** GMD */
+ GMD,
+ /** GEL */
+ GEL,
+ /** GHS */
+ GHS,
+ /** GIP */
+ GIP,
+ /** GTQ */
+ GTQ,
+ /** GBP */
+ GBP,
+ /** GNF */
+ GNF,
+ /** GYD */
+ GYD,
+ /** HTG */
+ HTG,
+ /** HNL */
+ HNL,
+ /** HKD */
+ HKD,
+ /** HUF */
+ HUF,
+ /** ISK */
+ ISK,
+ /** IDR */
+ IDR,
+ /** IRR */
+ IRR,
+ /** IQD */
+ IQD,
+ /** ILS */
+ ILS,
+ /** JMD */
+ JMD,
+ /** JPY */
+ JPY,
+ /** JOD */
+ JOD,
+ /** KZT */
+ KZT,
+ /** KES */
+ KES,
+ /** KPW */
+ KPW,
+ /** KRW */
+ KRW,
+ /** KWD */
+ KWD,
+ /** KGS */
+ KGS,
+ /** LAK */
+ LAK,
+ /** LBP */
+ LBP,
+ /** LSL */
+ LSL,
+ /** ZAR */
+ ZAR,
+ /** LRD */
+ LRD,
+ /** LYD */
+ LYD,
+ /** CHF */
+ CHF,
+ /** MOP */
+ MOP,
+ /** MKD */
+ MKD,
+ /** MGA */
+ MGA,
+ /** MWK */
+ MWK,
+ /** MYR */
+ MYR,
+ /** MVR */
+ MVR,
+ /** MRU */
+ MRU,
+ /** MUR */
+ MUR,
+ /** MXN */
+ MXN,
+ /** MXV */
+ MXV,
+ /** MDL */
+ MDL,
+ /** MNT */
+ MNT,
+ /** MAD */
+ MAD,
+ /** MZN */
+ MZN,
+ /** MMK */
+ MMK,
+ /** NAD */
+ NAD,
+ /** NPR */
+ NPR,
+ /** NIO */
+ NIO,
+ /** NGN */
+ NGN,
+ /** OMR */
+ OMR,
+ /** PKR */
+ PKR,
+ /** PAB */
+ PAB,
+ /** PGK */
+ PGK,
+ /** PYG */
+ PYG,
+ /** PEN */
+ PEN,
+ /** PHP */
+ PHP,
+ /** PLN */
+ PLN,
+ /** QAR */
+ QAR,
+ /** RON */
+ RON,
+ /** RUB */
+ RUB,
+ /** RWF */
+ RWF,
+ /** SHP */
+ SHP,
+ /** WST */
+ WST,
+ /** STN */
+ STN,
+ /** SAR */
+ SAR,
+ /** RSD */
+ RSD,
+ /** SCR */
+ SCR,
+ /** SLE */
+ SLE,
+ /** SGD */
+ SGD,
+ /** SBD */
+ SBD,
+ /** SOS */
+ SOS,
+ /** SSP */
+ SSP,
+ /** LKR */
+ LKR,
+ /** SDG */
+ SDG,
+ /** SRD */
+ SRD,
+ /** SEK */
+ SEK,
+ /** CHE */
+ CHE,
+ /** CHW */
+ CHW,
+ /** SYP */
+ SYP,
+ /** TWD */
+ TWD,
+ /** TJS */
+ TJS,
+ /** TZS */
+ TZS,
+ /** THB */
+ THB,
+ /** TOP */
+ TOP,
+ /** TTD */
+ TTD,
+ /** TND */
+ TND,
+ /** TRY */
+ TRY,
+ /** TMT */
+ TMT,
+ /** UGX */
+ UGX,
+ /** UAH */
+ UAH,
+ /** AED */
+ AED,
+ /** USN */
+ USN,
+ /** UYU */
+ UYU,
+ /** UYI */
+ UYI,
+ /** UYW */
+ UYW,
+ /** UZS */
+ UZS,
+ /** VUV */
+ VUV,
+ /** VES */
+ VES,
+ /** VED */
+ VED,
+ /** VND */
+ VND,
+ /** YER */
+ YER,
+ /** ZMW */
+ ZMW,
+ /** ZWG */
+ ZWG,
+ /**
+ * An enum member indicating that [Currency] 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) {
+ AFN -> Value.AFN
+ EUR -> Value.EUR
+ ALL -> Value.ALL
+ DZD -> Value.DZD
+ USD -> Value.USD
+ AOA -> Value.AOA
+ ARS -> Value.ARS
+ AMD -> Value.AMD
+ AWG -> Value.AWG
+ AUD -> Value.AUD
+ AZN -> Value.AZN
+ BSD -> Value.BSD
+ BHD -> Value.BHD
+ BDT -> Value.BDT
+ BBD -> Value.BBD
+ BYN -> Value.BYN
+ BZD -> Value.BZD
+ BMD -> Value.BMD
+ INR -> Value.INR
+ BTN -> Value.BTN
+ BOB -> Value.BOB
+ BOV -> Value.BOV
+ BAM -> Value.BAM
+ BWP -> Value.BWP
+ NOK -> Value.NOK
+ BRL -> Value.BRL
+ BND -> Value.BND
+ BGN -> Value.BGN
+ BIF -> Value.BIF
+ CVE -> Value.CVE
+ KHR -> Value.KHR
+ CAD -> Value.CAD
+ KYD -> Value.KYD
+ CLP -> Value.CLP
+ CLF -> Value.CLF
+ CNY -> Value.CNY
+ COP -> Value.COP
+ COU -> Value.COU
+ KMF -> Value.KMF
+ CDF -> Value.CDF
+ NZD -> Value.NZD
+ CRC -> Value.CRC
+ CUP -> Value.CUP
+ CZK -> Value.CZK
+ DKK -> Value.DKK
+ DJF -> Value.DJF
+ DOP -> Value.DOP
+ EGP -> Value.EGP
+ SVC -> Value.SVC
+ ERN -> Value.ERN
+ SZL -> Value.SZL
+ ETB -> Value.ETB
+ FKP -> Value.FKP
+ FJD -> Value.FJD
+ GMD -> Value.GMD
+ GEL -> Value.GEL
+ GHS -> Value.GHS
+ GIP -> Value.GIP
+ GTQ -> Value.GTQ
+ GBP -> Value.GBP
+ GNF -> Value.GNF
+ GYD -> Value.GYD
+ HTG -> Value.HTG
+ HNL -> Value.HNL
+ HKD -> Value.HKD
+ HUF -> Value.HUF
+ ISK -> Value.ISK
+ IDR -> Value.IDR
+ IRR -> Value.IRR
+ IQD -> Value.IQD
+ ILS -> Value.ILS
+ JMD -> Value.JMD
+ JPY -> Value.JPY
+ JOD -> Value.JOD
+ KZT -> Value.KZT
+ KES -> Value.KES
+ KPW -> Value.KPW
+ KRW -> Value.KRW
+ KWD -> Value.KWD
+ KGS -> Value.KGS
+ LAK -> Value.LAK
+ LBP -> Value.LBP
+ LSL -> Value.LSL
+ ZAR -> Value.ZAR
+ LRD -> Value.LRD
+ LYD -> Value.LYD
+ CHF -> Value.CHF
+ MOP -> Value.MOP
+ MKD -> Value.MKD
+ MGA -> Value.MGA
+ MWK -> Value.MWK
+ MYR -> Value.MYR
+ MVR -> Value.MVR
+ MRU -> Value.MRU
+ MUR -> Value.MUR
+ MXN -> Value.MXN
+ MXV -> Value.MXV
+ MDL -> Value.MDL
+ MNT -> Value.MNT
+ MAD -> Value.MAD
+ MZN -> Value.MZN
+ MMK -> Value.MMK
+ NAD -> Value.NAD
+ NPR -> Value.NPR
+ NIO -> Value.NIO
+ NGN -> Value.NGN
+ OMR -> Value.OMR
+ PKR -> Value.PKR
+ PAB -> Value.PAB
+ PGK -> Value.PGK
+ PYG -> Value.PYG
+ PEN -> Value.PEN
+ PHP -> Value.PHP
+ PLN -> Value.PLN
+ QAR -> Value.QAR
+ RON -> Value.RON
+ RUB -> Value.RUB
+ RWF -> Value.RWF
+ SHP -> Value.SHP
+ WST -> Value.WST
+ STN -> Value.STN
+ SAR -> Value.SAR
+ RSD -> Value.RSD
+ SCR -> Value.SCR
+ SLE -> Value.SLE
+ SGD -> Value.SGD
+ SBD -> Value.SBD
+ SOS -> Value.SOS
+ SSP -> Value.SSP
+ LKR -> Value.LKR
+ SDG -> Value.SDG
+ SRD -> Value.SRD
+ SEK -> Value.SEK
+ CHE -> Value.CHE
+ CHW -> Value.CHW
+ SYP -> Value.SYP
+ TWD -> Value.TWD
+ TJS -> Value.TJS
+ TZS -> Value.TZS
+ THB -> Value.THB
+ TOP -> Value.TOP
+ TTD -> Value.TTD
+ TND -> Value.TND
+ TRY -> Value.TRY
+ TMT -> Value.TMT
+ UGX -> Value.UGX
+ UAH -> Value.UAH
+ AED -> Value.AED
+ USN -> Value.USN
+ UYU -> Value.UYU
+ UYI -> Value.UYI
+ UYW -> Value.UYW
+ UZS -> Value.UZS
+ VUV -> Value.VUV
+ VES -> Value.VES
+ VED -> Value.VED
+ VND -> Value.VND
+ YER -> Value.YER
+ ZMW -> Value.ZMW
+ ZWG -> Value.ZWG
+ 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) {
+ AFN -> Known.AFN
+ EUR -> Known.EUR
+ ALL -> Known.ALL
+ DZD -> Known.DZD
+ USD -> Known.USD
+ AOA -> Known.AOA
+ ARS -> Known.ARS
+ AMD -> Known.AMD
+ AWG -> Known.AWG
+ AUD -> Known.AUD
+ AZN -> Known.AZN
+ BSD -> Known.BSD
+ BHD -> Known.BHD
+ BDT -> Known.BDT
+ BBD -> Known.BBD
+ BYN -> Known.BYN
+ BZD -> Known.BZD
+ BMD -> Known.BMD
+ INR -> Known.INR
+ BTN -> Known.BTN
+ BOB -> Known.BOB
+ BOV -> Known.BOV
+ BAM -> Known.BAM
+ BWP -> Known.BWP
+ NOK -> Known.NOK
+ BRL -> Known.BRL
+ BND -> Known.BND
+ BGN -> Known.BGN
+ BIF -> Known.BIF
+ CVE -> Known.CVE
+ KHR -> Known.KHR
+ CAD -> Known.CAD
+ KYD -> Known.KYD
+ CLP -> Known.CLP
+ CLF -> Known.CLF
+ CNY -> Known.CNY
+ COP -> Known.COP
+ COU -> Known.COU
+ KMF -> Known.KMF
+ CDF -> Known.CDF
+ NZD -> Known.NZD
+ CRC -> Known.CRC
+ CUP -> Known.CUP
+ CZK -> Known.CZK
+ DKK -> Known.DKK
+ DJF -> Known.DJF
+ DOP -> Known.DOP
+ EGP -> Known.EGP
+ SVC -> Known.SVC
+ ERN -> Known.ERN
+ SZL -> Known.SZL
+ ETB -> Known.ETB
+ FKP -> Known.FKP
+ FJD -> Known.FJD
+ GMD -> Known.GMD
+ GEL -> Known.GEL
+ GHS -> Known.GHS
+ GIP -> Known.GIP
+ GTQ -> Known.GTQ
+ GBP -> Known.GBP
+ GNF -> Known.GNF
+ GYD -> Known.GYD
+ HTG -> Known.HTG
+ HNL -> Known.HNL
+ HKD -> Known.HKD
+ HUF -> Known.HUF
+ ISK -> Known.ISK
+ IDR -> Known.IDR
+ IRR -> Known.IRR
+ IQD -> Known.IQD
+ ILS -> Known.ILS
+ JMD -> Known.JMD
+ JPY -> Known.JPY
+ JOD -> Known.JOD
+ KZT -> Known.KZT
+ KES -> Known.KES
+ KPW -> Known.KPW
+ KRW -> Known.KRW
+ KWD -> Known.KWD
+ KGS -> Known.KGS
+ LAK -> Known.LAK
+ LBP -> Known.LBP
+ LSL -> Known.LSL
+ ZAR -> Known.ZAR
+ LRD -> Known.LRD
+ LYD -> Known.LYD
+ CHF -> Known.CHF
+ MOP -> Known.MOP
+ MKD -> Known.MKD
+ MGA -> Known.MGA
+ MWK -> Known.MWK
+ MYR -> Known.MYR
+ MVR -> Known.MVR
+ MRU -> Known.MRU
+ MUR -> Known.MUR
+ MXN -> Known.MXN
+ MXV -> Known.MXV
+ MDL -> Known.MDL
+ MNT -> Known.MNT
+ MAD -> Known.MAD
+ MZN -> Known.MZN
+ MMK -> Known.MMK
+ NAD -> Known.NAD
+ NPR -> Known.NPR
+ NIO -> Known.NIO
+ NGN -> Known.NGN
+ OMR -> Known.OMR
+ PKR -> Known.PKR
+ PAB -> Known.PAB
+ PGK -> Known.PGK
+ PYG -> Known.PYG
+ PEN -> Known.PEN
+ PHP -> Known.PHP
+ PLN -> Known.PLN
+ QAR -> Known.QAR
+ RON -> Known.RON
+ RUB -> Known.RUB
+ RWF -> Known.RWF
+ SHP -> Known.SHP
+ WST -> Known.WST
+ STN -> Known.STN
+ SAR -> Known.SAR
+ RSD -> Known.RSD
+ SCR -> Known.SCR
+ SLE -> Known.SLE
+ SGD -> Known.SGD
+ SBD -> Known.SBD
+ SOS -> Known.SOS
+ SSP -> Known.SSP
+ LKR -> Known.LKR
+ SDG -> Known.SDG
+ SRD -> Known.SRD
+ SEK -> Known.SEK
+ CHE -> Known.CHE
+ CHW -> Known.CHW
+ SYP -> Known.SYP
+ TWD -> Known.TWD
+ TJS -> Known.TJS
+ TZS -> Known.TZS
+ THB -> Known.THB
+ TOP -> Known.TOP
+ TTD -> Known.TTD
+ TND -> Known.TND
+ TRY -> Known.TRY
+ TMT -> Known.TMT
+ UGX -> Known.UGX
+ UAH -> Known.UAH
+ AED -> Known.AED
+ USN -> Known.USN
+ UYU -> Known.UYU
+ UYI -> Known.UYI
+ UYW -> Known.UYW
+ UZS -> Known.UZS
+ VUV -> Known.VUV
+ VES -> Known.VES
+ VED -> Known.VED
+ VND -> Known.VND
+ YER -> Known.YER
+ ZMW -> Known.ZMW
+ ZWG -> Known.ZWG
+ else -> throw IncreaseInvalidDataException("Unknown Currency: $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(): Currency = 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 Currency && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is PresentmentAmount &&
+ currency == other.currency &&
+ value == other.value &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(currency, value, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "PresentmentAmount{currency=$currency, value=$value, additionalProperties=$additionalProperties}"
+ }
+
/** The lifecycle status of the transfer. */
class Status @JsonCreator private constructor(private val value: JsonField) : Enum {
@@ -5194,13 +6860,11 @@ private constructor(
id == other.id &&
acceptance == other.acceptance &&
accountId == other.accountId &&
- amount == other.amount &&
approval == other.approval &&
businessApplicationIdentifier == other.businessApplicationIdentifier &&
cancellation == other.cancellation &&
createdAt == other.createdAt &&
createdBy == other.createdBy &&
- currency == other.currency &&
decline == other.decline &&
idempotencyKey == other.idempotencyKey &&
merchantCategoryCode == other.merchantCategoryCode &&
@@ -5209,6 +6873,7 @@ private constructor(
merchantNamePrefix == other.merchantNamePrefix &&
merchantPostalCode == other.merchantPostalCode &&
merchantState == other.merchantState &&
+ presentmentAmount == other.presentmentAmount &&
recipientName == other.recipientName &&
senderAddressCity == other.senderAddressCity &&
senderAddressLine1 == other.senderAddressLine1 &&
@@ -5227,13 +6892,11 @@ private constructor(
id,
acceptance,
accountId,
- amount,
approval,
businessApplicationIdentifier,
cancellation,
createdAt,
createdBy,
- currency,
decline,
idempotencyKey,
merchantCategoryCode,
@@ -5242,6 +6905,7 @@ private constructor(
merchantNamePrefix,
merchantPostalCode,
merchantState,
+ presentmentAmount,
recipientName,
senderAddressCity,
senderAddressLine1,
@@ -5259,5 +6923,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardPushTransfer{id=$id, acceptance=$acceptance, accountId=$accountId, amount=$amount, approval=$approval, businessApplicationIdentifier=$businessApplicationIdentifier, cancellation=$cancellation, createdAt=$createdAt, createdBy=$createdBy, currency=$currency, decline=$decline, idempotencyKey=$idempotencyKey, merchantCategoryCode=$merchantCategoryCode, merchantCityName=$merchantCityName, merchantName=$merchantName, merchantNamePrefix=$merchantNamePrefix, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, recipientName=$recipientName, senderAddressCity=$senderAddressCity, senderAddressLine1=$senderAddressLine1, senderAddressPostalCode=$senderAddressPostalCode, senderAddressState=$senderAddressState, senderName=$senderName, sourceAccountNumberId=$sourceAccountNumberId, status=$status, submission=$submission, type=$type, additionalProperties=$additionalProperties}"
+ "CardPushTransfer{id=$id, acceptance=$acceptance, accountId=$accountId, approval=$approval, businessApplicationIdentifier=$businessApplicationIdentifier, cancellation=$cancellation, createdAt=$createdAt, createdBy=$createdBy, decline=$decline, idempotencyKey=$idempotencyKey, merchantCategoryCode=$merchantCategoryCode, merchantCityName=$merchantCityName, merchantName=$merchantName, merchantNamePrefix=$merchantNamePrefix, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, presentmentAmount=$presentmentAmount, recipientName=$recipientName, senderAddressCity=$senderAddressCity, senderAddressLine1=$senderAddressLine1, senderAddressPostalCode=$senderAddressPostalCode, senderAddressState=$senderAddressState, senderName=$senderName, sourceAccountNumberId=$sourceAccountNumberId, status=$status, submission=$submission, type=$type, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferCreateParams.kt
index cf3fd0870..e8bcac698 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferCreateParams.kt
@@ -29,14 +29,6 @@ private constructor(
private val additionalQueryParams: QueryParams,
) : Params {
- /**
- * The transfer amount in USD cents. For Card Push transfers, must be positive.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
- */
- fun amount(): Long = body.amount()
-
/**
* The Business Application Identifier describes the type of transaction being performed. Your
* program must be approved for the specified Business Application Identifier in order to use
@@ -110,6 +102,15 @@ private constructor(
*/
fun merchantState(): String = body.merchantState()
+ /**
+ * The amount to transfer. The receiving bank will convert this to the cardholder's currency.
+ * The amount that is applied to your Increase account matches the currency of your account.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun presentmentAmount(): PresentmentAmount = body.presentmentAmount()
+
/**
* The name of the funds recipient.
*
@@ -174,13 +175,6 @@ private constructor(
*/
fun requireApproval(): Optional = body.requireApproval()
- /**
- * Returns the raw JSON value of [amount].
- *
- * Unlike [amount], this method doesn't throw if the JSON field has an unexpected type.
- */
- fun _amount(): JsonField = body._amount()
-
/**
* Returns the raw JSON value of [businessApplicationIdentifier].
*
@@ -243,6 +237,14 @@ private constructor(
*/
fun _merchantState(): JsonField = body._merchantState()
+ /**
+ * Returns the raw JSON value of [presentmentAmount].
+ *
+ * Unlike [presentmentAmount], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ fun _presentmentAmount(): JsonField = body._presentmentAmount()
+
/**
* Returns the raw JSON value of [recipientName].
*
@@ -321,7 +323,6 @@ private constructor(
*
* The following fields are required:
* ```java
- * .amount()
* .businessApplicationIdentifier()
* .cardTokenId()
* .merchantCategoryCode()
@@ -330,6 +331,7 @@ private constructor(
* .merchantNamePrefix()
* .merchantPostalCode()
* .merchantState()
+ * .presentmentAmount()
* .recipientName()
* .senderAddressCity()
* .senderAddressLine1()
@@ -361,26 +363,15 @@ private constructor(
*
* This is generally only useful if you are already constructing the body separately.
* Otherwise, it's more convenient to use the top-level setters instead:
- * - [amount]
* - [businessApplicationIdentifier]
* - [cardTokenId]
* - [merchantCategoryCode]
* - [merchantCityName]
+ * - [merchantName]
* - etc.
*/
fun body(body: Body) = apply { this.body = body.toBuilder() }
- /** The transfer amount in USD cents. For Card Push transfers, must be positive. */
- fun amount(amount: Long) = apply { body.amount(amount) }
-
- /**
- * Sets [Builder.amount] to an arbitrary JSON value.
- *
- * You should usually call [Builder.amount] with a well-typed [Long] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun amount(amount: JsonField) = apply { body.amount(amount) }
-
/**
* The Business Application Identifier describes the type of transaction being performed.
* Your program must be approved for the specified Business Application Identifier in order
@@ -520,6 +511,26 @@ private constructor(
body.merchantState(merchantState)
}
+ /**
+ * The amount to transfer. The receiving bank will convert this to the cardholder's
+ * currency. The amount that is applied to your Increase account matches the currency of
+ * your account.
+ */
+ fun presentmentAmount(presentmentAmount: PresentmentAmount) = apply {
+ body.presentmentAmount(presentmentAmount)
+ }
+
+ /**
+ * Sets [Builder.presentmentAmount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.presentmentAmount] with a well-typed [PresentmentAmount]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun presentmentAmount(presentmentAmount: JsonField) = apply {
+ body.presentmentAmount(presentmentAmount)
+ }
+
/** The name of the funds recipient. */
fun recipientName(recipientName: String) = apply { body.recipientName(recipientName) }
@@ -766,7 +777,6 @@ private constructor(
*
* The following fields are required:
* ```java
- * .amount()
* .businessApplicationIdentifier()
* .cardTokenId()
* .merchantCategoryCode()
@@ -775,6 +785,7 @@ private constructor(
* .merchantNamePrefix()
* .merchantPostalCode()
* .merchantState()
+ * .presentmentAmount()
* .recipientName()
* .senderAddressCity()
* .senderAddressLine1()
@@ -803,7 +814,6 @@ private constructor(
class Body
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
- private val amount: JsonField,
private val businessApplicationIdentifier: JsonField,
private val cardTokenId: JsonField,
private val merchantCategoryCode: JsonField,
@@ -812,6 +822,7 @@ private constructor(
private val merchantNamePrefix: JsonField,
private val merchantPostalCode: JsonField,
private val merchantState: JsonField,
+ private val presentmentAmount: JsonField,
private val recipientName: JsonField,
private val senderAddressCity: JsonField,
private val senderAddressLine1: JsonField,
@@ -825,7 +836,6 @@ private constructor(
@JsonCreator
private constructor(
- @JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(),
@JsonProperty("business_application_identifier")
@ExcludeMissing
businessApplicationIdentifier: JsonField =
@@ -851,6 +861,9 @@ private constructor(
@JsonProperty("merchant_state")
@ExcludeMissing
merchantState: JsonField = JsonMissing.of(),
+ @JsonProperty("presentment_amount")
+ @ExcludeMissing
+ presentmentAmount: JsonField = JsonMissing.of(),
@JsonProperty("recipient_name")
@ExcludeMissing
recipientName: JsonField = JsonMissing.of(),
@@ -876,7 +889,6 @@ private constructor(
@ExcludeMissing
requireApproval: JsonField = JsonMissing.of(),
) : this(
- amount,
businessApplicationIdentifier,
cardTokenId,
merchantCategoryCode,
@@ -885,6 +897,7 @@ private constructor(
merchantNamePrefix,
merchantPostalCode,
merchantState,
+ presentmentAmount,
recipientName,
senderAddressCity,
senderAddressLine1,
@@ -896,14 +909,6 @@ private constructor(
mutableMapOf(),
)
- /**
- * The transfer amount in USD cents. For Card Push transfers, must be positive.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
- */
- fun amount(): Long = amount.getRequired("amount")
-
/**
* The Business Application Identifier describes the type of transaction being performed.
* Your program must be approved for the specified Business Application Identifier in order
@@ -979,6 +984,17 @@ private constructor(
*/
fun merchantState(): String = merchantState.getRequired("merchant_state")
+ /**
+ * The amount to transfer. The receiving bank will convert this to the cardholder's
+ * currency. The amount that is applied to your Increase account matches the currency of
+ * your account.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun presentmentAmount(): PresentmentAmount =
+ presentmentAmount.getRequired("presentment_amount")
+
/**
* The name of the funds recipient.
*
@@ -1045,13 +1061,6 @@ private constructor(
*/
fun requireApproval(): Optional = requireApproval.getOptional("require_approval")
- /**
- * Returns the raw JSON value of [amount].
- *
- * Unlike [amount], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField = amount
-
/**
* Returns the raw JSON value of [businessApplicationIdentifier].
*
@@ -1132,6 +1141,16 @@ private constructor(
@ExcludeMissing
fun _merchantState(): JsonField = merchantState
+ /**
+ * Returns the raw JSON value of [presentmentAmount].
+ *
+ * Unlike [presentmentAmount], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("presentment_amount")
+ @ExcludeMissing
+ fun _presentmentAmount(): JsonField = presentmentAmount
+
/**
* Returns the raw JSON value of [recipientName].
*
@@ -1230,7 +1249,6 @@ private constructor(
*
* The following fields are required:
* ```java
- * .amount()
* .businessApplicationIdentifier()
* .cardTokenId()
* .merchantCategoryCode()
@@ -1239,6 +1257,7 @@ private constructor(
* .merchantNamePrefix()
* .merchantPostalCode()
* .merchantState()
+ * .presentmentAmount()
* .recipientName()
* .senderAddressCity()
* .senderAddressLine1()
@@ -1254,7 +1273,6 @@ private constructor(
/** A builder for [Body]. */
class Builder internal constructor() {
- private var amount: JsonField? = null
private var businessApplicationIdentifier: JsonField? =
null
private var cardTokenId: JsonField? = null
@@ -1264,6 +1282,7 @@ private constructor(
private var merchantNamePrefix: JsonField? = null
private var merchantPostalCode: JsonField? = null
private var merchantState: JsonField? = null
+ private var presentmentAmount: JsonField? = null
private var recipientName: JsonField? = null
private var senderAddressCity: JsonField? = null
private var senderAddressLine1: JsonField? = null
@@ -1276,7 +1295,6 @@ private constructor(
@JvmSynthetic
internal fun from(body: Body) = apply {
- amount = body.amount
businessApplicationIdentifier = body.businessApplicationIdentifier
cardTokenId = body.cardTokenId
merchantCategoryCode = body.merchantCategoryCode
@@ -1285,6 +1303,7 @@ private constructor(
merchantNamePrefix = body.merchantNamePrefix
merchantPostalCode = body.merchantPostalCode
merchantState = body.merchantState
+ presentmentAmount = body.presentmentAmount
recipientName = body.recipientName
senderAddressCity = body.senderAddressCity
senderAddressLine1 = body.senderAddressLine1
@@ -1296,18 +1315,6 @@ private constructor(
additionalProperties = body.additionalProperties.toMutableMap()
}
- /** The transfer amount in USD cents. For Card Push transfers, must be positive. */
- fun amount(amount: Long) = amount(JsonField.of(amount))
-
- /**
- * Sets [Builder.amount] to an arbitrary JSON value.
- *
- * You should usually call [Builder.amount] with a well-typed [Long] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun amount(amount: JsonField) = apply { this.amount = amount }
-
/**
* The Business Application Identifier describes the type of transaction being
* performed. Your program must be approved for the specified Business Application
@@ -1445,6 +1452,25 @@ private constructor(
this.merchantState = merchantState
}
+ /**
+ * The amount to transfer. The receiving bank will convert this to the cardholder's
+ * currency. The amount that is applied to your Increase account matches the currency of
+ * your account.
+ */
+ fun presentmentAmount(presentmentAmount: PresentmentAmount) =
+ presentmentAmount(JsonField.of(presentmentAmount))
+
+ /**
+ * Sets [Builder.presentmentAmount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.presentmentAmount] with a well-typed
+ * [PresentmentAmount] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun presentmentAmount(presentmentAmount: JsonField) = apply {
+ this.presentmentAmount = presentmentAmount
+ }
+
/** The name of the funds recipient. */
fun recipientName(recipientName: String) = recipientName(JsonField.of(recipientName))
@@ -1587,7 +1613,6 @@ private constructor(
*
* The following fields are required:
* ```java
- * .amount()
* .businessApplicationIdentifier()
* .cardTokenId()
* .merchantCategoryCode()
@@ -1596,6 +1621,7 @@ private constructor(
* .merchantNamePrefix()
* .merchantPostalCode()
* .merchantState()
+ * .presentmentAmount()
* .recipientName()
* .senderAddressCity()
* .senderAddressLine1()
@@ -1609,7 +1635,6 @@ private constructor(
*/
fun build(): Body =
Body(
- checkRequired("amount", amount),
checkRequired("businessApplicationIdentifier", businessApplicationIdentifier),
checkRequired("cardTokenId", cardTokenId),
checkRequired("merchantCategoryCode", merchantCategoryCode),
@@ -1618,6 +1643,7 @@ private constructor(
checkRequired("merchantNamePrefix", merchantNamePrefix),
checkRequired("merchantPostalCode", merchantPostalCode),
checkRequired("merchantState", merchantState),
+ checkRequired("presentmentAmount", presentmentAmount),
checkRequired("recipientName", recipientName),
checkRequired("senderAddressCity", senderAddressCity),
checkRequired("senderAddressLine1", senderAddressLine1),
@@ -1637,7 +1663,6 @@ private constructor(
return@apply
}
- amount()
businessApplicationIdentifier().validate()
cardTokenId()
merchantCategoryCode()
@@ -1646,6 +1671,7 @@ private constructor(
merchantNamePrefix()
merchantPostalCode()
merchantState()
+ presentmentAmount().validate()
recipientName()
senderAddressCity()
senderAddressLine1()
@@ -1673,8 +1699,7 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (if (amount.asKnown().isPresent) 1 else 0) +
- (businessApplicationIdentifier.asKnown().getOrNull()?.validity() ?: 0) +
+ (businessApplicationIdentifier.asKnown().getOrNull()?.validity() ?: 0) +
(if (cardTokenId.asKnown().isPresent) 1 else 0) +
(if (merchantCategoryCode.asKnown().isPresent) 1 else 0) +
(if (merchantCityName.asKnown().isPresent) 1 else 0) +
@@ -1682,6 +1707,7 @@ private constructor(
(if (merchantNamePrefix.asKnown().isPresent) 1 else 0) +
(if (merchantPostalCode.asKnown().isPresent) 1 else 0) +
(if (merchantState.asKnown().isPresent) 1 else 0) +
+ (presentmentAmount.asKnown().getOrNull()?.validity() ?: 0) +
(if (recipientName.asKnown().isPresent) 1 else 0) +
(if (senderAddressCity.asKnown().isPresent) 1 else 0) +
(if (senderAddressLine1.asKnown().isPresent) 1 else 0) +
@@ -1697,7 +1723,6 @@ private constructor(
}
return other is Body &&
- amount == other.amount &&
businessApplicationIdentifier == other.businessApplicationIdentifier &&
cardTokenId == other.cardTokenId &&
merchantCategoryCode == other.merchantCategoryCode &&
@@ -1706,6 +1731,7 @@ private constructor(
merchantNamePrefix == other.merchantNamePrefix &&
merchantPostalCode == other.merchantPostalCode &&
merchantState == other.merchantState &&
+ presentmentAmount == other.presentmentAmount &&
recipientName == other.recipientName &&
senderAddressCity == other.senderAddressCity &&
senderAddressLine1 == other.senderAddressLine1 &&
@@ -1719,7 +1745,6 @@ private constructor(
private val hashCode: Int by lazy {
Objects.hash(
- amount,
businessApplicationIdentifier,
cardTokenId,
merchantCategoryCode,
@@ -1728,6 +1753,7 @@ private constructor(
merchantNamePrefix,
merchantPostalCode,
merchantState,
+ presentmentAmount,
recipientName,
senderAddressCity,
senderAddressLine1,
@@ -1743,7 +1769,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{amount=$amount, businessApplicationIdentifier=$businessApplicationIdentifier, cardTokenId=$cardTokenId, merchantCategoryCode=$merchantCategoryCode, merchantCityName=$merchantCityName, merchantName=$merchantName, merchantNamePrefix=$merchantNamePrefix, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, recipientName=$recipientName, senderAddressCity=$senderAddressCity, senderAddressLine1=$senderAddressLine1, senderAddressPostalCode=$senderAddressPostalCode, senderAddressState=$senderAddressState, senderName=$senderName, sourceAccountNumberId=$sourceAccountNumberId, requireApproval=$requireApproval, additionalProperties=$additionalProperties}"
+ "Body{businessApplicationIdentifier=$businessApplicationIdentifier, cardTokenId=$cardTokenId, merchantCategoryCode=$merchantCategoryCode, merchantCityName=$merchantCityName, merchantName=$merchantName, merchantNamePrefix=$merchantNamePrefix, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, presentmentAmount=$presentmentAmount, recipientName=$recipientName, senderAddressCity=$senderAddressCity, senderAddressLine1=$senderAddressLine1, senderAddressPostalCode=$senderAddressPostalCode, senderAddressState=$senderAddressState, senderName=$senderName, sourceAccountNumberId=$sourceAccountNumberId, requireApproval=$requireApproval, additionalProperties=$additionalProperties}"
}
/**
@@ -2002,6 +2028,1779 @@ private constructor(
override fun toString() = value.toString()
}
+ /**
+ * The amount to transfer. The receiving bank will convert this to the cardholder's currency.
+ * The amount that is applied to your Increase account matches the currency of your account.
+ */
+ class PresentmentAmount
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val currency: JsonField,
+ private val value: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("currency")
+ @ExcludeMissing
+ currency: JsonField = JsonMissing.of(),
+ @JsonProperty("value") @ExcludeMissing value: JsonField = JsonMissing.of(),
+ ) : this(currency, value, mutableMapOf())
+
+ /**
+ * The ISO 4217 currency code representing the currency of the amount.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun currency(): Currency = currency.getRequired("currency")
+
+ /**
+ * The amount value as a decimal string in the currency's major unit. For example, for USD,
+ * '1234.56' represents 1234 dollars and 56 cents. For JPY, '1234' represents 1234 yen. A
+ * currency with minor units requires at least one decimal place and supports up to the
+ * number of decimal places defined by the currency's minor units. A currency without minor
+ * units does not support any decimal places.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun value(): String = value.getRequired("value")
+
+ /**
+ * Returns the raw JSON value of [currency].
+ *
+ * Unlike [currency], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("currency") @ExcludeMissing fun _currency(): JsonField = currency
+
+ /**
+ * Returns the raw JSON value of [value].
+ *
+ * Unlike [value], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("value") @ExcludeMissing fun _value(): JsonField = value
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [PresentmentAmount].
+ *
+ * The following fields are required:
+ * ```java
+ * .currency()
+ * .value()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [PresentmentAmount]. */
+ class Builder internal constructor() {
+
+ private var currency: JsonField? = null
+ private var value: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(presentmentAmount: PresentmentAmount) = apply {
+ currency = presentmentAmount.currency
+ value = presentmentAmount.value
+ additionalProperties = presentmentAmount.additionalProperties.toMutableMap()
+ }
+
+ /** The ISO 4217 currency code representing the currency of the amount. */
+ fun currency(currency: Currency) = currency(JsonField.of(currency))
+
+ /**
+ * Sets [Builder.currency] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.currency] with a well-typed [Currency] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun currency(currency: JsonField) = apply { this.currency = currency }
+
+ /**
+ * The amount value as a decimal string in the currency's major unit. For example, for
+ * USD, '1234.56' represents 1234 dollars and 56 cents. For JPY, '1234' represents 1234
+ * yen. A currency with minor units requires at least one decimal place and supports up
+ * to the number of decimal places defined by the currency's minor units. A currency
+ * without minor units does not support any decimal places.
+ */
+ fun value(value: String) = value(JsonField.of(value))
+
+ /**
+ * Sets [Builder.value] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.value] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun value(value: JsonField) = apply { this.value = value }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [PresentmentAmount].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .currency()
+ * .value()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): PresentmentAmount =
+ PresentmentAmount(
+ checkRequired("currency", currency),
+ checkRequired("value", value),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): PresentmentAmount = apply {
+ if (validated) {
+ return@apply
+ }
+
+ currency().validate()
+ value()
+ 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 =
+ (currency.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (value.asKnown().isPresent) 1 else 0)
+
+ /** The ISO 4217 currency code representing the currency of the amount. */
+ class Currency @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 {
+
+ /** AFN */
+ @JvmField val AFN = of("AFN")
+
+ /** EUR */
+ @JvmField val EUR = of("EUR")
+
+ /** ALL */
+ @JvmField val ALL = of("ALL")
+
+ /** DZD */
+ @JvmField val DZD = of("DZD")
+
+ /** USD */
+ @JvmField val USD = of("USD")
+
+ /** AOA */
+ @JvmField val AOA = of("AOA")
+
+ /** ARS */
+ @JvmField val ARS = of("ARS")
+
+ /** AMD */
+ @JvmField val AMD = of("AMD")
+
+ /** AWG */
+ @JvmField val AWG = of("AWG")
+
+ /** AUD */
+ @JvmField val AUD = of("AUD")
+
+ /** AZN */
+ @JvmField val AZN = of("AZN")
+
+ /** BSD */
+ @JvmField val BSD = of("BSD")
+
+ /** BHD */
+ @JvmField val BHD = of("BHD")
+
+ /** BDT */
+ @JvmField val BDT = of("BDT")
+
+ /** BBD */
+ @JvmField val BBD = of("BBD")
+
+ /** BYN */
+ @JvmField val BYN = of("BYN")
+
+ /** BZD */
+ @JvmField val BZD = of("BZD")
+
+ /** BMD */
+ @JvmField val BMD = of("BMD")
+
+ /** INR */
+ @JvmField val INR = of("INR")
+
+ /** BTN */
+ @JvmField val BTN = of("BTN")
+
+ /** BOB */
+ @JvmField val BOB = of("BOB")
+
+ /** BOV */
+ @JvmField val BOV = of("BOV")
+
+ /** BAM */
+ @JvmField val BAM = of("BAM")
+
+ /** BWP */
+ @JvmField val BWP = of("BWP")
+
+ /** NOK */
+ @JvmField val NOK = of("NOK")
+
+ /** BRL */
+ @JvmField val BRL = of("BRL")
+
+ /** BND */
+ @JvmField val BND = of("BND")
+
+ /** BGN */
+ @JvmField val BGN = of("BGN")
+
+ /** BIF */
+ @JvmField val BIF = of("BIF")
+
+ /** CVE */
+ @JvmField val CVE = of("CVE")
+
+ /** KHR */
+ @JvmField val KHR = of("KHR")
+
+ /** CAD */
+ @JvmField val CAD = of("CAD")
+
+ /** KYD */
+ @JvmField val KYD = of("KYD")
+
+ /** CLP */
+ @JvmField val CLP = of("CLP")
+
+ /** CLF */
+ @JvmField val CLF = of("CLF")
+
+ /** CNY */
+ @JvmField val CNY = of("CNY")
+
+ /** COP */
+ @JvmField val COP = of("COP")
+
+ /** COU */
+ @JvmField val COU = of("COU")
+
+ /** KMF */
+ @JvmField val KMF = of("KMF")
+
+ /** CDF */
+ @JvmField val CDF = of("CDF")
+
+ /** NZD */
+ @JvmField val NZD = of("NZD")
+
+ /** CRC */
+ @JvmField val CRC = of("CRC")
+
+ /** CUP */
+ @JvmField val CUP = of("CUP")
+
+ /** CZK */
+ @JvmField val CZK = of("CZK")
+
+ /** DKK */
+ @JvmField val DKK = of("DKK")
+
+ /** DJF */
+ @JvmField val DJF = of("DJF")
+
+ /** DOP */
+ @JvmField val DOP = of("DOP")
+
+ /** EGP */
+ @JvmField val EGP = of("EGP")
+
+ /** SVC */
+ @JvmField val SVC = of("SVC")
+
+ /** ERN */
+ @JvmField val ERN = of("ERN")
+
+ /** SZL */
+ @JvmField val SZL = of("SZL")
+
+ /** ETB */
+ @JvmField val ETB = of("ETB")
+
+ /** FKP */
+ @JvmField val FKP = of("FKP")
+
+ /** FJD */
+ @JvmField val FJD = of("FJD")
+
+ /** GMD */
+ @JvmField val GMD = of("GMD")
+
+ /** GEL */
+ @JvmField val GEL = of("GEL")
+
+ /** GHS */
+ @JvmField val GHS = of("GHS")
+
+ /** GIP */
+ @JvmField val GIP = of("GIP")
+
+ /** GTQ */
+ @JvmField val GTQ = of("GTQ")
+
+ /** GBP */
+ @JvmField val GBP = of("GBP")
+
+ /** GNF */
+ @JvmField val GNF = of("GNF")
+
+ /** GYD */
+ @JvmField val GYD = of("GYD")
+
+ /** HTG */
+ @JvmField val HTG = of("HTG")
+
+ /** HNL */
+ @JvmField val HNL = of("HNL")
+
+ /** HKD */
+ @JvmField val HKD = of("HKD")
+
+ /** HUF */
+ @JvmField val HUF = of("HUF")
+
+ /** ISK */
+ @JvmField val ISK = of("ISK")
+
+ /** IDR */
+ @JvmField val IDR = of("IDR")
+
+ /** IRR */
+ @JvmField val IRR = of("IRR")
+
+ /** IQD */
+ @JvmField val IQD = of("IQD")
+
+ /** ILS */
+ @JvmField val ILS = of("ILS")
+
+ /** JMD */
+ @JvmField val JMD = of("JMD")
+
+ /** JPY */
+ @JvmField val JPY = of("JPY")
+
+ /** JOD */
+ @JvmField val JOD = of("JOD")
+
+ /** KZT */
+ @JvmField val KZT = of("KZT")
+
+ /** KES */
+ @JvmField val KES = of("KES")
+
+ /** KPW */
+ @JvmField val KPW = of("KPW")
+
+ /** KRW */
+ @JvmField val KRW = of("KRW")
+
+ /** KWD */
+ @JvmField val KWD = of("KWD")
+
+ /** KGS */
+ @JvmField val KGS = of("KGS")
+
+ /** LAK */
+ @JvmField val LAK = of("LAK")
+
+ /** LBP */
+ @JvmField val LBP = of("LBP")
+
+ /** LSL */
+ @JvmField val LSL = of("LSL")
+
+ /** ZAR */
+ @JvmField val ZAR = of("ZAR")
+
+ /** LRD */
+ @JvmField val LRD = of("LRD")
+
+ /** LYD */
+ @JvmField val LYD = of("LYD")
+
+ /** CHF */
+ @JvmField val CHF = of("CHF")
+
+ /** MOP */
+ @JvmField val MOP = of("MOP")
+
+ /** MKD */
+ @JvmField val MKD = of("MKD")
+
+ /** MGA */
+ @JvmField val MGA = of("MGA")
+
+ /** MWK */
+ @JvmField val MWK = of("MWK")
+
+ /** MYR */
+ @JvmField val MYR = of("MYR")
+
+ /** MVR */
+ @JvmField val MVR = of("MVR")
+
+ /** MRU */
+ @JvmField val MRU = of("MRU")
+
+ /** MUR */
+ @JvmField val MUR = of("MUR")
+
+ /** MXN */
+ @JvmField val MXN = of("MXN")
+
+ /** MXV */
+ @JvmField val MXV = of("MXV")
+
+ /** MDL */
+ @JvmField val MDL = of("MDL")
+
+ /** MNT */
+ @JvmField val MNT = of("MNT")
+
+ /** MAD */
+ @JvmField val MAD = of("MAD")
+
+ /** MZN */
+ @JvmField val MZN = of("MZN")
+
+ /** MMK */
+ @JvmField val MMK = of("MMK")
+
+ /** NAD */
+ @JvmField val NAD = of("NAD")
+
+ /** NPR */
+ @JvmField val NPR = of("NPR")
+
+ /** NIO */
+ @JvmField val NIO = of("NIO")
+
+ /** NGN */
+ @JvmField val NGN = of("NGN")
+
+ /** OMR */
+ @JvmField val OMR = of("OMR")
+
+ /** PKR */
+ @JvmField val PKR = of("PKR")
+
+ /** PAB */
+ @JvmField val PAB = of("PAB")
+
+ /** PGK */
+ @JvmField val PGK = of("PGK")
+
+ /** PYG */
+ @JvmField val PYG = of("PYG")
+
+ /** PEN */
+ @JvmField val PEN = of("PEN")
+
+ /** PHP */
+ @JvmField val PHP = of("PHP")
+
+ /** PLN */
+ @JvmField val PLN = of("PLN")
+
+ /** QAR */
+ @JvmField val QAR = of("QAR")
+
+ /** RON */
+ @JvmField val RON = of("RON")
+
+ /** RUB */
+ @JvmField val RUB = of("RUB")
+
+ /** RWF */
+ @JvmField val RWF = of("RWF")
+
+ /** SHP */
+ @JvmField val SHP = of("SHP")
+
+ /** WST */
+ @JvmField val WST = of("WST")
+
+ /** STN */
+ @JvmField val STN = of("STN")
+
+ /** SAR */
+ @JvmField val SAR = of("SAR")
+
+ /** RSD */
+ @JvmField val RSD = of("RSD")
+
+ /** SCR */
+ @JvmField val SCR = of("SCR")
+
+ /** SLE */
+ @JvmField val SLE = of("SLE")
+
+ /** SGD */
+ @JvmField val SGD = of("SGD")
+
+ /** SBD */
+ @JvmField val SBD = of("SBD")
+
+ /** SOS */
+ @JvmField val SOS = of("SOS")
+
+ /** SSP */
+ @JvmField val SSP = of("SSP")
+
+ /** LKR */
+ @JvmField val LKR = of("LKR")
+
+ /** SDG */
+ @JvmField val SDG = of("SDG")
+
+ /** SRD */
+ @JvmField val SRD = of("SRD")
+
+ /** SEK */
+ @JvmField val SEK = of("SEK")
+
+ /** CHE */
+ @JvmField val CHE = of("CHE")
+
+ /** CHW */
+ @JvmField val CHW = of("CHW")
+
+ /** SYP */
+ @JvmField val SYP = of("SYP")
+
+ /** TWD */
+ @JvmField val TWD = of("TWD")
+
+ /** TJS */
+ @JvmField val TJS = of("TJS")
+
+ /** TZS */
+ @JvmField val TZS = of("TZS")
+
+ /** THB */
+ @JvmField val THB = of("THB")
+
+ /** TOP */
+ @JvmField val TOP = of("TOP")
+
+ /** TTD */
+ @JvmField val TTD = of("TTD")
+
+ /** TND */
+ @JvmField val TND = of("TND")
+
+ /** TRY */
+ @JvmField val TRY = of("TRY")
+
+ /** TMT */
+ @JvmField val TMT = of("TMT")
+
+ /** UGX */
+ @JvmField val UGX = of("UGX")
+
+ /** UAH */
+ @JvmField val UAH = of("UAH")
+
+ /** AED */
+ @JvmField val AED = of("AED")
+
+ /** USN */
+ @JvmField val USN = of("USN")
+
+ /** UYU */
+ @JvmField val UYU = of("UYU")
+
+ /** UYI */
+ @JvmField val UYI = of("UYI")
+
+ /** UYW */
+ @JvmField val UYW = of("UYW")
+
+ /** UZS */
+ @JvmField val UZS = of("UZS")
+
+ /** VUV */
+ @JvmField val VUV = of("VUV")
+
+ /** VES */
+ @JvmField val VES = of("VES")
+
+ /** VED */
+ @JvmField val VED = of("VED")
+
+ /** VND */
+ @JvmField val VND = of("VND")
+
+ /** YER */
+ @JvmField val YER = of("YER")
+
+ /** ZMW */
+ @JvmField val ZMW = of("ZMW")
+
+ /** ZWG */
+ @JvmField val ZWG = of("ZWG")
+
+ @JvmStatic fun of(value: String) = Currency(JsonField.of(value))
+ }
+
+ /** An enum containing [Currency]'s known values. */
+ enum class Known {
+ /** AFN */
+ AFN,
+ /** EUR */
+ EUR,
+ /** ALL */
+ ALL,
+ /** DZD */
+ DZD,
+ /** USD */
+ USD,
+ /** AOA */
+ AOA,
+ /** ARS */
+ ARS,
+ /** AMD */
+ AMD,
+ /** AWG */
+ AWG,
+ /** AUD */
+ AUD,
+ /** AZN */
+ AZN,
+ /** BSD */
+ BSD,
+ /** BHD */
+ BHD,
+ /** BDT */
+ BDT,
+ /** BBD */
+ BBD,
+ /** BYN */
+ BYN,
+ /** BZD */
+ BZD,
+ /** BMD */
+ BMD,
+ /** INR */
+ INR,
+ /** BTN */
+ BTN,
+ /** BOB */
+ BOB,
+ /** BOV */
+ BOV,
+ /** BAM */
+ BAM,
+ /** BWP */
+ BWP,
+ /** NOK */
+ NOK,
+ /** BRL */
+ BRL,
+ /** BND */
+ BND,
+ /** BGN */
+ BGN,
+ /** BIF */
+ BIF,
+ /** CVE */
+ CVE,
+ /** KHR */
+ KHR,
+ /** CAD */
+ CAD,
+ /** KYD */
+ KYD,
+ /** CLP */
+ CLP,
+ /** CLF */
+ CLF,
+ /** CNY */
+ CNY,
+ /** COP */
+ COP,
+ /** COU */
+ COU,
+ /** KMF */
+ KMF,
+ /** CDF */
+ CDF,
+ /** NZD */
+ NZD,
+ /** CRC */
+ CRC,
+ /** CUP */
+ CUP,
+ /** CZK */
+ CZK,
+ /** DKK */
+ DKK,
+ /** DJF */
+ DJF,
+ /** DOP */
+ DOP,
+ /** EGP */
+ EGP,
+ /** SVC */
+ SVC,
+ /** ERN */
+ ERN,
+ /** SZL */
+ SZL,
+ /** ETB */
+ ETB,
+ /** FKP */
+ FKP,
+ /** FJD */
+ FJD,
+ /** GMD */
+ GMD,
+ /** GEL */
+ GEL,
+ /** GHS */
+ GHS,
+ /** GIP */
+ GIP,
+ /** GTQ */
+ GTQ,
+ /** GBP */
+ GBP,
+ /** GNF */
+ GNF,
+ /** GYD */
+ GYD,
+ /** HTG */
+ HTG,
+ /** HNL */
+ HNL,
+ /** HKD */
+ HKD,
+ /** HUF */
+ HUF,
+ /** ISK */
+ ISK,
+ /** IDR */
+ IDR,
+ /** IRR */
+ IRR,
+ /** IQD */
+ IQD,
+ /** ILS */
+ ILS,
+ /** JMD */
+ JMD,
+ /** JPY */
+ JPY,
+ /** JOD */
+ JOD,
+ /** KZT */
+ KZT,
+ /** KES */
+ KES,
+ /** KPW */
+ KPW,
+ /** KRW */
+ KRW,
+ /** KWD */
+ KWD,
+ /** KGS */
+ KGS,
+ /** LAK */
+ LAK,
+ /** LBP */
+ LBP,
+ /** LSL */
+ LSL,
+ /** ZAR */
+ ZAR,
+ /** LRD */
+ LRD,
+ /** LYD */
+ LYD,
+ /** CHF */
+ CHF,
+ /** MOP */
+ MOP,
+ /** MKD */
+ MKD,
+ /** MGA */
+ MGA,
+ /** MWK */
+ MWK,
+ /** MYR */
+ MYR,
+ /** MVR */
+ MVR,
+ /** MRU */
+ MRU,
+ /** MUR */
+ MUR,
+ /** MXN */
+ MXN,
+ /** MXV */
+ MXV,
+ /** MDL */
+ MDL,
+ /** MNT */
+ MNT,
+ /** MAD */
+ MAD,
+ /** MZN */
+ MZN,
+ /** MMK */
+ MMK,
+ /** NAD */
+ NAD,
+ /** NPR */
+ NPR,
+ /** NIO */
+ NIO,
+ /** NGN */
+ NGN,
+ /** OMR */
+ OMR,
+ /** PKR */
+ PKR,
+ /** PAB */
+ PAB,
+ /** PGK */
+ PGK,
+ /** PYG */
+ PYG,
+ /** PEN */
+ PEN,
+ /** PHP */
+ PHP,
+ /** PLN */
+ PLN,
+ /** QAR */
+ QAR,
+ /** RON */
+ RON,
+ /** RUB */
+ RUB,
+ /** RWF */
+ RWF,
+ /** SHP */
+ SHP,
+ /** WST */
+ WST,
+ /** STN */
+ STN,
+ /** SAR */
+ SAR,
+ /** RSD */
+ RSD,
+ /** SCR */
+ SCR,
+ /** SLE */
+ SLE,
+ /** SGD */
+ SGD,
+ /** SBD */
+ SBD,
+ /** SOS */
+ SOS,
+ /** SSP */
+ SSP,
+ /** LKR */
+ LKR,
+ /** SDG */
+ SDG,
+ /** SRD */
+ SRD,
+ /** SEK */
+ SEK,
+ /** CHE */
+ CHE,
+ /** CHW */
+ CHW,
+ /** SYP */
+ SYP,
+ /** TWD */
+ TWD,
+ /** TJS */
+ TJS,
+ /** TZS */
+ TZS,
+ /** THB */
+ THB,
+ /** TOP */
+ TOP,
+ /** TTD */
+ TTD,
+ /** TND */
+ TND,
+ /** TRY */
+ TRY,
+ /** TMT */
+ TMT,
+ /** UGX */
+ UGX,
+ /** UAH */
+ UAH,
+ /** AED */
+ AED,
+ /** USN */
+ USN,
+ /** UYU */
+ UYU,
+ /** UYI */
+ UYI,
+ /** UYW */
+ UYW,
+ /** UZS */
+ UZS,
+ /** VUV */
+ VUV,
+ /** VES */
+ VES,
+ /** VED */
+ VED,
+ /** VND */
+ VND,
+ /** YER */
+ YER,
+ /** ZMW */
+ ZMW,
+ /** ZWG */
+ ZWG,
+ }
+
+ /**
+ * An enum containing [Currency]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Currency] 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 {
+ /** AFN */
+ AFN,
+ /** EUR */
+ EUR,
+ /** ALL */
+ ALL,
+ /** DZD */
+ DZD,
+ /** USD */
+ USD,
+ /** AOA */
+ AOA,
+ /** ARS */
+ ARS,
+ /** AMD */
+ AMD,
+ /** AWG */
+ AWG,
+ /** AUD */
+ AUD,
+ /** AZN */
+ AZN,
+ /** BSD */
+ BSD,
+ /** BHD */
+ BHD,
+ /** BDT */
+ BDT,
+ /** BBD */
+ BBD,
+ /** BYN */
+ BYN,
+ /** BZD */
+ BZD,
+ /** BMD */
+ BMD,
+ /** INR */
+ INR,
+ /** BTN */
+ BTN,
+ /** BOB */
+ BOB,
+ /** BOV */
+ BOV,
+ /** BAM */
+ BAM,
+ /** BWP */
+ BWP,
+ /** NOK */
+ NOK,
+ /** BRL */
+ BRL,
+ /** BND */
+ BND,
+ /** BGN */
+ BGN,
+ /** BIF */
+ BIF,
+ /** CVE */
+ CVE,
+ /** KHR */
+ KHR,
+ /** CAD */
+ CAD,
+ /** KYD */
+ KYD,
+ /** CLP */
+ CLP,
+ /** CLF */
+ CLF,
+ /** CNY */
+ CNY,
+ /** COP */
+ COP,
+ /** COU */
+ COU,
+ /** KMF */
+ KMF,
+ /** CDF */
+ CDF,
+ /** NZD */
+ NZD,
+ /** CRC */
+ CRC,
+ /** CUP */
+ CUP,
+ /** CZK */
+ CZK,
+ /** DKK */
+ DKK,
+ /** DJF */
+ DJF,
+ /** DOP */
+ DOP,
+ /** EGP */
+ EGP,
+ /** SVC */
+ SVC,
+ /** ERN */
+ ERN,
+ /** SZL */
+ SZL,
+ /** ETB */
+ ETB,
+ /** FKP */
+ FKP,
+ /** FJD */
+ FJD,
+ /** GMD */
+ GMD,
+ /** GEL */
+ GEL,
+ /** GHS */
+ GHS,
+ /** GIP */
+ GIP,
+ /** GTQ */
+ GTQ,
+ /** GBP */
+ GBP,
+ /** GNF */
+ GNF,
+ /** GYD */
+ GYD,
+ /** HTG */
+ HTG,
+ /** HNL */
+ HNL,
+ /** HKD */
+ HKD,
+ /** HUF */
+ HUF,
+ /** ISK */
+ ISK,
+ /** IDR */
+ IDR,
+ /** IRR */
+ IRR,
+ /** IQD */
+ IQD,
+ /** ILS */
+ ILS,
+ /** JMD */
+ JMD,
+ /** JPY */
+ JPY,
+ /** JOD */
+ JOD,
+ /** KZT */
+ KZT,
+ /** KES */
+ KES,
+ /** KPW */
+ KPW,
+ /** KRW */
+ KRW,
+ /** KWD */
+ KWD,
+ /** KGS */
+ KGS,
+ /** LAK */
+ LAK,
+ /** LBP */
+ LBP,
+ /** LSL */
+ LSL,
+ /** ZAR */
+ ZAR,
+ /** LRD */
+ LRD,
+ /** LYD */
+ LYD,
+ /** CHF */
+ CHF,
+ /** MOP */
+ MOP,
+ /** MKD */
+ MKD,
+ /** MGA */
+ MGA,
+ /** MWK */
+ MWK,
+ /** MYR */
+ MYR,
+ /** MVR */
+ MVR,
+ /** MRU */
+ MRU,
+ /** MUR */
+ MUR,
+ /** MXN */
+ MXN,
+ /** MXV */
+ MXV,
+ /** MDL */
+ MDL,
+ /** MNT */
+ MNT,
+ /** MAD */
+ MAD,
+ /** MZN */
+ MZN,
+ /** MMK */
+ MMK,
+ /** NAD */
+ NAD,
+ /** NPR */
+ NPR,
+ /** NIO */
+ NIO,
+ /** NGN */
+ NGN,
+ /** OMR */
+ OMR,
+ /** PKR */
+ PKR,
+ /** PAB */
+ PAB,
+ /** PGK */
+ PGK,
+ /** PYG */
+ PYG,
+ /** PEN */
+ PEN,
+ /** PHP */
+ PHP,
+ /** PLN */
+ PLN,
+ /** QAR */
+ QAR,
+ /** RON */
+ RON,
+ /** RUB */
+ RUB,
+ /** RWF */
+ RWF,
+ /** SHP */
+ SHP,
+ /** WST */
+ WST,
+ /** STN */
+ STN,
+ /** SAR */
+ SAR,
+ /** RSD */
+ RSD,
+ /** SCR */
+ SCR,
+ /** SLE */
+ SLE,
+ /** SGD */
+ SGD,
+ /** SBD */
+ SBD,
+ /** SOS */
+ SOS,
+ /** SSP */
+ SSP,
+ /** LKR */
+ LKR,
+ /** SDG */
+ SDG,
+ /** SRD */
+ SRD,
+ /** SEK */
+ SEK,
+ /** CHE */
+ CHE,
+ /** CHW */
+ CHW,
+ /** SYP */
+ SYP,
+ /** TWD */
+ TWD,
+ /** TJS */
+ TJS,
+ /** TZS */
+ TZS,
+ /** THB */
+ THB,
+ /** TOP */
+ TOP,
+ /** TTD */
+ TTD,
+ /** TND */
+ TND,
+ /** TRY */
+ TRY,
+ /** TMT */
+ TMT,
+ /** UGX */
+ UGX,
+ /** UAH */
+ UAH,
+ /** AED */
+ AED,
+ /** USN */
+ USN,
+ /** UYU */
+ UYU,
+ /** UYI */
+ UYI,
+ /** UYW */
+ UYW,
+ /** UZS */
+ UZS,
+ /** VUV */
+ VUV,
+ /** VES */
+ VES,
+ /** VED */
+ VED,
+ /** VND */
+ VND,
+ /** YER */
+ YER,
+ /** ZMW */
+ ZMW,
+ /** ZWG */
+ ZWG,
+ /**
+ * An enum member indicating that [Currency] 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) {
+ AFN -> Value.AFN
+ EUR -> Value.EUR
+ ALL -> Value.ALL
+ DZD -> Value.DZD
+ USD -> Value.USD
+ AOA -> Value.AOA
+ ARS -> Value.ARS
+ AMD -> Value.AMD
+ AWG -> Value.AWG
+ AUD -> Value.AUD
+ AZN -> Value.AZN
+ BSD -> Value.BSD
+ BHD -> Value.BHD
+ BDT -> Value.BDT
+ BBD -> Value.BBD
+ BYN -> Value.BYN
+ BZD -> Value.BZD
+ BMD -> Value.BMD
+ INR -> Value.INR
+ BTN -> Value.BTN
+ BOB -> Value.BOB
+ BOV -> Value.BOV
+ BAM -> Value.BAM
+ BWP -> Value.BWP
+ NOK -> Value.NOK
+ BRL -> Value.BRL
+ BND -> Value.BND
+ BGN -> Value.BGN
+ BIF -> Value.BIF
+ CVE -> Value.CVE
+ KHR -> Value.KHR
+ CAD -> Value.CAD
+ KYD -> Value.KYD
+ CLP -> Value.CLP
+ CLF -> Value.CLF
+ CNY -> Value.CNY
+ COP -> Value.COP
+ COU -> Value.COU
+ KMF -> Value.KMF
+ CDF -> Value.CDF
+ NZD -> Value.NZD
+ CRC -> Value.CRC
+ CUP -> Value.CUP
+ CZK -> Value.CZK
+ DKK -> Value.DKK
+ DJF -> Value.DJF
+ DOP -> Value.DOP
+ EGP -> Value.EGP
+ SVC -> Value.SVC
+ ERN -> Value.ERN
+ SZL -> Value.SZL
+ ETB -> Value.ETB
+ FKP -> Value.FKP
+ FJD -> Value.FJD
+ GMD -> Value.GMD
+ GEL -> Value.GEL
+ GHS -> Value.GHS
+ GIP -> Value.GIP
+ GTQ -> Value.GTQ
+ GBP -> Value.GBP
+ GNF -> Value.GNF
+ GYD -> Value.GYD
+ HTG -> Value.HTG
+ HNL -> Value.HNL
+ HKD -> Value.HKD
+ HUF -> Value.HUF
+ ISK -> Value.ISK
+ IDR -> Value.IDR
+ IRR -> Value.IRR
+ IQD -> Value.IQD
+ ILS -> Value.ILS
+ JMD -> Value.JMD
+ JPY -> Value.JPY
+ JOD -> Value.JOD
+ KZT -> Value.KZT
+ KES -> Value.KES
+ KPW -> Value.KPW
+ KRW -> Value.KRW
+ KWD -> Value.KWD
+ KGS -> Value.KGS
+ LAK -> Value.LAK
+ LBP -> Value.LBP
+ LSL -> Value.LSL
+ ZAR -> Value.ZAR
+ LRD -> Value.LRD
+ LYD -> Value.LYD
+ CHF -> Value.CHF
+ MOP -> Value.MOP
+ MKD -> Value.MKD
+ MGA -> Value.MGA
+ MWK -> Value.MWK
+ MYR -> Value.MYR
+ MVR -> Value.MVR
+ MRU -> Value.MRU
+ MUR -> Value.MUR
+ MXN -> Value.MXN
+ MXV -> Value.MXV
+ MDL -> Value.MDL
+ MNT -> Value.MNT
+ MAD -> Value.MAD
+ MZN -> Value.MZN
+ MMK -> Value.MMK
+ NAD -> Value.NAD
+ NPR -> Value.NPR
+ NIO -> Value.NIO
+ NGN -> Value.NGN
+ OMR -> Value.OMR
+ PKR -> Value.PKR
+ PAB -> Value.PAB
+ PGK -> Value.PGK
+ PYG -> Value.PYG
+ PEN -> Value.PEN
+ PHP -> Value.PHP
+ PLN -> Value.PLN
+ QAR -> Value.QAR
+ RON -> Value.RON
+ RUB -> Value.RUB
+ RWF -> Value.RWF
+ SHP -> Value.SHP
+ WST -> Value.WST
+ STN -> Value.STN
+ SAR -> Value.SAR
+ RSD -> Value.RSD
+ SCR -> Value.SCR
+ SLE -> Value.SLE
+ SGD -> Value.SGD
+ SBD -> Value.SBD
+ SOS -> Value.SOS
+ SSP -> Value.SSP
+ LKR -> Value.LKR
+ SDG -> Value.SDG
+ SRD -> Value.SRD
+ SEK -> Value.SEK
+ CHE -> Value.CHE
+ CHW -> Value.CHW
+ SYP -> Value.SYP
+ TWD -> Value.TWD
+ TJS -> Value.TJS
+ TZS -> Value.TZS
+ THB -> Value.THB
+ TOP -> Value.TOP
+ TTD -> Value.TTD
+ TND -> Value.TND
+ TRY -> Value.TRY
+ TMT -> Value.TMT
+ UGX -> Value.UGX
+ UAH -> Value.UAH
+ AED -> Value.AED
+ USN -> Value.USN
+ UYU -> Value.UYU
+ UYI -> Value.UYI
+ UYW -> Value.UYW
+ UZS -> Value.UZS
+ VUV -> Value.VUV
+ VES -> Value.VES
+ VED -> Value.VED
+ VND -> Value.VND
+ YER -> Value.YER
+ ZMW -> Value.ZMW
+ ZWG -> Value.ZWG
+ 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) {
+ AFN -> Known.AFN
+ EUR -> Known.EUR
+ ALL -> Known.ALL
+ DZD -> Known.DZD
+ USD -> Known.USD
+ AOA -> Known.AOA
+ ARS -> Known.ARS
+ AMD -> Known.AMD
+ AWG -> Known.AWG
+ AUD -> Known.AUD
+ AZN -> Known.AZN
+ BSD -> Known.BSD
+ BHD -> Known.BHD
+ BDT -> Known.BDT
+ BBD -> Known.BBD
+ BYN -> Known.BYN
+ BZD -> Known.BZD
+ BMD -> Known.BMD
+ INR -> Known.INR
+ BTN -> Known.BTN
+ BOB -> Known.BOB
+ BOV -> Known.BOV
+ BAM -> Known.BAM
+ BWP -> Known.BWP
+ NOK -> Known.NOK
+ BRL -> Known.BRL
+ BND -> Known.BND
+ BGN -> Known.BGN
+ BIF -> Known.BIF
+ CVE -> Known.CVE
+ KHR -> Known.KHR
+ CAD -> Known.CAD
+ KYD -> Known.KYD
+ CLP -> Known.CLP
+ CLF -> Known.CLF
+ CNY -> Known.CNY
+ COP -> Known.COP
+ COU -> Known.COU
+ KMF -> Known.KMF
+ CDF -> Known.CDF
+ NZD -> Known.NZD
+ CRC -> Known.CRC
+ CUP -> Known.CUP
+ CZK -> Known.CZK
+ DKK -> Known.DKK
+ DJF -> Known.DJF
+ DOP -> Known.DOP
+ EGP -> Known.EGP
+ SVC -> Known.SVC
+ ERN -> Known.ERN
+ SZL -> Known.SZL
+ ETB -> Known.ETB
+ FKP -> Known.FKP
+ FJD -> Known.FJD
+ GMD -> Known.GMD
+ GEL -> Known.GEL
+ GHS -> Known.GHS
+ GIP -> Known.GIP
+ GTQ -> Known.GTQ
+ GBP -> Known.GBP
+ GNF -> Known.GNF
+ GYD -> Known.GYD
+ HTG -> Known.HTG
+ HNL -> Known.HNL
+ HKD -> Known.HKD
+ HUF -> Known.HUF
+ ISK -> Known.ISK
+ IDR -> Known.IDR
+ IRR -> Known.IRR
+ IQD -> Known.IQD
+ ILS -> Known.ILS
+ JMD -> Known.JMD
+ JPY -> Known.JPY
+ JOD -> Known.JOD
+ KZT -> Known.KZT
+ KES -> Known.KES
+ KPW -> Known.KPW
+ KRW -> Known.KRW
+ KWD -> Known.KWD
+ KGS -> Known.KGS
+ LAK -> Known.LAK
+ LBP -> Known.LBP
+ LSL -> Known.LSL
+ ZAR -> Known.ZAR
+ LRD -> Known.LRD
+ LYD -> Known.LYD
+ CHF -> Known.CHF
+ MOP -> Known.MOP
+ MKD -> Known.MKD
+ MGA -> Known.MGA
+ MWK -> Known.MWK
+ MYR -> Known.MYR
+ MVR -> Known.MVR
+ MRU -> Known.MRU
+ MUR -> Known.MUR
+ MXN -> Known.MXN
+ MXV -> Known.MXV
+ MDL -> Known.MDL
+ MNT -> Known.MNT
+ MAD -> Known.MAD
+ MZN -> Known.MZN
+ MMK -> Known.MMK
+ NAD -> Known.NAD
+ NPR -> Known.NPR
+ NIO -> Known.NIO
+ NGN -> Known.NGN
+ OMR -> Known.OMR
+ PKR -> Known.PKR
+ PAB -> Known.PAB
+ PGK -> Known.PGK
+ PYG -> Known.PYG
+ PEN -> Known.PEN
+ PHP -> Known.PHP
+ PLN -> Known.PLN
+ QAR -> Known.QAR
+ RON -> Known.RON
+ RUB -> Known.RUB
+ RWF -> Known.RWF
+ SHP -> Known.SHP
+ WST -> Known.WST
+ STN -> Known.STN
+ SAR -> Known.SAR
+ RSD -> Known.RSD
+ SCR -> Known.SCR
+ SLE -> Known.SLE
+ SGD -> Known.SGD
+ SBD -> Known.SBD
+ SOS -> Known.SOS
+ SSP -> Known.SSP
+ LKR -> Known.LKR
+ SDG -> Known.SDG
+ SRD -> Known.SRD
+ SEK -> Known.SEK
+ CHE -> Known.CHE
+ CHW -> Known.CHW
+ SYP -> Known.SYP
+ TWD -> Known.TWD
+ TJS -> Known.TJS
+ TZS -> Known.TZS
+ THB -> Known.THB
+ TOP -> Known.TOP
+ TTD -> Known.TTD
+ TND -> Known.TND
+ TRY -> Known.TRY
+ TMT -> Known.TMT
+ UGX -> Known.UGX
+ UAH -> Known.UAH
+ AED -> Known.AED
+ USN -> Known.USN
+ UYU -> Known.UYU
+ UYI -> Known.UYI
+ UYW -> Known.UYW
+ UZS -> Known.UZS
+ VUV -> Known.VUV
+ VES -> Known.VES
+ VED -> Known.VED
+ VND -> Known.VND
+ YER -> Known.YER
+ ZMW -> Known.ZMW
+ ZWG -> Known.ZWG
+ else -> throw IncreaseInvalidDataException("Unknown Currency: $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(): Currency = 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 Currency && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is PresentmentAmount &&
+ currency == other.currency &&
+ value == other.value &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(currency, value, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "PresentmentAmount{currency=$currency, value=$value, additionalProperties=$additionalProperties}"
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/Transaction.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/Transaction.kt
index cadc2d9b0..f3adb6002 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/Transaction.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/Transaction.kt
@@ -16187,18 +16187,20 @@ private constructor(
class CardPushTransferAcceptance
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
- private val amount: JsonField,
+ private val settlementAmount: JsonField,
private val transferId: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
- @JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(),
+ @JsonProperty("settlement_amount")
+ @ExcludeMissing
+ settlementAmount: JsonField = JsonMissing.of(),
@JsonProperty("transfer_id")
@ExcludeMissing
transferId: JsonField = JsonMissing.of(),
- ) : this(amount, transferId, mutableMapOf())
+ ) : this(settlementAmount, transferId, mutableMapOf())
/**
* The transfer amount in USD cents.
@@ -16207,7 +16209,7 @@ private constructor(
* unexpectedly missing or null (e.g. if the server responded with an unexpected
* value).
*/
- fun amount(): Long = amount.getRequired("amount")
+ fun settlementAmount(): Long = settlementAmount.getRequired("settlement_amount")
/**
* The identifier of the Card Push Transfer that led to this Transaction.
@@ -16219,11 +16221,14 @@ private constructor(
fun transferId(): String = transferId.getRequired("transfer_id")
/**
- * Returns the raw JSON value of [amount].
+ * Returns the raw JSON value of [settlementAmount].
*
- * Unlike [amount], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [settlementAmount], this method doesn't throw if the JSON field has an
+ * unexpected type.
*/
- @JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField = amount
+ @JsonProperty("settlement_amount")
+ @ExcludeMissing
+ fun _settlementAmount(): JsonField = settlementAmount
/**
* Returns the raw JSON value of [transferId].
@@ -16255,7 +16260,7 @@ private constructor(
*
* The following fields are required:
* ```java
- * .amount()
+ * .settlementAmount()
* .transferId()
* ```
*/
@@ -16265,29 +16270,32 @@ private constructor(
/** A builder for [CardPushTransferAcceptance]. */
class Builder internal constructor() {
- private var amount: JsonField? = null
+ private var settlementAmount: JsonField? = null
private var transferId: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(cardPushTransferAcceptance: CardPushTransferAcceptance) = apply {
- amount = cardPushTransferAcceptance.amount
+ settlementAmount = cardPushTransferAcceptance.settlementAmount
transferId = cardPushTransferAcceptance.transferId
additionalProperties =
cardPushTransferAcceptance.additionalProperties.toMutableMap()
}
/** The transfer amount in USD cents. */
- fun amount(amount: Long) = amount(JsonField.of(amount))
+ fun settlementAmount(settlementAmount: Long) =
+ settlementAmount(JsonField.of(settlementAmount))
/**
- * Sets [Builder.amount] to an arbitrary JSON value.
+ * Sets [Builder.settlementAmount] to an arbitrary JSON value.
*
- * You should usually call [Builder.amount] with a well-typed [Long] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
- * supported value.
+ * You should usually call [Builder.settlementAmount] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
*/
- fun amount(amount: JsonField) = apply { this.amount = amount }
+ fun settlementAmount(settlementAmount: JsonField) = apply {
+ this.settlementAmount = settlementAmount
+ }
/** The identifier of the Card Push Transfer that led to this Transaction. */
fun transferId(transferId: String) = transferId(JsonField.of(transferId))
@@ -16332,7 +16340,7 @@ private constructor(
*
* The following fields are required:
* ```java
- * .amount()
+ * .settlementAmount()
* .transferId()
* ```
*
@@ -16340,7 +16348,7 @@ private constructor(
*/
fun build(): CardPushTransferAcceptance =
CardPushTransferAcceptance(
- checkRequired("amount", amount),
+ checkRequired("settlementAmount", settlementAmount),
checkRequired("transferId", transferId),
additionalProperties.toMutableMap(),
)
@@ -16353,7 +16361,7 @@ private constructor(
return@apply
}
- amount()
+ settlementAmount()
transferId()
validated = true
}
@@ -16374,7 +16382,7 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (if (amount.asKnown().isPresent) 1 else 0) +
+ (if (settlementAmount.asKnown().isPresent) 1 else 0) +
(if (transferId.asKnown().isPresent) 1 else 0)
override fun equals(other: Any?): Boolean {
@@ -16383,19 +16391,19 @@ private constructor(
}
return other is CardPushTransferAcceptance &&
- amount == other.amount &&
+ settlementAmount == other.settlementAmount &&
transferId == other.transferId &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(amount, transferId, additionalProperties)
+ Objects.hash(settlementAmount, transferId, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardPushTransferAcceptance{amount=$amount, transferId=$transferId, additionalProperties=$additionalProperties}"
+ "CardPushTransferAcceptance{settlementAmount=$settlementAmount, transferId=$transferId, additionalProperties=$additionalProperties}"
}
/**
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferCreateParamsTest.kt
index c73cb4385..58b104fd4 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferCreateParamsTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferCreateParamsTest.kt
@@ -10,7 +10,6 @@ internal class CardPushTransferCreateParamsTest {
@Test
fun create() {
CardPushTransferCreateParams.builder()
- .amount(100L)
.businessApplicationIdentifier(
CardPushTransferCreateParams.BusinessApplicationIdentifier.FUNDS_DISBURSEMENT
)
@@ -21,6 +20,12 @@ internal class CardPushTransferCreateParamsTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransferCreateParams.PresentmentAmount.builder()
+ .currency(CardPushTransferCreateParams.PresentmentAmount.Currency.USD)
+ .value("1234.56")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")
@@ -36,7 +41,6 @@ internal class CardPushTransferCreateParamsTest {
fun body() {
val params =
CardPushTransferCreateParams.builder()
- .amount(100L)
.businessApplicationIdentifier(
CardPushTransferCreateParams.BusinessApplicationIdentifier.FUNDS_DISBURSEMENT
)
@@ -47,6 +51,12 @@ internal class CardPushTransferCreateParamsTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransferCreateParams.PresentmentAmount.builder()
+ .currency(CardPushTransferCreateParams.PresentmentAmount.Currency.USD)
+ .value("1234.56")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")
@@ -59,7 +69,6 @@ internal class CardPushTransferCreateParamsTest {
val body = params._body()
- assertThat(body.amount()).isEqualTo(100L)
assertThat(body.businessApplicationIdentifier())
.isEqualTo(
CardPushTransferCreateParams.BusinessApplicationIdentifier.FUNDS_DISBURSEMENT
@@ -71,6 +80,13 @@ internal class CardPushTransferCreateParamsTest {
assertThat(body.merchantNamePrefix()).isEqualTo("Acme")
assertThat(body.merchantPostalCode()).isEqualTo("10045")
assertThat(body.merchantState()).isEqualTo("NY")
+ assertThat(body.presentmentAmount())
+ .isEqualTo(
+ CardPushTransferCreateParams.PresentmentAmount.builder()
+ .currency(CardPushTransferCreateParams.PresentmentAmount.Currency.USD)
+ .value("1234.56")
+ .build()
+ )
assertThat(body.recipientName()).isEqualTo("Ian Crease")
assertThat(body.senderAddressCity()).isEqualTo("New York")
assertThat(body.senderAddressLine1()).isEqualTo("33 Liberty Street")
@@ -85,7 +101,6 @@ internal class CardPushTransferCreateParamsTest {
fun bodyWithoutOptionalFields() {
val params =
CardPushTransferCreateParams.builder()
- .amount(100L)
.businessApplicationIdentifier(
CardPushTransferCreateParams.BusinessApplicationIdentifier.FUNDS_DISBURSEMENT
)
@@ -96,6 +111,12 @@ internal class CardPushTransferCreateParamsTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransferCreateParams.PresentmentAmount.builder()
+ .currency(CardPushTransferCreateParams.PresentmentAmount.Currency.USD)
+ .value("1234.56")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")
@@ -107,7 +128,6 @@ internal class CardPushTransferCreateParamsTest {
val body = params._body()
- assertThat(body.amount()).isEqualTo(100L)
assertThat(body.businessApplicationIdentifier())
.isEqualTo(
CardPushTransferCreateParams.BusinessApplicationIdentifier.FUNDS_DISBURSEMENT
@@ -119,6 +139,13 @@ internal class CardPushTransferCreateParamsTest {
assertThat(body.merchantNamePrefix()).isEqualTo("Acme")
assertThat(body.merchantPostalCode()).isEqualTo("10045")
assertThat(body.merchantState()).isEqualTo("NY")
+ assertThat(body.presentmentAmount())
+ .isEqualTo(
+ CardPushTransferCreateParams.PresentmentAmount.builder()
+ .currency(CardPushTransferCreateParams.PresentmentAmount.Currency.USD)
+ .value("1234.56")
+ .build()
+ )
assertThat(body.recipientName()).isEqualTo("Ian Crease")
assertThat(body.senderAddressCity()).isEqualTo("New York")
assertThat(body.senderAddressLine1()).isEqualTo("33 Liberty Street")
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt
index 286f4cf50..2c9928d63 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt
@@ -23,10 +23,10 @@ internal class CardPushTransferListPageResponseTest {
.authorizationIdentificationResponse("ABCDEF")
.cardVerificationValue2Result(null)
.networkTransactionIdentifier("841488484271872")
+ .settlementAmount(100L)
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
- .amount(100L)
.approval(
CardPushTransfer.Approval.builder()
.approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -63,7 +63,6 @@ internal class CardPushTransferListPageResponseTest {
)
.build()
)
- .currency(CardPushTransfer.Currency.USD)
.decline(
CardPushTransfer.Decline.builder()
.declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -81,6 +80,12 @@ internal class CardPushTransferListPageResponseTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransfer.PresentmentAmount.builder()
+ .currency(CardPushTransfer.PresentmentAmount.Currency.USD)
+ .value("12.34")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")
@@ -113,10 +118,10 @@ internal class CardPushTransferListPageResponseTest {
.authorizationIdentificationResponse("ABCDEF")
.cardVerificationValue2Result(null)
.networkTransactionIdentifier("841488484271872")
+ .settlementAmount(100L)
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
- .amount(100L)
.approval(
CardPushTransfer.Approval.builder()
.approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -153,7 +158,6 @@ internal class CardPushTransferListPageResponseTest {
)
.build()
)
- .currency(CardPushTransfer.Currency.USD)
.decline(
CardPushTransfer.Decline.builder()
.declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -171,6 +175,12 @@ internal class CardPushTransferListPageResponseTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransfer.PresentmentAmount.builder()
+ .currency(CardPushTransfer.PresentmentAmount.Currency.USD)
+ .value("12.34")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")
@@ -207,10 +217,10 @@ internal class CardPushTransferListPageResponseTest {
.authorizationIdentificationResponse("ABCDEF")
.cardVerificationValue2Result(null)
.networkTransactionIdentifier("841488484271872")
+ .settlementAmount(100L)
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
- .amount(100L)
.approval(
CardPushTransfer.Approval.builder()
.approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -247,7 +257,6 @@ internal class CardPushTransferListPageResponseTest {
)
.build()
)
- .currency(CardPushTransfer.Currency.USD)
.decline(
CardPushTransfer.Decline.builder()
.declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -265,6 +274,12 @@ internal class CardPushTransferListPageResponseTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransfer.PresentmentAmount.builder()
+ .currency(CardPushTransfer.PresentmentAmount.Currency.USD)
+ .value("12.34")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferTest.kt
index 858034ac4..73d8cfb81 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferTest.kt
@@ -21,10 +21,10 @@ internal class CardPushTransferTest {
.authorizationIdentificationResponse("ABCDEF")
.cardVerificationValue2Result(null)
.networkTransactionIdentifier("841488484271872")
+ .settlementAmount(100L)
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
- .amount(100L)
.approval(
CardPushTransfer.Approval.builder()
.approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -61,7 +61,6 @@ internal class CardPushTransferTest {
)
.build()
)
- .currency(CardPushTransfer.Currency.USD)
.decline(
CardPushTransfer.Decline.builder()
.declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -78,6 +77,12 @@ internal class CardPushTransferTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransfer.PresentmentAmount.builder()
+ .currency(CardPushTransfer.PresentmentAmount.Currency.USD)
+ .value("12.34")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")
@@ -106,10 +111,10 @@ internal class CardPushTransferTest {
.authorizationIdentificationResponse("ABCDEF")
.cardVerificationValue2Result(null)
.networkTransactionIdentifier("841488484271872")
+ .settlementAmount(100L)
.build()
)
assertThat(cardPushTransfer.accountId()).isEqualTo("account_in71c4amph0vgo2qllky")
- assertThat(cardPushTransfer.amount()).isEqualTo(100L)
assertThat(cardPushTransfer.approval())
.contains(
CardPushTransfer.Approval.builder()
@@ -145,7 +150,6 @@ internal class CardPushTransferTest {
)
.build()
)
- assertThat(cardPushTransfer.currency()).isEqualTo(CardPushTransfer.Currency.USD)
assertThat(cardPushTransfer.decline())
.contains(
CardPushTransfer.Decline.builder()
@@ -161,6 +165,13 @@ internal class CardPushTransferTest {
assertThat(cardPushTransfer.merchantNamePrefix()).isEqualTo("Acme")
assertThat(cardPushTransfer.merchantPostalCode()).isEqualTo("10045")
assertThat(cardPushTransfer.merchantState()).isEqualTo("NY")
+ assertThat(cardPushTransfer.presentmentAmount())
+ .isEqualTo(
+ CardPushTransfer.PresentmentAmount.builder()
+ .currency(CardPushTransfer.PresentmentAmount.Currency.USD)
+ .value("12.34")
+ .build()
+ )
assertThat(cardPushTransfer.recipientName()).isEqualTo("Ian Crease")
assertThat(cardPushTransfer.senderAddressCity()).isEqualTo("New York")
assertThat(cardPushTransfer.senderAddressLine1()).isEqualTo("33 Liberty Street")
@@ -194,10 +205,10 @@ internal class CardPushTransferTest {
.authorizationIdentificationResponse("ABCDEF")
.cardVerificationValue2Result(null)
.networkTransactionIdentifier("841488484271872")
+ .settlementAmount(100L)
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
- .amount(100L)
.approval(
CardPushTransfer.Approval.builder()
.approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -234,7 +245,6 @@ internal class CardPushTransferTest {
)
.build()
)
- .currency(CardPushTransfer.Currency.USD)
.decline(
CardPushTransfer.Decline.builder()
.declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
@@ -251,6 +261,12 @@ internal class CardPushTransferTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransfer.PresentmentAmount.builder()
+ .currency(CardPushTransfer.PresentmentAmount.Currency.USD)
+ .value("12.34")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt
index 722a057c6..24860bbc4 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt
@@ -319,7 +319,7 @@ internal class TransactionListPageResponseTest {
)
.cardPushTransferAcceptance(
Transaction.Source.CardPushTransferAcceptance.builder()
- .amount(100L)
+ .settlementAmount(100L)
.transferId(
"outbound_card_push_transfer_e0z9rdpamraczh4tvwye"
)
@@ -1419,7 +1419,7 @@ internal class TransactionListPageResponseTest {
)
.cardPushTransferAcceptance(
Transaction.Source.CardPushTransferAcceptance.builder()
- .amount(100L)
+ .settlementAmount(100L)
.transferId("outbound_card_push_transfer_e0z9rdpamraczh4tvwye")
.build()
)
@@ -2498,7 +2498,7 @@ internal class TransactionListPageResponseTest {
)
.cardPushTransferAcceptance(
Transaction.Source.CardPushTransferAcceptance.builder()
- .amount(100L)
+ .settlementAmount(100L)
.transferId(
"outbound_card_push_transfer_e0z9rdpamraczh4tvwye"
)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionTest.kt
index 390d1623e..7eb4aecac 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionTest.kt
@@ -283,7 +283,7 @@ internal class TransactionTest {
)
.cardPushTransferAcceptance(
Transaction.Source.CardPushTransferAcceptance.builder()
- .amount(100L)
+ .settlementAmount(100L)
.transferId("outbound_card_push_transfer_e0z9rdpamraczh4tvwye")
.build()
)
@@ -1274,7 +1274,7 @@ internal class TransactionTest {
)
.cardPushTransferAcceptance(
Transaction.Source.CardPushTransferAcceptance.builder()
- .amount(100L)
+ .settlementAmount(100L)
.transferId("outbound_card_push_transfer_e0z9rdpamraczh4tvwye")
.build()
)
@@ -2237,7 +2237,7 @@ internal class TransactionTest {
)
.cardPushTransferAcceptance(
Transaction.Source.CardPushTransferAcceptance.builder()
- .amount(100L)
+ .settlementAmount(100L)
.transferId("outbound_card_push_transfer_e0z9rdpamraczh4tvwye")
.build()
)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncTest.kt
index 72f4833c7..376a27cf9 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncTest.kt
@@ -23,7 +23,6 @@ internal class CardPushTransferServiceAsyncTest {
val cardPushTransferFuture =
cardPushTransferServiceAsync.create(
CardPushTransferCreateParams.builder()
- .amount(100L)
.businessApplicationIdentifier(
CardPushTransferCreateParams.BusinessApplicationIdentifier
.FUNDS_DISBURSEMENT
@@ -35,6 +34,12 @@ internal class CardPushTransferServiceAsyncTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransferCreateParams.PresentmentAmount.builder()
+ .currency(CardPushTransferCreateParams.PresentmentAmount.Currency.USD)
+ .value("1234.56")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPushTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPushTransferServiceTest.kt
index eda8e3105..a406c3052 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPushTransferServiceTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPushTransferServiceTest.kt
@@ -23,7 +23,6 @@ internal class CardPushTransferServiceTest {
val cardPushTransfer =
cardPushTransferService.create(
CardPushTransferCreateParams.builder()
- .amount(100L)
.businessApplicationIdentifier(
CardPushTransferCreateParams.BusinessApplicationIdentifier
.FUNDS_DISBURSEMENT
@@ -35,6 +34,12 @@ internal class CardPushTransferServiceTest {
.merchantNamePrefix("Acme")
.merchantPostalCode("10045")
.merchantState("NY")
+ .presentmentAmount(
+ CardPushTransferCreateParams.PresentmentAmount.builder()
+ .currency(CardPushTransferCreateParams.PresentmentAmount.Currency.USD)
+ .value("1234.56")
+ .build()
+ )
.recipientName("Ian Crease")
.senderAddressCity("New York")
.senderAddressLine1("33 Liberty Street")