diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 63083449c..2503a8405 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.337.1"
+ ".": "0.338.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 2923d8298..a9120ac7b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 214
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3e092c1a52f33e962b8415bfa24a244fdb66783aa093e027501124cb8658881b.yml
-openapi_spec_hash: 677f23c2d65201b72074b3effb7d9ad4
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-749004bde06df3642fccde727f8e872c02795128db180789d1377c3168bd71ba.yml
+openapi_spec_hash: 9058f9b3951c7608de5b67d8d5c87ffd
config_hash: a143293c5450ae8f52acad08f3102575
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7cd05372c..31051f916 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.338.0 (2025-09-26)
+
+Full Changelog: [v0.337.1...v0.338.0](https://github.com/Increase/increase-java/compare/v0.337.1...v0.338.0)
+
+### Features
+
+* **api:** api update ([b563156](https://github.com/Increase/increase-java/commit/b56315678747c227486e75be28e75bbdd967a4e1))
+
## 0.337.1 (2025-09-25)
Full Changelog: [v0.337.0...v0.337.1](https://github.com/Increase/increase-java/compare/v0.337.0...v0.337.1)
diff --git a/README.md b/README.md
index d5d6bf10a..62cb79aec 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.337.1)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.337.1)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.338.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.338.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.337.1).
+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.338.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.337.1")
+implementation("com.increase.api:increase-java:0.338.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.337.1")
com.increase.api
increase-java
- 0.337.1
+ 0.338.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index dd6310906..a66106de5 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.337.1" // x-release-please-version
+ version = "0.338.0" // x-release-please-version
}
subprojects {
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 f92c28978..537bacf55 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
@@ -878,6 +878,7 @@ private constructor(
private val cardDisputeAcceptance: JsonField,
private val cardDisputeFinancial: JsonField,
private val cardDisputeLoss: JsonField,
+ private val cardFinancial: JsonField,
private val cardPushTransferAcceptance: JsonField,
private val cardRefund: JsonField,
private val cardRevenuePayment: JsonField,
@@ -938,6 +939,9 @@ private constructor(
@JsonProperty("card_dispute_loss")
@ExcludeMissing
cardDisputeLoss: JsonField = JsonMissing.of(),
+ @JsonProperty("card_financial")
+ @ExcludeMissing
+ cardFinancial: JsonField = JsonMissing.of(),
@JsonProperty("card_push_transfer_acceptance")
@ExcludeMissing
cardPushTransferAcceptance: JsonField = JsonMissing.of(),
@@ -1037,6 +1041,7 @@ private constructor(
cardDisputeAcceptance,
cardDisputeFinancial,
cardDisputeLoss,
+ cardFinancial,
cardPushTransferAcceptance,
cardRefund,
cardRevenuePayment,
@@ -1162,6 +1167,16 @@ private constructor(
fun cardDisputeLoss(): Optional =
cardDisputeLoss.getOptional("card_dispute_loss")
+ /**
+ * A Card Financial object. This field will be present in the JSON response if and only if
+ * `category` is equal to `card_financial`. Card Financials are temporary holds placed on a
+ * customers funds with the intent to later clear a transaction.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun cardFinancial(): Optional = cardFinancial.getOptional("card_financial")
+
/**
* A Card Push Transfer Acceptance object. This field will be present in the JSON response
* if and only if `category` is equal to `card_push_transfer_acceptance`. A Card Push
@@ -1569,6 +1584,16 @@ private constructor(
@ExcludeMissing
fun _cardDisputeLoss(): JsonField = cardDisputeLoss
+ /**
+ * Returns the raw JSON value of [cardFinancial].
+ *
+ * Unlike [cardFinancial], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("card_financial")
+ @ExcludeMissing
+ fun _cardFinancial(): JsonField = cardFinancial
+
/**
* Returns the raw JSON value of [cardPushTransferAcceptance].
*
@@ -1870,6 +1895,7 @@ private constructor(
* .cardDisputeAcceptance()
* .cardDisputeFinancial()
* .cardDisputeLoss()
+ * .cardFinancial()
* .cardPushTransferAcceptance()
* .cardRefund()
* .cardRevenuePayment()
@@ -1914,6 +1940,7 @@ private constructor(
private var cardDisputeAcceptance: JsonField? = null
private var cardDisputeFinancial: JsonField? = null
private var cardDisputeLoss: JsonField? = null
+ private var cardFinancial: JsonField? = null
private var cardPushTransferAcceptance: JsonField? = null
private var cardRefund: JsonField? = null
private var cardRevenuePayment: JsonField? = null
@@ -1965,6 +1992,7 @@ private constructor(
cardDisputeAcceptance = source.cardDisputeAcceptance
cardDisputeFinancial = source.cardDisputeFinancial
cardDisputeLoss = source.cardDisputeLoss
+ cardFinancial = source.cardFinancial
cardPushTransferAcceptance = source.cardPushTransferAcceptance
cardRefund = source.cardRefund
cardRevenuePayment = source.cardRevenuePayment
@@ -2214,6 +2242,29 @@ private constructor(
this.cardDisputeLoss = cardDisputeLoss
}
+ /**
+ * A Card Financial object. This field will be present in the JSON response if and only
+ * if `category` is equal to `card_financial`. Card Financials are temporary holds
+ * placed on a customers funds with the intent to later clear a transaction.
+ */
+ fun cardFinancial(cardFinancial: CardFinancial?) =
+ cardFinancial(JsonField.ofNullable(cardFinancial))
+
+ /** Alias for calling [Builder.cardFinancial] with `cardFinancial.orElse(null)`. */
+ fun cardFinancial(cardFinancial: Optional) =
+ cardFinancial(cardFinancial.getOrNull())
+
+ /**
+ * Sets [Builder.cardFinancial] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardFinancial] with a well-typed [CardFinancial]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun cardFinancial(cardFinancial: JsonField) = apply {
+ this.cardFinancial = cardFinancial
+ }
+
/**
* A Card Push Transfer Acceptance object. This field will be present in the JSON
* response if and only if `category` is equal to `card_push_transfer_acceptance`. A
@@ -3001,6 +3052,7 @@ private constructor(
* .cardDisputeAcceptance()
* .cardDisputeFinancial()
* .cardDisputeLoss()
+ * .cardFinancial()
* .cardPushTransferAcceptance()
* .cardRefund()
* .cardRevenuePayment()
@@ -3043,6 +3095,7 @@ private constructor(
checkRequired("cardDisputeAcceptance", cardDisputeAcceptance),
checkRequired("cardDisputeFinancial", cardDisputeFinancial),
checkRequired("cardDisputeLoss", cardDisputeLoss),
+ checkRequired("cardFinancial", cardFinancial),
checkRequired("cardPushTransferAcceptance", cardPushTransferAcceptance),
checkRequired("cardRefund", cardRefund),
checkRequired("cardRevenuePayment", cardRevenuePayment),
@@ -3105,6 +3158,7 @@ private constructor(
cardDisputeAcceptance().ifPresent { it.validate() }
cardDisputeFinancial().ifPresent { it.validate() }
cardDisputeLoss().ifPresent { it.validate() }
+ cardFinancial().ifPresent { it.validate() }
cardPushTransferAcceptance().ifPresent { it.validate() }
cardRefund().ifPresent { it.validate() }
cardRevenuePayment().ifPresent { it.validate() }
@@ -3159,6 +3213,7 @@ private constructor(
(cardDisputeAcceptance.asKnown().getOrNull()?.validity() ?: 0) +
(cardDisputeFinancial.asKnown().getOrNull()?.validity() ?: 0) +
(cardDisputeLoss.asKnown().getOrNull()?.validity() ?: 0) +
+ (cardFinancial.asKnown().getOrNull()?.validity() ?: 0) +
(cardPushTransferAcceptance.asKnown().getOrNull()?.validity() ?: 0) +
(cardRefund.asKnown().getOrNull()?.validity() ?: 0) +
(cardRevenuePayment.asKnown().getOrNull()?.validity() ?: 0) +
@@ -7683,272 +7738,65 @@ private constructor(
}
/**
- * A Card Push Transfer Acceptance object. This field will be present in the JSON response
- * if and only if `category` is equal to `card_push_transfer_acceptance`. A Card Push
- * Transfer Acceptance is created when an Outbound Card Push Transfer sent from Increase is
- * accepted by the receiving bank.
+ * A Card Financial object. This field will be present in the JSON response if and only if
+ * `category` is equal to `card_financial`. Card Financials are temporary holds placed on a
+ * customers funds with the intent to later clear a transaction.
*/
- class CardPushTransferAcceptance
- @JsonCreator(mode = JsonCreator.Mode.DISABLED)
- private constructor(
- private val amount: JsonField,
- private val transferId: JsonField,
- private val additionalProperties: MutableMap,
- ) {
-
- @JsonCreator
- private constructor(
- @JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(),
- @JsonProperty("transfer_id")
- @ExcludeMissing
- transferId: JsonField = JsonMissing.of(),
- ) : this(amount, transferId, mutableMapOf())
-
- /**
- * 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")
-
- /**
- * The identifier of the Card Push Transfer that led to this Transaction.
- *
- * @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 transferId(): String = transferId.getRequired("transfer_id")
-
- /**
- * 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 [transferId].
- *
- * Unlike [transferId], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @JsonProperty("transfer_id")
- @ExcludeMissing
- fun _transferId(): JsonField = transferId
-
- @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
- * [CardPushTransferAcceptance].
- *
- * The following fields are required:
- * ```java
- * .amount()
- * .transferId()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardPushTransferAcceptance]. */
- class Builder internal constructor() {
-
- private var amount: JsonField? = null
- private var transferId: JsonField? = null
- private var additionalProperties: MutableMap = mutableMapOf()
-
- @JvmSynthetic
- internal fun from(cardPushTransferAcceptance: CardPushTransferAcceptance) = apply {
- amount = cardPushTransferAcceptance.amount
- transferId = cardPushTransferAcceptance.transferId
- additionalProperties =
- cardPushTransferAcceptance.additionalProperties.toMutableMap()
- }
-
- /** 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 }
-
- /** The identifier of the Card Push Transfer that led to this Transaction. */
- fun transferId(transferId: String) = transferId(JsonField.of(transferId))
-
- /**
- * Sets [Builder.transferId] to an arbitrary JSON value.
- *
- * You should usually call [Builder.transferId] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not
- * yet supported value.
- */
- fun transferId(transferId: JsonField) = apply {
- this.transferId = transferId
- }
-
- 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 [CardPushTransferAcceptance].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .amount()
- * .transferId()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardPushTransferAcceptance =
- CardPushTransferAcceptance(
- checkRequired("amount", amount),
- checkRequired("transferId", transferId),
- additionalProperties.toMutableMap(),
- )
- }
-
- private var validated: Boolean = false
-
- fun validate(): CardPushTransferAcceptance = apply {
- if (validated) {
- return@apply
- }
-
- amount()
- transferId()
- 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 (amount.asKnown().isPresent) 1 else 0) +
- (if (transferId.asKnown().isPresent) 1 else 0)
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardPushTransferAcceptance &&
- amount == other.amount &&
- transferId == other.transferId &&
- additionalProperties == other.additionalProperties
- }
-
- private val hashCode: Int by lazy {
- Objects.hash(amount, transferId, additionalProperties)
- }
-
- override fun hashCode(): Int = hashCode
-
- override fun toString() =
- "CardPushTransferAcceptance{amount=$amount, transferId=$transferId, additionalProperties=$additionalProperties}"
- }
-
- /**
- * A Card Refund object. This field will be present in the JSON response if and only if
- * `category` is equal to `card_refund`. Card Refunds move money back to the cardholder.
- * While they are usually connected to a Card Settlement an acquirer can also refund money
- * directly to a card without relation to a transaction.
- */
- class CardRefund
+ class CardFinancial
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val id: JsonField,
+ private val actioner: JsonField,
+ private val additionalAmounts: JsonField,
private val amount: JsonField,
private val cardPaymentId: JsonField,
- private val cashback: JsonField,
private val currency: JsonField,
- private val interchange: JsonField,
+ private val digitalWalletTokenId: JsonField,
+ private val direction: JsonField,
private val merchantAcceptorId: JsonField,
private val merchantCategoryCode: JsonField,
private val merchantCity: JsonField,
private val merchantCountry: JsonField,
- private val merchantName: JsonField,
+ private val merchantDescriptor: JsonField,
private val merchantPostalCode: JsonField,
private val merchantState: JsonField,
+ private val networkDetails: JsonField,
private val networkIdentifiers: JsonField,
+ private val networkRiskScore: JsonField,
+ private val physicalCardId: JsonField,
private val presentmentAmount: JsonField,
private val presentmentCurrency: JsonField,
- private val purchaseDetails: JsonField,
+ private val processingCategory: JsonField,
+ private val realTimeDecisionId: JsonField,
+ private val terminalId: JsonField,
private val transactionId: JsonField,
private val type: JsonField,
+ private val verification: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
@JsonProperty("id") @ExcludeMissing id: JsonField = JsonMissing.of(),
+ @JsonProperty("actioner")
+ @ExcludeMissing
+ actioner: JsonField = JsonMissing.of(),
+ @JsonProperty("additional_amounts")
+ @ExcludeMissing
+ additionalAmounts: JsonField = JsonMissing.of(),
@JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(),
@JsonProperty("card_payment_id")
@ExcludeMissing
cardPaymentId: JsonField = JsonMissing.of(),
- @JsonProperty("cashback")
- @ExcludeMissing
- cashback: JsonField = JsonMissing.of(),
@JsonProperty("currency")
@ExcludeMissing
currency: JsonField = JsonMissing.of(),
- @JsonProperty("interchange")
+ @JsonProperty("digital_wallet_token_id")
@ExcludeMissing
- interchange: JsonField = JsonMissing.of(),
+ digitalWalletTokenId: JsonField = JsonMissing.of(),
+ @JsonProperty("direction")
+ @ExcludeMissing
+ direction: JsonField = JsonMissing.of(),
@JsonProperty("merchant_acceptor_id")
@ExcludeMissing
merchantAcceptorId: JsonField = JsonMissing.of(),
@@ -7961,56 +7809,82 @@ private constructor(
@JsonProperty("merchant_country")
@ExcludeMissing
merchantCountry: JsonField = JsonMissing.of(),
- @JsonProperty("merchant_name")
+ @JsonProperty("merchant_descriptor")
@ExcludeMissing
- merchantName: JsonField = JsonMissing.of(),
+ merchantDescriptor: JsonField = JsonMissing.of(),
@JsonProperty("merchant_postal_code")
@ExcludeMissing
merchantPostalCode: JsonField = JsonMissing.of(),
@JsonProperty("merchant_state")
@ExcludeMissing
merchantState: JsonField = JsonMissing.of(),
+ @JsonProperty("network_details")
+ @ExcludeMissing
+ networkDetails: JsonField = JsonMissing.of(),
@JsonProperty("network_identifiers")
@ExcludeMissing
networkIdentifiers: JsonField = JsonMissing.of(),
+ @JsonProperty("network_risk_score")
+ @ExcludeMissing
+ networkRiskScore: JsonField = JsonMissing.of(),
+ @JsonProperty("physical_card_id")
+ @ExcludeMissing
+ physicalCardId: JsonField = JsonMissing.of(),
@JsonProperty("presentment_amount")
@ExcludeMissing
presentmentAmount: JsonField = JsonMissing.of(),
@JsonProperty("presentment_currency")
@ExcludeMissing
presentmentCurrency: JsonField = JsonMissing.of(),
- @JsonProperty("purchase_details")
+ @JsonProperty("processing_category")
@ExcludeMissing
- purchaseDetails: JsonField = JsonMissing.of(),
+ processingCategory: JsonField = JsonMissing.of(),
+ @JsonProperty("real_time_decision_id")
+ @ExcludeMissing
+ realTimeDecisionId: JsonField = JsonMissing.of(),
+ @JsonProperty("terminal_id")
+ @ExcludeMissing
+ terminalId: JsonField = JsonMissing.of(),
@JsonProperty("transaction_id")
@ExcludeMissing
transactionId: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
+ @JsonProperty("verification")
+ @ExcludeMissing
+ verification: JsonField = JsonMissing.of(),
) : this(
id,
+ actioner,
+ additionalAmounts,
amount,
cardPaymentId,
- cashback,
currency,
- interchange,
+ digitalWalletTokenId,
+ direction,
merchantAcceptorId,
merchantCategoryCode,
merchantCity,
merchantCountry,
- merchantName,
+ merchantDescriptor,
merchantPostalCode,
merchantState,
+ networkDetails,
networkIdentifiers,
+ networkRiskScore,
+ physicalCardId,
presentmentAmount,
presentmentCurrency,
- purchaseDetails,
+ processingCategory,
+ realTimeDecisionId,
+ terminalId,
transactionId,
type,
+ verification,
mutableMapOf(),
)
/**
- * The Card Refund identifier.
+ * The Card Financial identifier.
*
* @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
@@ -8019,36 +7893,49 @@ private constructor(
fun id(): String = id.getRequired("id")
/**
- * The amount in the minor unit of the transaction's settlement currency. For dollars,
- * for example, this is cents.
+ * Whether this financial was approved by Increase, the card network through stand-in
+ * processing, or the user through a real-time decision.
*
* @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")
+ fun actioner(): Actioner = actioner.getRequired("actioner")
/**
- * The ID of the Card Payment this transaction belongs to.
+ * Additional amounts associated with the card authorization, such as ATM surcharges
+ * fees. These are usually a subset of the `amount` field and are used to provide more
+ * detailed information about the transaction.
*
* @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 cardPaymentId(): String = cardPaymentId.getRequired("card_payment_id")
+ fun additionalAmounts(): AdditionalAmounts =
+ additionalAmounts.getRequired("additional_amounts")
/**
- * Cashback debited for this transaction, if eligible. Cashback is paid out in
- * aggregate, monthly.
+ * The pending amount in the minor unit of the transaction's currency. For dollars, for
+ * example, this is cents.
*
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
- * if the server responded with an unexpected value).
+ * @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 cashback(): Optional = cashback.getOptional("cashback")
+ fun amount(): Long = amount.getRequired("amount")
+
+ /**
+ * The ID of the Card Payment this transaction belongs to.
+ *
+ * @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 cardPaymentId(): String = cardPaymentId.getRequired("card_payment_id")
/**
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's
- * settlement currency.
+ * 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
@@ -8057,12 +7944,24 @@ private constructor(
fun currency(): Currency = currency.getRequired("currency")
/**
- * Interchange assessed as a part of this transaciton.
+ * If the authorization was made via a Digital Wallet Token (such as an Apple Pay
+ * purchase), the identifier of the token that was used.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
*/
- fun interchange(): Optional = interchange.getOptional("interchange")
+ fun digitalWalletTokenId(): Optional =
+ digitalWalletTokenId.getOptional("digital_wallet_token_id")
+
+ /**
+ * The direction describes the direction the funds will move, either from the cardholder
+ * to the merchant or from the merchant to the cardholder.
+ *
+ * @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 direction(): Direction = direction.getRequired("direction")
/**
* The merchant identifier (commonly abbreviated as MID) of the merchant the card is
@@ -8076,7 +7975,8 @@ private constructor(
merchantAcceptorId.getRequired("merchant_acceptor_id")
/**
- * The 4-digit MCC describing the merchant's business.
+ * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is
+ * transacting with.
*
* @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
@@ -8088,11 +7988,10 @@ private constructor(
/**
* The city the merchant resides in.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun merchantCity(): String = merchantCity.getRequired("merchant_city")
+ fun merchantCity(): Optional = merchantCity.getOptional("merchant_city")
/**
* The country the merchant resides in.
@@ -8104,16 +8003,17 @@ private constructor(
fun merchantCountry(): String = merchantCountry.getRequired("merchant_country")
/**
- * The name of the merchant.
+ * The merchant descriptor of the merchant the card is transacting with.
*
* @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 merchantName(): String = merchantName.getRequired("merchant_name")
+ fun merchantDescriptor(): String = merchantDescriptor.getRequired("merchant_descriptor")
/**
- * The merchant's postal code. For US merchants this is always a 5-digit ZIP code.
+ * The merchant's postal code. For US merchants this is either a 5-digit or 9-digit ZIP
+ * code, where the first 5 and last 4 are separated by a dash.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
@@ -8130,7 +8030,16 @@ private constructor(
fun merchantState(): Optional = merchantState.getOptional("merchant_state")
/**
- * Network-specific identifiers for this refund.
+ * Fields specific to the `network`.
+ *
+ * @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 networkDetails(): NetworkDetails = networkDetails.getRequired("network_details")
+
+ /**
+ * Network-specific identifiers for a specific request or transaction.
*
* @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
@@ -8140,7 +8049,26 @@ private constructor(
networkIdentifiers.getRequired("network_identifiers")
/**
- * The amount in the minor unit of the transaction's presentment currency.
+ * The risk score generated by the card network. For Visa this is the Visa Advanced
+ * Authorization risk score, from 0 to 99, where 99 is the riskiest.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun networkRiskScore(): Optional =
+ networkRiskScore.getOptional("network_risk_score")
+
+ /**
+ * If the authorization was made in-person with a physical card, the Physical Card that
+ * was used.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun physicalCardId(): Optional = physicalCardId.getOptional("physical_card_id")
+
+ /**
+ * The pending amount in the minor unit of the transaction's presentment 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
@@ -8160,13 +8088,33 @@ private constructor(
presentmentCurrency.getRequired("presentment_currency")
/**
- * Additional details about the card purchase, such as tax and industry-specific fields.
+ * The processing category describes the intent behind the financial, such as whether it
+ * was used for bill payments or an automatic fuel dispenser.
+ *
+ * @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 processingCategory(): ProcessingCategory =
+ processingCategory.getRequired("processing_category")
+
+ /**
+ * The identifier of the Real-Time Decision sent to approve or decline this transaction.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
*/
- fun purchaseDetails(): Optional =
- purchaseDetails.getOptional("purchase_details")
+ fun realTimeDecisionId(): Optional =
+ realTimeDecisionId.getOptional("real_time_decision_id")
+
+ /**
+ * The terminal identifier (commonly abbreviated as TID) of the terminal the card is
+ * transacting with.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun terminalId(): Optional = terminalId.getOptional("terminal_id")
/**
* The identifier of the Transaction associated with this Transaction.
@@ -8179,7 +8127,7 @@ private constructor(
/**
* A constant representing the object's type. For this resource it will always be
- * `card_refund`.
+ * `card_financial`.
*
* @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
@@ -8187,6 +8135,15 @@ private constructor(
*/
fun type(): Type = type.getRequired("type")
+ /**
+ * Fields related to verification of cardholder-provided values.
+ *
+ * @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 verification(): Verification = verification.getRequired("verification")
+
/**
* Returns the raw JSON value of [id].
*
@@ -8194,6 +8151,26 @@ private constructor(
*/
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
+ /**
+ * Returns the raw JSON value of [actioner].
+ *
+ * Unlike [actioner], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("actioner")
+ @ExcludeMissing
+ fun _actioner(): JsonField = actioner
+
+ /**
+ * Returns the raw JSON value of [additionalAmounts].
+ *
+ * Unlike [additionalAmounts], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("additional_amounts")
+ @ExcludeMissing
+ fun _additionalAmounts(): JsonField = additionalAmounts
+
/**
* Returns the raw JSON value of [amount].
*
@@ -8212,34 +8189,34 @@ private constructor(
fun _cardPaymentId(): JsonField = cardPaymentId
/**
- * Returns the raw JSON value of [cashback].
+ * Returns the raw JSON value of [currency].
*
- * Unlike [cashback], this method doesn't throw if the JSON field has an unexpected
+ * Unlike [currency], this method doesn't throw if the JSON field has an unexpected
* type.
*/
- @JsonProperty("cashback")
+ @JsonProperty("currency")
@ExcludeMissing
- fun _cashback(): JsonField = cashback
+ fun _currency(): JsonField = currency
/**
- * Returns the raw JSON value of [currency].
+ * Returns the raw JSON value of [digitalWalletTokenId].
*
- * Unlike [currency], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [digitalWalletTokenId], this method doesn't throw if the JSON field has an
+ * unexpected type.
*/
- @JsonProperty("currency")
+ @JsonProperty("digital_wallet_token_id")
@ExcludeMissing
- fun _currency(): JsonField = currency
+ fun _digitalWalletTokenId(): JsonField = digitalWalletTokenId
/**
- * Returns the raw JSON value of [interchange].
+ * Returns the raw JSON value of [direction].
*
- * Unlike [interchange], this method doesn't throw if the JSON field has an unexpected
+ * Unlike [direction], this method doesn't throw if the JSON field has an unexpected
* type.
*/
- @JsonProperty("interchange")
+ @JsonProperty("direction")
@ExcludeMissing
- fun _interchange(): JsonField = interchange
+ fun _direction(): JsonField = direction
/**
* Returns the raw JSON value of [merchantAcceptorId].
@@ -8282,14 +8259,14 @@ private constructor(
fun _merchantCountry(): JsonField = merchantCountry
/**
- * Returns the raw JSON value of [merchantName].
+ * Returns the raw JSON value of [merchantDescriptor].
*
- * Unlike [merchantName], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [merchantDescriptor], this method doesn't throw if the JSON field has an
+ * unexpected type.
*/
- @JsonProperty("merchant_name")
+ @JsonProperty("merchant_descriptor")
@ExcludeMissing
- fun _merchantName(): JsonField = merchantName
+ fun _merchantDescriptor(): JsonField = merchantDescriptor
/**
* Returns the raw JSON value of [merchantPostalCode].
@@ -8311,6 +8288,16 @@ private constructor(
@ExcludeMissing
fun _merchantState(): JsonField = merchantState
+ /**
+ * Returns the raw JSON value of [networkDetails].
+ *
+ * Unlike [networkDetails], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("network_details")
+ @ExcludeMissing
+ fun _networkDetails(): JsonField = networkDetails
+
/**
* Returns the raw JSON value of [networkIdentifiers].
*
@@ -8321,6 +8308,26 @@ private constructor(
@ExcludeMissing
fun _networkIdentifiers(): JsonField = networkIdentifiers
+ /**
+ * Returns the raw JSON value of [networkRiskScore].
+ *
+ * Unlike [networkRiskScore], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("network_risk_score")
+ @ExcludeMissing
+ fun _networkRiskScore(): JsonField = networkRiskScore
+
+ /**
+ * Returns the raw JSON value of [physicalCardId].
+ *
+ * Unlike [physicalCardId], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("physical_card_id")
+ @ExcludeMissing
+ fun _physicalCardId(): JsonField = physicalCardId
+
/**
* Returns the raw JSON value of [presentmentAmount].
*
@@ -8342,14 +8349,34 @@ private constructor(
fun _presentmentCurrency(): JsonField = presentmentCurrency
/**
- * Returns the raw JSON value of [purchaseDetails].
+ * Returns the raw JSON value of [processingCategory].
*
- * Unlike [purchaseDetails], this method doesn't throw if the JSON field has an
+ * Unlike [processingCategory], this method doesn't throw if the JSON field has an
* unexpected type.
*/
- @JsonProperty("purchase_details")
+ @JsonProperty("processing_category")
@ExcludeMissing
- fun _purchaseDetails(): JsonField = purchaseDetails
+ fun _processingCategory(): JsonField = processingCategory
+
+ /**
+ * Returns the raw JSON value of [realTimeDecisionId].
+ *
+ * Unlike [realTimeDecisionId], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("real_time_decision_id")
+ @ExcludeMissing
+ fun _realTimeDecisionId(): JsonField = realTimeDecisionId
+
+ /**
+ * Returns the raw JSON value of [terminalId].
+ *
+ * Unlike [terminalId], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("terminal_id")
+ @ExcludeMissing
+ fun _terminalId(): JsonField = terminalId
/**
* Returns the raw JSON value of [transactionId].
@@ -8368,6 +8395,16 @@ private constructor(
*/
@JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
+ /**
+ * Returns the raw JSON value of [verification].
+ *
+ * Unlike [verification], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("verification")
+ @ExcludeMissing
+ fun _verification(): JsonField = verification
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -8383,83 +8420,107 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [CardRefund].
+ * Returns a mutable builder for constructing an instance of [CardFinancial].
*
* The following fields are required:
* ```java
* .id()
+ * .actioner()
+ * .additionalAmounts()
* .amount()
* .cardPaymentId()
- * .cashback()
* .currency()
- * .interchange()
+ * .digitalWalletTokenId()
+ * .direction()
* .merchantAcceptorId()
* .merchantCategoryCode()
* .merchantCity()
* .merchantCountry()
- * .merchantName()
+ * .merchantDescriptor()
* .merchantPostalCode()
* .merchantState()
+ * .networkDetails()
* .networkIdentifiers()
+ * .networkRiskScore()
+ * .physicalCardId()
* .presentmentAmount()
* .presentmentCurrency()
- * .purchaseDetails()
+ * .processingCategory()
+ * .realTimeDecisionId()
+ * .terminalId()
* .transactionId()
* .type()
+ * .verification()
* ```
*/
@JvmStatic fun builder() = Builder()
}
- /** A builder for [CardRefund]. */
+ /** A builder for [CardFinancial]. */
class Builder internal constructor() {
private var id: JsonField? = null
+ private var actioner: JsonField? = null
+ private var additionalAmounts: JsonField? = null
private var amount: JsonField? = null
private var cardPaymentId: JsonField? = null
- private var cashback: JsonField? = null
private var currency: JsonField? = null
- private var interchange: JsonField? = null
+ private var digitalWalletTokenId: JsonField? = null
+ private var direction: JsonField? = null
private var merchantAcceptorId: JsonField? = null
private var merchantCategoryCode: JsonField? = null
private var merchantCity: JsonField? = null
private var merchantCountry: JsonField? = null
- private var merchantName: JsonField? = null
+ private var merchantDescriptor: JsonField? = null
private var merchantPostalCode: JsonField? = null
private var merchantState: JsonField? = null
+ private var networkDetails: JsonField? = null
private var networkIdentifiers: JsonField? = null
+ private var networkRiskScore: JsonField? = null
+ private var physicalCardId: JsonField? = null
private var presentmentAmount: JsonField? = null
private var presentmentCurrency: JsonField? = null
- private var purchaseDetails: JsonField? = null
+ private var processingCategory: JsonField? = null
+ private var realTimeDecisionId: JsonField? = null
+ private var terminalId: JsonField? = null
private var transactionId: JsonField? = null
private var type: JsonField? = null
+ private var verification: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(cardRefund: CardRefund) = apply {
- id = cardRefund.id
- amount = cardRefund.amount
- cardPaymentId = cardRefund.cardPaymentId
- cashback = cardRefund.cashback
- currency = cardRefund.currency
- interchange = cardRefund.interchange
- merchantAcceptorId = cardRefund.merchantAcceptorId
- merchantCategoryCode = cardRefund.merchantCategoryCode
- merchantCity = cardRefund.merchantCity
- merchantCountry = cardRefund.merchantCountry
- merchantName = cardRefund.merchantName
- merchantPostalCode = cardRefund.merchantPostalCode
- merchantState = cardRefund.merchantState
- networkIdentifiers = cardRefund.networkIdentifiers
- presentmentAmount = cardRefund.presentmentAmount
- presentmentCurrency = cardRefund.presentmentCurrency
- purchaseDetails = cardRefund.purchaseDetails
- transactionId = cardRefund.transactionId
- type = cardRefund.type
- additionalProperties = cardRefund.additionalProperties.toMutableMap()
- }
-
- /** The Card Refund identifier. */
+ internal fun from(cardFinancial: CardFinancial) = apply {
+ id = cardFinancial.id
+ actioner = cardFinancial.actioner
+ additionalAmounts = cardFinancial.additionalAmounts
+ amount = cardFinancial.amount
+ cardPaymentId = cardFinancial.cardPaymentId
+ currency = cardFinancial.currency
+ digitalWalletTokenId = cardFinancial.digitalWalletTokenId
+ direction = cardFinancial.direction
+ merchantAcceptorId = cardFinancial.merchantAcceptorId
+ merchantCategoryCode = cardFinancial.merchantCategoryCode
+ merchantCity = cardFinancial.merchantCity
+ merchantCountry = cardFinancial.merchantCountry
+ merchantDescriptor = cardFinancial.merchantDescriptor
+ merchantPostalCode = cardFinancial.merchantPostalCode
+ merchantState = cardFinancial.merchantState
+ networkDetails = cardFinancial.networkDetails
+ networkIdentifiers = cardFinancial.networkIdentifiers
+ networkRiskScore = cardFinancial.networkRiskScore
+ physicalCardId = cardFinancial.physicalCardId
+ presentmentAmount = cardFinancial.presentmentAmount
+ presentmentCurrency = cardFinancial.presentmentCurrency
+ processingCategory = cardFinancial.processingCategory
+ realTimeDecisionId = cardFinancial.realTimeDecisionId
+ terminalId = cardFinancial.terminalId
+ transactionId = cardFinancial.transactionId
+ type = cardFinancial.type
+ verification = cardFinancial.verification
+ additionalProperties = cardFinancial.additionalProperties.toMutableMap()
+ }
+
+ /** The Card Financial identifier. */
fun id(id: String) = id(JsonField.of(id))
/**
@@ -8472,8 +8533,42 @@ private constructor(
fun id(id: JsonField) = apply { this.id = id }
/**
- * The amount in the minor unit of the transaction's settlement currency. For
- * dollars, for example, this is cents.
+ * Whether this financial was approved by Increase, the card network through
+ * stand-in processing, or the user through a real-time decision.
+ */
+ fun actioner(actioner: Actioner) = actioner(JsonField.of(actioner))
+
+ /**
+ * Sets [Builder.actioner] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.actioner] with a well-typed [Actioner] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun actioner(actioner: JsonField) = apply { this.actioner = actioner }
+
+ /**
+ * Additional amounts associated with the card authorization, such as ATM surcharges
+ * fees. These are usually a subset of the `amount` field and are used to provide
+ * more detailed information about the transaction.
+ */
+ fun additionalAmounts(additionalAmounts: AdditionalAmounts) =
+ additionalAmounts(JsonField.of(additionalAmounts))
+
+ /**
+ * Sets [Builder.additionalAmounts] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.additionalAmounts] with a well-typed
+ * [AdditionalAmounts] value instead. This method is primarily for setting the field
+ * to an undocumented or not yet supported value.
+ */
+ fun additionalAmounts(additionalAmounts: JsonField) = apply {
+ this.additionalAmounts = additionalAmounts
+ }
+
+ /**
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
+ * for example, this is cents.
*/
fun amount(amount: Long) = amount(JsonField.of(amount))
@@ -8501,27 +8596,9 @@ private constructor(
this.cardPaymentId = cardPaymentId
}
- /**
- * Cashback debited for this transaction, if eligible. Cashback is paid out in
- * aggregate, monthly.
- */
- fun cashback(cashback: Cashback?) = cashback(JsonField.ofNullable(cashback))
-
- /** Alias for calling [Builder.cashback] with `cashback.orElse(null)`. */
- fun cashback(cashback: Optional) = cashback(cashback.getOrNull())
-
- /**
- * Sets [Builder.cashback] to an arbitrary JSON value.
- *
- * You should usually call [Builder.cashback] with a well-typed [Cashback] value
- * instead. This method is primarily for setting the field to an undocumented or not
- * yet supported value.
- */
- fun cashback(cashback: JsonField) = apply { this.cashback = cashback }
-
/**
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's
- * settlement currency.
+ * currency.
*/
fun currency(currency: Currency) = currency(JsonField.of(currency))
@@ -8534,23 +8611,46 @@ private constructor(
*/
fun currency(currency: JsonField) = apply { this.currency = currency }
- /** Interchange assessed as a part of this transaciton. */
- fun interchange(interchange: Interchange?) =
- interchange(JsonField.ofNullable(interchange))
+ /**
+ * If the authorization was made via a Digital Wallet Token (such as an Apple Pay
+ * purchase), the identifier of the token that was used.
+ */
+ fun digitalWalletTokenId(digitalWalletTokenId: String?) =
+ digitalWalletTokenId(JsonField.ofNullable(digitalWalletTokenId))
- /** Alias for calling [Builder.interchange] with `interchange.orElse(null)`. */
- fun interchange(interchange: Optional) =
- interchange(interchange.getOrNull())
+ /**
+ * Alias for calling [Builder.digitalWalletTokenId] with
+ * `digitalWalletTokenId.orElse(null)`.
+ */
+ fun digitalWalletTokenId(digitalWalletTokenId: Optional) =
+ digitalWalletTokenId(digitalWalletTokenId.getOrNull())
/**
- * Sets [Builder.interchange] to an arbitrary JSON value.
+ * Sets [Builder.digitalWalletTokenId] to an arbitrary JSON value.
*
- * You should usually call [Builder.interchange] with a well-typed [Interchange]
+ * You should usually call [Builder.digitalWalletTokenId] with a well-typed [String]
* value instead. This method is primarily for setting the field to an undocumented
* or not yet supported value.
*/
- fun interchange(interchange: JsonField) = apply {
- this.interchange = interchange
+ fun digitalWalletTokenId(digitalWalletTokenId: JsonField) = apply {
+ this.digitalWalletTokenId = digitalWalletTokenId
+ }
+
+ /**
+ * The direction describes the direction the funds will move, either from the
+ * cardholder to the merchant or from the merchant to the cardholder.
+ */
+ fun direction(direction: Direction) = direction(JsonField.of(direction))
+
+ /**
+ * Sets [Builder.direction] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.direction] with a well-typed [Direction] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun direction(direction: JsonField) = apply {
+ this.direction = direction
}
/**
@@ -8571,7 +8671,10 @@ private constructor(
this.merchantAcceptorId = merchantAcceptorId
}
- /** The 4-digit MCC describing the merchant's business. */
+ /**
+ * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card
+ * is transacting with.
+ */
fun merchantCategoryCode(merchantCategoryCode: String) =
merchantCategoryCode(JsonField.of(merchantCategoryCode))
@@ -8587,7 +8690,12 @@ private constructor(
}
/** The city the merchant resides in. */
- fun merchantCity(merchantCity: String) = merchantCity(JsonField.of(merchantCity))
+ fun merchantCity(merchantCity: String?) =
+ merchantCity(JsonField.ofNullable(merchantCity))
+
+ /** Alias for calling [Builder.merchantCity] with `merchantCity.orElse(null)`. */
+ fun merchantCity(merchantCity: Optional) =
+ merchantCity(merchantCity.getOrNull())
/**
* Sets [Builder.merchantCity] to an arbitrary JSON value.
@@ -8615,22 +8723,24 @@ private constructor(
this.merchantCountry = merchantCountry
}
- /** The name of the merchant. */
- fun merchantName(merchantName: String) = merchantName(JsonField.of(merchantName))
+ /** The merchant descriptor of the merchant the card is transacting with. */
+ fun merchantDescriptor(merchantDescriptor: String) =
+ merchantDescriptor(JsonField.of(merchantDescriptor))
/**
- * Sets [Builder.merchantName] to an arbitrary JSON value.
+ * Sets [Builder.merchantDescriptor] to an arbitrary JSON value.
*
- * You should usually call [Builder.merchantName] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not
- * yet supported value.
+ * You should usually call [Builder.merchantDescriptor] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented
+ * or not yet supported value.
*/
- fun merchantName(merchantName: JsonField) = apply {
- this.merchantName = merchantName
+ fun merchantDescriptor(merchantDescriptor: JsonField) = apply {
+ this.merchantDescriptor = merchantDescriptor
}
/**
- * The merchant's postal code. For US merchants this is always a 5-digit ZIP code.
+ * The merchant's postal code. For US merchants this is either a 5-digit or 9-digit
+ * ZIP code, where the first 5 and last 4 are separated by a dash.
*/
fun merchantPostalCode(merchantPostalCode: String?) =
merchantPostalCode(JsonField.ofNullable(merchantPostalCode))
@@ -8672,7 +8782,22 @@ private constructor(
this.merchantState = merchantState
}
- /** Network-specific identifiers for this refund. */
+ /** Fields specific to the `network`. */
+ fun networkDetails(networkDetails: NetworkDetails) =
+ networkDetails(JsonField.of(networkDetails))
+
+ /**
+ * Sets [Builder.networkDetails] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.networkDetails] with a well-typed
+ * [NetworkDetails] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun networkDetails(networkDetails: JsonField) = apply {
+ this.networkDetails = networkDetails
+ }
+
+ /** Network-specific identifiers for a specific request or transaction. */
fun networkIdentifiers(networkIdentifiers: NetworkIdentifiers) =
networkIdentifiers(JsonField.of(networkIdentifiers))
@@ -8687,7 +8812,66 @@ private constructor(
this.networkIdentifiers = networkIdentifiers
}
- /** The amount in the minor unit of the transaction's presentment currency. */
+ /**
+ * The risk score generated by the card network. For Visa this is the Visa Advanced
+ * Authorization risk score, from 0 to 99, where 99 is the riskiest.
+ */
+ fun networkRiskScore(networkRiskScore: Long?) =
+ networkRiskScore(JsonField.ofNullable(networkRiskScore))
+
+ /**
+ * Alias for [Builder.networkRiskScore].
+ *
+ * This unboxed primitive overload exists for backwards compatibility.
+ */
+ fun networkRiskScore(networkRiskScore: Long) =
+ networkRiskScore(networkRiskScore as Long?)
+
+ /**
+ * Alias for calling [Builder.networkRiskScore] with
+ * `networkRiskScore.orElse(null)`.
+ */
+ fun networkRiskScore(networkRiskScore: Optional) =
+ networkRiskScore(networkRiskScore.getOrNull())
+
+ /**
+ * Sets [Builder.networkRiskScore] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.networkRiskScore] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun networkRiskScore(networkRiskScore: JsonField) = apply {
+ this.networkRiskScore = networkRiskScore
+ }
+
+ /**
+ * If the authorization was made in-person with a physical card, the Physical Card
+ * that was used.
+ */
+ fun physicalCardId(physicalCardId: String?) =
+ physicalCardId(JsonField.ofNullable(physicalCardId))
+
+ /**
+ * Alias for calling [Builder.physicalCardId] with `physicalCardId.orElse(null)`.
+ */
+ fun physicalCardId(physicalCardId: Optional) =
+ physicalCardId(physicalCardId.getOrNull())
+
+ /**
+ * Sets [Builder.physicalCardId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.physicalCardId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun physicalCardId(physicalCardId: JsonField) = apply {
+ this.physicalCardId = physicalCardId
+ }
+
+ /**
+ * The pending amount in the minor unit of the transaction's presentment currency.
+ */
fun presentmentAmount(presentmentAmount: Long) =
presentmentAmount(JsonField.of(presentmentAmount))
@@ -8721,27 +8905,66 @@ private constructor(
}
/**
- * Additional details about the card purchase, such as tax and industry-specific
- * fields.
+ * The processing category describes the intent behind the financial, such as
+ * whether it was used for bill payments or an automatic fuel dispenser.
*/
- fun purchaseDetails(purchaseDetails: PurchaseDetails?) =
- purchaseDetails(JsonField.ofNullable(purchaseDetails))
+ fun processingCategory(processingCategory: ProcessingCategory) =
+ processingCategory(JsonField.of(processingCategory))
/**
- * Alias for calling [Builder.purchaseDetails] with `purchaseDetails.orElse(null)`.
+ * Sets [Builder.processingCategory] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.processingCategory] with a well-typed
+ * [ProcessingCategory] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
*/
- fun purchaseDetails(purchaseDetails: Optional) =
- purchaseDetails(purchaseDetails.getOrNull())
+ fun processingCategory(processingCategory: JsonField) = apply {
+ this.processingCategory = processingCategory
+ }
/**
- * Sets [Builder.purchaseDetails] to an arbitrary JSON value.
+ * The identifier of the Real-Time Decision sent to approve or decline this
+ * transaction.
+ */
+ fun realTimeDecisionId(realTimeDecisionId: String?) =
+ realTimeDecisionId(JsonField.ofNullable(realTimeDecisionId))
+
+ /**
+ * Alias for calling [Builder.realTimeDecisionId] with
+ * `realTimeDecisionId.orElse(null)`.
+ */
+ fun realTimeDecisionId(realTimeDecisionId: Optional) =
+ realTimeDecisionId(realTimeDecisionId.getOrNull())
+
+ /**
+ * Sets [Builder.realTimeDecisionId] to an arbitrary JSON value.
*
- * You should usually call [Builder.purchaseDetails] with a well-typed
- * [PurchaseDetails] value instead. This method is primarily for setting the field
- * to an undocumented or not yet supported value.
+ * You should usually call [Builder.realTimeDecisionId] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented
+ * or not yet supported value.
*/
- fun purchaseDetails(purchaseDetails: JsonField) = apply {
- this.purchaseDetails = purchaseDetails
+ fun realTimeDecisionId(realTimeDecisionId: JsonField) = apply {
+ this.realTimeDecisionId = realTimeDecisionId
+ }
+
+ /**
+ * The terminal identifier (commonly abbreviated as TID) of the terminal the card is
+ * transacting with.
+ */
+ fun terminalId(terminalId: String?) = terminalId(JsonField.ofNullable(terminalId))
+
+ /** Alias for calling [Builder.terminalId] with `terminalId.orElse(null)`. */
+ fun terminalId(terminalId: Optional) = terminalId(terminalId.getOrNull())
+
+ /**
+ * Sets [Builder.terminalId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.terminalId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun terminalId(terminalId: JsonField) = apply {
+ this.terminalId = terminalId
}
/** The identifier of the Transaction associated with this Transaction. */
@@ -8761,7 +8984,7 @@ private constructor(
/**
* A constant representing the object's type. For this resource it will always be
- * `card_refund`.
+ * `card_financial`.
*/
fun type(type: Type) = type(JsonField.of(type))
@@ -8774,6 +8997,21 @@ private constructor(
*/
fun type(type: JsonField) = apply { this.type = type }
+ /** Fields related to verification of cardholder-provided values. */
+ fun verification(verification: Verification) =
+ verification(JsonField.of(verification))
+
+ /**
+ * Sets [Builder.verification] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.verification] with a well-typed [Verification]
+ * value instead. This method is primarily for setting the field to an undocumented
+ * or not yet supported value.
+ */
+ fun verification(verification: JsonField) = apply {
+ this.verification = verification
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -8797,84 +9035,7923 @@ private constructor(
}
/**
- * Returns an immutable instance of [CardRefund].
+ * Returns an immutable instance of [CardFinancial].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
* The following fields are required:
* ```java
* .id()
+ * .actioner()
+ * .additionalAmounts()
* .amount()
* .cardPaymentId()
- * .cashback()
* .currency()
- * .interchange()
+ * .digitalWalletTokenId()
+ * .direction()
* .merchantAcceptorId()
* .merchantCategoryCode()
* .merchantCity()
* .merchantCountry()
- * .merchantName()
+ * .merchantDescriptor()
* .merchantPostalCode()
* .merchantState()
+ * .networkDetails()
* .networkIdentifiers()
+ * .networkRiskScore()
+ * .physicalCardId()
* .presentmentAmount()
* .presentmentCurrency()
- * .purchaseDetails()
+ * .processingCategory()
+ * .realTimeDecisionId()
+ * .terminalId()
* .transactionId()
* .type()
+ * .verification()
* ```
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): CardRefund =
- CardRefund(
+ fun build(): CardFinancial =
+ CardFinancial(
checkRequired("id", id),
+ checkRequired("actioner", actioner),
+ checkRequired("additionalAmounts", additionalAmounts),
checkRequired("amount", amount),
checkRequired("cardPaymentId", cardPaymentId),
- checkRequired("cashback", cashback),
checkRequired("currency", currency),
- checkRequired("interchange", interchange),
+ checkRequired("digitalWalletTokenId", digitalWalletTokenId),
+ checkRequired("direction", direction),
checkRequired("merchantAcceptorId", merchantAcceptorId),
checkRequired("merchantCategoryCode", merchantCategoryCode),
checkRequired("merchantCity", merchantCity),
checkRequired("merchantCountry", merchantCountry),
- checkRequired("merchantName", merchantName),
+ checkRequired("merchantDescriptor", merchantDescriptor),
checkRequired("merchantPostalCode", merchantPostalCode),
checkRequired("merchantState", merchantState),
+ checkRequired("networkDetails", networkDetails),
checkRequired("networkIdentifiers", networkIdentifiers),
+ checkRequired("networkRiskScore", networkRiskScore),
+ checkRequired("physicalCardId", physicalCardId),
checkRequired("presentmentAmount", presentmentAmount),
checkRequired("presentmentCurrency", presentmentCurrency),
- checkRequired("purchaseDetails", purchaseDetails),
+ checkRequired("processingCategory", processingCategory),
+ checkRequired("realTimeDecisionId", realTimeDecisionId),
+ checkRequired("terminalId", terminalId),
checkRequired("transactionId", transactionId),
checkRequired("type", type),
+ checkRequired("verification", verification),
additionalProperties.toMutableMap(),
)
}
private var validated: Boolean = false
- fun validate(): CardRefund = apply {
+ fun validate(): CardFinancial = apply {
if (validated) {
return@apply
}
id()
+ actioner().validate()
+ additionalAmounts().validate()
amount()
cardPaymentId()
- cashback().ifPresent { it.validate() }
currency().validate()
- interchange().ifPresent { it.validate() }
+ digitalWalletTokenId()
+ direction().validate()
merchantAcceptorId()
merchantCategoryCode()
merchantCity()
merchantCountry()
- merchantName()
+ merchantDescriptor()
merchantPostalCode()
merchantState()
+ networkDetails().validate()
networkIdentifiers().validate()
+ networkRiskScore()
+ physicalCardId()
presentmentAmount()
presentmentCurrency()
- purchaseDetails().ifPresent { it.validate() }
+ processingCategory().validate()
+ realTimeDecisionId()
+ terminalId()
+ transactionId()
+ type().validate()
+ verification().validate()
+ 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 (id.asKnown().isPresent) 1 else 0) +
+ (actioner.asKnown().getOrNull()?.validity() ?: 0) +
+ (additionalAmounts.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (amount.asKnown().isPresent) 1 else 0) +
+ (if (cardPaymentId.asKnown().isPresent) 1 else 0) +
+ (currency.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (digitalWalletTokenId.asKnown().isPresent) 1 else 0) +
+ (direction.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (merchantAcceptorId.asKnown().isPresent) 1 else 0) +
+ (if (merchantCategoryCode.asKnown().isPresent) 1 else 0) +
+ (if (merchantCity.asKnown().isPresent) 1 else 0) +
+ (if (merchantCountry.asKnown().isPresent) 1 else 0) +
+ (if (merchantDescriptor.asKnown().isPresent) 1 else 0) +
+ (if (merchantPostalCode.asKnown().isPresent) 1 else 0) +
+ (if (merchantState.asKnown().isPresent) 1 else 0) +
+ (networkDetails.asKnown().getOrNull()?.validity() ?: 0) +
+ (networkIdentifiers.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (networkRiskScore.asKnown().isPresent) 1 else 0) +
+ (if (physicalCardId.asKnown().isPresent) 1 else 0) +
+ (if (presentmentAmount.asKnown().isPresent) 1 else 0) +
+ (if (presentmentCurrency.asKnown().isPresent) 1 else 0) +
+ (processingCategory.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (realTimeDecisionId.asKnown().isPresent) 1 else 0) +
+ (if (terminalId.asKnown().isPresent) 1 else 0) +
+ (if (transactionId.asKnown().isPresent) 1 else 0) +
+ (type.asKnown().getOrNull()?.validity() ?: 0) +
+ (verification.asKnown().getOrNull()?.validity() ?: 0)
+
+ /**
+ * Whether this financial was approved by Increase, the card network through stand-in
+ * processing, or the user through a real-time decision.
+ */
+ class Actioner @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 {
+
+ /** This object was actioned by the user through a real-time decision. */
+ @JvmField val USER = of("user")
+
+ /** This object was actioned by Increase without user intervention. */
+ @JvmField val INCREASE = of("increase")
+
+ /** This object was actioned by the network, through stand-in processing. */
+ @JvmField val NETWORK = of("network")
+
+ @JvmStatic fun of(value: String) = Actioner(JsonField.of(value))
+ }
+
+ /** An enum containing [Actioner]'s known values. */
+ enum class Known {
+ /** This object was actioned by the user through a real-time decision. */
+ USER,
+ /** This object was actioned by Increase without user intervention. */
+ INCREASE,
+ /** This object was actioned by the network, through stand-in processing. */
+ NETWORK,
+ }
+
+ /**
+ * An enum containing [Actioner]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Actioner] 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 {
+ /** This object was actioned by the user through a real-time decision. */
+ USER,
+ /** This object was actioned by Increase without user intervention. */
+ INCREASE,
+ /** This object was actioned by the network, through stand-in processing. */
+ NETWORK,
+ /**
+ * An enum member indicating that [Actioner] 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) {
+ USER -> Value.USER
+ INCREASE -> Value.INCREASE
+ NETWORK -> Value.NETWORK
+ 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) {
+ USER -> Known.USER
+ INCREASE -> Known.INCREASE
+ NETWORK -> Known.NETWORK
+ else -> throw IncreaseInvalidDataException("Unknown Actioner: $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(): Actioner = 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 Actioner && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /**
+ * Additional amounts associated with the card authorization, such as ATM surcharges
+ * fees. These are usually a subset of the `amount` field and are used to provide more
+ * detailed information about the transaction.
+ */
+ class AdditionalAmounts
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val clinic: JsonField,
+ private val dental: JsonField,
+ private val prescription: JsonField,
+ private val surcharge: JsonField,
+ private val totalCumulative: JsonField,
+ private val totalHealthcare: JsonField,
+ private val transit: JsonField,
+ private val unknown: JsonField,
+ private val vision: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("clinic")
+ @ExcludeMissing
+ clinic: JsonField = JsonMissing.of(),
+ @JsonProperty("dental")
+ @ExcludeMissing
+ dental: JsonField = JsonMissing.of(),
+ @JsonProperty("prescription")
+ @ExcludeMissing
+ prescription: JsonField = JsonMissing.of(),
+ @JsonProperty("surcharge")
+ @ExcludeMissing
+ surcharge: JsonField = JsonMissing.of(),
+ @JsonProperty("total_cumulative")
+ @ExcludeMissing
+ totalCumulative: JsonField = JsonMissing.of(),
+ @JsonProperty("total_healthcare")
+ @ExcludeMissing
+ totalHealthcare: JsonField = JsonMissing.of(),
+ @JsonProperty("transit")
+ @ExcludeMissing
+ transit: JsonField = JsonMissing.of(),
+ @JsonProperty("unknown")
+ @ExcludeMissing
+ unknown: JsonField = JsonMissing.of(),
+ @JsonProperty("vision")
+ @ExcludeMissing
+ vision: JsonField = JsonMissing.of(),
+ ) : this(
+ clinic,
+ dental,
+ prescription,
+ surcharge,
+ totalCumulative,
+ totalHealthcare,
+ transit,
+ unknown,
+ vision,
+ mutableMapOf(),
+ )
+
+ /**
+ * The part of this transaction amount that was for clinic-related services.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun clinic(): Optional = clinic.getOptional("clinic")
+
+ /**
+ * The part of this transaction amount that was for dental-related services.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun dental(): Optional = dental.getOptional("dental")
+
+ /**
+ * The part of this transaction amount that was for healthcare prescriptions.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun prescription(): Optional =
+ prescription.getOptional("prescription")
+
+ /**
+ * The surcharge amount charged for this transaction by the merchant.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun surcharge(): Optional = surcharge.getOptional("surcharge")
+
+ /**
+ * The total amount of a series of incremental authorizations, optionally provided.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun totalCumulative(): Optional =
+ totalCumulative.getOptional("total_cumulative")
+
+ /**
+ * The total amount of healthcare-related additional amounts.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun totalHealthcare(): Optional =
+ totalHealthcare.getOptional("total_healthcare")
+
+ /**
+ * The part of this transaction amount that was for transit-related services.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun transit(): Optional = transit.getOptional("transit")
+
+ /**
+ * An unknown additional amount.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun unknown(): Optional = unknown.getOptional("unknown")
+
+ /**
+ * The part of this transaction amount that was for vision-related services.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun vision(): Optional = vision.getOptional("vision")
+
+ /**
+ * Returns the raw JSON value of [clinic].
+ *
+ * Unlike [clinic], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("clinic") @ExcludeMissing fun _clinic(): JsonField = clinic
+
+ /**
+ * Returns the raw JSON value of [dental].
+ *
+ * Unlike [dental], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("dental") @ExcludeMissing fun _dental(): JsonField = dental
+
+ /**
+ * Returns the raw JSON value of [prescription].
+ *
+ * Unlike [prescription], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("prescription")
+ @ExcludeMissing
+ fun _prescription(): JsonField = prescription
+
+ /**
+ * Returns the raw JSON value of [surcharge].
+ *
+ * Unlike [surcharge], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("surcharge")
+ @ExcludeMissing
+ fun _surcharge(): JsonField = surcharge
+
+ /**
+ * Returns the raw JSON value of [totalCumulative].
+ *
+ * Unlike [totalCumulative], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("total_cumulative")
+ @ExcludeMissing
+ fun _totalCumulative(): JsonField = totalCumulative
+
+ /**
+ * Returns the raw JSON value of [totalHealthcare].
+ *
+ * Unlike [totalHealthcare], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("total_healthcare")
+ @ExcludeMissing
+ fun _totalHealthcare(): JsonField = totalHealthcare
+
+ /**
+ * Returns the raw JSON value of [transit].
+ *
+ * Unlike [transit], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("transit")
+ @ExcludeMissing
+ fun _transit(): JsonField = transit
+
+ /**
+ * Returns the raw JSON value of [unknown].
+ *
+ * Unlike [unknown], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("unknown")
+ @ExcludeMissing
+ fun _unknown(): JsonField = unknown
+
+ /**
+ * Returns the raw JSON value of [vision].
+ *
+ * Unlike [vision], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("vision") @ExcludeMissing fun _vision(): JsonField = vision
+
+ @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
+ * [AdditionalAmounts].
+ *
+ * The following fields are required:
+ * ```java
+ * .clinic()
+ * .dental()
+ * .prescription()
+ * .surcharge()
+ * .totalCumulative()
+ * .totalHealthcare()
+ * .transit()
+ * .unknown()
+ * .vision()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [AdditionalAmounts]. */
+ class Builder internal constructor() {
+
+ private var clinic: JsonField? = null
+ private var dental: JsonField? = null
+ private var prescription: JsonField? = null
+ private var surcharge: JsonField? = null
+ private var totalCumulative: JsonField? = null
+ private var totalHealthcare: JsonField? = null
+ private var transit: JsonField? = null
+ private var unknown: JsonField? = null
+ private var vision: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(additionalAmounts: AdditionalAmounts) = apply {
+ clinic = additionalAmounts.clinic
+ dental = additionalAmounts.dental
+ prescription = additionalAmounts.prescription
+ surcharge = additionalAmounts.surcharge
+ totalCumulative = additionalAmounts.totalCumulative
+ totalHealthcare = additionalAmounts.totalHealthcare
+ transit = additionalAmounts.transit
+ unknown = additionalAmounts.unknown
+ vision = additionalAmounts.vision
+ additionalProperties = additionalAmounts.additionalProperties.toMutableMap()
+ }
+
+ /** The part of this transaction amount that was for clinic-related services. */
+ fun clinic(clinic: Clinic?) = clinic(JsonField.ofNullable(clinic))
+
+ /** Alias for calling [Builder.clinic] with `clinic.orElse(null)`. */
+ fun clinic(clinic: Optional) = clinic(clinic.getOrNull())
+
+ /**
+ * Sets [Builder.clinic] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.clinic] with a well-typed [Clinic] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun clinic(clinic: JsonField) = apply { this.clinic = clinic }
+
+ /** The part of this transaction amount that was for dental-related services. */
+ fun dental(dental: Dental?) = dental(JsonField.ofNullable(dental))
+
+ /** Alias for calling [Builder.dental] with `dental.orElse(null)`. */
+ fun dental(dental: Optional) = dental(dental.getOrNull())
+
+ /**
+ * Sets [Builder.dental] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.dental] with a well-typed [Dental] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun dental(dental: JsonField) = apply { this.dental = dental }
+
+ /**
+ * The part of this transaction amount that was for healthcare prescriptions.
+ */
+ fun prescription(prescription: Prescription?) =
+ prescription(JsonField.ofNullable(prescription))
+
+ /**
+ * Alias for calling [Builder.prescription] with `prescription.orElse(null)`.
+ */
+ fun prescription(prescription: Optional) =
+ prescription(prescription.getOrNull())
+
+ /**
+ * Sets [Builder.prescription] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.prescription] with a well-typed
+ * [Prescription] value instead. This method is primarily for setting the field
+ * to an undocumented or not yet supported value.
+ */
+ fun prescription(prescription: JsonField) = apply {
+ this.prescription = prescription
+ }
+
+ /** The surcharge amount charged for this transaction by the merchant. */
+ fun surcharge(surcharge: Surcharge?) =
+ surcharge(JsonField.ofNullable(surcharge))
+
+ /** Alias for calling [Builder.surcharge] with `surcharge.orElse(null)`. */
+ fun surcharge(surcharge: Optional) = surcharge(surcharge.getOrNull())
+
+ /**
+ * Sets [Builder.surcharge] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.surcharge] with a well-typed [Surcharge]
+ * value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun surcharge(surcharge: JsonField) = apply {
+ this.surcharge = surcharge
+ }
+
+ /**
+ * The total amount of a series of incremental authorizations, optionally
+ * provided.
+ */
+ fun totalCumulative(totalCumulative: TotalCumulative?) =
+ totalCumulative(JsonField.ofNullable(totalCumulative))
+
+ /**
+ * Alias for calling [Builder.totalCumulative] with
+ * `totalCumulative.orElse(null)`.
+ */
+ fun totalCumulative(totalCumulative: Optional