Skip to content

Commit da7b625

Browse files
docs: add comment for arbitrary value fields
1 parent 672ca90 commit da7b625

4 files changed

Lines changed: 56 additions & 7 deletions

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,14 @@ private constructor(
103103
*/
104104
fun customerProductId(): Optional<String> = customerProductId.getOptional("customer_product_id")
105105

106-
/** Shipping address for all cards in this bulk order */
106+
/**
107+
* Shipping address for all cards in this bulk order
108+
*
109+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
110+
* ```java
111+
* MyClass myObject = cardBulkOrder.shippingAddress().convert(MyClass.class);
112+
* ```
113+
*/
107114
@JsonProperty("shipping_address")
108115
@ExcludeMissing
109116
fun _shippingAddress(): JsonValue = shippingAddress

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

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ private constructor(
4343
*/
4444
fun customerProductId(): String = body.customerProductId()
4545

46-
/** Shipping address for all cards in this bulk order */
46+
/**
47+
* Shipping address for all cards in this bulk order
48+
*
49+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
50+
* ```java
51+
* MyClass myObject = cardBulkOrderCreateParams.shippingAddress().convert(MyClass.class);
52+
* ```
53+
*/
4754
fun _shippingAddress(): JsonValue = body._shippingAddress()
4855

4956
/**
@@ -340,7 +347,14 @@ private constructor(
340347
*/
341348
fun customerProductId(): String = customerProductId.getRequired("customer_product_id")
342349

343-
/** Shipping address for all cards in this bulk order */
350+
/**
351+
* Shipping address for all cards in this bulk order
352+
*
353+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
354+
* ```java
355+
* MyClass myObject = createBulkOrderRequest.shippingAddress().convert(MyClass.class);
356+
* ```
357+
*/
344358
@JsonProperty("shipping_address")
345359
@ExcludeMissing
346360
fun _shippingAddress(): JsonValue = shippingAddress

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,14 @@ private constructor(
5555
*/
5656
fun eventType(): EventType = eventType.getRequired("event_type")
5757

58-
/** The previous values of the fields that were updated. */
58+
/**
59+
* The previous values of the fields that were updated.
60+
*
61+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
62+
* ```java
63+
* MyClass myObject = cardUpdatedWebhookEvent.previousFields().convert(MyClass.class);
64+
* ```
65+
*/
5966
@JsonProperty("previous_fields")
6067
@ExcludeMissing
6168
fun _previousFields(): JsonValue = previousFields

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

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,34 @@ private constructor(
130130
*/
131131
fun purchases(): Long = purchases.getRequired("purchases")
132132

133-
/** Breakdown of credits */
133+
/**
134+
* Breakdown of credits
135+
*
136+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
137+
* ```java
138+
* MyClass myObject = statementTotals.creditDetails().convert(MyClass.class);
139+
* ```
140+
*/
134141
@JsonProperty("credit_details") @ExcludeMissing fun _creditDetails(): JsonValue = creditDetails
135142

136-
/** Breakdown of debits */
143+
/**
144+
* Breakdown of debits
145+
*
146+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
147+
* ```java
148+
* MyClass myObject = statementTotals.debitDetails().convert(MyClass.class);
149+
* ```
150+
*/
137151
@JsonProperty("debit_details") @ExcludeMissing fun _debitDetails(): JsonValue = debitDetails
138152

139-
/** Breakdown of payments */
153+
/**
154+
* Breakdown of payments
155+
*
156+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
157+
* ```java
158+
* MyClass myObject = statementTotals.paymentDetails().convert(MyClass.class);
159+
* ```
160+
*/
140161
@JsonProperty("payment_details")
141162
@ExcludeMissing
142163
fun _paymentDetails(): JsonValue = paymentDetails

0 commit comments

Comments
 (0)