Skip to content

Commit ea05274

Browse files
feat(api): new fields in Statements APIs
fix(api): fixing spec for Tokenizations and Enhanced data
1 parent b21d55c commit ea05274

15 files changed

+385
-112
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 168
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c10c01eac94b422808bb16cc1044c67c980791b6d1360b01628d13c5a745dfeb.yml
3-
openapi_spec_hash: 9e6642fdb875a6aa6037c107917ebff4
4-
config_hash: 0b45ea129fca7c4755ef61eb97baa096
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fceec607fd66c8b227edc9f52ca348a906855f9aa1b0727f5eeb9f5975889e91.yml
3+
openapi_spec_hash: 759ede618594b93833ca93a34b97a11f
4+
config_hash: f5a16e702bac54729afed6e50b0de3ff

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

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -650,18 +650,18 @@ private constructor(
650650
class LineItem
651651
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
652652
private constructor(
653-
private val amount: JsonField<Double>,
653+
private val amount: JsonField<String>,
654654
private val description: JsonField<String>,
655655
private val productCode: JsonField<String>,
656-
private val quantity: JsonField<Double>,
656+
private val quantity: JsonField<String>,
657657
private val additionalProperties: MutableMap<String, JsonValue>,
658658
) {
659659

660660
@JsonCreator
661661
private constructor(
662662
@JsonProperty("amount")
663663
@ExcludeMissing
664-
amount: JsonField<Double> = JsonMissing.of(),
664+
amount: JsonField<String> = JsonMissing.of(),
665665
@JsonProperty("description")
666666
@ExcludeMissing
667667
description: JsonField<String> = JsonMissing.of(),
@@ -670,7 +670,7 @@ private constructor(
670670
productCode: JsonField<String> = JsonMissing.of(),
671671
@JsonProperty("quantity")
672672
@ExcludeMissing
673-
quantity: JsonField<Double> = JsonMissing.of(),
673+
quantity: JsonField<String> = JsonMissing.of(),
674674
) : this(amount, description, productCode, quantity, mutableMapOf())
675675

676676
/**
@@ -679,7 +679,7 @@ private constructor(
679679
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
680680
* the server responded with an unexpected value).
681681
*/
682-
fun amount(): Optional<Double> = amount.getOptional("amount")
682+
fun amount(): Optional<String> = amount.getOptional("amount")
683683

684684
/**
685685
* A human-readable description of the item.
@@ -703,14 +703,14 @@ private constructor(
703703
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
704704
* the server responded with an unexpected value).
705705
*/
706-
fun quantity(): Optional<Double> = quantity.getOptional("quantity")
706+
fun quantity(): Optional<String> = quantity.getOptional("quantity")
707707

708708
/**
709709
* Returns the raw JSON value of [amount].
710710
*
711711
* Unlike [amount], this method doesn't throw if the JSON field has an unexpected type.
712712
*/
713-
@JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField<Double> = amount
713+
@JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField<String> = amount
714714

715715
/**
716716
* Returns the raw JSON value of [description].
@@ -738,7 +738,7 @@ private constructor(
738738
* Unlike [quantity], this method doesn't throw if the JSON field has an unexpected
739739
* type.
740740
*/
741-
@JsonProperty("quantity") @ExcludeMissing fun _quantity(): JsonField<Double> = quantity
741+
@JsonProperty("quantity") @ExcludeMissing fun _quantity(): JsonField<String> = quantity
742742

743743
@JsonAnySetter
744744
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -761,10 +761,10 @@ private constructor(
761761
/** A builder for [LineItem]. */
762762
class Builder internal constructor() {
763763

764-
private var amount: JsonField<Double> = JsonMissing.of()
764+
private var amount: JsonField<String> = JsonMissing.of()
765765
private var description: JsonField<String> = JsonMissing.of()
766766
private var productCode: JsonField<String> = JsonMissing.of()
767-
private var quantity: JsonField<Double> = JsonMissing.of()
767+
private var quantity: JsonField<String> = JsonMissing.of()
768768
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
769769

770770
@JvmSynthetic
@@ -777,16 +777,16 @@ private constructor(
777777
}
778778

779779
/** The price of the item purchased in merchant currency. */
780-
fun amount(amount: Double) = amount(JsonField.of(amount))
780+
fun amount(amount: String) = amount(JsonField.of(amount))
781781

782782
/**
783783
* Sets [Builder.amount] to an arbitrary JSON value.
784784
*
785-
* You should usually call [Builder.amount] with a well-typed [Double] value
785+
* You should usually call [Builder.amount] with a well-typed [String] value
786786
* instead. This method is primarily for setting the field to an undocumented or not
787787
* yet supported value.
788788
*/
789-
fun amount(amount: JsonField<Double>) = apply { this.amount = amount }
789+
fun amount(amount: JsonField<String>) = apply { this.amount = amount }
790790

791791
/** A human-readable description of the item. */
792792
fun description(description: String) = description(JsonField.of(description))
@@ -817,16 +817,16 @@ private constructor(
817817
}
818818

819819
/** The quantity of the item purchased. */
820-
fun quantity(quantity: Double) = quantity(JsonField.of(quantity))
820+
fun quantity(quantity: String) = quantity(JsonField.of(quantity))
821821

822822
/**
823823
* Sets [Builder.quantity] to an arbitrary JSON value.
824824
*
825-
* You should usually call [Builder.quantity] with a well-typed [Double] value
825+
* You should usually call [Builder.quantity] with a well-typed [String] value
826826
* instead. This method is primarily for setting the field to an undocumented or not
827827
* yet supported value.
828828
*/
829-
fun quantity(quantity: JsonField<Double>) = apply { this.quantity = quantity }
829+
fun quantity(quantity: JsonField<String>) = apply { this.quantity = quantity }
830830

831831
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
832832
this.additionalProperties.clear()
@@ -1907,7 +1907,7 @@ private constructor(
19071907
class FuelData
19081908
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
19091909
private constructor(
1910-
private val quantity: JsonField<Double>,
1910+
private val quantity: JsonField<String>,
19111911
private val type: JsonField<FuelType>,
19121912
private val unitOfMeasure: JsonField<FuelUnitOfMeasure>,
19131913
private val unitPrice: JsonField<Long>,
@@ -1918,7 +1918,7 @@ private constructor(
19181918
private constructor(
19191919
@JsonProperty("quantity")
19201920
@ExcludeMissing
1921-
quantity: JsonField<Double> = JsonMissing.of(),
1921+
quantity: JsonField<String> = JsonMissing.of(),
19221922
@JsonProperty("type") @ExcludeMissing type: JsonField<FuelType> = JsonMissing.of(),
19231923
@JsonProperty("unit_of_measure")
19241924
@ExcludeMissing
@@ -1934,7 +1934,7 @@ private constructor(
19341934
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
19351935
* the server responded with an unexpected value).
19361936
*/
1937-
fun quantity(): Optional<Double> = quantity.getOptional("quantity")
1937+
fun quantity(): Optional<String> = quantity.getOptional("quantity")
19381938

19391939
/**
19401940
* The type of fuel purchased.
@@ -1967,7 +1967,7 @@ private constructor(
19671967
* Unlike [quantity], this method doesn't throw if the JSON field has an unexpected
19681968
* type.
19691969
*/
1970-
@JsonProperty("quantity") @ExcludeMissing fun _quantity(): JsonField<Double> = quantity
1970+
@JsonProperty("quantity") @ExcludeMissing fun _quantity(): JsonField<String> = quantity
19711971

19721972
/**
19731973
* Returns the raw JSON value of [type].
@@ -2017,7 +2017,7 @@ private constructor(
20172017
/** A builder for [FuelData]. */
20182018
class Builder internal constructor() {
20192019

2020-
private var quantity: JsonField<Double> = JsonMissing.of()
2020+
private var quantity: JsonField<String> = JsonMissing.of()
20212021
private var type: JsonField<FuelType> = JsonMissing.of()
20222022
private var unitOfMeasure: JsonField<FuelUnitOfMeasure> = JsonMissing.of()
20232023
private var unitPrice: JsonField<Long> = JsonMissing.of()
@@ -2033,16 +2033,16 @@ private constructor(
20332033
}
20342034

20352035
/** The quantity of fuel purchased. */
2036-
fun quantity(quantity: Double) = quantity(JsonField.of(quantity))
2036+
fun quantity(quantity: String) = quantity(JsonField.of(quantity))
20372037

20382038
/**
20392039
* Sets [Builder.quantity] to an arbitrary JSON value.
20402040
*
2041-
* You should usually call [Builder.quantity] with a well-typed [Double] value
2041+
* You should usually call [Builder.quantity] with a well-typed [String] value
20422042
* instead. This method is primarily for setting the field to an undocumented or not
20432043
* yet supported value.
20442044
*/
2045-
fun quantity(quantity: JsonField<Double>) = apply { this.quantity = quantity }
2045+
fun quantity(quantity: JsonField<String>) = apply { this.quantity = quantity }
20462046

20472047
/** The type of fuel purchased. */
20482048
fun type(type: FuelType) = type(JsonField.of(type))

0 commit comments

Comments
 (0)