-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): rename
token
and type
to financial_account_token
and…
… `financial_account_type` (#131)
- Loading branch information
1 parent
465e513
commit 815c889
Showing
12 changed files
with
320 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
configured_endpoints: 106 | ||
configured_endpoints: 107 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
130 changes: 130 additions & 0 deletions
130
lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtRetrieveParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
|
||
package com.lithic.api.models | ||
|
||
import com.lithic.api.core.NoAutoDetect | ||
import com.lithic.api.core.toUnmodifiable | ||
import com.lithic.api.models.* | ||
import java.util.Objects | ||
|
||
class DigitalCardArtRetrieveParams | ||
constructor( | ||
private val digitalCardArtToken: String, | ||
private val additionalQueryParams: Map<String, List<String>>, | ||
private val additionalHeaders: Map<String, List<String>>, | ||
) { | ||
|
||
fun digitalCardArtToken(): String = digitalCardArtToken | ||
|
||
@JvmSynthetic internal fun getQueryParams(): Map<String, List<String>> = additionalQueryParams | ||
|
||
@JvmSynthetic internal fun getHeaders(): Map<String, List<String>> = additionalHeaders | ||
|
||
fun getPathParam(index: Int): String { | ||
return when (index) { | ||
0 -> digitalCardArtToken | ||
else -> "" | ||
} | ||
} | ||
|
||
fun _additionalQueryParams(): Map<String, List<String>> = additionalQueryParams | ||
|
||
fun _additionalHeaders(): Map<String, List<String>> = additionalHeaders | ||
|
||
override fun equals(other: Any?): Boolean { | ||
if (this === other) { | ||
return true | ||
} | ||
|
||
return other is DigitalCardArtRetrieveParams && | ||
this.digitalCardArtToken == other.digitalCardArtToken && | ||
this.additionalQueryParams == other.additionalQueryParams && | ||
this.additionalHeaders == other.additionalHeaders | ||
} | ||
|
||
override fun hashCode(): Int { | ||
return Objects.hash( | ||
digitalCardArtToken, | ||
additionalQueryParams, | ||
additionalHeaders, | ||
) | ||
} | ||
|
||
override fun toString() = | ||
"DigitalCardArtRetrieveParams{digitalCardArtToken=$digitalCardArtToken, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" | ||
|
||
fun toBuilder() = Builder().from(this) | ||
|
||
companion object { | ||
|
||
@JvmStatic fun builder() = Builder() | ||
} | ||
|
||
@NoAutoDetect | ||
class Builder { | ||
|
||
private var digitalCardArtToken: String? = null | ||
private var additionalQueryParams: MutableMap<String, MutableList<String>> = mutableMapOf() | ||
private var additionalHeaders: MutableMap<String, MutableList<String>> = mutableMapOf() | ||
|
||
@JvmSynthetic | ||
internal fun from(digitalCardArtRetrieveParams: DigitalCardArtRetrieveParams) = apply { | ||
this.digitalCardArtToken = digitalCardArtRetrieveParams.digitalCardArtToken | ||
additionalQueryParams(digitalCardArtRetrieveParams.additionalQueryParams) | ||
additionalHeaders(digitalCardArtRetrieveParams.additionalHeaders) | ||
} | ||
|
||
fun digitalCardArtToken(digitalCardArtToken: String) = apply { | ||
this.digitalCardArtToken = digitalCardArtToken | ||
} | ||
|
||
fun additionalQueryParams(additionalQueryParams: Map<String, List<String>>) = apply { | ||
this.additionalQueryParams.clear() | ||
putAllQueryParams(additionalQueryParams) | ||
} | ||
|
||
fun putQueryParam(name: String, value: String) = apply { | ||
this.additionalQueryParams.getOrPut(name) { mutableListOf() }.add(value) | ||
} | ||
|
||
fun putQueryParams(name: String, values: Iterable<String>) = apply { | ||
this.additionalQueryParams.getOrPut(name) { mutableListOf() }.addAll(values) | ||
} | ||
|
||
fun putAllQueryParams(additionalQueryParams: Map<String, Iterable<String>>) = apply { | ||
additionalQueryParams.forEach(this::putQueryParams) | ||
} | ||
|
||
fun removeQueryParam(name: String) = apply { | ||
this.additionalQueryParams.put(name, mutableListOf()) | ||
} | ||
|
||
fun additionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply { | ||
this.additionalHeaders.clear() | ||
putAllHeaders(additionalHeaders) | ||
} | ||
|
||
fun putHeader(name: String, value: String) = apply { | ||
this.additionalHeaders.getOrPut(name) { mutableListOf() }.add(value) | ||
} | ||
|
||
fun putHeaders(name: String, values: Iterable<String>) = apply { | ||
this.additionalHeaders.getOrPut(name) { mutableListOf() }.addAll(values) | ||
} | ||
|
||
fun putAllHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply { | ||
additionalHeaders.forEach(this::putHeaders) | ||
} | ||
|
||
fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) } | ||
|
||
fun build(): DigitalCardArtRetrieveParams = | ||
DigitalCardArtRetrieveParams( | ||
checkNotNull(digitalCardArtToken) { | ||
"`digitalCardArtToken` is required but was not set" | ||
}, | ||
additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), | ||
additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.