Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 258
openapi_spec_hash: 0ea7abef2ca205d64ab8597eea538946
openapi_spec_hash: 428c1af03dcba08ed165656fb9300a88
config_hash: b0e46656e84a8c26907fbe6dc8116a3d
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ private constructor(
/**
* The name by which the recipient knows you.
*
* @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 companyName(): Optional<String> = companyName.getOptional("company_name")
fun companyName(): String = companyName.getRequired("company_name")

/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer
Expand Down Expand Up @@ -398,10 +398,10 @@ private constructor(
* The name of the transfer recipient. This value is informational and not verified by the
* recipient's bank.
*
* @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 individualName(): Optional<String> = individualName.getOptional("individual_name")
fun individualName(): String = individualName.getRequired("individual_name")

/**
* The transfer's network.
Expand Down Expand Up @@ -1199,10 +1199,7 @@ private constructor(
fun companyId(companyId: JsonField<String>) = apply { this.companyId = companyId }

/** The name by which the recipient knows you. */
fun companyName(companyName: String?) = companyName(JsonField.ofNullable(companyName))

/** Alias for calling [Builder.companyName] with `companyName.orElse(null)`. */
fun companyName(companyName: Optional<String>) = companyName(companyName.getOrNull())
fun companyName(companyName: String) = companyName(JsonField.of(companyName))

/**
* Sets [Builder.companyName] to an arbitrary JSON value.
Expand Down Expand Up @@ -1372,12 +1369,7 @@ private constructor(
* The name of the transfer recipient. This value is informational and not verified by the
* recipient's bank.
*/
fun individualName(individualName: String?) =
individualName(JsonField.ofNullable(individualName))

/** Alias for calling [Builder.individualName] with `individualName.orElse(null)`. */
fun individualName(individualName: Optional<String>) =
individualName(individualName.getOrNull())
fun individualName(individualName: String) = individualName(JsonField.of(individualName))

/**
* Sets [Builder.individualName] to an arbitrary JSON value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ private constructor(
fun disputedTransactionId(): String = body.disputedTransactionId()

/**
* The network of the disputed transaction. Details specific to the network are required under
* the sub-object with the same identifier as the network.
* The network of the disputed transaction. Details specific to the network can be provided
* under the sub-object with the same identifier as the network.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
Expand All @@ -61,7 +61,8 @@ private constructor(
fun amount(): Optional<Long> = body.amount()

/**
* The files to be attached to the initial dispute submission.
* The files to be attached to the initial dispute submission. Can only be provided along with
* the network-specific details.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
Expand All @@ -70,15 +71,17 @@ private constructor(

/**
* The free-form explanation provided to Increase to provide more context for the user
* submission. This field is not sent directly to the card networks.
* submission. This field is not sent directly to the card networks. Can only be provided along
* with the network-specific details.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun explanation(): Optional<String> = body.explanation()

/**
* The Visa-specific parameters for the dispute. Required if and only if `network` is `visa`.
* The Visa-specific parameters for the initial User Submission. If omitted, a later User
* Submission will be required.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
Expand Down Expand Up @@ -200,7 +203,7 @@ private constructor(
}

/**
* The network of the disputed transaction. Details specific to the network are required
* The network of the disputed transaction. Details specific to the network can be provided
* under the sub-object with the same identifier as the network.
*/
fun network(network: Network) = apply { body.network(network) }
Expand Down Expand Up @@ -228,7 +231,10 @@ private constructor(
*/
fun amount(amount: JsonField<Long>) = apply { body.amount(amount) }

/** The files to be attached to the initial dispute submission. */
/**
* The files to be attached to the initial dispute submission. Can only be provided along
* with the network-specific details.
*/
fun attachmentFiles(attachmentFiles: List<AttachmentFile>) = apply {
body.attachmentFiles(attachmentFiles)
}
Expand All @@ -255,7 +261,8 @@ private constructor(

/**
* The free-form explanation provided to Increase to provide more context for the user
* submission. This field is not sent directly to the card networks.
* submission. This field is not sent directly to the card networks. Can only be provided
* along with the network-specific details.
*/
fun explanation(explanation: String) = apply { body.explanation(explanation) }

Expand All @@ -269,8 +276,8 @@ private constructor(
fun explanation(explanation: JsonField<String>) = apply { body.explanation(explanation) }

/**
* The Visa-specific parameters for the dispute. Required if and only if `network` is
* `visa`.
* The Visa-specific parameters for the initial User Submission. If omitted, a later User
* Submission will be required.
*/
fun visa(visa: Visa) = apply { body.visa(visa) }

Expand Down Expand Up @@ -473,7 +480,7 @@ private constructor(
disputedTransactionId.getRequired("disputed_transaction_id")

/**
* The network of the disputed transaction. Details specific to the network are required
* The network of the disputed transaction. Details specific to the network can be provided
* under the sub-object with the same identifier as the network.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
Expand All @@ -492,7 +499,8 @@ private constructor(
fun amount(): Optional<Long> = amount.getOptional("amount")

/**
* The files to be attached to the initial dispute submission.
* The files to be attached to the initial dispute submission. Can only be provided along
* with the network-specific details.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
Expand All @@ -502,16 +510,17 @@ private constructor(

/**
* The free-form explanation provided to Increase to provide more context for the user
* submission. This field is not sent directly to the card networks.
* submission. This field is not sent directly to the card networks. Can only be provided
* along with the network-specific details.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
*/
fun explanation(): Optional<String> = explanation.getOptional("explanation")

/**
* The Visa-specific parameters for the dispute. Required if and only if `network` is
* `visa`.
* The Visa-specific parameters for the initial User Submission. If omitted, a later User
* Submission will be required.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
Expand Down Expand Up @@ -635,8 +644,8 @@ private constructor(
}

/**
* The network of the disputed transaction. Details specific to the network are required
* under the sub-object with the same identifier as the network.
* The network of the disputed transaction. Details specific to the network can be
* provided under the sub-object with the same identifier as the network.
*/
fun network(network: Network) = network(JsonField.of(network))

Expand Down Expand Up @@ -665,7 +674,10 @@ private constructor(
*/
fun amount(amount: JsonField<Long>) = apply { this.amount = amount }

/** The files to be attached to the initial dispute submission. */
/**
* The files to be attached to the initial dispute submission. Can only be provided
* along with the network-specific details.
*/
fun attachmentFiles(attachmentFiles: List<AttachmentFile>) =
attachmentFiles(JsonField.of(attachmentFiles))

Expand Down Expand Up @@ -694,7 +706,8 @@ private constructor(

/**
* The free-form explanation provided to Increase to provide more context for the user
* submission. This field is not sent directly to the card networks.
* submission. This field is not sent directly to the card networks. Can only be
* provided along with the network-specific details.
*/
fun explanation(explanation: String) = explanation(JsonField.of(explanation))

Expand All @@ -710,8 +723,8 @@ private constructor(
}

/**
* The Visa-specific parameters for the dispute. Required if and only if `network` is
* `visa`.
* The Visa-specific parameters for the initial User Submission. If omitted, a later
* User Submission will be required.
*/
fun visa(visa: Visa) = visa(JsonField.of(visa))

Expand Down Expand Up @@ -850,8 +863,8 @@ private constructor(
}

/**
* The network of the disputed transaction. Details specific to the network are required under
* the sub-object with the same identifier as the network.
* The network of the disputed transaction. Details specific to the network can be provided
* under the sub-object with the same identifier as the network.
*/
class Network @JsonCreator private constructor(private val value: JsonField<String>) : Enum {

Expand Down Expand Up @@ -1156,7 +1169,8 @@ private constructor(
}

/**
* The Visa-specific parameters for the dispute. Required if and only if `network` is `visa`.
* The Visa-specific parameters for the initial User Submission. If omitted, a later User
* Submission will be required.
*/
class Visa
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ private constructor(
fun amount(): Optional<Long> = body.amount()

/**
* The identifier of the Pending Transaction for the refund authorization. If this is provided,
* `transaction` must not be provided as a refund with a refund authorized can not be linked to
* a regular transaction.
* The identifier of the Pending Transaction for the refund or original credit authorization. If
* this is provided, `transaction` must not be provided as a refund with a refund authorized can
* not be linked to a regular transaction.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
Expand Down Expand Up @@ -137,9 +137,9 @@ private constructor(
fun amount(amount: JsonField<Long>) = apply { body.amount(amount) }

/**
* The identifier of the Pending Transaction for the refund authorization. If this is
* provided, `transaction` must not be provided as a refund with a refund authorized can not
* be linked to a regular transaction.
* The identifier of the Pending Transaction for the refund or original credit
* authorization. If this is provided, `transaction` must not be provided as a refund with a
* refund authorized can not be linked to a regular transaction.
*/
fun pendingTransactionId(pendingTransactionId: String) = apply {
body.pendingTransactionId(pendingTransactionId)
Expand Down Expand Up @@ -339,9 +339,9 @@ private constructor(
fun amount(): Optional<Long> = amount.getOptional("amount")

/**
* The identifier of the Pending Transaction for the refund authorization. If this is
* provided, `transaction` must not be provided as a refund with a refund authorized can not
* be linked to a regular transaction.
* The identifier of the Pending Transaction for the refund or original credit
* authorization. If this is provided, `transaction` must not be provided as a refund with a
* refund authorized can not be linked to a regular transaction.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
Expand Down Expand Up @@ -435,9 +435,9 @@ private constructor(
fun amount(amount: JsonField<Long>) = apply { this.amount = amount }

/**
* The identifier of the Pending Transaction for the refund authorization. If this is
* provided, `transaction` must not be provided as a refund with a refund authorized can
* not be linked to a regular transaction.
* The identifier of the Pending Transaction for the refund or original credit
* authorization. If this is provided, `transaction` must not be provided as a refund
* with a refund authorized can not be linked to a regular transaction.
*/
fun pendingTransactionId(pendingTransactionId: String) =
pendingTransactionId(JsonField.of(pendingTransactionId))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,8 @@ private constructor(
fun category(): Category = category.getRequired("category")

/**
* Unstructured `payment_related_information` passed through with the transfer.
* Unstructured `payment_related_information` passed through with the transfer. Required if
* and only if `category` is `freeform`.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
Expand Down Expand Up @@ -1382,7 +1383,10 @@ private constructor(
*/
fun category(category: JsonField<Category>) = apply { this.category = category }

/** Unstructured `payment_related_information` passed through with the transfer. */
/**
* Unstructured `payment_related_information` passed through with the transfer. Required
* if and only if `category` is `freeform`.
*/
fun freeform(freeform: Freeform) = freeform(JsonField.of(freeform))

/**
Expand Down Expand Up @@ -1611,7 +1615,10 @@ private constructor(
override fun toString() = value.toString()
}

/** Unstructured `payment_related_information` passed through with the transfer. */
/**
* Unstructured `payment_related_information` passed through with the transfer. Required if
* and only if `category` is `freeform`.
*/
class Freeform
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ internal class AchTransferTest {
assertThat(achTransfer.companyDiscretionaryData()).isEmpty
assertThat(achTransfer.companyEntryDescription()).isEmpty
assertThat(achTransfer.companyId()).isEqualTo("1234987601")
assertThat(achTransfer.companyName()).contains("National Phonograph Company")
assertThat(achTransfer.companyName()).isEqualTo("National Phonograph Company")
assertThat(achTransfer.createdAt()).isEqualTo(OffsetDateTime.parse("2020-01-31T14:00:00Z"))
assertThat(achTransfer.createdBy())
.contains(
Expand Down Expand Up @@ -258,7 +258,7 @@ internal class AchTransferTest {
.build()
)
assertThat(achTransfer.individualId()).isEmpty
assertThat(achTransfer.individualName()).contains("Ian Crease")
assertThat(achTransfer.individualName()).isEqualTo("Ian Crease")
assertThat(achTransfer.network()).isEqualTo(AchTransfer.Network.ACH)
assertThat(achTransfer.notificationsOfChange())
.containsExactly(
Expand Down
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

Loading