From 9838c94009c0388e229f15ab3a2bf612573dac79 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 21:17:05 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- .../WireDrawdownRequest.kt | 1573 ++++++++++------ .../WireDrawdownRequestCreateParams.kt | 1639 ++++++++++------- .../WireDrawdownRequestCreateParamsTest.kt | 158 +- ...WireDrawdownRequestListPageResponseTest.kt | 108 +- .../WireDrawdownRequestTest.kt | 111 +- .../WireDrawdownRequestServiceAsyncTest.kt | 36 +- .../WireDrawdownRequestServiceTest.kt | 36 +- 8 files changed, 2339 insertions(+), 1326 deletions(-) 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/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 = body.recipientAddressLine2() + fun debtorRoutingNumber(): String = body.debtorRoutingNumber() /** - * Line 3 of the drawdown request's recipient's address. + * Remittance information the debtor will see as part of the request. * - * @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 recipientAddressLine3(): Optional = body.recipientAddressLine3() + fun unstructuredRemittanceInformation(): String = body.unstructuredRemittanceInformation() /** * Returns the raw JSON value of [accountNumberId]. @@ -150,90 +115,57 @@ private constructor( fun _amount(): JsonField = body._amount() /** - * Returns the raw JSON value of [messageToRecipient]. - * - * Unlike [messageToRecipient], this method doesn't throw if the JSON field has an unexpected - * type. - */ - fun _messageToRecipient(): JsonField = body._messageToRecipient() - - /** - * Returns the raw JSON value of [recipientAccountNumber]. - * - * Unlike [recipientAccountNumber], this method doesn't throw if the JSON field has an - * unexpected type. - */ - fun _recipientAccountNumber(): JsonField = body._recipientAccountNumber() - - /** - * Returns the raw JSON value of [recipientName]. - * - * Unlike [recipientName], this method doesn't throw if the JSON field has an unexpected type. - */ - fun _recipientName(): JsonField = body._recipientName() - - /** - * Returns the raw JSON value of [recipientRoutingNumber]. - * - * Unlike [recipientRoutingNumber], this method doesn't throw if the JSON field has an - * unexpected type. - */ - fun _recipientRoutingNumber(): JsonField = body._recipientRoutingNumber() - - /** - * Returns the raw JSON value of [originatorAddressLine1]. + * Returns the raw JSON value of [creditorAddress]. * - * Unlike [originatorAddressLine1], 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. */ - fun _originatorAddressLine1(): JsonField = body._originatorAddressLine1() + fun _creditorAddress(): JsonField = body._creditorAddress() /** - * Returns the raw JSON value of [originatorAddressLine2]. + * Returns the raw JSON value of [creditorName]. * - * Unlike [originatorAddressLine2], 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. */ - fun _originatorAddressLine2(): JsonField = body._originatorAddressLine2() + fun _creditorName(): JsonField = body._creditorName() /** - * Returns the raw JSON value of [originatorAddressLine3]. + * Returns the raw JSON value of [debtorAccountNumber]. * - * Unlike [originatorAddressLine3], 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. */ - fun _originatorAddressLine3(): JsonField = body._originatorAddressLine3() + fun _debtorAccountNumber(): JsonField = body._debtorAccountNumber() /** - * Returns the raw JSON value of [originatorName]. + * Returns the raw JSON value of [debtorAddress]. * - * Unlike [originatorName], 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. */ - fun _originatorName(): JsonField = body._originatorName() + fun _debtorAddress(): JsonField = body._debtorAddress() /** - * Returns the raw JSON value of [recipientAddressLine1]. + * Returns the raw JSON value of [debtorName]. * - * Unlike [recipientAddressLine1], 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. */ - fun _recipientAddressLine1(): JsonField = body._recipientAddressLine1() + fun _debtorName(): JsonField = body._debtorName() /** - * Returns the raw JSON value of [recipientAddressLine2]. + * Returns the raw JSON value of [debtorRoutingNumber]. * - * Unlike [recipientAddressLine2], 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. */ - fun _recipientAddressLine2(): JsonField = body._recipientAddressLine2() + fun _debtorRoutingNumber(): JsonField = body._debtorRoutingNumber() /** - * Returns the raw JSON value of [recipientAddressLine3]. + * Returns the raw JSON value of [unstructuredRemittanceInformation]. * - * Unlike [recipientAddressLine3], this method doesn't throw if the JSON field has an unexpected - * type. + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field has + * an unexpected type. */ - fun _recipientAddressLine3(): JsonField = body._recipientAddressLine3() + fun _unstructuredRemittanceInformation(): JsonField = + body._unstructuredRemittanceInformation() fun _additionalBodyProperties(): Map = body._additionalProperties() @@ -253,10 +185,13 @@ private constructor( * ```java * .accountNumberId() * .amount() - * .messageToRecipient() - * .recipientAccountNumber() - * .recipientName() - * .recipientRoutingNumber() + * .creditorAddress() + * .creditorName() + * .debtorAccountNumber() + * .debtorAddress() + * .debtorName() + * .debtorRoutingNumber() + * .unstructuredRemittanceInformation() * ``` */ @JvmStatic fun builder() = Builder() @@ -285,14 +220,14 @@ private constructor( * Otherwise, it's more convenient to use the top-level setters instead: * - [accountNumberId] * - [amount] - * - [messageToRecipient] - * - [recipientAccountNumber] - * - [recipientName] + * - [creditorAddress] + * - [creditorName] + * - [debtorAccountNumber] * - etc. */ fun body(body: Body) = apply { this.body = body.toBuilder() } - /** The Account Number to which the recipient should send funds. */ + /** The Account Number to which the debtor should send funds. */ fun accountNumberId(accountNumberId: String) = apply { body.accountNumberId(accountNumberId) } @@ -308,7 +243,7 @@ private constructor( body.accountNumberId(accountNumberId) } - /** The amount requested from the recipient, in USD cents. */ + /** The amount requested from the debtor, in USD cents. */ fun amount(amount: Long) = apply { body.amount(amount) } /** @@ -319,192 +254,111 @@ private constructor( */ fun amount(amount: JsonField) = apply { body.amount(amount) } - /** A message the recipient will see as part of the request. */ - fun messageToRecipient(messageToRecipient: String) = apply { - body.messageToRecipient(messageToRecipient) - } - - /** - * Sets [Builder.messageToRecipient] 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. - */ - fun messageToRecipient(messageToRecipient: JsonField) = apply { - body.messageToRecipient(messageToRecipient) - } - - /** The drawdown request's recipient's account number. */ - fun recipientAccountNumber(recipientAccountNumber: String) = apply { - body.recipientAccountNumber(recipientAccountNumber) + /** The creditor's address. */ + fun creditorAddress(creditorAddress: CreditorAddress) = apply { + body.creditorAddress(creditorAddress) } /** - * Sets [Builder.recipientAccountNumber] to an arbitrary JSON value. + * Sets [Builder.creditorAddress] 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. + * 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 recipientAccountNumber(recipientAccountNumber: JsonField) = apply { - body.recipientAccountNumber(recipientAccountNumber) + fun creditorAddress(creditorAddress: JsonField) = apply { + body.creditorAddress(creditorAddress) } - /** The drawdown request's recipient's name. */ - fun recipientName(recipientName: String) = apply { body.recipientName(recipientName) } + /** The creditor's name. */ + fun creditorName(creditorName: String) = apply { body.creditorName(creditorName) } /** - * Sets [Builder.recipientName] to an arbitrary JSON value. + * Sets [Builder.creditorName] to an arbitrary JSON value. * - * You should usually call [Builder.recipientName] with a well-typed [String] value instead. + * 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 recipientName(recipientName: JsonField) = apply { - body.recipientName(recipientName) - } - - /** The drawdown request's recipient's routing number. */ - fun recipientRoutingNumber(recipientRoutingNumber: String) = apply { - body.recipientRoutingNumber(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 { - body.recipientRoutingNumber(recipientRoutingNumber) - } - - /** - * 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. - */ - fun originatorAddressLine1(originatorAddressLine1: String) = apply { - body.originatorAddressLine1(originatorAddressLine1) - } - - /** - * Sets [Builder.originatorAddressLine1] to an arbitrary JSON value. - * - * You should usually call [Builder.originatorAddressLine1] with a well-typed [String] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun originatorAddressLine1(originatorAddressLine1: JsonField) = apply { - body.originatorAddressLine1(originatorAddressLine1) + fun creditorName(creditorName: JsonField) = apply { + body.creditorName(creditorName) } - /** - * 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. - */ - fun originatorAddressLine2(originatorAddressLine2: String) = apply { - body.originatorAddressLine2(originatorAddressLine2) + /** The debtor's account number. */ + fun debtorAccountNumber(debtorAccountNumber: String) = apply { + body.debtorAccountNumber(debtorAccountNumber) } /** - * Sets [Builder.originatorAddressLine2] to an arbitrary JSON value. + * Sets [Builder.debtorAccountNumber] to an arbitrary JSON value. * - * You should usually call [Builder.originatorAddressLine2] with a well-typed [String] 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 originatorAddressLine2(originatorAddressLine2: JsonField) = apply { - body.originatorAddressLine2(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. - */ - fun originatorAddressLine3(originatorAddressLine3: String) = apply { - body.originatorAddressLine3(originatorAddressLine3) + fun debtorAccountNumber(debtorAccountNumber: JsonField) = apply { + body.debtorAccountNumber(debtorAccountNumber) } - /** - * Sets [Builder.originatorAddressLine3] 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. - */ - fun originatorAddressLine3(originatorAddressLine3: JsonField) = apply { - body.originatorAddressLine3(originatorAddressLine3) + /** The debtor's address. */ + fun debtorAddress(debtorAddress: DebtorAddress) = apply { + body.debtorAddress(debtorAddress) } /** - * 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. - */ - fun originatorName(originatorName: String) = apply { body.originatorName(originatorName) } - - /** - * Sets [Builder.originatorName] to an arbitrary JSON value. + * Sets [Builder.debtorAddress] to an arbitrary JSON value. * - * You should usually call [Builder.originatorName] with a well-typed [String] 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 originatorName(originatorName: JsonField) = apply { - body.originatorName(originatorName) + fun debtorAddress(debtorAddress: JsonField) = apply { + body.debtorAddress(debtorAddress) } - /** Line 1 of the drawdown request's recipient's address. */ - fun recipientAddressLine1(recipientAddressLine1: String) = apply { - body.recipientAddressLine1(recipientAddressLine1) - } + /** The debtor's name. */ + fun debtorName(debtorName: String) = apply { body.debtorName(debtorName) } /** - * Sets [Builder.recipientAddressLine1] to an arbitrary JSON value. + * Sets [Builder.debtorName] 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. + * 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 recipientAddressLine1(recipientAddressLine1: JsonField) = apply { - body.recipientAddressLine1(recipientAddressLine1) - } + fun debtorName(debtorName: JsonField) = apply { body.debtorName(debtorName) } - /** Line 2 of the drawdown request's recipient's address. */ - fun recipientAddressLine2(recipientAddressLine2: String) = apply { - body.recipientAddressLine2(recipientAddressLine2) + /** The debtor's routing number. */ + fun debtorRoutingNumber(debtorRoutingNumber: String) = apply { + body.debtorRoutingNumber(debtorRoutingNumber) } /** - * Sets [Builder.recipientAddressLine2] to an arbitrary JSON value. + * Sets [Builder.debtorRoutingNumber] to an arbitrary JSON value. * - * You should usually call [Builder.recipientAddressLine2] with a well-typed [String] 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 recipientAddressLine2(recipientAddressLine2: JsonField) = apply { - body.recipientAddressLine2(recipientAddressLine2) + fun debtorRoutingNumber(debtorRoutingNumber: JsonField) = apply { + body.debtorRoutingNumber(debtorRoutingNumber) } - /** Line 3 of the drawdown request's recipient's address. */ - fun recipientAddressLine3(recipientAddressLine3: String) = apply { - body.recipientAddressLine3(recipientAddressLine3) + /** Remittance information the debtor will see as part of the request. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) = apply { + body.unstructuredRemittanceInformation(unstructuredRemittanceInformation) } /** - * Sets [Builder.recipientAddressLine3] to an arbitrary JSON value. + * Sets [Builder.unstructuredRemittanceInformation] 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. + * 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 recipientAddressLine3(recipientAddressLine3: JsonField) = apply { - body.recipientAddressLine3(recipientAddressLine3) - } + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { body.unstructuredRemittanceInformation(unstructuredRemittanceInformation) } fun additionalBodyProperties(additionalBodyProperties: Map) = apply { body.additionalProperties(additionalBodyProperties) @@ -632,10 +486,13 @@ private constructor( * ```java * .accountNumberId() * .amount() - * .messageToRecipient() - * .recipientAccountNumber() - * .recipientName() - * .recipientRoutingNumber() + * .creditorAddress() + * .creditorName() + * .debtorAccountNumber() + * .debtorAddress() + * .debtorName() + * .debtorRoutingNumber() + * .unstructuredRemittanceInformation() * ``` * * @throws IllegalStateException if any required field is unset. @@ -658,17 +515,13 @@ private constructor( private constructor( private val accountNumberId: JsonField, private val amount: JsonField, - private val messageToRecipient: JsonField, - private val recipientAccountNumber: JsonField, - private val recipientName: JsonField, - private val recipientRoutingNumber: JsonField, - private val originatorAddressLine1: JsonField, - private val originatorAddressLine2: JsonField, - private val originatorAddressLine3: JsonField, - private val originatorName: JsonField, - private val recipientAddressLine1: JsonField, - private val recipientAddressLine2: JsonField, - private val recipientAddressLine3: JsonField, + private val creditorAddress: JsonField, + private val creditorName: JsonField, + private val debtorAccountNumber: JsonField, + private val debtorAddress: JsonField, + private val debtorName: JsonField, + private val debtorRoutingNumber: JsonField, + private val unstructuredRemittanceInformation: JsonField, private val additionalProperties: MutableMap, ) { @@ -678,58 +531,42 @@ private constructor( @ExcludeMissing accountNumberId: JsonField = JsonMissing.of(), @JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(), - @JsonProperty("message_to_recipient") + @JsonProperty("creditor_address") @ExcludeMissing - messageToRecipient: JsonField = JsonMissing.of(), - @JsonProperty("recipient_account_number") + creditorAddress: JsonField = JsonMissing.of(), + @JsonProperty("creditor_name") @ExcludeMissing - recipientAccountNumber: JsonField = JsonMissing.of(), - @JsonProperty("recipient_name") + creditorName: JsonField = JsonMissing.of(), + @JsonProperty("debtor_account_number") @ExcludeMissing - recipientName: JsonField = JsonMissing.of(), - @JsonProperty("recipient_routing_number") + debtorAccountNumber: JsonField = JsonMissing.of(), + @JsonProperty("debtor_address") @ExcludeMissing - recipientRoutingNumber: JsonField = JsonMissing.of(), - @JsonProperty("originator_address_line1") + debtorAddress: JsonField = JsonMissing.of(), + @JsonProperty("debtor_name") @ExcludeMissing - originatorAddressLine1: JsonField = JsonMissing.of(), - @JsonProperty("originator_address_line2") + debtorName: JsonField = JsonMissing.of(), + @JsonProperty("debtor_routing_number") @ExcludeMissing - originatorAddressLine2: JsonField = JsonMissing.of(), - @JsonProperty("originator_address_line3") + debtorRoutingNumber: JsonField = JsonMissing.of(), + @JsonProperty("unstructured_remittance_information") @ExcludeMissing - originatorAddressLine3: JsonField = JsonMissing.of(), - @JsonProperty("originator_name") - @ExcludeMissing - originatorName: JsonField = JsonMissing.of(), - @JsonProperty("recipient_address_line1") - @ExcludeMissing - recipientAddressLine1: JsonField = JsonMissing.of(), - @JsonProperty("recipient_address_line2") - @ExcludeMissing - recipientAddressLine2: JsonField = JsonMissing.of(), - @JsonProperty("recipient_address_line3") - @ExcludeMissing - recipientAddressLine3: JsonField = JsonMissing.of(), + unstructuredRemittanceInformation: JsonField = JsonMissing.of(), ) : this( accountNumberId, amount, - messageToRecipient, - recipientAccountNumber, - recipientName, - recipientRoutingNumber, - originatorAddressLine1, - originatorAddressLine2, - originatorAddressLine3, - originatorName, - recipientAddressLine1, - recipientAddressLine2, - recipientAddressLine3, + creditorAddress, + creditorName, + debtorAccountNumber, + debtorAddress, + debtorName, + debtorRoutingNumber, + unstructuredRemittanceInformation, mutableMapOf(), ) /** - * 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). @@ -737,7 +574,7 @@ private constructor( fun accountNumberId(): String = accountNumberId.getRequired("account_number_id") /** - * 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). @@ -745,107 +582,61 @@ private constructor( fun amount(): Long = amount.getRequired("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 = messageToRecipient.getRequired("message_to_recipient") + fun creditorAddress(): CreditorAddress = creditorAddress.getRequired("creditor_address") /** - * 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 = - recipientAccountNumber.getRequired("recipient_account_number") + fun creditorName(): String = creditorName.getRequired("creditor_name") /** - * 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 = recipientName.getRequired("recipient_name") + fun debtorAccountNumber(): String = debtorAccountNumber.getRequired("debtor_account_number") /** - * 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 = - recipientRoutingNumber.getRequired("recipient_routing_number") - - /** - * 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. - * - * @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 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 = - originatorAddressLine2.getOptional("originator_address_line2") + fun debtorAddress(): DebtorAddress = debtorAddress.getRequired("debtor_address") /** - * 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. + * 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 originatorAddressLine3(): Optional = - originatorAddressLine3.getOptional("originator_address_line3") - - /** - * 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 = originatorName.getOptional("originator_name") - - /** - * 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 = - 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. + * Remittance information the debtor will see as part of the request. * - * @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 recipientAddressLine3(): Optional = - recipientAddressLine3.getOptional("recipient_address_line3") + fun unstructuredRemittanceInformation(): String = + unstructuredRemittanceInformation.getRequired("unstructured_remittance_information") /** * Returns the raw JSON value of [accountNumberId]. @@ -865,114 +656,74 @@ private constructor( @JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField = amount /** - * 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 [recipientAccountNumber]. - * - * Unlike [recipientAccountNumber], this method doesn't throw if the JSON field has an - * unexpected type. - */ - @JsonProperty("recipient_account_number") - @ExcludeMissing - fun _recipientAccountNumber(): JsonField = recipientAccountNumber - - /** - * Returns the raw JSON value of [recipientName]. + * Returns the raw JSON value of [creditorAddress]. * - * Unlike [recipientName], this method doesn't throw if the JSON field has an unexpected + * Unlike [creditorAddress], this method doesn't throw if the JSON field has an unexpected * type. */ - @JsonProperty("recipient_name") - @ExcludeMissing - fun _recipientName(): JsonField = recipientName - - /** - * Returns the raw JSON value of [recipientRoutingNumber]. - * - * Unlike [recipientRoutingNumber], this method doesn't throw if the JSON field has an - * unexpected type. - */ - @JsonProperty("recipient_routing_number") - @ExcludeMissing - fun _recipientRoutingNumber(): JsonField = recipientRoutingNumber - - /** - * 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") + @JsonProperty("creditor_address") @ExcludeMissing - fun _originatorAddressLine1(): JsonField = originatorAddressLine1 + fun _creditorAddress(): JsonField = creditorAddress /** - * Returns the raw JSON value of [originatorAddressLine2]. + * Returns the raw JSON value of [creditorName]. * - * Unlike [originatorAddressLine2], 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_line2") + @JsonProperty("creditor_name") @ExcludeMissing - fun _originatorAddressLine2(): JsonField = originatorAddressLine2 + fun _creditorName(): JsonField = creditorName /** - * Returns the raw JSON value of [originatorAddressLine3]. + * Returns the raw JSON value of [debtorAccountNumber]. * - * Unlike [originatorAddressLine3], this method doesn't throw if the JSON field has an + * Unlike [debtorAccountNumber], this method doesn't throw if the JSON field has an * unexpected type. */ - @JsonProperty("originator_address_line3") + @JsonProperty("debtor_account_number") @ExcludeMissing - fun _originatorAddressLine3(): JsonField = originatorAddressLine3 + fun _debtorAccountNumber(): JsonField = debtorAccountNumber /** - * Returns the raw JSON value of [originatorName]. + * Returns the raw JSON value of [debtorAddress]. * - * Unlike [originatorName], this method doesn't throw if the JSON field has an unexpected + * Unlike [debtorAddress], this method doesn't throw if the JSON field has an unexpected * type. */ - @JsonProperty("originator_name") + @JsonProperty("debtor_address") @ExcludeMissing - fun _originatorName(): JsonField = originatorName + fun _debtorAddress(): JsonField = debtorAddress /** - * Returns the raw JSON value of [recipientAddressLine1]. + * Returns the raw JSON value of [debtorName]. * - * Unlike [recipientAddressLine1], 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_line1") + @JsonProperty("debtor_name") @ExcludeMissing - fun _recipientAddressLine1(): JsonField = recipientAddressLine1 + fun _debtorName(): JsonField = debtorName /** - * Returns the raw JSON value of [recipientAddressLine2]. + * Returns the raw JSON value of [debtorRoutingNumber]. * - * Unlike [recipientAddressLine2], this method doesn't throw if the JSON field has an + * Unlike [debtorRoutingNumber], this method doesn't throw if the JSON field has an * unexpected type. */ - @JsonProperty("recipient_address_line2") + @JsonProperty("debtor_routing_number") @ExcludeMissing - fun _recipientAddressLine2(): JsonField = recipientAddressLine2 + fun _debtorRoutingNumber(): JsonField = debtorRoutingNumber /** - * Returns the raw JSON value of [recipientAddressLine3]. + * Returns the raw JSON value of [unstructuredRemittanceInformation]. * - * Unlike [recipientAddressLine3], this method doesn't throw if the JSON field has an - * unexpected type. + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field + * has an unexpected type. */ - @JsonProperty("recipient_address_line3") + @JsonProperty("unstructured_remittance_information") @ExcludeMissing - fun _recipientAddressLine3(): JsonField = recipientAddressLine3 + fun _unstructuredRemittanceInformation(): JsonField = + unstructuredRemittanceInformation @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { @@ -995,10 +746,13 @@ private constructor( * ```java * .accountNumberId() * .amount() - * .messageToRecipient() - * .recipientAccountNumber() - * .recipientName() - * .recipientRoutingNumber() + * .creditorAddress() + * .creditorName() + * .debtorAccountNumber() + * .debtorAddress() + * .debtorName() + * .debtorRoutingNumber() + * .unstructuredRemittanceInformation() * ``` */ @JvmStatic fun builder() = Builder() @@ -1009,38 +763,30 @@ private constructor( private var accountNumberId: JsonField? = null private var amount: JsonField? = null - private var messageToRecipient: JsonField? = null - private var recipientAccountNumber: JsonField? = null - private var recipientName: JsonField? = null - private var recipientRoutingNumber: JsonField? = null - private var originatorAddressLine1: JsonField = JsonMissing.of() - private var originatorAddressLine2: JsonField = JsonMissing.of() - private var originatorAddressLine3: JsonField = JsonMissing.of() - private var originatorName: JsonField = JsonMissing.of() - private var recipientAddressLine1: JsonField = JsonMissing.of() - private var recipientAddressLine2: JsonField = JsonMissing.of() - private var recipientAddressLine3: JsonField = JsonMissing.of() + private var creditorAddress: JsonField? = null + private var creditorName: JsonField? = null + private var debtorAccountNumber: JsonField? = null + private var debtorAddress: JsonField? = null + private var debtorName: JsonField? = null + private var debtorRoutingNumber: JsonField? = null + private var unstructuredRemittanceInformation: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(body: Body) = apply { accountNumberId = body.accountNumberId amount = body.amount - messageToRecipient = body.messageToRecipient - recipientAccountNumber = body.recipientAccountNumber - recipientName = body.recipientName - recipientRoutingNumber = body.recipientRoutingNumber - originatorAddressLine1 = body.originatorAddressLine1 - originatorAddressLine2 = body.originatorAddressLine2 - originatorAddressLine3 = body.originatorAddressLine3 - originatorName = body.originatorName - recipientAddressLine1 = body.recipientAddressLine1 - recipientAddressLine2 = body.recipientAddressLine2 - recipientAddressLine3 = body.recipientAddressLine3 + creditorAddress = body.creditorAddress + creditorName = body.creditorName + debtorAccountNumber = body.debtorAccountNumber + debtorAddress = body.debtorAddress + debtorName = body.debtorName + debtorRoutingNumber = body.debtorRoutingNumber + unstructuredRemittanceInformation = body.unstructuredRemittanceInformation additionalProperties = body.additionalProperties.toMutableMap() } - /** The Account Number to which the recipient should send funds. */ + /** The Account Number to which the debtor should send funds. */ fun accountNumberId(accountNumberId: String) = accountNumberId(JsonField.of(accountNumberId)) @@ -1055,7 +801,7 @@ private constructor( this.accountNumberId = accountNumberId } - /** The amount requested from the recipient, in USD cents. */ + /** The amount requested from the debtor, in USD cents. */ fun amount(amount: Long) = amount(JsonField.of(amount)) /** @@ -1067,185 +813,106 @@ private constructor( */ fun amount(amount: JsonField) = apply { this.amount = amount } - /** A message the recipient will see as part of the request. */ - fun messageToRecipient(messageToRecipient: String) = - messageToRecipient(JsonField.of(messageToRecipient)) - - /** - * Sets [Builder.messageToRecipient] 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. - */ - fun messageToRecipient(messageToRecipient: JsonField) = apply { - this.messageToRecipient = messageToRecipient - } - - /** The drawdown request's recipient's account number. */ - fun recipientAccountNumber(recipientAccountNumber: String) = - recipientAccountNumber(JsonField.of(recipientAccountNumber)) + /** The creditor's address. */ + fun creditorAddress(creditorAddress: CreditorAddress) = + creditorAddress(JsonField.of(creditorAddress)) /** - * Sets [Builder.recipientAccountNumber] to an arbitrary JSON value. + * Sets [Builder.creditorAddress] to an arbitrary JSON value. * - * You should usually call [Builder.recipientAccountNumber] with a well-typed [String] + * 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 recipientAccountNumber(recipientAccountNumber: JsonField) = apply { - this.recipientAccountNumber = recipientAccountNumber + fun creditorAddress(creditorAddress: JsonField) = apply { + this.creditorAddress = creditorAddress } - /** The drawdown request's recipient's name. */ - fun recipientName(recipientName: String) = recipientName(JsonField.of(recipientName)) + /** The creditor's name. */ + fun creditorName(creditorName: String) = creditorName(JsonField.of(creditorName)) /** - * Sets [Builder.recipientName] to an arbitrary JSON value. + * Sets [Builder.creditorName] to an arbitrary JSON value. * - * You should usually call [Builder.recipientName] with a well-typed [String] 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 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 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. - */ - fun originatorAddressLine1(originatorAddressLine1: String) = - originatorAddressLine1(JsonField.of(originatorAddressLine1)) - - /** - * Sets [Builder.originatorAddressLine1] to an arbitrary JSON value. - * - * You should usually call [Builder.originatorAddressLine1] with a well-typed [String] - * 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 + fun creditorName(creditorName: JsonField) = apply { + this.creditorName = creditorName } - /** - * 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. - */ - fun originatorAddressLine2(originatorAddressLine2: String) = - originatorAddressLine2(JsonField.of(originatorAddressLine2)) + /** The debtor's account number. */ + fun debtorAccountNumber(debtorAccountNumber: String) = + debtorAccountNumber(JsonField.of(debtorAccountNumber)) /** - * Sets [Builder.originatorAddressLine2] to an arbitrary JSON value. + * Sets [Builder.debtorAccountNumber] to an arbitrary JSON value. * - * You should usually call [Builder.originatorAddressLine2] with a well-typed [String] + * 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 originatorAddressLine2(originatorAddressLine2: JsonField) = apply { - this.originatorAddressLine2 = originatorAddressLine2 + fun debtorAccountNumber(debtorAccountNumber: JsonField) = apply { + this.debtorAccountNumber = debtorAccountNumber } - /** - * 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. - */ - fun originatorAddressLine3(originatorAddressLine3: String) = - originatorAddressLine3(JsonField.of(originatorAddressLine3)) + /** The debtor's address. */ + fun debtorAddress(debtorAddress: DebtorAddress) = + debtorAddress(JsonField.of(debtorAddress)) /** - * Sets [Builder.originatorAddressLine3] to an arbitrary JSON value. + * Sets [Builder.debtorAddress] to an arbitrary JSON value. * - * You should usually call [Builder.originatorAddressLine3] with a well-typed [String] + * 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 originatorAddressLine3(originatorAddressLine3: JsonField) = apply { - this.originatorAddressLine3 = originatorAddressLine3 + fun debtorAddress(debtorAddress: JsonField) = apply { + this.debtorAddress = debtorAddress } - /** - * 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. - */ - fun originatorName(originatorName: String) = - originatorName(JsonField.of(originatorName)) + /** The debtor's name. */ + fun debtorName(debtorName: String) = debtorName(JsonField.of(debtorName)) /** - * Sets [Builder.originatorName] to an arbitrary JSON value. + * Sets [Builder.debtorName] to an arbitrary JSON value. * - * You should usually call [Builder.originatorName] with a well-typed [String] 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 originatorName(originatorName: JsonField) = apply { - this.originatorName = originatorName - } - - /** Line 1 of the drawdown request's recipient's address. */ - fun recipientAddressLine1(recipientAddressLine1: String) = - recipientAddressLine1(JsonField.of(recipientAddressLine1)) - - /** - * 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 - } + fun debtorName(debtorName: JsonField) = apply { this.debtorName = debtorName } - /** Line 2 of the drawdown request's recipient's address. */ - fun recipientAddressLine2(recipientAddressLine2: String) = - recipientAddressLine2(JsonField.of(recipientAddressLine2)) + /** The debtor's routing number. */ + fun debtorRoutingNumber(debtorRoutingNumber: String) = + debtorRoutingNumber(JsonField.of(debtorRoutingNumber)) /** - * Sets [Builder.recipientAddressLine2] to an arbitrary JSON value. + * Sets [Builder.debtorRoutingNumber] to an arbitrary JSON value. * - * You should usually call [Builder.recipientAddressLine2] with a well-typed [String] + * 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 recipientAddressLine2(recipientAddressLine2: JsonField) = apply { - this.recipientAddressLine2 = recipientAddressLine2 + fun debtorRoutingNumber(debtorRoutingNumber: JsonField) = apply { + this.debtorRoutingNumber = debtorRoutingNumber } - /** Line 3 of the drawdown request's recipient's address. */ - fun recipientAddressLine3(recipientAddressLine3: String) = - recipientAddressLine3(JsonField.of(recipientAddressLine3)) + /** Remittance information the debtor will see as part of the request. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) = + unstructuredRemittanceInformation(JsonField.of(unstructuredRemittanceInformation)) /** - * Sets [Builder.recipientAddressLine3] to an arbitrary JSON value. + * Sets [Builder.unstructuredRemittanceInformation] 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. + * 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 recipientAddressLine3(recipientAddressLine3: JsonField) = apply { - this.recipientAddressLine3 = recipientAddressLine3 - } + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { this.unstructuredRemittanceInformation = unstructuredRemittanceInformation } fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -1275,10 +942,13 @@ private constructor( * ```java * .accountNumberId() * .amount() - * .messageToRecipient() - * .recipientAccountNumber() - * .recipientName() - * .recipientRoutingNumber() + * .creditorAddress() + * .creditorName() + * .debtorAccountNumber() + * .debtorAddress() + * .debtorName() + * .debtorRoutingNumber() + * .unstructuredRemittanceInformation() * ``` * * @throws IllegalStateException if any required field is unset. @@ -1287,17 +957,16 @@ private constructor( Body( checkRequired("accountNumberId", accountNumberId), checkRequired("amount", amount), - checkRequired("messageToRecipient", messageToRecipient), - checkRequired("recipientAccountNumber", recipientAccountNumber), - checkRequired("recipientName", recipientName), - checkRequired("recipientRoutingNumber", recipientRoutingNumber), - originatorAddressLine1, - originatorAddressLine2, - originatorAddressLine3, - originatorName, - recipientAddressLine1, - recipientAddressLine2, - recipientAddressLine3, + checkRequired("creditorAddress", creditorAddress), + checkRequired("creditorName", creditorName), + checkRequired("debtorAccountNumber", debtorAccountNumber), + checkRequired("debtorAddress", debtorAddress), + checkRequired("debtorName", debtorName), + checkRequired("debtorRoutingNumber", debtorRoutingNumber), + checkRequired( + "unstructuredRemittanceInformation", + unstructuredRemittanceInformation, + ), additionalProperties.toMutableMap(), ) } @@ -1311,17 +980,13 @@ private constructor( accountNumberId() amount() - messageToRecipient() - recipientAccountNumber() - recipientName() - recipientRoutingNumber() - originatorAddressLine1() - originatorAddressLine2() - originatorAddressLine3() - originatorName() - recipientAddressLine1() - recipientAddressLine2() - recipientAddressLine3() + creditorAddress().validate() + creditorName() + debtorAccountNumber() + debtorAddress().validate() + debtorName() + debtorRoutingNumber() + unstructuredRemittanceInformation() validated = true } @@ -1343,34 +1008,716 @@ private constructor( internal fun validity(): Int = (if (accountNumberId.asKnown().isPresent) 1 else 0) + (if (amount.asKnown().isPresent) 1 else 0) + - (if (messageToRecipient.asKnown().isPresent) 1 else 0) + - (if (recipientAccountNumber.asKnown().isPresent) 1 else 0) + - (if (recipientName.asKnown().isPresent) 1 else 0) + - (if (recipientRoutingNumber.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 (recipientAddressLine1.asKnown().isPresent) 1 else 0) + - (if (recipientAddressLine2.asKnown().isPresent) 1 else 0) + - (if (recipientAddressLine3.asKnown().isPresent) 1 else 0) + (creditorAddress.asKnown().getOrNull()?.validity() ?: 0) + + (if (creditorName.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 (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Body && accountNumberId == other.accountNumberId && amount == other.amount && creditorAddress == other.creditorAddress && creditorName == other.creditorName && debtorAccountNumber == other.debtorAccountNumber && debtorAddress == other.debtorAddress && debtorName == other.debtorName && debtorRoutingNumber == other.debtorRoutingNumber && unstructuredRemittanceInformation == other.unstructuredRemittanceInformation && additionalProperties == other.additionalProperties /* spotless:on */ + } + + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(accountNumberId, amount, creditorAddress, creditorName, debtorAccountNumber, debtorAddress, debtorName, debtorRoutingNumber, unstructuredRemittanceInformation, additionalProperties) } + /* spotless:on */ + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Body{accountNumberId=$accountNumberId, amount=$amount, creditorAddress=$creditorAddress, creditorName=$creditorName, debtorAccountNumber=$debtorAccountNumber, debtorAddress=$debtorAddress, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, unstructuredRemittanceInformation=$unstructuredRemittanceInformation, additionalProperties=$additionalProperties}" + } + + /** 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. This is usually the street number and street. + * + * @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. This might be the floor or room number. + * + * @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() + * ``` + */ + @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 = JsonMissing.of() + private var postalCode: JsonField = JsonMissing.of() + private var state: JsonField = JsonMissing.of() + 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. This is usually the street number and street. */ + 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. This might be the floor or room number. */ + fun line2(line2: String) = line2(JsonField.of(line2)) + + /** + * 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.of(postalCode)) + + /** + * 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.of(state)) + + /** + * 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() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): CreditorAddress = + CreditorAddress( + checkRequired("city", city), + checkRequired("country", country), + checkRequired("line1", line1), + line2, + postalCode, + 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. This is usually the street number and street. + * + * @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. This might be the floor or room number. + * + * @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() + * ``` + */ + @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 = JsonMissing.of() + private var postalCode: JsonField = JsonMissing.of() + private var state: JsonField = JsonMissing.of() + 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. This is usually the street number and street. */ + 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. This might be the floor or room number. */ + fun line2(line2: String) = line2(JsonField.of(line2)) + + /** + * 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.of(postalCode)) + + /** + * 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.of(state)) + + /** + * 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() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): DebtorAddress = + DebtorAddress( + checkRequired("city", city), + checkRequired("country", country), + checkRequired("line1", line1), + line2, + postalCode, + 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 Body && accountNumberId == other.accountNumberId && amount == other.amount && messageToRecipient == other.messageToRecipient && recipientAccountNumber == other.recipientAccountNumber && recipientName == other.recipientName && recipientRoutingNumber == other.recipientRoutingNumber && originatorAddressLine1 == other.originatorAddressLine1 && originatorAddressLine2 == other.originatorAddressLine2 && originatorAddressLine3 == other.originatorAddressLine3 && originatorName == other.originatorName && recipientAddressLine1 == other.recipientAddressLine1 && recipientAddressLine2 == other.recipientAddressLine2 && recipientAddressLine3 == other.recipientAddressLine3 && additionalProperties == other.additionalProperties /* spotless:on */ + 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(accountNumberId, amount, messageToRecipient, recipientAccountNumber, recipientName, recipientRoutingNumber, originatorAddressLine1, originatorAddressLine2, originatorAddressLine3, originatorName, recipientAddressLine1, recipientAddressLine2, recipientAddressLine3, additionalProperties) } + 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() = - "Body{accountNumberId=$accountNumberId, amount=$amount, messageToRecipient=$messageToRecipient, recipientAccountNumber=$recipientAccountNumber, recipientName=$recipientName, recipientRoutingNumber=$recipientRoutingNumber, originatorAddressLine1=$originatorAddressLine1, originatorAddressLine2=$originatorAddressLine2, originatorAddressLine3=$originatorAddressLine3, originatorName=$originatorName, recipientAddressLine1=$recipientAddressLine1, recipientAddressLine2=$recipientAddressLine2, recipientAddressLine3=$recipientAddressLine3, additionalProperties=$additionalProperties}" + "DebtorAddress{city=$city, country=$country, line1=$line1, line2=$line2, postalCode=$postalCode, state=$state, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestCreateParamsTest.kt index 445a8c3cc..8e65ff33b 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestCreateParamsTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestCreateParamsTest.kt @@ -12,17 +12,31 @@ internal class WireDrawdownRequestCreateParamsTest { WireDrawdownRequestCreateParams.builder() .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) - .messageToRecipient("Invoice 29582") - .recipientAccountNumber("987654321") - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") - .originatorAddressLine1("x") - .originatorAddressLine2("x") - .originatorAddressLine3("x") - .originatorName("x") - .recipientAddressLine1("33 Liberty Street") - .recipientAddressLine2("New York, NY, 10045") - .recipientAddressLine3("x") + .creditorAddress( + WireDrawdownRequestCreateParams.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + .creditorName("National Phonograph Company") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequestCreateParams.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") + .unstructuredRemittanceInformation("Invoice 29582") .build() } @@ -32,34 +46,64 @@ internal class WireDrawdownRequestCreateParamsTest { WireDrawdownRequestCreateParams.builder() .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) - .messageToRecipient("Invoice 29582") - .recipientAccountNumber("987654321") - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") - .originatorAddressLine1("x") - .originatorAddressLine2("x") - .originatorAddressLine3("x") - .originatorName("x") - .recipientAddressLine1("33 Liberty Street") - .recipientAddressLine2("New York, NY, 10045") - .recipientAddressLine3("x") + .creditorAddress( + WireDrawdownRequestCreateParams.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + .creditorName("National Phonograph Company") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequestCreateParams.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") + .unstructuredRemittanceInformation("Invoice 29582") .build() val body = params._body() assertThat(body.accountNumberId()).isEqualTo("account_number_v18nkfqm6afpsrvy82b2") assertThat(body.amount()).isEqualTo(10000L) - assertThat(body.messageToRecipient()).isEqualTo("Invoice 29582") - assertThat(body.recipientAccountNumber()).isEqualTo("987654321") - assertThat(body.recipientName()).isEqualTo("Ian Crease") - assertThat(body.recipientRoutingNumber()).isEqualTo("101050001") - assertThat(body.originatorAddressLine1()).contains("x") - assertThat(body.originatorAddressLine2()).contains("x") - assertThat(body.originatorAddressLine3()).contains("x") - assertThat(body.originatorName()).contains("x") - assertThat(body.recipientAddressLine1()).contains("33 Liberty Street") - assertThat(body.recipientAddressLine2()).contains("New York, NY, 10045") - assertThat(body.recipientAddressLine3()).contains("x") + assertThat(body.creditorAddress()) + .isEqualTo( + WireDrawdownRequestCreateParams.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + assertThat(body.creditorName()).isEqualTo("National Phonograph Company") + assertThat(body.debtorAccountNumber()).isEqualTo("987654321") + assertThat(body.debtorAddress()) + .isEqualTo( + WireDrawdownRequestCreateParams.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + assertThat(body.debtorName()).isEqualTo("Ian Crease") + assertThat(body.debtorRoutingNumber()).isEqualTo("101050001") + assertThat(body.unstructuredRemittanceInformation()).isEqualTo("Invoice 29582") } @Test @@ -68,19 +112,51 @@ internal class WireDrawdownRequestCreateParamsTest { WireDrawdownRequestCreateParams.builder() .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) - .messageToRecipient("Invoice 29582") - .recipientAccountNumber("987654321") - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") + .creditorAddress( + WireDrawdownRequestCreateParams.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .build() + ) + .creditorName("National Phonograph Company") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequestCreateParams.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") + .unstructuredRemittanceInformation("Invoice 29582") .build() val body = params._body() assertThat(body.accountNumberId()).isEqualTo("account_number_v18nkfqm6afpsrvy82b2") assertThat(body.amount()).isEqualTo(10000L) - assertThat(body.messageToRecipient()).isEqualTo("Invoice 29582") - assertThat(body.recipientAccountNumber()).isEqualTo("987654321") - assertThat(body.recipientName()).isEqualTo("Ian Crease") - assertThat(body.recipientRoutingNumber()).isEqualTo("101050001") + assertThat(body.creditorAddress()) + .isEqualTo( + WireDrawdownRequestCreateParams.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .build() + ) + assertThat(body.creditorName()).isEqualTo("National Phonograph Company") + assertThat(body.debtorAccountNumber()).isEqualTo("987654321") + assertThat(body.debtorAddress()) + .isEqualTo( + WireDrawdownRequestCreateParams.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .build() + ) + assertThat(body.debtorName()).isEqualTo("Ian Crease") + assertThat(body.debtorRoutingNumber()).isEqualTo("101050001") + assertThat(body.unstructuredRemittanceInformation()).isEqualTo("Invoice 29582") } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponseTest.kt index 1a76a8ae4..654f78166 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponseTest.kt @@ -20,22 +20,35 @@ internal class WireDrawdownRequestListPageResponseTest { .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .creditorAddress( + WireDrawdownRequest.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .creditorName("Ian Crease") .currency("USD") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequest.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") .fulfillmentInboundWireTransferId( "inbound_wire_transfer_f228m6bmhtcxjco9pwp0" ) .idempotencyKey(null) - .messageToRecipient("Invoice 29582") - .originatorAddressLine1(null) - .originatorAddressLine2(null) - .originatorAddressLine3(null) - .originatorName(null) - .recipientAccountNumber("987654321") - .recipientAddressLine1("33 Liberty Street") - .recipientAddressLine2("New York, NY, 10045") - .recipientAddressLine3(null) - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") .status(WireDrawdownRequest.Status.FULFILLED) .submission( WireDrawdownRequest.Submission.builder() @@ -43,6 +56,7 @@ internal class WireDrawdownRequestListPageResponseTest { .build() ) .type(WireDrawdownRequest.Type.WIRE_DRAWDOWN_REQUEST) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .nextCursor("v57w5d") @@ -55,20 +69,33 @@ internal class WireDrawdownRequestListPageResponseTest { .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .creditorAddress( + WireDrawdownRequest.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .creditorName("Ian Crease") .currency("USD") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequest.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") .fulfillmentInboundWireTransferId("inbound_wire_transfer_f228m6bmhtcxjco9pwp0") .idempotencyKey(null) - .messageToRecipient("Invoice 29582") - .originatorAddressLine1(null) - .originatorAddressLine2(null) - .originatorAddressLine3(null) - .originatorName(null) - .recipientAccountNumber("987654321") - .recipientAddressLine1("33 Liberty Street") - .recipientAddressLine2("New York, NY, 10045") - .recipientAddressLine3(null) - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") .status(WireDrawdownRequest.Status.FULFILLED) .submission( WireDrawdownRequest.Submission.builder() @@ -76,6 +103,7 @@ internal class WireDrawdownRequestListPageResponseTest { .build() ) .type(WireDrawdownRequest.Type.WIRE_DRAWDOWN_REQUEST) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) assertThat(wireDrawdownRequestListPageResponse.nextCursor()).contains("v57w5d") @@ -92,22 +120,35 @@ internal class WireDrawdownRequestListPageResponseTest { .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .creditorAddress( + WireDrawdownRequest.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .creditorName("Ian Crease") .currency("USD") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequest.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") .fulfillmentInboundWireTransferId( "inbound_wire_transfer_f228m6bmhtcxjco9pwp0" ) .idempotencyKey(null) - .messageToRecipient("Invoice 29582") - .originatorAddressLine1(null) - .originatorAddressLine2(null) - .originatorAddressLine3(null) - .originatorName(null) - .recipientAccountNumber("987654321") - .recipientAddressLine1("33 Liberty Street") - .recipientAddressLine2("New York, NY, 10045") - .recipientAddressLine3(null) - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") .status(WireDrawdownRequest.Status.FULFILLED) .submission( WireDrawdownRequest.Submission.builder() @@ -115,6 +156,7 @@ internal class WireDrawdownRequestListPageResponseTest { .build() ) .type(WireDrawdownRequest.Type.WIRE_DRAWDOWN_REQUEST) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .nextCursor("v57w5d") diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestTest.kt index b15acc723..3c7403bda 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestTest.kt @@ -18,20 +18,33 @@ internal class WireDrawdownRequestTest { .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .creditorAddress( + WireDrawdownRequest.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .creditorName("Ian Crease") .currency("USD") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequest.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") .fulfillmentInboundWireTransferId("inbound_wire_transfer_f228m6bmhtcxjco9pwp0") .idempotencyKey(null) - .messageToRecipient("Invoice 29582") - .originatorAddressLine1(null) - .originatorAddressLine2(null) - .originatorAddressLine3(null) - .originatorName(null) - .recipientAccountNumber("987654321") - .recipientAddressLine1("33 Liberty Street") - .recipientAddressLine2("New York, NY, 10045") - .recipientAddressLine3(null) - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") .status(WireDrawdownRequest.Status.FULFILLED) .submission( WireDrawdownRequest.Submission.builder() @@ -39,6 +52,7 @@ internal class WireDrawdownRequestTest { .build() ) .type(WireDrawdownRequest.Type.WIRE_DRAWDOWN_REQUEST) + .unstructuredRemittanceInformation("Invoice 29582") .build() assertThat(wireDrawdownRequest.id()).isEqualTo("wire_drawdown_request_q6lmocus3glo0lr2bfv3") @@ -47,21 +61,36 @@ internal class WireDrawdownRequestTest { assertThat(wireDrawdownRequest.amount()).isEqualTo(10000L) assertThat(wireDrawdownRequest.createdAt()) .isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + assertThat(wireDrawdownRequest.creditorAddress()) + .isEqualTo( + WireDrawdownRequest.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + assertThat(wireDrawdownRequest.creditorName()).isEqualTo("Ian Crease") assertThat(wireDrawdownRequest.currency()).isEqualTo("USD") + assertThat(wireDrawdownRequest.debtorAccountNumber()).isEqualTo("987654321") + assertThat(wireDrawdownRequest.debtorAddress()) + .isEqualTo( + WireDrawdownRequest.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + assertThat(wireDrawdownRequest.debtorName()).isEqualTo("Ian Crease") + assertThat(wireDrawdownRequest.debtorRoutingNumber()).isEqualTo("101050001") assertThat(wireDrawdownRequest.fulfillmentInboundWireTransferId()) .contains("inbound_wire_transfer_f228m6bmhtcxjco9pwp0") assertThat(wireDrawdownRequest.idempotencyKey()).isEmpty - assertThat(wireDrawdownRequest.messageToRecipient()).isEqualTo("Invoice 29582") - assertThat(wireDrawdownRequest.originatorAddressLine1()).isEmpty - assertThat(wireDrawdownRequest.originatorAddressLine2()).isEmpty - assertThat(wireDrawdownRequest.originatorAddressLine3()).isEmpty - assertThat(wireDrawdownRequest.originatorName()).isEmpty - assertThat(wireDrawdownRequest.recipientAccountNumber()).isEqualTo("987654321") - assertThat(wireDrawdownRequest.recipientAddressLine1()).contains("33 Liberty Street") - assertThat(wireDrawdownRequest.recipientAddressLine2()).contains("New York, NY, 10045") - assertThat(wireDrawdownRequest.recipientAddressLine3()).isEmpty - assertThat(wireDrawdownRequest.recipientName()).contains("Ian Crease") - assertThat(wireDrawdownRequest.recipientRoutingNumber()).isEqualTo("101050001") assertThat(wireDrawdownRequest.status()).isEqualTo(WireDrawdownRequest.Status.FULFILLED) assertThat(wireDrawdownRequest.submission()) .contains( @@ -71,6 +100,8 @@ internal class WireDrawdownRequestTest { ) assertThat(wireDrawdownRequest.type()) .isEqualTo(WireDrawdownRequest.Type.WIRE_DRAWDOWN_REQUEST) + assertThat(wireDrawdownRequest.unstructuredRemittanceInformation()) + .isEqualTo("Invoice 29582") } @Test @@ -82,20 +113,33 @@ internal class WireDrawdownRequestTest { .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .creditorAddress( + WireDrawdownRequest.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .creditorName("Ian Crease") .currency("USD") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequest.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2(null) + .postalCode("10045") + .state("NY") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") .fulfillmentInboundWireTransferId("inbound_wire_transfer_f228m6bmhtcxjco9pwp0") .idempotencyKey(null) - .messageToRecipient("Invoice 29582") - .originatorAddressLine1(null) - .originatorAddressLine2(null) - .originatorAddressLine3(null) - .originatorName(null) - .recipientAccountNumber("987654321") - .recipientAddressLine1("33 Liberty Street") - .recipientAddressLine2("New York, NY, 10045") - .recipientAddressLine3(null) - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") .status(WireDrawdownRequest.Status.FULFILLED) .submission( WireDrawdownRequest.Submission.builder() @@ -103,6 +147,7 @@ internal class WireDrawdownRequestTest { .build() ) .type(WireDrawdownRequest.Type.WIRE_DRAWDOWN_REQUEST) + .unstructuredRemittanceInformation("Invoice 29582") .build() val roundtrippedWireDrawdownRequest = diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncTest.kt index 4de61b0d9..c1ebbd5c4 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncTest.kt @@ -25,17 +25,31 @@ internal class WireDrawdownRequestServiceAsyncTest { WireDrawdownRequestCreateParams.builder() .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) - .messageToRecipient("Invoice 29582") - .recipientAccountNumber("987654321") - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") - .originatorAddressLine1("x") - .originatorAddressLine2("x") - .originatorAddressLine3("x") - .originatorName("x") - .recipientAddressLine1("33 Liberty Street") - .recipientAddressLine2("New York, NY, 10045") - .recipientAddressLine3("x") + .creditorAddress( + WireDrawdownRequestCreateParams.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + .creditorName("National Phonograph Company") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequestCreateParams.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") + .unstructuredRemittanceInformation("Invoice 29582") .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceTest.kt index 8e062563e..2ae36ad33 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceTest.kt @@ -25,17 +25,31 @@ internal class WireDrawdownRequestServiceTest { WireDrawdownRequestCreateParams.builder() .accountNumberId("account_number_v18nkfqm6afpsrvy82b2") .amount(10000L) - .messageToRecipient("Invoice 29582") - .recipientAccountNumber("987654321") - .recipientName("Ian Crease") - .recipientRoutingNumber("101050001") - .originatorAddressLine1("x") - .originatorAddressLine2("x") - .originatorAddressLine3("x") - .originatorName("x") - .recipientAddressLine1("33 Liberty Street") - .recipientAddressLine2("New York, NY, 10045") - .recipientAddressLine3("x") + .creditorAddress( + WireDrawdownRequestCreateParams.CreditorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + .creditorName("National Phonograph Company") + .debtorAccountNumber("987654321") + .debtorAddress( + WireDrawdownRequestCreateParams.DebtorAddress.builder() + .city("New York") + .country("US") + .line1("33 Liberty Street") + .line2("x") + .postalCode("10045") + .state("NY") + .build() + ) + .debtorName("Ian Crease") + .debtorRoutingNumber("101050001") + .unstructuredRemittanceInformation("Invoice 29582") .build() ) From efd124652dab72c97c10194b0f21ab1f323142c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 21:17:28 +0000 Subject: [PATCH 2/2] release: 0.258.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) 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/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 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.257.0) -[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.257.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.257.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.258.0) +[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.258.0/javadoc.svg)](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 {