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 @@ -31,6 +31,7 @@ constructor(
private val productId: String?,
private val shippingAddress: ShippingAddress?,
private val shippingMethod: ShippingMethod?,
private val carrier: Carrier?,
private val additionalQueryParams: Map<String, List<String>>,
private val additionalHeaders: Map<String, List<String>>,
private val additionalBodyProperties: Map<String, JsonValue>,
Expand Down Expand Up @@ -64,6 +65,8 @@ constructor(

fun shippingMethod(): Optional<ShippingMethod> = Optional.ofNullable(shippingMethod)

fun carrier(): Optional<Carrier> = Optional.ofNullable(carrier)

@JvmSynthetic
internal fun getBody(): CardCreateBody {
return CardCreateBody(
Expand All @@ -81,6 +84,7 @@ constructor(
productId,
shippingAddress,
shippingMethod,
carrier,
additionalBodyProperties,
)
}
Expand All @@ -107,6 +111,7 @@ constructor(
private val productId: String?,
private val shippingAddress: ShippingAddress?,
private val shippingMethod: ShippingMethod?,
private val carrier: Carrier?,
private val additionalProperties: Map<String, JsonValue>,
) {

Expand Down Expand Up @@ -228,6 +233,8 @@ constructor(
*/
@JsonProperty("shipping_method") fun shippingMethod(): ShippingMethod? = shippingMethod

@JsonProperty("carrier") fun carrier(): Carrier? = carrier

@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
Expand All @@ -254,6 +261,7 @@ constructor(
this.productId == other.productId &&
this.shippingAddress == other.shippingAddress &&
this.shippingMethod == other.shippingMethod &&
this.carrier == other.carrier &&
this.additionalProperties == other.additionalProperties
}

Expand All @@ -275,14 +283,15 @@ constructor(
productId,
shippingAddress,
shippingMethod,
carrier,
additionalProperties,
)
}
return hashCode
}

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

companion object {

Expand All @@ -305,6 +314,7 @@ constructor(
private var productId: String? = null
private var shippingAddress: ShippingAddress? = null
private var shippingMethod: ShippingMethod? = null
private var carrier: Carrier? = null
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
Expand All @@ -323,6 +333,7 @@ constructor(
this.productId = cardCreateBody.productId
this.shippingAddress = cardCreateBody.shippingAddress
this.shippingMethod = cardCreateBody.shippingMethod
this.carrier = cardCreateBody.carrier
additionalProperties(cardCreateBody.additionalProperties)
}

Expand Down Expand Up @@ -463,6 +474,9 @@ constructor(
this.shippingMethod = shippingMethod
}

@JsonProperty("carrier")
fun carrier(carrier: Carrier) = apply { this.carrier = carrier }

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
Expand Down Expand Up @@ -493,6 +507,7 @@ constructor(
productId,
shippingAddress,
shippingMethod,
carrier,
additionalProperties.toUnmodifiable(),
)
}
Expand Down Expand Up @@ -524,6 +539,7 @@ constructor(
this.productId == other.productId &&
this.shippingAddress == other.shippingAddress &&
this.shippingMethod == other.shippingMethod &&
this.carrier == other.carrier &&
this.additionalQueryParams == other.additionalQueryParams &&
this.additionalHeaders == other.additionalHeaders &&
this.additionalBodyProperties == other.additionalBodyProperties
Expand All @@ -545,14 +561,15 @@ constructor(
productId,
shippingAddress,
shippingMethod,
carrier,
additionalQueryParams,
additionalHeaders,
additionalBodyProperties,
)
}

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

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

Expand All @@ -578,6 +595,7 @@ constructor(
private var productId: String? = null
private var shippingAddress: ShippingAddress? = null
private var shippingMethod: ShippingMethod? = null
private var carrier: Carrier? = null
private var additionalQueryParams: MutableMap<String, MutableList<String>> = mutableMapOf()
private var additionalHeaders: MutableMap<String, MutableList<String>> = mutableMapOf()
private var additionalBodyProperties: MutableMap<String, JsonValue> = mutableMapOf()
Expand All @@ -598,6 +616,7 @@ constructor(
this.productId = cardCreateParams.productId
this.shippingAddress = cardCreateParams.shippingAddress
this.shippingMethod = cardCreateParams.shippingMethod
this.carrier = cardCreateParams.carrier
additionalQueryParams(cardCreateParams.additionalQueryParams)
additionalHeaders(cardCreateParams.additionalHeaders)
additionalBodyProperties(cardCreateParams.additionalBodyProperties)
Expand Down Expand Up @@ -727,6 +746,8 @@ constructor(
this.shippingMethod = shippingMethod
}

fun carrier(carrier: Carrier) = apply { this.carrier = carrier }

fun additionalQueryParams(additionalQueryParams: Map<String, List<String>>) = apply {
this.additionalQueryParams.clear()
putAllQueryParams(additionalQueryParams)
Expand Down Expand Up @@ -797,6 +818,7 @@ constructor(
productId,
shippingAddress,
shippingMethod,
carrier,
additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
additionalBodyProperties.toUnmodifiable(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ constructor(
private val shippingAddress: ShippingAddress?,
private val shippingMethod: ShippingMethod?,
private val productId: String?,
private val carrier: Carrier?,
private val additionalQueryParams: Map<String, List<String>>,
private val additionalHeaders: Map<String, List<String>>,
private val additionalBodyProperties: Map<String, JsonValue>,
Expand All @@ -34,12 +35,15 @@ constructor(

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

fun carrier(): Optional<Carrier> = Optional.ofNullable(carrier)

@JvmSynthetic
internal fun getBody(): CardReissueBody {
return CardReissueBody(
shippingAddress,
shippingMethod,
productId,
carrier,
additionalBodyProperties,
)
}
Expand All @@ -62,6 +66,7 @@ constructor(
private val shippingAddress: ShippingAddress?,
private val shippingMethod: ShippingMethod?,
private val productId: String?,
private val carrier: Carrier?,
private val additionalProperties: Map<String, JsonValue>,
) {

Expand All @@ -88,6 +93,9 @@ constructor(
*/
@JsonProperty("product_id") fun productId(): String? = productId

/** If omitted, the previous carrier will be used. */
@JsonProperty("carrier") fun carrier(): Carrier? = carrier

@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
Expand All @@ -103,6 +111,7 @@ constructor(
this.shippingAddress == other.shippingAddress &&
this.shippingMethod == other.shippingMethod &&
this.productId == other.productId &&
this.carrier == other.carrier &&
this.additionalProperties == other.additionalProperties
}

Expand All @@ -113,14 +122,15 @@ constructor(
shippingAddress,
shippingMethod,
productId,
carrier,
additionalProperties,
)
}
return hashCode
}

override fun toString() =
"CardReissueBody{shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, productId=$productId, additionalProperties=$additionalProperties}"
"CardReissueBody{shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, productId=$productId, carrier=$carrier, additionalProperties=$additionalProperties}"

companion object {

Expand All @@ -132,13 +142,15 @@ constructor(
private var shippingAddress: ShippingAddress? = null
private var shippingMethod: ShippingMethod? = null
private var productId: String? = null
private var carrier: Carrier? = null
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
internal fun from(cardReissueBody: CardReissueBody) = apply {
this.shippingAddress = cardReissueBody.shippingAddress
this.shippingMethod = cardReissueBody.shippingMethod
this.productId = cardReissueBody.productId
this.carrier = cardReissueBody.carrier
additionalProperties(cardReissueBody.additionalProperties)
}

Expand Down Expand Up @@ -171,6 +183,10 @@ constructor(
@JsonProperty("product_id")
fun productId(productId: String) = apply { this.productId = productId }

/** If omitted, the previous carrier will be used. */
@JsonProperty("carrier")
fun carrier(carrier: Carrier) = apply { this.carrier = carrier }

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
Expand All @@ -190,6 +206,7 @@ constructor(
shippingAddress,
shippingMethod,
productId,
carrier,
additionalProperties.toUnmodifiable(),
)
}
Expand All @@ -211,6 +228,7 @@ constructor(
this.shippingAddress == other.shippingAddress &&
this.shippingMethod == other.shippingMethod &&
this.productId == other.productId &&
this.carrier == other.carrier &&
this.additionalQueryParams == other.additionalQueryParams &&
this.additionalHeaders == other.additionalHeaders &&
this.additionalBodyProperties == other.additionalBodyProperties
Expand All @@ -222,14 +240,15 @@ constructor(
shippingAddress,
shippingMethod,
productId,
carrier,
additionalQueryParams,
additionalHeaders,
additionalBodyProperties,
)
}

override fun toString() =
"CardReissueParams{cardToken=$cardToken, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, productId=$productId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
"CardReissueParams{cardToken=$cardToken, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, productId=$productId, carrier=$carrier, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"

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

Expand All @@ -245,6 +264,7 @@ constructor(
private var shippingAddress: ShippingAddress? = null
private var shippingMethod: ShippingMethod? = null
private var productId: String? = null
private var carrier: Carrier? = null
private var additionalQueryParams: MutableMap<String, MutableList<String>> = mutableMapOf()
private var additionalHeaders: MutableMap<String, MutableList<String>> = mutableMapOf()
private var additionalBodyProperties: MutableMap<String, JsonValue> = mutableMapOf()
Expand All @@ -255,6 +275,7 @@ constructor(
this.shippingAddress = cardReissueParams.shippingAddress
this.shippingMethod = cardReissueParams.shippingMethod
this.productId = cardReissueParams.productId
this.carrier = cardReissueParams.carrier
additionalQueryParams(cardReissueParams.additionalQueryParams)
additionalHeaders(cardReissueParams.additionalHeaders)
additionalBodyProperties(cardReissueParams.additionalBodyProperties)
Expand Down Expand Up @@ -287,6 +308,9 @@ constructor(
*/
fun productId(productId: String) = apply { this.productId = productId }

/** If omitted, the previous carrier will be used. */
fun carrier(carrier: Carrier) = apply { this.carrier = carrier }

fun additionalQueryParams(additionalQueryParams: Map<String, List<String>>) = apply {
this.additionalQueryParams.clear()
putAllQueryParams(additionalQueryParams)
Expand Down Expand Up @@ -347,6 +371,7 @@ constructor(
shippingAddress,
shippingMethod,
productId,
carrier,
additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
additionalBodyProperties.toUnmodifiable(),
Expand Down
Loading