@@ -1732,6 +1732,7 @@ private constructor(
17321732 private val result: JsonField <Transaction .DeclineResult >,
17331733 private val settledAmount: JsonField <Long >,
17341734 private val status: JsonField <Transaction .Status >,
1735+ private val tags: JsonField <Transaction .Tags >,
17351736 private val tokenInfo: JsonField <TokenInfo >,
17361737 private val updated: JsonField <OffsetDateTime >,
17371738 private val events: JsonField <List <Transaction .TransactionEvent >>,
@@ -1802,6 +1803,9 @@ private constructor(
18021803 @JsonProperty(" status" )
18031804 @ExcludeMissing
18041805 status: JsonField <Transaction .Status > = JsonMissing .of(),
1806+ @JsonProperty(" tags" )
1807+ @ExcludeMissing
1808+ tags: JsonField <Transaction .Tags > = JsonMissing .of(),
18051809 @JsonProperty(" token_info" )
18061810 @ExcludeMissing
18071811 tokenInfo: JsonField <TokenInfo > = JsonMissing .of(),
@@ -1836,6 +1840,7 @@ private constructor(
18361840 result,
18371841 settledAmount,
18381842 status,
1843+ tags,
18391844 tokenInfo,
18401845 updated,
18411846 events,
@@ -1868,6 +1873,7 @@ private constructor(
18681873 .result(result)
18691874 .settledAmount(settledAmount)
18701875 .status(status)
1876+ .tags(tags)
18711877 .tokenInfo(tokenInfo)
18721878 .updated(updated)
18731879 .events(events)
@@ -2066,6 +2072,15 @@ private constructor(
20662072 */
20672073 fun status (): Transaction .Status = status.getRequired(" status" )
20682074
2075+ /* *
2076+ * Key-value pairs for tagging resources. Tags allow you to associate arbitrary metadata
2077+ * with a resource for your own purposes.
2078+ *
2079+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
2080+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
2081+ */
2082+ fun tags (): Transaction .Tags = tags.getRequired(" tags" )
2083+
20692084 /* *
20702085 * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
20712086 * server responded with an unexpected value).
@@ -2308,6 +2323,13 @@ private constructor(
23082323 @ExcludeMissing
23092324 fun _status (): JsonField <Transaction .Status > = status
23102325
2326+ /* *
2327+ * Returns the raw JSON value of [tags].
2328+ *
2329+ * Unlike [tags], this method doesn't throw if the JSON field has an unexpected type.
2330+ */
2331+ @JsonProperty(" tags" ) @ExcludeMissing fun _tags (): JsonField <Transaction .Tags > = tags
2332+
23112333 /* *
23122334 * Returns the raw JSON value of [tokenInfo].
23132335 *
@@ -2382,6 +2404,7 @@ private constructor(
23822404 * .result()
23832405 * .settledAmount()
23842406 * .status()
2407+ * .tags()
23852408 * .tokenInfo()
23862409 * .updated()
23872410 * .family()
@@ -2416,6 +2439,7 @@ private constructor(
24162439 private var result: JsonField <Transaction .DeclineResult >? = null
24172440 private var settledAmount: JsonField <Long >? = null
24182441 private var status: JsonField <Transaction .Status >? = null
2442+ private var tags: JsonField <Transaction .Tags >? = null
24192443 private var tokenInfo: JsonField <TokenInfo >? = null
24202444 private var updated: JsonField <OffsetDateTime >? = null
24212445 private var events: JsonField <MutableList <Transaction .TransactionEvent >>? = null
@@ -2447,6 +2471,7 @@ private constructor(
24472471 result = cardTransaction.result
24482472 settledAmount = cardTransaction.settledAmount
24492473 status = cardTransaction.status
2474+ tags = cardTransaction.tags
24502475 tokenInfo = cardTransaction.tokenInfo
24512476 updated = cardTransaction.updated
24522477 events = cardTransaction.events.map { it.toMutableList() }
@@ -2902,6 +2927,21 @@ private constructor(
29022927 */
29032928 fun status (status : JsonField <Transaction .Status >) = apply { this .status = status }
29042929
2930+ /* *
2931+ * Key-value pairs for tagging resources. Tags allow you to associate arbitrary metadata
2932+ * with a resource for your own purposes.
2933+ */
2934+ fun tags (tags : Transaction .Tags ) = tags(JsonField .of(tags))
2935+
2936+ /* *
2937+ * Sets [Builder.tags] to an arbitrary JSON value.
2938+ *
2939+ * You should usually call [Builder.tags] with a well-typed [Transaction.Tags] value
2940+ * instead. This method is primarily for setting the field to an undocumented or not yet
2941+ * supported value.
2942+ */
2943+ fun tags (tags : JsonField <Transaction .Tags >) = apply { this .tags = tags }
2944+
29052945 fun tokenInfo (tokenInfo : TokenInfo ? ) = tokenInfo(JsonField .ofNullable(tokenInfo))
29062946
29072947 /* * Alias for calling [Builder.tokenInfo] with `tokenInfo.orElse(null)`. */
@@ -3014,6 +3054,7 @@ private constructor(
30143054 * .result()
30153055 * .settledAmount()
30163056 * .status()
3057+ * .tags()
30173058 * .tokenInfo()
30183059 * .updated()
30193060 * .family()
@@ -3046,6 +3087,7 @@ private constructor(
30463087 checkRequired(" result" , result),
30473088 checkRequired(" settledAmount" , settledAmount),
30483089 checkRequired(" status" , status),
3090+ checkRequired(" tags" , tags),
30493091 checkRequired(" tokenInfo" , tokenInfo),
30503092 checkRequired(" updated" , updated),
30513093 (events ? : JsonMissing .of()).map { it.toImmutable() },
@@ -3084,6 +3126,7 @@ private constructor(
30843126 result().validate()
30853127 settledAmount()
30863128 status().validate()
3129+ tags().validate()
30873130 tokenInfo().ifPresent { it.validate() }
30883131 updated()
30893132 events().ifPresent { it.forEach { it.validate() } }
@@ -3130,6 +3173,7 @@ private constructor(
31303173 (result.asKnown().getOrNull()?.validity() ? : 0 ) +
31313174 (if (settledAmount.asKnown().isPresent) 1 else 0 ) +
31323175 (status.asKnown().getOrNull()?.validity() ? : 0 ) +
3176+ (tags.asKnown().getOrNull()?.validity() ? : 0 ) +
31333177 (tokenInfo.asKnown().getOrNull()?.validity() ? : 0 ) +
31343178 (if (updated.asKnown().isPresent) 1 else 0 ) +
31353179 (events.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ? : 0 ) +
@@ -3446,6 +3490,7 @@ private constructor(
34463490 result == other.result &&
34473491 settledAmount == other.settledAmount &&
34483492 status == other.status &&
3493+ tags == other.tags &&
34493494 tokenInfo == other.tokenInfo &&
34503495 updated == other.updated &&
34513496 events == other.events &&
@@ -3478,6 +3523,7 @@ private constructor(
34783523 result,
34793524 settledAmount,
34803525 status,
3526+ tags,
34813527 tokenInfo,
34823528 updated,
34833529 events,
@@ -3489,6 +3535,6 @@ private constructor(
34893535 override fun hashCode (): Int = hashCode
34903536
34913537 override fun toString () =
3492- " CardTransaction{token=$token , accountToken=$accountToken , acquirerFee=$acquirerFee , acquirerReferenceNumber=$acquirerReferenceNumber , amount=$amount , amounts=$amounts , authorizationAmount=$authorizationAmount , authorizationCode=$authorizationCode , avs=$avs , cardToken=$cardToken , cardholderAuthentication=$cardholderAuthentication , created=$created , financialAccountToken=$financialAccountToken , merchant=$merchant , merchantAmount=$merchantAmount , merchantAuthorizationAmount=$merchantAuthorizationAmount , merchantCurrency=$merchantCurrency , network=$network , networkRiskScore=$networkRiskScore , pos=$pos , result=$result , settledAmount=$settledAmount , status=$status , tokenInfo=$tokenInfo , updated=$updated , events=$events , family=$family , additionalProperties=$additionalProperties }"
3538+ " CardTransaction{token=$token , accountToken=$accountToken , acquirerFee=$acquirerFee , acquirerReferenceNumber=$acquirerReferenceNumber , amount=$amount , amounts=$amounts , authorizationAmount=$authorizationAmount , authorizationCode=$authorizationCode , avs=$avs , cardToken=$cardToken , cardholderAuthentication=$cardholderAuthentication , created=$created , financialAccountToken=$financialAccountToken , merchant=$merchant , merchantAmount=$merchantAmount , merchantAuthorizationAmount=$merchantAuthorizationAmount , merchantCurrency=$merchantCurrency , network=$network , networkRiskScore=$networkRiskScore , pos=$pos , result=$result , settledAmount=$settledAmount , status=$status , tags= $tags , tokenInfo=$tokenInfo , updated=$updated , events=$events , family=$family , additionalProperties=$additionalProperties }"
34933539 }
34943540}
0 commit comments