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: 238
openapi_spec_hash: 97592a4f24ae885bcf0c7408a3f3eac3
openapi_spec_hash: 92c19b7ba8e824331804be9fd3d19da5
config_hash: 2ae0d8aaecf01b38cbf9f9e112822c23
Original file line number Diff line number Diff line change
Expand Up @@ -4053,6 +4053,7 @@ private constructor(
private constructor(
private val messageIdentification: JsonField<String>,
private val submittedAt: JsonField<OffsetDateTime>,
private val uniqueEndToEndTransactionReference: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
) {

Expand All @@ -4064,7 +4065,15 @@ private constructor(
@JsonProperty("submitted_at")
@ExcludeMissing
submittedAt: JsonField<OffsetDateTime> = JsonMissing.of(),
) : this(messageIdentification, submittedAt, mutableMapOf())
@JsonProperty("unique_end_to_end_transaction_reference")
@ExcludeMissing
uniqueEndToEndTransactionReference: JsonField<String> = JsonMissing.of(),
) : this(
messageIdentification,
submittedAt,
uniqueEndToEndTransactionReference,
mutableMapOf(),
)

/**
* The FedNow network identification of the message submitted.
Expand All @@ -4084,6 +4093,19 @@ private constructor(
*/
fun submittedAt(): Optional<OffsetDateTime> = submittedAt.getOptional("submitted_at")

/**
* The Unique End-to-end Transaction Reference
* ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr))
* of the transfer.
*
* @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 uniqueEndToEndTransactionReference(): String =
uniqueEndToEndTransactionReference.getRequired(
"unique_end_to_end_transaction_reference"
)

/**
* Returns the raw JSON value of [messageIdentification].
*
Expand All @@ -4103,6 +4125,17 @@ private constructor(
@ExcludeMissing
fun _submittedAt(): JsonField<OffsetDateTime> = submittedAt

/**
* Returns the raw JSON value of [uniqueEndToEndTransactionReference].
*
* Unlike [uniqueEndToEndTransactionReference], this method doesn't throw if the JSON field
* has an unexpected type.
*/
@JsonProperty("unique_end_to_end_transaction_reference")
@ExcludeMissing
fun _uniqueEndToEndTransactionReference(): JsonField<String> =
uniqueEndToEndTransactionReference

@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
Expand All @@ -4124,6 +4157,7 @@ private constructor(
* ```java
* .messageIdentification()
* .submittedAt()
* .uniqueEndToEndTransactionReference()
* ```
*/
@JvmStatic fun builder() = Builder()
Expand All @@ -4134,12 +4168,14 @@ private constructor(

private var messageIdentification: JsonField<String>? = null
private var submittedAt: JsonField<OffsetDateTime>? = null
private var uniqueEndToEndTransactionReference: JsonField<String>? = null
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
internal fun from(submission: Submission) = apply {
messageIdentification = submission.messageIdentification
submittedAt = submission.submittedAt
uniqueEndToEndTransactionReference = submission.uniqueEndToEndTransactionReference
additionalProperties = submission.additionalProperties.toMutableMap()
}

Expand Down Expand Up @@ -4180,6 +4216,27 @@ private constructor(
this.submittedAt = submittedAt
}

/**
* The Unique End-to-end Transaction Reference
* ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr))
* of the transfer.
*/
fun uniqueEndToEndTransactionReference(uniqueEndToEndTransactionReference: String) =
uniqueEndToEndTransactionReference(JsonField.of(uniqueEndToEndTransactionReference))

/**
* Sets [Builder.uniqueEndToEndTransactionReference] to an arbitrary JSON value.
*
* You should usually call [Builder.uniqueEndToEndTransactionReference] with a
* well-typed [String] value instead. This method is primarily for setting the field to
* an undocumented or not yet supported value.
*/
fun uniqueEndToEndTransactionReference(
uniqueEndToEndTransactionReference: JsonField<String>
) = apply {
this.uniqueEndToEndTransactionReference = uniqueEndToEndTransactionReference
}

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand Down Expand Up @@ -4208,6 +4265,7 @@ private constructor(
* ```java
* .messageIdentification()
* .submittedAt()
* .uniqueEndToEndTransactionReference()
* ```
*
* @throws IllegalStateException if any required field is unset.
Expand All @@ -4216,6 +4274,10 @@ private constructor(
Submission(
checkRequired("messageIdentification", messageIdentification),
checkRequired("submittedAt", submittedAt),
checkRequired(
"uniqueEndToEndTransactionReference",
uniqueEndToEndTransactionReference,
),
additionalProperties.toMutableMap(),
)
}
Expand All @@ -4238,6 +4300,7 @@ private constructor(

messageIdentification()
submittedAt()
uniqueEndToEndTransactionReference()
validated = true
}

Expand All @@ -4258,7 +4321,8 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (messageIdentification.asKnown().isPresent) 1 else 0) +
(if (submittedAt.asKnown().isPresent) 1 else 0)
(if (submittedAt.asKnown().isPresent) 1 else 0) +
(if (uniqueEndToEndTransactionReference.asKnown().isPresent) 1 else 0)

override fun equals(other: Any?): Boolean {
if (this === other) {
Expand All @@ -4268,17 +4332,23 @@ private constructor(
return other is Submission &&
messageIdentification == other.messageIdentification &&
submittedAt == other.submittedAt &&
uniqueEndToEndTransactionReference == other.uniqueEndToEndTransactionReference &&
additionalProperties == other.additionalProperties
}

private val hashCode: Int by lazy {
Objects.hash(messageIdentification, submittedAt, additionalProperties)
Objects.hash(
messageIdentification,
submittedAt,
uniqueEndToEndTransactionReference,
additionalProperties,
)
}

override fun hashCode(): Int = hashCode

override fun toString() =
"Submission{messageIdentification=$messageIdentification, submittedAt=$submittedAt, additionalProperties=$additionalProperties}"
"Submission{messageIdentification=$messageIdentification, submittedAt=$submittedAt, uniqueEndToEndTransactionReference=$uniqueEndToEndTransactionReference, additionalProperties=$additionalProperties}"
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ internal class FednowTransferListPageResponseTest {
FednowTransfer.Submission.builder()
.messageIdentification("20250308723260130GT4LAKENDXBHQCZDWS")
.submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.uniqueEndToEndTransactionReference(
"9a21e10a-7600-4a24-8ff3-2cbc5943c27a"
)
.build()
)
.transactionId("transaction_uyrp7fld2ium70oa7oi")
Expand Down Expand Up @@ -162,6 +165,9 @@ internal class FednowTransferListPageResponseTest {
FednowTransfer.Submission.builder()
.messageIdentification("20250308723260130GT4LAKENDXBHQCZDWS")
.submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.uniqueEndToEndTransactionReference(
"9a21e10a-7600-4a24-8ff3-2cbc5943c27a"
)
.build()
)
.transactionId("transaction_uyrp7fld2ium70oa7oi")
Expand Down Expand Up @@ -246,6 +252,9 @@ internal class FednowTransferListPageResponseTest {
FednowTransfer.Submission.builder()
.messageIdentification("20250308723260130GT4LAKENDXBHQCZDWS")
.submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.uniqueEndToEndTransactionReference(
"9a21e10a-7600-4a24-8ff3-2cbc5943c27a"
)
.build()
)
.transactionId("transaction_uyrp7fld2ium70oa7oi")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ internal class FednowTransferTest {
FednowTransfer.Submission.builder()
.messageIdentification("20250308723260130GT4LAKENDXBHQCZDWS")
.submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.uniqueEndToEndTransactionReference("9a21e10a-7600-4a24-8ff3-2cbc5943c27a")
.build()
)
.transactionId("transaction_uyrp7fld2ium70oa7oi")
Expand Down Expand Up @@ -153,6 +154,7 @@ internal class FednowTransferTest {
FednowTransfer.Submission.builder()
.messageIdentification("20250308723260130GT4LAKENDXBHQCZDWS")
.submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.uniqueEndToEndTransactionReference("9a21e10a-7600-4a24-8ff3-2cbc5943c27a")
.build()
)
assertThat(fednowTransfer.transactionId()).contains("transaction_uyrp7fld2ium70oa7oi")
Expand Down Expand Up @@ -231,6 +233,7 @@ internal class FednowTransferTest {
FednowTransfer.Submission.builder()
.messageIdentification("20250308723260130GT4LAKENDXBHQCZDWS")
.submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.uniqueEndToEndTransactionReference("9a21e10a-7600-4a24-8ff3-2cbc5943c27a")
.build()
)
.transactionId("transaction_uyrp7fld2ium70oa7oi")
Expand Down
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

Loading