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
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ constructor(
private val memo: String?,
private val pin: String?,
private val productId: String?,
private val replacementAccountToken: String?,
private val replacementFor: String?,
private val shippingAddress: ShippingAddress?,
private val shippingMethod: ShippingMethod?,
Expand Down Expand Up @@ -63,6 +64,8 @@ constructor(

fun productId(): Optional<String> = Optional.ofNullable(productId)

fun replacementAccountToken(): Optional<String> = Optional.ofNullable(replacementAccountToken)

fun replacementFor(): Optional<String> = Optional.ofNullable(replacementFor)

fun shippingAddress(): Optional<ShippingAddress> = Optional.ofNullable(shippingAddress)
Expand All @@ -88,6 +91,7 @@ constructor(
memo,
pin,
productId,
replacementAccountToken,
replacementFor,
shippingAddress,
shippingMethod,
Expand Down Expand Up @@ -116,6 +120,7 @@ constructor(
private val memo: String?,
private val pin: String?,
private val productId: String?,
private val replacementAccountToken: String?,
private val replacementFor: String?,
private val shippingAddress: ShippingAddress?,
private val shippingMethod: ShippingMethod?,
Expand Down Expand Up @@ -194,6 +199,16 @@ constructor(
*/
@JsonProperty("product_id") fun productId(): String? = productId

/**
* Restricted field limited to select use cases. Lithic will reach out directly if this
* field should be used. Globally unique identifier for the replacement card's account. If
* this field is specified, `replacement_for` must also be specified. If `replacement_for`
* is specified and this field is omitted, the replacement card's account will be inferred
* from the card being replaced.
*/
@JsonProperty("replacement_account_token")
fun replacementAccountToken(): String? = replacementAccountToken

/**
* Only applicable to cards of type `PHYSICAL`. Globally unique identifier for the card that
* this physical card will replace.
Expand Down Expand Up @@ -268,6 +283,7 @@ constructor(
private var memo: String? = null
private var pin: String? = null
private var productId: String? = null
private var replacementAccountToken: String? = null
private var replacementFor: String? = null
private var shippingAddress: ShippingAddress? = null
private var shippingMethod: ShippingMethod? = null
Expand All @@ -288,6 +304,7 @@ constructor(
this.memo = cardCreateBody.memo
this.pin = cardCreateBody.pin
this.productId = cardCreateBody.productId
this.replacementAccountToken = cardCreateBody.replacementAccountToken
this.replacementFor = cardCreateBody.replacementFor
this.shippingAddress = cardCreateBody.shippingAddress
this.shippingMethod = cardCreateBody.shippingMethod
Expand Down Expand Up @@ -378,6 +395,18 @@ constructor(
@JsonProperty("product_id")
fun productId(productId: String) = apply { this.productId = productId }

/**
* Restricted field limited to select use cases. Lithic will reach out directly if this
* field should be used. Globally unique identifier for the replacement card's account.
* If this field is specified, `replacement_for` must also be specified. If
* `replacement_for` is specified and this field is omitted, the replacement card's
* account will be inferred from the card being replaced.
*/
@JsonProperty("replacement_account_token")
fun replacementAccountToken(replacementAccountToken: String) = apply {
this.replacementAccountToken = replacementAccountToken
}

/**
* Only applicable to cards of type `PHYSICAL`. Globally unique identifier for the card
* that this physical card will replace.
Expand Down Expand Up @@ -470,6 +499,7 @@ constructor(
memo,
pin,
productId,
replacementAccountToken,
replacementFor,
shippingAddress,
shippingMethod,
Expand All @@ -485,20 +515,20 @@ constructor(
return true
}

return /* spotless:off */ other is CardCreateBody && this.type == other.type && this.accountToken == other.accountToken && this.cardProgramToken == other.cardProgramToken && this.carrier == other.carrier && this.digitalCardArtToken == other.digitalCardArtToken && this.expMonth == other.expMonth && this.expYear == other.expYear && this.memo == other.memo && this.pin == other.pin && this.productId == other.productId && this.replacementFor == other.replacementFor && this.shippingAddress == other.shippingAddress && this.shippingMethod == other.shippingMethod && this.spendLimit == other.spendLimit && this.spendLimitDuration == other.spendLimitDuration && this.state == other.state && this.additionalProperties == other.additionalProperties /* spotless:on */
return /* spotless:off */ other is CardCreateBody && this.type == other.type && this.accountToken == other.accountToken && this.cardProgramToken == other.cardProgramToken && this.carrier == other.carrier && this.digitalCardArtToken == other.digitalCardArtToken && this.expMonth == other.expMonth && this.expYear == other.expYear && this.memo == other.memo && this.pin == other.pin && this.productId == other.productId && this.replacementAccountToken == other.replacementAccountToken && this.replacementFor == other.replacementFor && this.shippingAddress == other.shippingAddress && this.shippingMethod == other.shippingMethod && this.spendLimit == other.spendLimit && this.spendLimitDuration == other.spendLimitDuration && this.state == other.state && this.additionalProperties == other.additionalProperties /* spotless:on */
}

private var hashCode: Int = 0

override fun hashCode(): Int {
if (hashCode == 0) {
hashCode = /* spotless:off */ Objects.hash(type, accountToken, cardProgramToken, carrier, digitalCardArtToken, expMonth, expYear, memo, pin, productId, replacementFor, shippingAddress, shippingMethod, spendLimit, spendLimitDuration, state, additionalProperties) /* spotless:on */
hashCode = /* spotless:off */ Objects.hash(type, accountToken, cardProgramToken, carrier, digitalCardArtToken, expMonth, expYear, memo, pin, productId, replacementAccountToken, replacementFor, shippingAddress, shippingMethod, spendLimit, spendLimitDuration, state, additionalProperties) /* spotless:on */
}
return hashCode
}

override fun toString() =
"CardCreateBody{type=$type, accountToken=$accountToken, cardProgramToken=$cardProgramToken, carrier=$carrier, digitalCardArtToken=$digitalCardArtToken, expMonth=$expMonth, expYear=$expYear, memo=$memo, pin=$pin, productId=$productId, replacementFor=$replacementFor, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalProperties=$additionalProperties}"
"CardCreateBody{type=$type, accountToken=$accountToken, cardProgramToken=$cardProgramToken, carrier=$carrier, digitalCardArtToken=$digitalCardArtToken, expMonth=$expMonth, expYear=$expYear, memo=$memo, pin=$pin, productId=$productId, replacementAccountToken=$replacementAccountToken, replacementFor=$replacementFor, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalProperties=$additionalProperties}"
}

fun _additionalHeaders(): Map<String, List<String>> = additionalHeaders
Expand All @@ -512,15 +542,15 @@ constructor(
return true
}

return /* spotless:off */ other is CardCreateParams && this.type == other.type && this.accountToken == other.accountToken && this.cardProgramToken == other.cardProgramToken && this.carrier == other.carrier && this.digitalCardArtToken == other.digitalCardArtToken && this.expMonth == other.expMonth && this.expYear == other.expYear && this.memo == other.memo && this.pin == other.pin && this.productId == other.productId && this.replacementFor == other.replacementFor && this.shippingAddress == other.shippingAddress && this.shippingMethod == other.shippingMethod && this.spendLimit == other.spendLimit && this.spendLimitDuration == other.spendLimitDuration && this.state == other.state && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
return /* spotless:off */ other is CardCreateParams && this.type == other.type && this.accountToken == other.accountToken && this.cardProgramToken == other.cardProgramToken && this.carrier == other.carrier && this.digitalCardArtToken == other.digitalCardArtToken && this.expMonth == other.expMonth && this.expYear == other.expYear && this.memo == other.memo && this.pin == other.pin && this.productId == other.productId && this.replacementAccountToken == other.replacementAccountToken && this.replacementFor == other.replacementFor && this.shippingAddress == other.shippingAddress && this.shippingMethod == other.shippingMethod && this.spendLimit == other.spendLimit && this.spendLimitDuration == other.spendLimitDuration && this.state == other.state && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
}

override fun hashCode(): Int {
return /* spotless:off */ Objects.hash(type, accountToken, cardProgramToken, carrier, digitalCardArtToken, expMonth, expYear, memo, pin, productId, replacementFor, shippingAddress, shippingMethod, spendLimit, spendLimitDuration, state, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
return /* spotless:off */ Objects.hash(type, accountToken, cardProgramToken, carrier, digitalCardArtToken, expMonth, expYear, memo, pin, productId, replacementAccountToken, replacementFor, shippingAddress, shippingMethod, spendLimit, spendLimitDuration, state, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
}

override fun toString() =
"CardCreateParams{type=$type, accountToken=$accountToken, cardProgramToken=$cardProgramToken, carrier=$carrier, digitalCardArtToken=$digitalCardArtToken, expMonth=$expMonth, expYear=$expYear, memo=$memo, pin=$pin, productId=$productId, replacementFor=$replacementFor, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
"CardCreateParams{type=$type, accountToken=$accountToken, cardProgramToken=$cardProgramToken, carrier=$carrier, digitalCardArtToken=$digitalCardArtToken, expMonth=$expMonth, expYear=$expYear, memo=$memo, pin=$pin, productId=$productId, replacementAccountToken=$replacementAccountToken, replacementFor=$replacementFor, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"

fun toBuilder() = Builder().from(this)

Expand All @@ -542,6 +572,7 @@ constructor(
private var memo: String? = null
private var pin: String? = null
private var productId: String? = null
private var replacementAccountToken: String? = null
private var replacementFor: String? = null
private var shippingAddress: ShippingAddress? = null
private var shippingMethod: ShippingMethod? = null
Expand All @@ -564,6 +595,7 @@ constructor(
this.memo = cardCreateParams.memo
this.pin = cardCreateParams.pin
this.productId = cardCreateParams.productId
this.replacementAccountToken = cardCreateParams.replacementAccountToken
this.replacementFor = cardCreateParams.replacementFor
this.shippingAddress = cardCreateParams.shippingAddress
this.shippingMethod = cardCreateParams.shippingMethod
Expand Down Expand Up @@ -647,6 +679,17 @@ constructor(
*/
fun productId(productId: String) = apply { this.productId = productId }

/**
* Restricted field limited to select use cases. Lithic will reach out directly if this
* field should be used. Globally unique identifier for the replacement card's account. If
* this field is specified, `replacement_for` must also be specified. If `replacement_for`
* is specified and this field is omitted, the replacement card's account will be inferred
* from the card being replaced.
*/
fun replacementAccountToken(replacementAccountToken: String) = apply {
this.replacementAccountToken = replacementAccountToken
}

/**
* Only applicable to cards of type `PHYSICAL`. Globally unique identifier for the card that
* this physical card will replace.
Expand Down Expand Up @@ -803,6 +846,7 @@ constructor(
memo,
pin,
productId,
replacementAccountToken,
replacementFor,
shippingAddress,
shippingMethod,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class CardCreateParamsTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -58,6 +59,7 @@ class CardCreateParamsTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -91,6 +93,7 @@ class CardCreateParamsTest {
assertThat(body.memo()).isEqualTo("New Card")
assertThat(body.pin()).isEqualTo("pin")
assertThat(body.productId()).isEqualTo("1")
assertThat(body.replacementAccountToken()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
assertThat(body.replacementFor()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
assertThat(body.shippingAddress())
.isEqualTo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -147,6 +148,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -194,6 +196,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -241,6 +244,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -288,6 +292,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -335,6 +340,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -382,6 +388,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -429,6 +436,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -476,6 +484,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -528,6 +537,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down Expand Up @@ -574,6 +584,7 @@ class ErrorHandlingTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class ServiceParamsTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CardServiceTest {
.memo("New Card")
.pin("pin")
.productId("1")
.replacementAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.replacementFor("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.shippingAddress(
ShippingAddress.builder()
Expand Down