Skip to content

Commit 0658929

Browse files
fix(types): make cardholderCurrency optional in CardProgram
1 parent 7234968 commit 0658929

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 194
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c2235aace63c72401c7a2830da84bf7b5ab4006916595790243e23d9d7aa6727.yml
3-
openapi_spec_hash: 6ba55a7b55799ac4a311043a0f21d7ac
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-659808bfd15f4eafd418ec0db871b22be857ca94f771c9539792ecda2d2d0dbe.yml
3+
openapi_spec_hash: e870e6403121ac3bbd1667deec6788de
44
config_hash: 1c5c139a2aa0d1d45c063f953a9bc803

lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgram.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,14 @@ private constructor(
342342
}
343343

344344
/** 3-character alphabetic ISO 4217 code for the currency of the cardholder. */
345-
fun cardholderCurrency(cardholderCurrency: String) =
346-
cardholderCurrency(JsonField.of(cardholderCurrency))
345+
fun cardholderCurrency(cardholderCurrency: String?) =
346+
cardholderCurrency(JsonField.ofNullable(cardholderCurrency))
347+
348+
/**
349+
* Alias for calling [Builder.cardholderCurrency] with `cardholderCurrency.orElse(null)`.
350+
*/
351+
fun cardholderCurrency(cardholderCurrency: Optional<String>) =
352+
cardholderCurrency(cardholderCurrency.getOrNull())
347353

348354
/**
349355
* Sets [Builder.cardholderCurrency] to an arbitrary JSON value.

0 commit comments

Comments
 (0)