Skip to content

Commit 94423c4

Browse files
feat(api): add merchant location/service fields, SERVICE_LOCATION authorization attributes
1 parent aa189f8 commit 94423c4

14 files changed

Lines changed: 2701 additions & 227 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 190
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-5f3c4878ed085a0e8925abdf14ed250ba25b04d5a128e3edd81f28be5fd79b69.yml
3-
openapi_spec_hash: f2cc51f780daf0454712a4f73b9c8302
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-7fb459122adaf544433c3d5acd17566e642289b3eccb7ee25d7b7ce418967e32.yml
3+
openapi_spec_hash: fe69fbb129fa5b7d7b1e71d4f2a908f1
44
config_hash: 400b9afe0f7f7b7d96177d05950775f9

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

Lines changed: 78 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,14 +1780,15 @@ private constructor(
17801780
private val cardholderAuthentication: JsonField<CardholderAuthentication>,
17811781
private val created: JsonField<OffsetDateTime>,
17821782
private val financialAccountToken: JsonField<String>,
1783-
private val merchant: JsonField<Merchant>,
1783+
private val merchant: JsonField<Transaction.TransactionMerchant>,
17841784
private val merchantAmount: JsonField<Long>,
17851785
private val merchantAuthorizationAmount: JsonField<Long>,
17861786
private val merchantCurrency: JsonField<String>,
17871787
private val network: JsonField<Transaction.Network>,
17881788
private val networkRiskScore: JsonField<Long>,
17891789
private val pos: JsonField<Transaction.Pos>,
17901790
private val result: JsonField<Transaction.DeclineResult>,
1791+
private val serviceLocation: JsonField<Transaction.ServiceLocation>,
17911792
private val settledAmount: JsonField<Long>,
17921793
private val status: JsonField<Transaction.Status>,
17931794
private val tags: JsonField<Transaction.Tags>,
@@ -1835,7 +1836,7 @@ private constructor(
18351836
financialAccountToken: JsonField<String> = JsonMissing.of(),
18361837
@JsonProperty("merchant")
18371838
@ExcludeMissing
1838-
merchant: JsonField<Merchant> = JsonMissing.of(),
1839+
merchant: JsonField<Transaction.TransactionMerchant> = JsonMissing.of(),
18391840
@JsonProperty("merchant_amount")
18401841
@ExcludeMissing
18411842
merchantAmount: JsonField<Long> = JsonMissing.of(),
@@ -1855,6 +1856,9 @@ private constructor(
18551856
@JsonProperty("result")
18561857
@ExcludeMissing
18571858
result: JsonField<Transaction.DeclineResult> = JsonMissing.of(),
1859+
@JsonProperty("service_location")
1860+
@ExcludeMissing
1861+
serviceLocation: JsonField<Transaction.ServiceLocation> = JsonMissing.of(),
18581862
@JsonProperty("settled_amount")
18591863
@ExcludeMissing
18601864
settledAmount: JsonField<Long> = JsonMissing.of(),
@@ -1896,6 +1900,7 @@ private constructor(
18961900
networkRiskScore,
18971901
pos,
18981902
result,
1903+
serviceLocation,
18991904
settledAmount,
19001905
status,
19011906
tags,
@@ -1929,6 +1934,7 @@ private constructor(
19291934
.networkRiskScore(networkRiskScore)
19301935
.pos(pos)
19311936
.result(result)
1937+
.serviceLocation(serviceLocation)
19321938
.settledAmount(settledAmount)
19331939
.status(status)
19341940
.tags(tags)
@@ -2048,10 +2054,12 @@ private constructor(
20482054
financialAccountToken.getOptional("financial_account_token")
20492055

20502056
/**
2057+
* Merchant information including full location details.
2058+
*
20512059
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
20522060
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
20532061
*/
2054-
fun merchant(): Merchant = merchant.getRequired("merchant")
2062+
fun merchant(): Transaction.TransactionMerchant = merchant.getRequired("merchant")
20552063

20562064
/**
20572065
* Analogous to the 'amount', but in the merchant currency.
@@ -2113,6 +2121,17 @@ private constructor(
21132121
*/
21142122
fun result(): Transaction.DeclineResult = result.getRequired("result")
21152123

2124+
/**
2125+
* Where the cardholder received the service, when different from the card acceptor
2126+
* location. This is populated from network data elements such as Mastercard DE-122 SE1
2127+
* SF9-14 and Visa F34 DS02.
2128+
*
2129+
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
2130+
* server responded with an unexpected value).
2131+
*/
2132+
fun serviceLocation(): Optional<Transaction.ServiceLocation> =
2133+
serviceLocation.getOptional("service_location")
2134+
21162135
/**
21172136
* The settled amount of the transaction in the settlement currency.
21182137
*
@@ -2291,7 +2310,9 @@ private constructor(
22912310
*
22922311
* Unlike [merchant], this method doesn't throw if the JSON field has an unexpected type.
22932312
*/
2294-
@JsonProperty("merchant") @ExcludeMissing fun _merchant(): JsonField<Merchant> = merchant
2313+
@JsonProperty("merchant")
2314+
@ExcludeMissing
2315+
fun _merchant(): JsonField<Transaction.TransactionMerchant> = merchant
22952316

22962317
/**
22972318
* Returns the raw JSON value of [merchantAmount].
@@ -2361,6 +2382,16 @@ private constructor(
23612382
@ExcludeMissing
23622383
fun _result(): JsonField<Transaction.DeclineResult> = result
23632384

2385+
/**
2386+
* Returns the raw JSON value of [serviceLocation].
2387+
*
2388+
* Unlike [serviceLocation], this method doesn't throw if the JSON field has an unexpected
2389+
* type.
2390+
*/
2391+
@JsonProperty("service_location")
2392+
@ExcludeMissing
2393+
fun _serviceLocation(): JsonField<Transaction.ServiceLocation> = serviceLocation
2394+
23642395
/**
23652396
* Returns the raw JSON value of [settledAmount].
23662397
*
@@ -2460,6 +2491,7 @@ private constructor(
24602491
* .networkRiskScore()
24612492
* .pos()
24622493
* .result()
2494+
* .serviceLocation()
24632495
* .settledAmount()
24642496
* .status()
24652497
* .tags()
@@ -2487,14 +2519,15 @@ private constructor(
24872519
private var cardholderAuthentication: JsonField<CardholderAuthentication>? = null
24882520
private var created: JsonField<OffsetDateTime>? = null
24892521
private var financialAccountToken: JsonField<String>? = null
2490-
private var merchant: JsonField<Merchant>? = null
2522+
private var merchant: JsonField<Transaction.TransactionMerchant>? = null
24912523
private var merchantAmount: JsonField<Long>? = null
24922524
private var merchantAuthorizationAmount: JsonField<Long>? = null
24932525
private var merchantCurrency: JsonField<String>? = null
24942526
private var network: JsonField<Transaction.Network>? = null
24952527
private var networkRiskScore: JsonField<Long>? = null
24962528
private var pos: JsonField<Transaction.Pos>? = null
24972529
private var result: JsonField<Transaction.DeclineResult>? = null
2530+
private var serviceLocation: JsonField<Transaction.ServiceLocation>? = null
24982531
private var settledAmount: JsonField<Long>? = null
24992532
private var status: JsonField<Transaction.Status>? = null
25002533
private var tags: JsonField<Transaction.Tags>? = null
@@ -2527,6 +2560,7 @@ private constructor(
25272560
networkRiskScore = cardTransaction.networkRiskScore
25282561
pos = cardTransaction.pos
25292562
result = cardTransaction.result
2563+
serviceLocation = cardTransaction.serviceLocation
25302564
settledAmount = cardTransaction.settledAmount
25312565
status = cardTransaction.status
25322566
tags = cardTransaction.tags
@@ -2789,16 +2823,20 @@ private constructor(
27892823
this.financialAccountToken = financialAccountToken
27902824
}
27912825

2792-
fun merchant(merchant: Merchant) = merchant(JsonField.of(merchant))
2826+
/** Merchant information including full location details. */
2827+
fun merchant(merchant: Transaction.TransactionMerchant) =
2828+
merchant(JsonField.of(merchant))
27932829

27942830
/**
27952831
* Sets [Builder.merchant] to an arbitrary JSON value.
27962832
*
2797-
* You should usually call [Builder.merchant] with a well-typed [Merchant] value
2798-
* instead. This method is primarily for setting the field to an undocumented or not yet
2799-
* supported value.
2833+
* You should usually call [Builder.merchant] with a well-typed
2834+
* [Transaction.TransactionMerchant] value instead. This method is primarily for setting
2835+
* the field to an undocumented or not yet supported value.
28002836
*/
2801-
fun merchant(merchant: JsonField<Merchant>) = apply { this.merchant = merchant }
2837+
fun merchant(merchant: JsonField<Transaction.TransactionMerchant>) = apply {
2838+
this.merchant = merchant
2839+
}
28022840

28032841
/** Analogous to the 'amount', but in the merchant currency. */
28042842
@Deprecated("deprecated")
@@ -2957,6 +2995,29 @@ private constructor(
29572995
this.result = result
29582996
}
29592997

2998+
/**
2999+
* Where the cardholder received the service, when different from the card acceptor
3000+
* location. This is populated from network data elements such as Mastercard DE-122 SE1
3001+
* SF9-14 and Visa F34 DS02.
3002+
*/
3003+
fun serviceLocation(serviceLocation: Transaction.ServiceLocation?) =
3004+
serviceLocation(JsonField.ofNullable(serviceLocation))
3005+
3006+
/** Alias for calling [Builder.serviceLocation] with `serviceLocation.orElse(null)`. */
3007+
fun serviceLocation(serviceLocation: Optional<Transaction.ServiceLocation>) =
3008+
serviceLocation(serviceLocation.getOrNull())
3009+
3010+
/**
3011+
* Sets [Builder.serviceLocation] to an arbitrary JSON value.
3012+
*
3013+
* You should usually call [Builder.serviceLocation] with a well-typed
3014+
* [Transaction.ServiceLocation] value instead. This method is primarily for setting the
3015+
* field to an undocumented or not yet supported value.
3016+
*/
3017+
fun serviceLocation(serviceLocation: JsonField<Transaction.ServiceLocation>) = apply {
3018+
this.serviceLocation = serviceLocation
3019+
}
3020+
29603021
/** The settled amount of the transaction in the settlement currency. */
29613022
@Deprecated("deprecated")
29623023
fun settledAmount(settledAmount: Long) = settledAmount(JsonField.of(settledAmount))
@@ -3110,6 +3171,7 @@ private constructor(
31103171
* .networkRiskScore()
31113172
* .pos()
31123173
* .result()
3174+
* .serviceLocation()
31133175
* .settledAmount()
31143176
* .status()
31153177
* .tags()
@@ -3143,6 +3205,7 @@ private constructor(
31433205
checkRequired("networkRiskScore", networkRiskScore),
31443206
checkRequired("pos", pos),
31453207
checkRequired("result", result),
3208+
checkRequired("serviceLocation", serviceLocation),
31463209
checkRequired("settledAmount", settledAmount),
31473210
checkRequired("status", status),
31483211
checkRequired("tags", tags),
@@ -3182,6 +3245,7 @@ private constructor(
31823245
networkRiskScore()
31833246
pos().validate()
31843247
result().validate()
3248+
serviceLocation().ifPresent { it.validate() }
31853249
settledAmount()
31863250
status().validate()
31873251
tags().validate()
@@ -3229,6 +3293,7 @@ private constructor(
32293293
(if (networkRiskScore.asKnown().isPresent) 1 else 0) +
32303294
(pos.asKnown().getOrNull()?.validity() ?: 0) +
32313295
(result.asKnown().getOrNull()?.validity() ?: 0) +
3296+
(serviceLocation.asKnown().getOrNull()?.validity() ?: 0) +
32323297
(if (settledAmount.asKnown().isPresent) 1 else 0) +
32333298
(status.asKnown().getOrNull()?.validity() ?: 0) +
32343299
(tags.asKnown().getOrNull()?.validity() ?: 0) +
@@ -3546,6 +3611,7 @@ private constructor(
35463611
networkRiskScore == other.networkRiskScore &&
35473612
pos == other.pos &&
35483613
result == other.result &&
3614+
serviceLocation == other.serviceLocation &&
35493615
settledAmount == other.settledAmount &&
35503616
status == other.status &&
35513617
tags == other.tags &&
@@ -3579,6 +3645,7 @@ private constructor(
35793645
networkRiskScore,
35803646
pos,
35813647
result,
3648+
serviceLocation,
35823649
settledAmount,
35833650
status,
35843651
tags,
@@ -3593,6 +3660,6 @@ private constructor(
35933660
override fun hashCode(): Int = hashCode
35943661

35953662
override fun toString() =
3596-
"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}"
3663+
"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, serviceLocation=$serviceLocation, settledAmount=$settledAmount, status=$status, tags=$tags, tokenInfo=$tokenInfo, updated=$updated, events=$events, family=$family, additionalProperties=$additionalProperties}"
35973664
}
35983665
}

0 commit comments

Comments
 (0)