Skip to content

Commit c89f07d

Browse files
committed
chore: Update pay api to 2025-1
1 parent b0efe36 commit c89f07d

File tree

46 files changed

+546
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+546
-179
lines changed

library/src/main/java/cloud/pace/sdk/api/pay/PayAPI.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@ The PACE Payment API is responsible for managing payment methods for users as we
1414
*/
1515
object PayAPI {
1616

17-
const val VERSION = "2024-3"
17+
const val VERSION = "2025-1"
1818
internal val baseUrl = "${API.baseUrl}/pay/$VERSION/"
1919

2020
class FleetPaymentMethodsAPI
2121
class NewPaymentMethodsAPI
22+
class PaceDriveBusinessAPI
2223
class PaymentMethodKindsAPI
2324
class PaymentMethodsAPI
2425
class PaymentTokensAPI
2526
class PaymentTransactionsAPI
2627

2728
val API.fleetPaymentMethods: FleetPaymentMethodsAPI by lazy { FleetPaymentMethodsAPI() }
2829
val API.newPaymentMethods: NewPaymentMethodsAPI by lazy { NewPaymentMethodsAPI() }
30+
val API.paceDriveBusiness: PaceDriveBusinessAPI by lazy { PaceDriveBusinessAPI() }
2931
val API.paymentMethodKinds: PaymentMethodKindsAPI by lazy { PaymentMethodKindsAPI() }
3032
val API.paymentMethods: PaymentMethodsAPI by lazy { PaymentMethodsAPI() }
3133
val API.paymentTokens: PaymentTokensAPI by lazy { PaymentTokensAPI() }
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* PLEASE DO NOT EDIT!
3+
*
4+
* Generated by SwagGen with Kotlin template.
5+
* https://github.com/pace/SwagGen
6+
*/
7+
8+
package cloud.pace.sdk.api.pay.generated.model
9+
10+
import com.google.gson.annotations.SerializedName
11+
import com.squareup.moshi.Json
12+
13+
class PatchPaymentMethodReqBody {
14+
15+
var attributes: Attributes? = null
16+
17+
/* Payment method ID */
18+
var id: String? = null
19+
var type: Type? = null
20+
21+
enum class Type(val value: String) {
22+
@SerializedName("paymentMethod")
23+
@Json(name = "paymentMethod")
24+
PAYMENTMETHOD("paymentMethod")
25+
}
26+
27+
class Attributes {
28+
29+
/* Customer chosen alias for the payment method */
30+
var alias: String? = null
31+
var mandatoryAuthorisationAttributes: List<MandatoryAuthorisationAttributes>? = null
32+
33+
/* User UUID (optional field, if not provided, we use the user from the token) */
34+
var userID: String? = null
35+
36+
/* Mandatory transaction attribute validator. If maxLength and regex are not provided and changed is true, the attribute is not mandatory and will be removed from the list of mandatory attributes. */
37+
class MandatoryAuthorisationAttributes {
38+
39+
var changed: Boolean? = null
40+
var maxLength: Int? = null
41+
var name: String? = null
42+
var regex: String? = null
43+
}
44+
}
45+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* PLEASE DO NOT EDIT!
3+
*
4+
* Generated by SwagGen with Kotlin template.
5+
* https://github.com/pace/SwagGen
6+
*/
7+
8+
package cloud.pace.sdk.api.pay.generated.model
9+
10+
import moe.banana.jsonapi2.JsonApi
11+
import moe.banana.jsonapi2.Resource
12+
13+
@JsonApi(type = "paymentMethod")
14+
class PatchPaymentMethodReq : Resource() {
15+
16+
/* Customer chosen alias for the payment method */
17+
var alias: String? = null
18+
var mandatoryAuthorisationAttributes: List<MandatoryAuthorisationAttributes>? = null
19+
20+
/* User UUID (optional field, if not provided, we use the user from the token) */
21+
var userID: String? = null
22+
23+
/* Mandatory transaction attribute validator. If maxLength and regex are not provided and changed is true, the attribute is not mandatory and will be removed from the list of mandatory attributes. */
24+
class MandatoryAuthorisationAttributes {
25+
26+
var changed: Boolean? = null
27+
var maxLength: Int? = null
28+
var name: String? = null
29+
var regex: String? = null
30+
}
31+
}

library/src/main/java/cloud/pace/sdk/api/pay/generated/model/PaymentMethodBody.kt

Lines changed: 0 additions & 145 deletions
This file was deleted.

library/src/main/java/cloud/pace/sdk/api/pay/generated/model/PaymentMethodModel.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ class PaymentMethod : Resource() {
2121
var links: Links? = null
2222
var meta: Meta? = null
2323

24+
/* The datetime (iso8601) when the payment method was created */
25+
var createdAt: Date? = null
26+
27+
/* The datetime (iso8601) when the payment method was updated */
28+
var updatedAt: Date? = null
29+
30+
/* client of our utm partner */
31+
var utmPartnerClient: String? = null
32+
2433
/* Customer chosen alias for the payment method */
2534
var alias: String? = null
2635

@@ -34,7 +43,7 @@ class PaymentMethod : Resource() {
3443
/* Implicit (`true`) payment methods are read-only and cannot be deleted, e.g., ApplePay */
3544
var implicit: Boolean? = null
3645

37-
/* Indicates if the payment method is eligible for discounts. */
46+
/* Indicates if the payment method is eligible for discounts. */
3847
var isEligibleForDiscounts: Boolean? = null
3948

4049
/* one of sepa, creditcard, paypal, paydirekt, dkv, applepay, ... */
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* PLEASE DO NOT EDIT!
3+
*
4+
* Generated by SwagGen with Kotlin template.
5+
* https://github.com/pace/SwagGen
6+
*/
7+
8+
package cloud.pace.sdk.api.pay.generated.model
9+
10+
import com.google.gson.annotations.SerializedName
11+
import com.squareup.moshi.Json
12+
13+
class PaymentMethodPFCCreateBody {
14+
15+
lateinit var type: Type
16+
var attributes: Attributes? = null
17+
18+
/* The ID of this payment method. */
19+
var id: String? = null
20+
21+
enum class Type(val value: String) {
22+
@SerializedName("paymentMethod")
23+
@Json(name = "paymentMethod")
24+
PAYMENTMETHOD("paymentMethod")
25+
}
26+
27+
class Attributes {
28+
29+
lateinit var kind: Kind
30+
31+
/* Identifier or PAN (Primary Account Number) representing the PFC Card. The identifier is payment provider specific and provided by the payment provider.
32+
*/
33+
var pan: String? = null
34+
35+
/* Personal identification number is a security code for verifying the user's identity. */
36+
var pin: String? = null
37+
38+
/* Track 2 data of payment card. */
39+
var track2: String? = null
40+
41+
enum class Kind(val value: String) {
42+
@SerializedName("pfc")
43+
@Json(name = "pfc")
44+
PFC("pfc")
45+
}
46+
}
47+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* PLEASE DO NOT EDIT!
3+
*
4+
* Generated by SwagGen with Kotlin template.
5+
* https://github.com/pace/SwagGen
6+
*/
7+
8+
package cloud.pace.sdk.api.pay.generated.model
9+
10+
import com.google.gson.annotations.SerializedName
11+
import com.squareup.moshi.Json
12+
import moe.banana.jsonapi2.JsonApi
13+
import moe.banana.jsonapi2.Resource
14+
15+
@JsonApi(type = "paymentMethod")
16+
class PaymentMethodPFCCreate : Resource() {
17+
18+
lateinit var kind: Kind
19+
20+
/* Identifier or PAN (Primary Account Number) representing the PFC Card. The identifier is payment provider specific and provided by the payment provider.
21+
*/
22+
var pan: String? = null
23+
24+
/* Personal identification number is a security code for verifying the user's identity. */
25+
var pin: String? = null
26+
27+
/* Track 2 data of payment card. */
28+
var track2: String? = null
29+
30+
enum class Kind(val value: String) {
31+
@SerializedName("pfc")
32+
@Json(name = "pfc")
33+
PFC("pfc")
34+
}
35+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* PLEASE DO NOT EDIT!
3+
*
4+
* Generated by SwagGen with Kotlin template.
5+
* https://github.com/pace/SwagGen
6+
*/
7+
8+
package cloud.pace.sdk.api.pay.generated.model
9+
10+
import com.google.gson.annotations.SerializedName
11+
import com.squareup.moshi.Json
12+
13+
class PaymentMethodPaceDriveBusinessCreateBody {
14+
15+
/* The ID of this payment method. */
16+
lateinit var id: String
17+
lateinit var type: Type
18+
var attributes: Attributes? = null
19+
20+
enum class Type(val value: String) {
21+
@SerializedName("paymentMethod")
22+
@Json(name = "paymentMethod")
23+
PAYMENTMETHOD("paymentMethod")
24+
}
25+
26+
class Attributes {
27+
28+
/* The ID of the user for which the payment method is created. */
29+
lateinit var userID: String
30+
lateinit var identificationString: String
31+
}
32+
}

0 commit comments

Comments
 (0)