Skip to content
Merged
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,2 +1,2 @@
configured_endpoints: 201
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-97fb48534a75d68acd544082e2352e69557d798f912cf62c85825e78d9102eca.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fb44f7a35402f0dc2a091841c1ee5c0d0b1c0dc21bbd49f9fe7a07cfaca8dfca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,9 @@ private constructor(
@JsonProperty("mailed_at")
@ExcludeMissing
private val mailedAt: JsonField<OffsetDateTime> = JsonMissing.of(),
@JsonProperty("tracking_number")
@ExcludeMissing
private val trackingNumber: JsonField<String> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map<String, JsonValue> = immutableEmptyMap(),
) {
Expand All @@ -1993,6 +1996,10 @@ private constructor(
*/
fun mailedAt(): OffsetDateTime = mailedAt.getRequired("mailed_at")

/** The tracking number of the shipment, if available for the shipping method. */
fun trackingNumber(): Optional<String> =
Optional.ofNullable(trackingNumber.getNullable("tracking_number"))

/**
* The ID of the file corresponding to an image of the check that was mailed, if available.
*/
Expand All @@ -2006,6 +2013,11 @@ private constructor(
@ExcludeMissing
fun _mailedAt(): JsonField<OffsetDateTime> = mailedAt

/** The tracking number of the shipment, if available for the shipping method. */
@JsonProperty("tracking_number")
@ExcludeMissing
fun _trackingNumber(): JsonField<String> = trackingNumber

@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
Expand All @@ -2019,6 +2031,7 @@ private constructor(

imageId()
mailedAt()
trackingNumber()
validated = true
}

Expand All @@ -2034,12 +2047,14 @@ private constructor(

private var imageId: JsonField<String>? = null
private var mailedAt: JsonField<OffsetDateTime>? = null
private var trackingNumber: JsonField<String>? = null
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
internal fun from(mailing: Mailing) = apply {
imageId = mailing.imageId
mailedAt = mailing.mailedAt
trackingNumber = mailing.trackingNumber
additionalProperties = mailing.additionalProperties.toMutableMap()
}

Expand Down Expand Up @@ -2073,6 +2088,19 @@ private constructor(
*/
fun mailedAt(mailedAt: JsonField<OffsetDateTime>) = apply { this.mailedAt = mailedAt }

/** The tracking number of the shipment, if available for the shipping method. */
fun trackingNumber(trackingNumber: String?) =
trackingNumber(JsonField.ofNullable(trackingNumber))

/** The tracking number of the shipment, if available for the shipping method. */
fun trackingNumber(trackingNumber: Optional<String>) =
trackingNumber(trackingNumber.orElse(null))

/** The tracking number of the shipment, if available for the shipping method. */
fun trackingNumber(trackingNumber: JsonField<String>) = apply {
this.trackingNumber = trackingNumber
}

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand All @@ -2096,6 +2124,7 @@ private constructor(
Mailing(
checkRequired("imageId", imageId),
checkRequired("mailedAt", mailedAt),
checkRequired("trackingNumber", trackingNumber),
additionalProperties.toImmutable(),
)
}
Expand All @@ -2105,17 +2134,17 @@ private constructor(
return true
}

return /* spotless:off */ other is Mailing && imageId == other.imageId && mailedAt == other.mailedAt && additionalProperties == other.additionalProperties /* spotless:on */
return /* spotless:off */ other is Mailing && imageId == other.imageId && mailedAt == other.mailedAt && trackingNumber == other.trackingNumber && additionalProperties == other.additionalProperties /* spotless:on */
}

/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(imageId, mailedAt, additionalProperties) }
private val hashCode: Int by lazy { Objects.hash(imageId, mailedAt, trackingNumber, additionalProperties) }
/* spotless:on */

override fun hashCode(): Int = hashCode

override fun toString() =
"Mailing{imageId=$imageId, mailedAt=$mailedAt, additionalProperties=$additionalProperties}"
"Mailing{imageId=$imageId, mailedAt=$mailedAt, trackingNumber=$trackingNumber, additionalProperties=$additionalProperties}"
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class CheckTransferTest {
CheckTransfer.Mailing.builder()
.imageId(null)
.mailedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.trackingNumber(null)
.build()
)
.pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4")
Expand Down Expand Up @@ -162,6 +163,7 @@ class CheckTransferTest {
CheckTransfer.Mailing.builder()
.imageId(null)
.mailedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.trackingNumber(null)
.build()
)
assertThat(checkTransfer.pendingTransactionId())
Expand Down