diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 02a070605..b7101200d 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.257.0"
+ ".": "0.258.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index a7be6ee39..327b8df67 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 201
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fa06f0029b2f1cf3d611a6cb6c7fabdbf09dba80d0953e49dd4395bbd3bc3107.yml
-openapi_spec_hash: 724b6c1c0e7c9e28f35e9ad66e3fe54e
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e25bdcd9c9cd987962f1507200b619dc7c32f91b940e5ca9110f24bdb294b14a.yml
+openapi_spec_hash: 693a205b039e410d9a6b49a5b0ccc72c
config_hash: 97774f946585cecb19181a1817870d0b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 77cbdb8c3..46a66a940 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.258.0 (2025-07-08)
+
+Full Changelog: [v0.257.0...v0.258.0](https://github.com/Increase/increase-java/compare/v0.257.0...v0.258.0)
+
+### Features
+
+* **api:** api update ([9838c94](https://github.com/Increase/increase-java/commit/9838c94009c0388e229f15ab3a2bf612573dac79))
+
## 0.257.0 (2025-07-08)
Full Changelog: [v0.256.0...v0.257.0](https://github.com/Increase/increase-java/compare/v0.256.0...v0.257.0)
diff --git a/README.md b/README.md
index 71939b129..12ecdb1eb 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.257.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.257.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.258.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.258.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.257.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.258.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.257.0")
+implementation("com.increase.api:increase-java:0.258.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.257.0")
com.increase.api
increase-java
- 0.257.0
+ 0.258.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 9a676ef96..73e1be1dc 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.257.0" // x-release-please-version
+ version = "0.258.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequest.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequest.kt
index 57f2fd8f2..91a9f52ae 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequest.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequest.kt
@@ -32,23 +32,19 @@ private constructor(
private val accountNumberId: JsonField,
private val amount: JsonField,
private val createdAt: JsonField,
+ private val creditorAddress: JsonField,
+ private val creditorName: JsonField,
private val currency: JsonField,
+ private val debtorAccountNumber: JsonField,
+ private val debtorAddress: JsonField,
+ private val debtorName: JsonField,
+ private val debtorRoutingNumber: JsonField,
private val fulfillmentInboundWireTransferId: JsonField,
private val idempotencyKey: JsonField,
- private val messageToRecipient: JsonField,
- private val originatorAddressLine1: JsonField,
- private val originatorAddressLine2: JsonField,
- private val originatorAddressLine3: JsonField,
- private val originatorName: JsonField,
- private val recipientAccountNumber: JsonField,
- private val recipientAddressLine1: JsonField,
- private val recipientAddressLine2: JsonField,
- private val recipientAddressLine3: JsonField,
- private val recipientName: JsonField,
- private val recipientRoutingNumber: JsonField,
private val status: JsonField,
private val submission: JsonField,
private val type: JsonField,
+ private val unstructuredRemittanceInformation: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -62,73 +58,57 @@ private constructor(
@JsonProperty("created_at")
@ExcludeMissing
createdAt: JsonField = JsonMissing.of(),
- @JsonProperty("currency") @ExcludeMissing currency: JsonField = JsonMissing.of(),
- @JsonProperty("fulfillment_inbound_wire_transfer_id")
- @ExcludeMissing
- fulfillmentInboundWireTransferId: JsonField = JsonMissing.of(),
- @JsonProperty("idempotency_key")
- @ExcludeMissing
- idempotencyKey: JsonField = JsonMissing.of(),
- @JsonProperty("message_to_recipient")
- @ExcludeMissing
- messageToRecipient: JsonField = JsonMissing.of(),
- @JsonProperty("originator_address_line1")
+ @JsonProperty("creditor_address")
@ExcludeMissing
- originatorAddressLine1: JsonField = JsonMissing.of(),
- @JsonProperty("originator_address_line2")
+ creditorAddress: JsonField = JsonMissing.of(),
+ @JsonProperty("creditor_name")
@ExcludeMissing
- originatorAddressLine2: JsonField = JsonMissing.of(),
- @JsonProperty("originator_address_line3")
- @ExcludeMissing
- originatorAddressLine3: JsonField = JsonMissing.of(),
- @JsonProperty("originator_name")
- @ExcludeMissing
- originatorName: JsonField = JsonMissing.of(),
- @JsonProperty("recipient_account_number")
+ creditorName: JsonField = JsonMissing.of(),
+ @JsonProperty("currency") @ExcludeMissing currency: JsonField = JsonMissing.of(),
+ @JsonProperty("debtor_account_number")
@ExcludeMissing
- recipientAccountNumber: JsonField = JsonMissing.of(),
- @JsonProperty("recipient_address_line1")
+ debtorAccountNumber: JsonField = JsonMissing.of(),
+ @JsonProperty("debtor_address")
@ExcludeMissing
- recipientAddressLine1: JsonField = JsonMissing.of(),
- @JsonProperty("recipient_address_line2")
+ debtorAddress: JsonField = JsonMissing.of(),
+ @JsonProperty("debtor_name")
@ExcludeMissing
- recipientAddressLine2: JsonField = JsonMissing.of(),
- @JsonProperty("recipient_address_line3")
+ debtorName: JsonField = JsonMissing.of(),
+ @JsonProperty("debtor_routing_number")
@ExcludeMissing
- recipientAddressLine3: JsonField = JsonMissing.of(),
- @JsonProperty("recipient_name")
+ debtorRoutingNumber: JsonField = JsonMissing.of(),
+ @JsonProperty("fulfillment_inbound_wire_transfer_id")
@ExcludeMissing
- recipientName: JsonField = JsonMissing.of(),
- @JsonProperty("recipient_routing_number")
+ fulfillmentInboundWireTransferId: JsonField = JsonMissing.of(),
+ @JsonProperty("idempotency_key")
@ExcludeMissing
- recipientRoutingNumber: JsonField = JsonMissing.of(),
+ idempotencyKey: JsonField = JsonMissing.of(),
@JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
@JsonProperty("submission")
@ExcludeMissing
submission: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
+ @JsonProperty("unstructured_remittance_information")
+ @ExcludeMissing
+ unstructuredRemittanceInformation: JsonField = JsonMissing.of(),
) : this(
id,
accountNumberId,
amount,
createdAt,
+ creditorAddress,
+ creditorName,
currency,
+ debtorAccountNumber,
+ debtorAddress,
+ debtorName,
+ debtorRoutingNumber,
fulfillmentInboundWireTransferId,
idempotencyKey,
- messageToRecipient,
- originatorAddressLine1,
- originatorAddressLine2,
- originatorAddressLine3,
- originatorName,
- recipientAccountNumber,
- recipientAddressLine1,
- recipientAddressLine2,
- recipientAddressLine3,
- recipientName,
- recipientRoutingNumber,
status,
submission,
type,
+ unstructuredRemittanceInformation,
mutableMapOf(),
)
@@ -141,7 +121,8 @@ private constructor(
fun id(): String = id.getRequired("id")
/**
- * The Account Number to which the recipient of this request is being requested to send funds.
+ * The Account Number to which the debtor—the recipient of this request—is being requested to
+ * send funds.
*
* @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).
@@ -166,129 +147,81 @@ private constructor(
fun createdAt(): OffsetDateTime = createdAt.getRequired("created_at")
/**
- * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the amount being requested.
- * Will always be "USD".
+ * The creditor's address.
*
* @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(): String = currency.getRequired("currency")
-
- /**
- * If the recipient fulfills the drawdown request by sending funds, then this will be the
- * identifier of the corresponding Transaction.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun fulfillmentInboundWireTransferId(): Optional =
- fulfillmentInboundWireTransferId.getOptional("fulfillment_inbound_wire_transfer_id")
-
- /**
- * The idempotency key you chose for this object. This value is unique across Increase and is
- * used to ensure that a request is only processed once. Learn more about
- * [idempotency](https://increase.com/documentation/idempotency-keys).
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun idempotencyKey(): Optional = idempotencyKey.getOptional("idempotency_key")
+ fun creditorAddress(): CreditorAddress = creditorAddress.getRequired("creditor_address")
/**
- * The message the recipient will see as part of the drawdown request.
+ * The creditor's name.
*
* @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 messageToRecipient(): String = messageToRecipient.getRequired("message_to_recipient")
-
- /**
- * The originator's address line 1.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun originatorAddressLine1(): Optional =
- originatorAddressLine1.getOptional("originator_address_line1")
-
- /**
- * The originator's address line 2.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun originatorAddressLine2(): Optional =
- originatorAddressLine2.getOptional("originator_address_line2")
+ fun creditorName(): String = creditorName.getRequired("creditor_name")
/**
- * The originator's address line 3.
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the amount being requested.
+ * Will always be "USD".
*
- * @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 originatorAddressLine3(): Optional =
- originatorAddressLine3.getOptional("originator_address_line3")
+ fun currency(): String = currency.getRequired("currency")
/**
- * The originator's name.
+ * The debtor's account number.
*
- * @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 originatorName(): Optional = originatorName.getOptional("originator_name")
+ fun debtorAccountNumber(): String = debtorAccountNumber.getRequired("debtor_account_number")
/**
- * The drawdown request's recipient's account number.
+ * The debtor's address.
*
* @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 recipientAccountNumber(): String =
- recipientAccountNumber.getRequired("recipient_account_number")
+ fun debtorAddress(): DebtorAddress = debtorAddress.getRequired("debtor_address")
/**
- * Line 1 of the drawdown request's recipient's address.
+ * The debtor's name.
*
- * @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 recipientAddressLine1(): Optional =
- recipientAddressLine1.getOptional("recipient_address_line1")
+ fun debtorName(): String = debtorName.getRequired("debtor_name")
/**
- * Line 2 of the drawdown request's recipient's address.
+ * The debtor's routing number.
*
- * @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 recipientAddressLine2(): Optional =
- recipientAddressLine2.getOptional("recipient_address_line2")
+ fun debtorRoutingNumber(): String = debtorRoutingNumber.getRequired("debtor_routing_number")
/**
- * Line 3 of the drawdown request's recipient's address.
+ * If the recipient fulfills the drawdown request by sending funds, then this will be the
+ * identifier of the corresponding Transaction.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun recipientAddressLine3(): Optional =
- recipientAddressLine3.getOptional("recipient_address_line3")
+ fun fulfillmentInboundWireTransferId(): Optional =
+ fulfillmentInboundWireTransferId.getOptional("fulfillment_inbound_wire_transfer_id")
/**
- * The drawdown request's recipient's name.
+ * The idempotency key you chose for this object. This value is unique across Increase and is
+ * used to ensure that a request is only processed once. Learn more about
+ * [idempotency](https://increase.com/documentation/idempotency-keys).
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun recipientName(): Optional = recipientName.getOptional("recipient_name")
-
- /**
- * The drawdown request's recipient's routing number.
- *
- * @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 recipientRoutingNumber(): String =
- recipientRoutingNumber.getRequired("recipient_routing_number")
+ fun idempotencyKey(): Optional = idempotencyKey.getOptional("idempotency_key")
/**
* The lifecycle status of the drawdown request.
@@ -315,6 +248,15 @@ private constructor(
*/
fun type(): Type = type.getRequired("type")
+ /**
+ * Remittance information the debtor will see as part of the drawdown request.
+ *
+ * @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 unstructuredRemittanceInformation(): String =
+ unstructuredRemittanceInformation.getRequired("unstructured_remittance_information")
+
/**
* Returns the raw JSON value of [id].
*
@@ -348,138 +290,84 @@ private constructor(
fun _createdAt(): JsonField = createdAt
/**
- * 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 [fulfillmentInboundWireTransferId].
- *
- * Unlike [fulfillmentInboundWireTransferId], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @JsonProperty("fulfillment_inbound_wire_transfer_id")
- @ExcludeMissing
- fun _fulfillmentInboundWireTransferId(): JsonField = fulfillmentInboundWireTransferId
-
- /**
- * Returns the raw JSON value of [idempotencyKey].
- *
- * Unlike [idempotencyKey], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("idempotency_key")
- @ExcludeMissing
- fun _idempotencyKey(): JsonField = idempotencyKey
-
- /**
- * Returns the raw JSON value of [messageToRecipient].
- *
- * Unlike [messageToRecipient], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @JsonProperty("message_to_recipient")
- @ExcludeMissing
- fun _messageToRecipient(): JsonField = messageToRecipient
-
- /**
- * Returns the raw JSON value of [originatorAddressLine1].
- *
- * Unlike [originatorAddressLine1], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @JsonProperty("originator_address_line1")
- @ExcludeMissing
- fun _originatorAddressLine1(): JsonField = originatorAddressLine1
-
- /**
- * Returns the raw JSON value of [originatorAddressLine2].
+ * Returns the raw JSON value of [creditorAddress].
*
- * Unlike [originatorAddressLine2], this method doesn't throw if the JSON field has an
- * unexpected type.
+ * Unlike [creditorAddress], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("originator_address_line2")
+ @JsonProperty("creditor_address")
@ExcludeMissing
- fun _originatorAddressLine2(): JsonField = originatorAddressLine2
+ fun _creditorAddress(): JsonField = creditorAddress
/**
- * Returns the raw JSON value of [originatorAddressLine3].
+ * Returns the raw JSON value of [creditorName].
*
- * Unlike [originatorAddressLine3], this method doesn't throw if the JSON field has an
- * unexpected type.
+ * Unlike [creditorName], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("originator_address_line3")
+ @JsonProperty("creditor_name")
@ExcludeMissing
- fun _originatorAddressLine3(): JsonField = originatorAddressLine3
+ fun _creditorName(): JsonField = creditorName
/**
- * Returns the raw JSON value of [originatorName].
+ * Returns the raw JSON value of [currency].
*
- * Unlike [originatorName], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [currency], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("originator_name")
- @ExcludeMissing
- fun _originatorName(): JsonField = originatorName
+ @JsonProperty("currency") @ExcludeMissing fun _currency(): JsonField = currency
/**
- * Returns the raw JSON value of [recipientAccountNumber].
+ * Returns the raw JSON value of [debtorAccountNumber].
*
- * Unlike [recipientAccountNumber], this method doesn't throw if the JSON field has an
- * unexpected type.
+ * Unlike [debtorAccountNumber], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- @JsonProperty("recipient_account_number")
+ @JsonProperty("debtor_account_number")
@ExcludeMissing
- fun _recipientAccountNumber(): JsonField = recipientAccountNumber
+ fun _debtorAccountNumber(): JsonField = debtorAccountNumber
/**
- * Returns the raw JSON value of [recipientAddressLine1].
+ * Returns the raw JSON value of [debtorAddress].
*
- * Unlike [recipientAddressLine1], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [debtorAddress], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("recipient_address_line1")
+ @JsonProperty("debtor_address")
@ExcludeMissing
- fun _recipientAddressLine1(): JsonField = recipientAddressLine1
+ fun _debtorAddress(): JsonField = debtorAddress
/**
- * Returns the raw JSON value of [recipientAddressLine2].
+ * Returns the raw JSON value of [debtorName].
*
- * Unlike [recipientAddressLine2], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [debtorName], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("recipient_address_line2")
- @ExcludeMissing
- fun _recipientAddressLine2(): JsonField = recipientAddressLine2
+ @JsonProperty("debtor_name") @ExcludeMissing fun _debtorName(): JsonField = debtorName
/**
- * Returns the raw JSON value of [recipientAddressLine3].
+ * Returns the raw JSON value of [debtorRoutingNumber].
*
- * Unlike [recipientAddressLine3], this method doesn't throw if the JSON field has an unexpected
+ * Unlike [debtorRoutingNumber], this method doesn't throw if the JSON field has an unexpected
* type.
*/
- @JsonProperty("recipient_address_line3")
+ @JsonProperty("debtor_routing_number")
@ExcludeMissing
- fun _recipientAddressLine3(): JsonField = recipientAddressLine3
+ fun _debtorRoutingNumber(): JsonField = debtorRoutingNumber
/**
- * Returns the raw JSON value of [recipientName].
+ * Returns the raw JSON value of [fulfillmentInboundWireTransferId].
*
- * Unlike [recipientName], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [fulfillmentInboundWireTransferId], this method doesn't throw if the JSON field has an
+ * unexpected type.
*/
- @JsonProperty("recipient_name")
+ @JsonProperty("fulfillment_inbound_wire_transfer_id")
@ExcludeMissing
- fun _recipientName(): JsonField = recipientName
+ fun _fulfillmentInboundWireTransferId(): JsonField = fulfillmentInboundWireTransferId
/**
- * Returns the raw JSON value of [recipientRoutingNumber].
+ * Returns the raw JSON value of [idempotencyKey].
*
- * Unlike [recipientRoutingNumber], this method doesn't throw if the JSON field has an
- * unexpected type.
+ * Unlike [idempotencyKey], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("recipient_routing_number")
+ @JsonProperty("idempotency_key")
@ExcludeMissing
- fun _recipientRoutingNumber(): JsonField = recipientRoutingNumber
+ fun _idempotencyKey(): JsonField = idempotencyKey
/**
* Returns the raw JSON value of [status].
@@ -504,6 +392,16 @@ private constructor(
*/
@JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
+ /**
+ * Returns the raw JSON value of [unstructuredRemittanceInformation].
+ *
+ * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("unstructured_remittance_information")
+ @ExcludeMissing
+ fun _unstructuredRemittanceInformation(): JsonField = unstructuredRemittanceInformation
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -527,23 +425,19 @@ private constructor(
* .accountNumberId()
* .amount()
* .createdAt()
+ * .creditorAddress()
+ * .creditorName()
* .currency()
+ * .debtorAccountNumber()
+ * .debtorAddress()
+ * .debtorName()
+ * .debtorRoutingNumber()
* .fulfillmentInboundWireTransferId()
* .idempotencyKey()
- * .messageToRecipient()
- * .originatorAddressLine1()
- * .originatorAddressLine2()
- * .originatorAddressLine3()
- * .originatorName()
- * .recipientAccountNumber()
- * .recipientAddressLine1()
- * .recipientAddressLine2()
- * .recipientAddressLine3()
- * .recipientName()
- * .recipientRoutingNumber()
* .status()
* .submission()
* .type()
+ * .unstructuredRemittanceInformation()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -556,23 +450,19 @@ private constructor(
private var accountNumberId: JsonField? = null
private var amount: JsonField? = null
private var createdAt: JsonField? = null
+ private var creditorAddress: JsonField? = null
+ private var creditorName: JsonField? = null
private var currency: JsonField? = null
+ private var debtorAccountNumber: JsonField? = null
+ private var debtorAddress: JsonField? = null
+ private var debtorName: JsonField? = null
+ private var debtorRoutingNumber: JsonField? = null
private var fulfillmentInboundWireTransferId: JsonField? = null
private var idempotencyKey: JsonField? = null
- private var messageToRecipient: JsonField? = null
- private var originatorAddressLine1: JsonField? = null
- private var originatorAddressLine2: JsonField? = null
- private var originatorAddressLine3: JsonField? = null
- private var originatorName: JsonField? = null
- private var recipientAccountNumber: JsonField? = null
- private var recipientAddressLine1: JsonField? = null
- private var recipientAddressLine2: JsonField? = null
- private var recipientAddressLine3: JsonField? = null
- private var recipientName: JsonField? = null
- private var recipientRoutingNumber: JsonField? = null
private var status: JsonField? = null
private var submission: JsonField? = null
private var type: JsonField? = null
+ private var unstructuredRemittanceInformation: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -581,23 +471,20 @@ private constructor(
accountNumberId = wireDrawdownRequest.accountNumberId
amount = wireDrawdownRequest.amount
createdAt = wireDrawdownRequest.createdAt
+ creditorAddress = wireDrawdownRequest.creditorAddress
+ creditorName = wireDrawdownRequest.creditorName
currency = wireDrawdownRequest.currency
+ debtorAccountNumber = wireDrawdownRequest.debtorAccountNumber
+ debtorAddress = wireDrawdownRequest.debtorAddress
+ debtorName = wireDrawdownRequest.debtorName
+ debtorRoutingNumber = wireDrawdownRequest.debtorRoutingNumber
fulfillmentInboundWireTransferId = wireDrawdownRequest.fulfillmentInboundWireTransferId
idempotencyKey = wireDrawdownRequest.idempotencyKey
- messageToRecipient = wireDrawdownRequest.messageToRecipient
- originatorAddressLine1 = wireDrawdownRequest.originatorAddressLine1
- originatorAddressLine2 = wireDrawdownRequest.originatorAddressLine2
- originatorAddressLine3 = wireDrawdownRequest.originatorAddressLine3
- originatorName = wireDrawdownRequest.originatorName
- recipientAccountNumber = wireDrawdownRequest.recipientAccountNumber
- recipientAddressLine1 = wireDrawdownRequest.recipientAddressLine1
- recipientAddressLine2 = wireDrawdownRequest.recipientAddressLine2
- recipientAddressLine3 = wireDrawdownRequest.recipientAddressLine3
- recipientName = wireDrawdownRequest.recipientName
- recipientRoutingNumber = wireDrawdownRequest.recipientRoutingNumber
status = wireDrawdownRequest.status
submission = wireDrawdownRequest.submission
type = wireDrawdownRequest.type
+ unstructuredRemittanceInformation =
+ wireDrawdownRequest.unstructuredRemittanceInformation
additionalProperties = wireDrawdownRequest.additionalProperties.toMutableMap()
}
@@ -613,8 +500,8 @@ private constructor(
fun id(id: JsonField) = apply { this.id = id }
/**
- * The Account Number to which the recipient of this request is being requested to send
- * funds.
+ * The Account Number to which the debtor—the recipient of this request—is being requested
+ * to send funds.
*/
fun accountNumberId(accountNumberId: String) =
accountNumberId(JsonField.of(accountNumberId))
@@ -656,6 +543,35 @@ private constructor(
*/
fun createdAt(createdAt: JsonField) = apply { this.createdAt = createdAt }
+ /** The creditor's address. */
+ fun creditorAddress(creditorAddress: CreditorAddress) =
+ creditorAddress(JsonField.of(creditorAddress))
+
+ /**
+ * Sets [Builder.creditorAddress] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.creditorAddress] with a well-typed [CreditorAddress]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun creditorAddress(creditorAddress: JsonField) = apply {
+ this.creditorAddress = creditorAddress
+ }
+
+ /** The creditor's name. */
+ fun creditorName(creditorName: String) = creditorName(JsonField.of(creditorName))
+
+ /**
+ * Sets [Builder.creditorName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.creditorName] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun creditorName(creditorName: JsonField) = apply {
+ this.creditorName = creditorName
+ }
+
/**
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the amount being
* requested. Will always be "USD".
@@ -670,6 +586,62 @@ private constructor(
*/
fun currency(currency: JsonField) = apply { this.currency = currency }
+ /** The debtor's account number. */
+ fun debtorAccountNumber(debtorAccountNumber: String) =
+ debtorAccountNumber(JsonField.of(debtorAccountNumber))
+
+ /**
+ * Sets [Builder.debtorAccountNumber] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.debtorAccountNumber] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun debtorAccountNumber(debtorAccountNumber: JsonField) = apply {
+ this.debtorAccountNumber = debtorAccountNumber
+ }
+
+ /** The debtor's address. */
+ fun debtorAddress(debtorAddress: DebtorAddress) = debtorAddress(JsonField.of(debtorAddress))
+
+ /**
+ * Sets [Builder.debtorAddress] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.debtorAddress] with a well-typed [DebtorAddress] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun debtorAddress(debtorAddress: JsonField) = apply {
+ this.debtorAddress = debtorAddress
+ }
+
+ /** The debtor's name. */
+ fun debtorName(debtorName: String) = debtorName(JsonField.of(debtorName))
+
+ /**
+ * Sets [Builder.debtorName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.debtorName] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun debtorName(debtorName: JsonField) = apply { this.debtorName = debtorName }
+
+ /** The debtor's routing number. */
+ fun debtorRoutingNumber(debtorRoutingNumber: String) =
+ debtorRoutingNumber(JsonField.of(debtorRoutingNumber))
+
+ /**
+ * Sets [Builder.debtorRoutingNumber] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.debtorRoutingNumber] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun debtorRoutingNumber(debtorRoutingNumber: JsonField) = apply {
+ this.debtorRoutingNumber = debtorRoutingNumber
+ }
+
/**
* If the recipient fulfills the drawdown request by sending funds, then this will be the
* identifier of the corresponding Transaction.
@@ -719,278 +691,78 @@ private constructor(
this.idempotencyKey = idempotencyKey
}
- /** The message the recipient will see as part of the drawdown request. */
- fun messageToRecipient(messageToRecipient: String) =
- messageToRecipient(JsonField.of(messageToRecipient))
+ /** The lifecycle status of the drawdown request. */
+ fun status(status: Status) = status(JsonField.of(status))
/**
- * Sets [Builder.messageToRecipient] to an arbitrary JSON value.
+ * Sets [Builder.status] to an arbitrary JSON value.
*
- * You should usually call [Builder.messageToRecipient] 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.status] with a well-typed [Status] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
*/
- fun messageToRecipient(messageToRecipient: JsonField) = apply {
- this.messageToRecipient = messageToRecipient
- }
-
- /** The originator's address line 1. */
- fun originatorAddressLine1(originatorAddressLine1: String?) =
- originatorAddressLine1(JsonField.ofNullable(originatorAddressLine1))
+ fun status(status: JsonField) = apply { this.status = status }
/**
- * Alias for calling [Builder.originatorAddressLine1] with
- * `originatorAddressLine1.orElse(null)`.
+ * After the drawdown request is submitted to Fedwire, this will contain supplemental
+ * details.
*/
- fun originatorAddressLine1(originatorAddressLine1: Optional) =
- originatorAddressLine1(originatorAddressLine1.getOrNull())
+ fun submission(submission: Submission?) = submission(JsonField.ofNullable(submission))
+
+ /** Alias for calling [Builder.submission] with `submission.orElse(null)`. */
+ fun submission(submission: Optional) = submission(submission.getOrNull())
/**
- * Sets [Builder.originatorAddressLine1] to an arbitrary JSON value.
+ * Sets [Builder.submission] to an arbitrary JSON value.
*
- * You should usually call [Builder.originatorAddressLine1] with a well-typed [String] value
+ * You should usually call [Builder.submission] with a well-typed [Submission] value
* instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun originatorAddressLine1(originatorAddressLine1: JsonField) = apply {
- this.originatorAddressLine1 = originatorAddressLine1
- }
-
- /** The originator's address line 2. */
- fun originatorAddressLine2(originatorAddressLine2: String?) =
- originatorAddressLine2(JsonField.ofNullable(originatorAddressLine2))
+ fun submission(submission: JsonField) = apply { this.submission = submission }
/**
- * Alias for calling [Builder.originatorAddressLine2] with
- * `originatorAddressLine2.orElse(null)`.
+ * A constant representing the object's type. For this resource it will always be
+ * `wire_drawdown_request`.
*/
- fun originatorAddressLine2(originatorAddressLine2: Optional) =
- originatorAddressLine2(originatorAddressLine2.getOrNull())
+ fun type(type: Type) = type(JsonField.of(type))
/**
- * Sets [Builder.originatorAddressLine2] to an arbitrary JSON value.
+ * Sets [Builder.type] to an arbitrary JSON value.
*
- * You should usually call [Builder.originatorAddressLine2] 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.type] with a well-typed [Type] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
*/
- fun originatorAddressLine2(originatorAddressLine2: JsonField) = apply {
- this.originatorAddressLine2 = originatorAddressLine2
- }
-
- /** The originator's address line 3. */
- fun originatorAddressLine3(originatorAddressLine3: String?) =
- originatorAddressLine3(JsonField.ofNullable(originatorAddressLine3))
+ fun type(type: JsonField) = apply { this.type = type }
- /**
- * Alias for calling [Builder.originatorAddressLine3] with
- * `originatorAddressLine3.orElse(null)`.
- */
- fun originatorAddressLine3(originatorAddressLine3: Optional) =
- originatorAddressLine3(originatorAddressLine3.getOrNull())
+ /** Remittance information the debtor will see as part of the drawdown request. */
+ fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) =
+ unstructuredRemittanceInformation(JsonField.of(unstructuredRemittanceInformation))
/**
- * Sets [Builder.originatorAddressLine3] to an arbitrary JSON value.
+ * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value.
*
- * You should usually call [Builder.originatorAddressLine3] 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.unstructuredRemittanceInformation] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to an undocumented
+ * or not yet supported value.
*/
- fun originatorAddressLine3(originatorAddressLine3: JsonField) = apply {
- this.originatorAddressLine3 = originatorAddressLine3
- }
+ fun unstructuredRemittanceInformation(
+ unstructuredRemittanceInformation: JsonField
+ ) = apply { this.unstructuredRemittanceInformation = unstructuredRemittanceInformation }
- /** The originator's name. */
- fun originatorName(originatorName: String?) =
- originatorName(JsonField.ofNullable(originatorName))
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
- /** Alias for calling [Builder.originatorName] with `originatorName.orElse(null)`. */
- fun originatorName(originatorName: Optional) =
- originatorName(originatorName.getOrNull())
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
- /**
- * Sets [Builder.originatorName] to an arbitrary JSON value.
- *
- * You should usually call [Builder.originatorName] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun originatorName(originatorName: JsonField) = apply {
- this.originatorName = originatorName
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
}
- /** The drawdown request's recipient's account number. */
- fun recipientAccountNumber(recipientAccountNumber: String) =
- recipientAccountNumber(JsonField.of(recipientAccountNumber))
-
- /**
- * Sets [Builder.recipientAccountNumber] to an arbitrary JSON value.
- *
- * You should usually call [Builder.recipientAccountNumber] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun recipientAccountNumber(recipientAccountNumber: JsonField) = apply {
- this.recipientAccountNumber = recipientAccountNumber
- }
-
- /** Line 1 of the drawdown request's recipient's address. */
- fun recipientAddressLine1(recipientAddressLine1: String?) =
- recipientAddressLine1(JsonField.ofNullable(recipientAddressLine1))
-
- /**
- * Alias for calling [Builder.recipientAddressLine1] with
- * `recipientAddressLine1.orElse(null)`.
- */
- fun recipientAddressLine1(recipientAddressLine1: Optional) =
- recipientAddressLine1(recipientAddressLine1.getOrNull())
-
- /**
- * Sets [Builder.recipientAddressLine1] to an arbitrary JSON value.
- *
- * You should usually call [Builder.recipientAddressLine1] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun recipientAddressLine1(recipientAddressLine1: JsonField) = apply {
- this.recipientAddressLine1 = recipientAddressLine1
- }
-
- /** Line 2 of the drawdown request's recipient's address. */
- fun recipientAddressLine2(recipientAddressLine2: String?) =
- recipientAddressLine2(JsonField.ofNullable(recipientAddressLine2))
-
- /**
- * Alias for calling [Builder.recipientAddressLine2] with
- * `recipientAddressLine2.orElse(null)`.
- */
- fun recipientAddressLine2(recipientAddressLine2: Optional) =
- recipientAddressLine2(recipientAddressLine2.getOrNull())
-
- /**
- * Sets [Builder.recipientAddressLine2] to an arbitrary JSON value.
- *
- * You should usually call [Builder.recipientAddressLine2] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun recipientAddressLine2(recipientAddressLine2: JsonField) = apply {
- this.recipientAddressLine2 = recipientAddressLine2
- }
-
- /** Line 3 of the drawdown request's recipient's address. */
- fun recipientAddressLine3(recipientAddressLine3: String?) =
- recipientAddressLine3(JsonField.ofNullable(recipientAddressLine3))
-
- /**
- * Alias for calling [Builder.recipientAddressLine3] with
- * `recipientAddressLine3.orElse(null)`.
- */
- fun recipientAddressLine3(recipientAddressLine3: Optional) =
- recipientAddressLine3(recipientAddressLine3.getOrNull())
-
- /**
- * Sets [Builder.recipientAddressLine3] to an arbitrary JSON value.
- *
- * You should usually call [Builder.recipientAddressLine3] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun recipientAddressLine3(recipientAddressLine3: JsonField) = apply {
- this.recipientAddressLine3 = recipientAddressLine3
- }
-
- /** The drawdown request's recipient's name. */
- fun recipientName(recipientName: String?) =
- recipientName(JsonField.ofNullable(recipientName))
-
- /** Alias for calling [Builder.recipientName] with `recipientName.orElse(null)`. */
- fun recipientName(recipientName: Optional) =
- recipientName(recipientName.getOrNull())
-
- /**
- * Sets [Builder.recipientName] to an arbitrary JSON value.
- *
- * You should usually call [Builder.recipientName] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun recipientName(recipientName: JsonField) = apply {
- this.recipientName = recipientName
- }
-
- /** The drawdown request's recipient's routing number. */
- fun recipientRoutingNumber(recipientRoutingNumber: String) =
- recipientRoutingNumber(JsonField.of(recipientRoutingNumber))
-
- /**
- * Sets [Builder.recipientRoutingNumber] to an arbitrary JSON value.
- *
- * You should usually call [Builder.recipientRoutingNumber] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun recipientRoutingNumber(recipientRoutingNumber: JsonField) = apply {
- this.recipientRoutingNumber = recipientRoutingNumber
- }
-
- /** The lifecycle status of the drawdown request. */
- fun status(status: Status) = status(JsonField.of(status))
-
- /**
- * Sets [Builder.status] to an arbitrary JSON value.
- *
- * You should usually call [Builder.status] with a well-typed [Status] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun status(status: JsonField) = apply { this.status = status }
-
- /**
- * After the drawdown request is submitted to Fedwire, this will contain supplemental
- * details.
- */
- fun submission(submission: Submission?) = submission(JsonField.ofNullable(submission))
-
- /** Alias for calling [Builder.submission] with `submission.orElse(null)`. */
- fun submission(submission: Optional) = submission(submission.getOrNull())
-
- /**
- * Sets [Builder.submission] to an arbitrary JSON value.
- *
- * You should usually call [Builder.submission] with a well-typed [Submission] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun submission(submission: JsonField) = apply { this.submission = submission }
-
- /**
- * A constant representing the object's type. For this resource it will always be
- * `wire_drawdown_request`.
- */
- fun type(type: Type) = type(JsonField.of(type))
-
- /**
- * Sets [Builder.type] to an arbitrary JSON value.
- *
- * You should usually call [Builder.type] with a well-typed [Type] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun type(type: JsonField) = apply { this.type = type }
-
- 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 removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
fun removeAllAdditionalProperties(keys: Set) = apply {
keys.forEach(::removeAdditionalProperty)
@@ -1007,23 +779,19 @@ private constructor(
* .accountNumberId()
* .amount()
* .createdAt()
+ * .creditorAddress()
+ * .creditorName()
* .currency()
+ * .debtorAccountNumber()
+ * .debtorAddress()
+ * .debtorName()
+ * .debtorRoutingNumber()
* .fulfillmentInboundWireTransferId()
* .idempotencyKey()
- * .messageToRecipient()
- * .originatorAddressLine1()
- * .originatorAddressLine2()
- * .originatorAddressLine3()
- * .originatorName()
- * .recipientAccountNumber()
- * .recipientAddressLine1()
- * .recipientAddressLine2()
- * .recipientAddressLine3()
- * .recipientName()
- * .recipientRoutingNumber()
* .status()
* .submission()
* .type()
+ * .unstructuredRemittanceInformation()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -1034,23 +802,22 @@ private constructor(
checkRequired("accountNumberId", accountNumberId),
checkRequired("amount", amount),
checkRequired("createdAt", createdAt),
+ checkRequired("creditorAddress", creditorAddress),
+ checkRequired("creditorName", creditorName),
checkRequired("currency", currency),
+ checkRequired("debtorAccountNumber", debtorAccountNumber),
+ checkRequired("debtorAddress", debtorAddress),
+ checkRequired("debtorName", debtorName),
+ checkRequired("debtorRoutingNumber", debtorRoutingNumber),
checkRequired("fulfillmentInboundWireTransferId", fulfillmentInboundWireTransferId),
checkRequired("idempotencyKey", idempotencyKey),
- checkRequired("messageToRecipient", messageToRecipient),
- checkRequired("originatorAddressLine1", originatorAddressLine1),
- checkRequired("originatorAddressLine2", originatorAddressLine2),
- checkRequired("originatorAddressLine3", originatorAddressLine3),
- checkRequired("originatorName", originatorName),
- checkRequired("recipientAccountNumber", recipientAccountNumber),
- checkRequired("recipientAddressLine1", recipientAddressLine1),
- checkRequired("recipientAddressLine2", recipientAddressLine2),
- checkRequired("recipientAddressLine3", recipientAddressLine3),
- checkRequired("recipientName", recipientName),
- checkRequired("recipientRoutingNumber", recipientRoutingNumber),
checkRequired("status", status),
checkRequired("submission", submission),
checkRequired("type", type),
+ checkRequired(
+ "unstructuredRemittanceInformation",
+ unstructuredRemittanceInformation,
+ ),
additionalProperties.toMutableMap(),
)
}
@@ -1066,23 +833,19 @@ private constructor(
accountNumberId()
amount()
createdAt()
+ creditorAddress().validate()
+ creditorName()
currency()
+ debtorAccountNumber()
+ debtorAddress().validate()
+ debtorName()
+ debtorRoutingNumber()
fulfillmentInboundWireTransferId()
idempotencyKey()
- messageToRecipient()
- originatorAddressLine1()
- originatorAddressLine2()
- originatorAddressLine3()
- originatorName()
- recipientAccountNumber()
- recipientAddressLine1()
- recipientAddressLine2()
- recipientAddressLine3()
- recipientName()
- recipientRoutingNumber()
status().validate()
submission().ifPresent { it.validate() }
type().validate()
+ unstructuredRemittanceInformation()
validated = true
}
@@ -1105,23 +868,735 @@ private constructor(
(if (accountNumberId.asKnown().isPresent) 1 else 0) +
(if (amount.asKnown().isPresent) 1 else 0) +
(if (createdAt.asKnown().isPresent) 1 else 0) +
+ (creditorAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (creditorName.asKnown().isPresent) 1 else 0) +
(if (currency.asKnown().isPresent) 1 else 0) +
+ (if (debtorAccountNumber.asKnown().isPresent) 1 else 0) +
+ (debtorAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (debtorName.asKnown().isPresent) 1 else 0) +
+ (if (debtorRoutingNumber.asKnown().isPresent) 1 else 0) +
(if (fulfillmentInboundWireTransferId.asKnown().isPresent) 1 else 0) +
(if (idempotencyKey.asKnown().isPresent) 1 else 0) +
- (if (messageToRecipient.asKnown().isPresent) 1 else 0) +
- (if (originatorAddressLine1.asKnown().isPresent) 1 else 0) +
- (if (originatorAddressLine2.asKnown().isPresent) 1 else 0) +
- (if (originatorAddressLine3.asKnown().isPresent) 1 else 0) +
- (if (originatorName.asKnown().isPresent) 1 else 0) +
- (if (recipientAccountNumber.asKnown().isPresent) 1 else 0) +
- (if (recipientAddressLine1.asKnown().isPresent) 1 else 0) +
- (if (recipientAddressLine2.asKnown().isPresent) 1 else 0) +
- (if (recipientAddressLine3.asKnown().isPresent) 1 else 0) +
- (if (recipientName.asKnown().isPresent) 1 else 0) +
- (if (recipientRoutingNumber.asKnown().isPresent) 1 else 0) +
(status.asKnown().getOrNull()?.validity() ?: 0) +
(submission.asKnown().getOrNull()?.validity() ?: 0) +
- (type.asKnown().getOrNull()?.validity() ?: 0)
+ (type.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0)
+
+ /** The creditor's address. */
+ class CreditorAddress
+ private constructor(
+ private val city: JsonField,
+ private val country: JsonField,
+ private val line1: JsonField,
+ private val line2: JsonField,
+ private val postalCode: JsonField,
+ private val state: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country") @ExcludeMissing country: JsonField = JsonMissing.of(),
+ @JsonProperty("line1") @ExcludeMissing line1: JsonField = JsonMissing.of(),
+ @JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ postalCode: JsonField = JsonMissing.of(),
+ @JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
+ ) : this(city, country, line1, line2, postalCode, state, mutableMapOf())
+
+ /**
+ * The city, district, town, or village of the address.
+ *
+ * @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 city(): String = city.getRequired("city")
+
+ /**
+ * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
+ * code for the country of the address.
+ *
+ * @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 country(): String = country.getRequired("country")
+
+ /**
+ * The first line of the address.
+ *
+ * @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 line1(): String = line1.getRequired("line1")
+
+ /**
+ * The second line of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun line2(): Optional = line2.getOptional("line2")
+
+ /**
+ * The ZIP code of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun postalCode(): Optional = postalCode.getOptional("postal_code")
+
+ /**
+ * The address state.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun state(): Optional = state.getOptional("state")
+
+ /**
+ * Returns the raw JSON value of [city].
+ *
+ * Unlike [city], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
+ /**
+ * Returns the raw JSON value of [line1].
+ *
+ * Unlike [line1], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("line1") @ExcludeMissing fun _line1(): JsonField = line1
+
+ /**
+ * Returns the raw JSON value of [line2].
+ *
+ * Unlike [line2], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("line2") @ExcludeMissing fun _line2(): JsonField = line2
+
+ /**
+ * Returns the raw JSON value of [postalCode].
+ *
+ * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ fun _postalCode(): JsonField = postalCode
+
+ /**
+ * Returns the raw JSON value of [state].
+ *
+ * Unlike [state], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("state") @ExcludeMissing fun _state(): JsonField = state
+
+ @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 [CreditorAddress].
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .line1()
+ * .line2()
+ * .postalCode()
+ * .state()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CreditorAddress]. */
+ class Builder internal constructor() {
+
+ private var city: JsonField? = null
+ private var country: JsonField? = null
+ private var line1: JsonField? = null
+ private var line2: JsonField? = null
+ private var postalCode: JsonField? = null
+ private var state: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(creditorAddress: CreditorAddress) = apply {
+ city = creditorAddress.city
+ country = creditorAddress.country
+ line1 = creditorAddress.line1
+ line2 = creditorAddress.line2
+ postalCode = creditorAddress.postalCode
+ state = creditorAddress.state
+ additionalProperties = creditorAddress.additionalProperties.toMutableMap()
+ }
+
+ /** The city, district, town, or village of the address. */
+ fun city(city: String) = city(JsonField.of(city))
+
+ /**
+ * Sets [Builder.city] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.city] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun city(city: JsonField) = apply { this.city = city }
+
+ /**
+ * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
+ * code for the country of the address.
+ */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
+ /** The first line of the address. */
+ fun line1(line1: String) = line1(JsonField.of(line1))
+
+ /**
+ * Sets [Builder.line1] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.line1] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun line1(line1: JsonField) = apply { this.line1 = line1 }
+
+ /** The second line of the address. */
+ fun line2(line2: String?) = line2(JsonField.ofNullable(line2))
+
+ /** Alias for calling [Builder.line2] with `line2.orElse(null)`. */
+ fun line2(line2: Optional) = line2(line2.getOrNull())
+
+ /**
+ * Sets [Builder.line2] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.line2] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun line2(line2: JsonField) = apply { this.line2 = line2 }
+
+ /** The ZIP code of the address. */
+ fun postalCode(postalCode: String?) = postalCode(JsonField.ofNullable(postalCode))
+
+ /** Alias for calling [Builder.postalCode] with `postalCode.orElse(null)`. */
+ fun postalCode(postalCode: Optional) = postalCode(postalCode.getOrNull())
+
+ /**
+ * Sets [Builder.postalCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.postalCode] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun postalCode(postalCode: JsonField) = apply { this.postalCode = postalCode }
+
+ /** The address state. */
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
+
+ /**
+ * Sets [Builder.state] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.state] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun state(state: JsonField) = apply { this.state = state }
+
+ 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 [CreditorAddress].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .line1()
+ * .line2()
+ * .postalCode()
+ * .state()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CreditorAddress =
+ CreditorAddress(
+ checkRequired("city", city),
+ checkRequired("country", country),
+ checkRequired("line1", line1),
+ checkRequired("line2", line2),
+ checkRequired("postalCode", postalCode),
+ checkRequired("state", state),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): CreditorAddress = apply {
+ if (validated) {
+ return@apply
+ }
+
+ city()
+ country()
+ line1()
+ line2()
+ postalCode()
+ state()
+ 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 (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
+ (if (line1.asKnown().isPresent) 1 else 0) +
+ (if (line2.asKnown().isPresent) 1 else 0) +
+ (if (postalCode.asKnown().isPresent) 1 else 0) +
+ (if (state.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is CreditorAddress && city == other.city && country == other.country && line1 == other.line1 && line2 == other.line2 && postalCode == other.postalCode && state == other.state && additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ /* spotless:off */
+ private val hashCode: Int by lazy { Objects.hash(city, country, line1, line2, postalCode, state, additionalProperties) }
+ /* spotless:on */
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CreditorAddress{city=$city, country=$country, line1=$line1, line2=$line2, postalCode=$postalCode, state=$state, additionalProperties=$additionalProperties}"
+ }
+
+ /** The debtor's address. */
+ class DebtorAddress
+ private constructor(
+ private val city: JsonField,
+ private val country: JsonField,
+ private val line1: JsonField,
+ private val line2: JsonField,
+ private val postalCode: JsonField,
+ private val state: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country") @ExcludeMissing country: JsonField = JsonMissing.of(),
+ @JsonProperty("line1") @ExcludeMissing line1: JsonField = JsonMissing.of(),
+ @JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ postalCode: JsonField = JsonMissing.of(),
+ @JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
+ ) : this(city, country, line1, line2, postalCode, state, mutableMapOf())
+
+ /**
+ * The city, district, town, or village of the address.
+ *
+ * @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 city(): String = city.getRequired("city")
+
+ /**
+ * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
+ * code for the country of the address.
+ *
+ * @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 country(): String = country.getRequired("country")
+
+ /**
+ * The first line of the address.
+ *
+ * @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 line1(): String = line1.getRequired("line1")
+
+ /**
+ * The second line of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun line2(): Optional = line2.getOptional("line2")
+
+ /**
+ * The ZIP code of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun postalCode(): Optional = postalCode.getOptional("postal_code")
+
+ /**
+ * The address state.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun state(): Optional = state.getOptional("state")
+
+ /**
+ * Returns the raw JSON value of [city].
+ *
+ * Unlike [city], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
+ /**
+ * Returns the raw JSON value of [line1].
+ *
+ * Unlike [line1], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("line1") @ExcludeMissing fun _line1(): JsonField = line1
+
+ /**
+ * Returns the raw JSON value of [line2].
+ *
+ * Unlike [line2], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("line2") @ExcludeMissing fun _line2(): JsonField = line2
+
+ /**
+ * Returns the raw JSON value of [postalCode].
+ *
+ * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ fun _postalCode(): JsonField = postalCode
+
+ /**
+ * Returns the raw JSON value of [state].
+ *
+ * Unlike [state], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("state") @ExcludeMissing fun _state(): JsonField = state
+
+ @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 [DebtorAddress].
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .line1()
+ * .line2()
+ * .postalCode()
+ * .state()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [DebtorAddress]. */
+ class Builder internal constructor() {
+
+ private var city: JsonField? = null
+ private var country: JsonField? = null
+ private var line1: JsonField? = null
+ private var line2: JsonField? = null
+ private var postalCode: JsonField? = null
+ private var state: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(debtorAddress: DebtorAddress) = apply {
+ city = debtorAddress.city
+ country = debtorAddress.country
+ line1 = debtorAddress.line1
+ line2 = debtorAddress.line2
+ postalCode = debtorAddress.postalCode
+ state = debtorAddress.state
+ additionalProperties = debtorAddress.additionalProperties.toMutableMap()
+ }
+
+ /** The city, district, town, or village of the address. */
+ fun city(city: String) = city(JsonField.of(city))
+
+ /**
+ * Sets [Builder.city] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.city] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun city(city: JsonField) = apply { this.city = city }
+
+ /**
+ * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
+ * code for the country of the address.
+ */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
+ /** The first line of the address. */
+ fun line1(line1: String) = line1(JsonField.of(line1))
+
+ /**
+ * Sets [Builder.line1] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.line1] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun line1(line1: JsonField) = apply { this.line1 = line1 }
+
+ /** The second line of the address. */
+ fun line2(line2: String?) = line2(JsonField.ofNullable(line2))
+
+ /** Alias for calling [Builder.line2] with `line2.orElse(null)`. */
+ fun line2(line2: Optional) = line2(line2.getOrNull())
+
+ /**
+ * Sets [Builder.line2] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.line2] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun line2(line2: JsonField) = apply { this.line2 = line2 }
+
+ /** The ZIP code of the address. */
+ fun postalCode(postalCode: String?) = postalCode(JsonField.ofNullable(postalCode))
+
+ /** Alias for calling [Builder.postalCode] with `postalCode.orElse(null)`. */
+ fun postalCode(postalCode: Optional) = postalCode(postalCode.getOrNull())
+
+ /**
+ * Sets [Builder.postalCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.postalCode] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun postalCode(postalCode: JsonField) = apply { this.postalCode = postalCode }
+
+ /** The address state. */
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
+
+ /**
+ * Sets [Builder.state] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.state] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun state(state: JsonField) = apply { this.state = state }
+
+ 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 [DebtorAddress].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .line1()
+ * .line2()
+ * .postalCode()
+ * .state()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): DebtorAddress =
+ DebtorAddress(
+ checkRequired("city", city),
+ checkRequired("country", country),
+ checkRequired("line1", line1),
+ checkRequired("line2", line2),
+ checkRequired("postalCode", postalCode),
+ checkRequired("state", state),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): DebtorAddress = apply {
+ if (validated) {
+ return@apply
+ }
+
+ city()
+ country()
+ line1()
+ line2()
+ postalCode()
+ state()
+ 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 (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
+ (if (line1.asKnown().isPresent) 1 else 0) +
+ (if (line2.asKnown().isPresent) 1 else 0) +
+ (if (postalCode.asKnown().isPresent) 1 else 0) +
+ (if (state.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is DebtorAddress && city == other.city && country == other.country && line1 == other.line1 && line2 == other.line2 && postalCode == other.postalCode && state == other.state && additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ /* spotless:off */
+ private val hashCode: Int by lazy { Objects.hash(city, country, line1, line2, postalCode, state, additionalProperties) }
+ /* spotless:on */
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "DebtorAddress{city=$city, country=$country, line1=$line1, line2=$line2, postalCode=$postalCode, state=$state, additionalProperties=$additionalProperties}"
+ }
/** The lifecycle status of the drawdown request. */
class Status @JsonCreator private constructor(private val value: JsonField) : Enum {
@@ -1582,15 +2057,15 @@ private constructor(
return true
}
- return /* spotless:off */ other is WireDrawdownRequest && id == other.id && accountNumberId == other.accountNumberId && amount == other.amount && createdAt == other.createdAt && currency == other.currency && fulfillmentInboundWireTransferId == other.fulfillmentInboundWireTransferId && idempotencyKey == other.idempotencyKey && messageToRecipient == other.messageToRecipient && originatorAddressLine1 == other.originatorAddressLine1 && originatorAddressLine2 == other.originatorAddressLine2 && originatorAddressLine3 == other.originatorAddressLine3 && originatorName == other.originatorName && recipientAccountNumber == other.recipientAccountNumber && recipientAddressLine1 == other.recipientAddressLine1 && recipientAddressLine2 == other.recipientAddressLine2 && recipientAddressLine3 == other.recipientAddressLine3 && recipientName == other.recipientName && recipientRoutingNumber == other.recipientRoutingNumber && status == other.status && submission == other.submission && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is WireDrawdownRequest && id == other.id && accountNumberId == other.accountNumberId && amount == other.amount && createdAt == other.createdAt && creditorAddress == other.creditorAddress && creditorName == other.creditorName && currency == other.currency && debtorAccountNumber == other.debtorAccountNumber && debtorAddress == other.debtorAddress && debtorName == other.debtorName && debtorRoutingNumber == other.debtorRoutingNumber && fulfillmentInboundWireTransferId == other.fulfillmentInboundWireTransferId && idempotencyKey == other.idempotencyKey && status == other.status && submission == other.submission && type == other.type && unstructuredRemittanceInformation == other.unstructuredRemittanceInformation && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(id, accountNumberId, amount, createdAt, currency, fulfillmentInboundWireTransferId, idempotencyKey, messageToRecipient, originatorAddressLine1, originatorAddressLine2, originatorAddressLine3, originatorName, recipientAccountNumber, recipientAddressLine1, recipientAddressLine2, recipientAddressLine3, recipientName, recipientRoutingNumber, status, submission, type, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(id, accountNumberId, amount, createdAt, creditorAddress, creditorName, currency, debtorAccountNumber, debtorAddress, debtorName, debtorRoutingNumber, fulfillmentInboundWireTransferId, idempotencyKey, status, submission, type, unstructuredRemittanceInformation, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "WireDrawdownRequest{id=$id, accountNumberId=$accountNumberId, amount=$amount, createdAt=$createdAt, currency=$currency, fulfillmentInboundWireTransferId=$fulfillmentInboundWireTransferId, idempotencyKey=$idempotencyKey, messageToRecipient=$messageToRecipient, originatorAddressLine1=$originatorAddressLine1, originatorAddressLine2=$originatorAddressLine2, originatorAddressLine3=$originatorAddressLine3, originatorName=$originatorName, recipientAccountNumber=$recipientAccountNumber, recipientAddressLine1=$recipientAddressLine1, recipientAddressLine2=$recipientAddressLine2, recipientAddressLine3=$recipientAddressLine3, recipientName=$recipientName, recipientRoutingNumber=$recipientRoutingNumber, status=$status, submission=$submission, type=$type, additionalProperties=$additionalProperties}"
+ "WireDrawdownRequest{id=$id, accountNumberId=$accountNumberId, amount=$amount, createdAt=$createdAt, creditorAddress=$creditorAddress, creditorName=$creditorName, currency=$currency, debtorAccountNumber=$debtorAccountNumber, debtorAddress=$debtorAddress, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, fulfillmentInboundWireTransferId=$fulfillmentInboundWireTransferId, idempotencyKey=$idempotencyKey, status=$status, submission=$submission, type=$type, unstructuredRemittanceInformation=$unstructuredRemittanceInformation, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestCreateParams.kt
index 3ede8a6e2..a6d33a6fe 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestCreateParams.kt
@@ -18,6 +18,7 @@ import com.increase.api.errors.IncreaseInvalidDataException
import java.util.Collections
import java.util.Objects
import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
/** Create a Wire Drawdown Request */
class WireDrawdownRequestCreateParams
@@ -28,7 +29,7 @@ private constructor(
) : Params {
/**
- * The Account Number to which the recipient should send funds.
+ * The Account Number to which the debtor should send funds.
*
* @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).
@@ -36,7 +37,7 @@ private constructor(
fun accountNumberId(): String = body.accountNumberId()
/**
- * The amount requested from the recipient, in USD cents.
+ * The amount requested from the debtor, 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).
@@ -44,96 +45,60 @@ private constructor(
fun amount(): Long = body.amount()
/**
- * A message the recipient will see as part of the request.
+ * The creditor's address.
*
* @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 messageToRecipient(): String = body.messageToRecipient()
+ fun creditorAddress(): CreditorAddress = body.creditorAddress()
/**
- * The drawdown request's recipient's account number.
+ * The creditor's name.
*
* @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 recipientAccountNumber(): String = body.recipientAccountNumber()
+ fun creditorName(): String = body.creditorName()
/**
- * The drawdown request's recipient's name.
+ * The debtor's account number.
*
* @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 recipientName(): String = body.recipientName()
+ fun debtorAccountNumber(): String = body.debtorAccountNumber()
/**
- * The drawdown request's recipient's routing number.
+ * The debtor's address.
*
* @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 recipientRoutingNumber(): String = body.recipientRoutingNumber()
+ fun debtorAddress(): DebtorAddress = body.debtorAddress()
/**
- * The drawdown request originator's address line 1. This is only necessary if you're requesting
- * a payment to a commingled account. Otherwise, we'll use the associated entity's details.
+ * The debtor's name.
*
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun originatorAddressLine1(): Optional = body.originatorAddressLine1()
-
- /**
- * The drawdown request originator's address line 2. This is only necessary if you're requesting
- * a payment to a commingled account. Otherwise, we'll use the associated entity's details.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun originatorAddressLine2(): Optional = body.originatorAddressLine2()
-
- /**
- * The drawdown request originator's address line 3. This is only necessary if you're requesting
- * a payment to a commingled account. Otherwise, we'll use the associated entity's details.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun originatorAddressLine3(): Optional = body.originatorAddressLine3()
-
- /**
- * The drawdown request originator's name. This is only necessary if you're requesting a payment
- * to a commingled account. Otherwise, we'll use the associated entity's details.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun originatorName(): Optional = body.originatorName()
-
- /**
- * Line 1 of the drawdown request's recipient's address.
- *
- * @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 recipientAddressLine1(): Optional = body.recipientAddressLine1()
+ fun debtorName(): String = body.debtorName()
/**
- * Line 2 of the drawdown request's recipient's address.
+ * The debtor's routing number.
*
- * @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 recipientAddressLine2(): Optional