Skip to content

Commit b67ea83

Browse files
committed
Merge branch '169-regenerate-api-for-2021-2' into 'master'
Resolve "Regenerate API for 2021-2" Closes #169 See merge request pace/mobile/android/pace-cloud-sdk!171
2 parents bb18ac7 + 4619534 commit b67ea83

File tree

66 files changed

+1867
-193
lines changed

Some content is hidden

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

66 files changed

+1867
-193
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ x.y.z Release notes (yyyy-MM-dd)
1313
### Internal
1414

1515
* Add custom user agent in interceptor
16+
* Regenerate Api for 2021-2
1617

1718

1819
10.1.1 Release notes (2021-09-30)

library/src/main/java/cloud/pace/sdk/api/fueling/FuelingAPI.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import cloud.pace.sdk.api.API
1212
/** Fueling API */
1313
object FuelingAPI {
1414

15-
const val VERSION = "2020-4"
15+
const val VERSION = "2021-2"
1616
internal val baseUrl = "${API.baseUrl}/fueling/$VERSION/"
1717

1818
class FuelingAPI

library/src/main/java/cloud/pace/sdk/api/fueling/generated/model/ApproachingResponse.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,18 @@ class ApproachingResponse : Resource() {
2121
private var gasStation: HasOne<GasStation> = HasOne()
2222
fun getGasStation() = gasStation.get(document)
2323

24+
private var gasStationNote: HasMany<GasStationNote> = HasMany()
25+
fun getGasStationNote() = gasStationNote.get(document)
26+
2427
private var paymentMethods: HasMany<PaymentMethod> = HasMany()
2528
fun getPaymentMethods() = paymentMethods.get(document)
2629

2730
private var supportedPaymentMethodKinds: HasMany<PaymentMethodKind> = HasMany()
2831
fun getSupportedPaymentMethodKinds() = supportedPaymentMethodKinds.get(document)
2932

33+
private var transactions: HasMany<Transaction> = HasMany()
34+
fun getTransactions() = transactions.get(document)
35+
3036
private var unsupportedPaymentMethods: HasMany<PaymentMethod> = HasMany()
3137
fun getUnsupportedPaymentMethods() = unsupportedPaymentMethods.get(document)
3238

library/src/main/java/cloud/pace/sdk/api/fueling/generated/model/FuelPriceResponse.kt

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -18,81 +18,81 @@ import java.util.*
1818
@JsonApi(type = "fuelPriceResponse")
1919
class FuelPriceResponse: Resource() {
2020

21-
/* Currency as specified in ISO-4217. */
22-
var currency: String? = null
23-
/* Fuel type for cars, based on the EU fuel marking */
24-
var fuelType: FuelType? = null
25-
/* Price in liters */
26-
var price: Double? = null
27-
var productName: String? = null
21+
/* Currency as specified in ISO-4217. */
22+
var currency: String? = null
23+
/* Fuel type for cars, based on the EU fuel marking */
24+
var fuelType: FuelType? = null
25+
/* Price in liters */
26+
var price: Double? = null
27+
var productName: String? = null
2828

29-
/* Fuel type for cars, based on the EU fuel marking */
30-
enum class FuelType(val value: String) {
31-
@SerializedName("ron98")
32-
@Json(name = "ron98")
33-
RON98("ron98"),
34-
@SerializedName("ron98e5")
35-
@Json(name = "ron98e5")
36-
RON98E5("ron98e5"),
37-
@SerializedName("ron95e10")
38-
@Json(name = "ron95e10")
39-
RON95E10("ron95e10"),
40-
@SerializedName("diesel")
41-
@Json(name = "diesel")
42-
DIESEL("diesel"),
43-
@SerializedName("e85")
44-
@Json(name = "e85")
45-
E85("e85"),
46-
@SerializedName("ron91")
47-
@Json(name = "ron91")
48-
RON91("ron91"),
49-
@SerializedName("ron95e5")
50-
@Json(name = "ron95e5")
51-
RON95E5("ron95e5"),
52-
@SerializedName("ron100")
53-
@Json(name = "ron100")
54-
RON100("ron100"),
55-
@SerializedName("dieselGtl")
56-
@Json(name = "dieselGtl")
57-
DIESELGTL("dieselGtl"),
58-
@SerializedName("dieselB7")
59-
@Json(name = "dieselB7")
60-
DIESELB7("dieselB7"),
61-
@SerializedName("dieselB15")
62-
@Json(name = "dieselB15")
63-
DIESELB15("dieselB15"),
64-
@SerializedName("dieselPremium")
65-
@Json(name = "dieselPremium")
66-
DIESELPREMIUM("dieselPremium"),
67-
@SerializedName("lpg")
68-
@Json(name = "lpg")
69-
LPG("lpg"),
70-
@SerializedName("cng")
71-
@Json(name = "cng")
72-
CNG("cng"),
73-
@SerializedName("lng")
74-
@Json(name = "lng")
75-
LNG("lng"),
76-
@SerializedName("h2")
77-
@Json(name = "h2")
78-
H2("h2"),
79-
@SerializedName("truckDiesel")
80-
@Json(name = "truckDiesel")
81-
TRUCKDIESEL("truckDiesel"),
82-
@SerializedName("adBlue")
83-
@Json(name = "adBlue")
84-
ADBLUE("adBlue"),
85-
@SerializedName("truckAdBlue")
86-
@Json(name = "truckAdBlue")
87-
TRUCKADBLUE("truckAdBlue"),
88-
@SerializedName("truckDieselPremium")
89-
@Json(name = "truckDieselPremium")
90-
TRUCKDIESELPREMIUM("truckDieselPremium"),
91-
@SerializedName("truckLpg")
92-
@Json(name = "truckLpg")
93-
TRUCKLPG("truckLpg"),
94-
@SerializedName("heatingOil")
95-
@Json(name = "heatingOil")
96-
HEATINGOIL("heatingOil")
97-
}
29+
/* Fuel type for cars, based on the EU fuel marking */
30+
enum class FuelType(val value: String) {
31+
@SerializedName("ron98")
32+
@Json(name = "ron98")
33+
RON98("ron98"),
34+
@SerializedName("ron98e5")
35+
@Json(name = "ron98e5")
36+
RON98E5("ron98e5"),
37+
@SerializedName("ron95e10")
38+
@Json(name = "ron95e10")
39+
RON95E10("ron95e10"),
40+
@SerializedName("diesel")
41+
@Json(name = "diesel")
42+
DIESEL("diesel"),
43+
@SerializedName("e85")
44+
@Json(name = "e85")
45+
E85("e85"),
46+
@SerializedName("ron91")
47+
@Json(name = "ron91")
48+
RON91("ron91"),
49+
@SerializedName("ron95e5")
50+
@Json(name = "ron95e5")
51+
RON95E5("ron95e5"),
52+
@SerializedName("ron100")
53+
@Json(name = "ron100")
54+
RON100("ron100"),
55+
@SerializedName("dieselGtl")
56+
@Json(name = "dieselGtl")
57+
DIESELGTL("dieselGtl"),
58+
@SerializedName("dieselB7")
59+
@Json(name = "dieselB7")
60+
DIESELB7("dieselB7"),
61+
@SerializedName("dieselB15")
62+
@Json(name = "dieselB15")
63+
DIESELB15("dieselB15"),
64+
@SerializedName("dieselPremium")
65+
@Json(name = "dieselPremium")
66+
DIESELPREMIUM("dieselPremium"),
67+
@SerializedName("lpg")
68+
@Json(name = "lpg")
69+
LPG("lpg"),
70+
@SerializedName("cng")
71+
@Json(name = "cng")
72+
CNG("cng"),
73+
@SerializedName("lng")
74+
@Json(name = "lng")
75+
LNG("lng"),
76+
@SerializedName("h2")
77+
@Json(name = "h2")
78+
H2("h2"),
79+
@SerializedName("truckDiesel")
80+
@Json(name = "truckDiesel")
81+
TRUCKDIESEL("truckDiesel"),
82+
@SerializedName("adBlue")
83+
@Json(name = "adBlue")
84+
ADBLUE("adBlue"),
85+
@SerializedName("truckAdBlue")
86+
@Json(name = "truckAdBlue")
87+
TRUCKADBLUE("truckAdBlue"),
88+
@SerializedName("truckDieselPremium")
89+
@Json(name = "truckDieselPremium")
90+
TRUCKDIESELPREMIUM("truckDieselPremium"),
91+
@SerializedName("truckLpg")
92+
@Json(name = "truckLpg")
93+
TRUCKLPG("truckLpg"),
94+
@SerializedName("heatingOil")
95+
@Json(name = "heatingOil")
96+
HEATINGOIL("heatingOil")
97+
}
9898
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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.fueling.generated.model
9+
10+
import com.google.gson.annotations.SerializedName
11+
import com.squareup.moshi.Json
12+
import moe.banana.jsonapi2.HasMany
13+
import moe.banana.jsonapi2.HasOne
14+
import moe.banana.jsonapi2.JsonApi
15+
import moe.banana.jsonapi2.Resource
16+
import java.util.*
17+
18+
@JsonApi(type = "gasStationNote")
19+
class GasStationNote : Resource() {
20+
21+
var info: String? = null
22+
var name: String? = null
23+
var text: String? = null
24+
25+
}

library/src/main/java/cloud/pace/sdk/api/fueling/generated/model/PaymentMethod.kt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,44 @@ class PaymentMethod : Resource() {
2323
var identificationString: String? = null
2424
/* one of sepa, creditcard, paypal, paydirekt, dkv, applepay, ... */
2525
var kind: String? = null
26+
var mandatoryAuthorisationAttributes: List<MandatoryAuthorisationAttributes>? = null
27+
/* The desired status for a payment method is `verified`, this means the method is ready to use.
28+
A payment method that has the status `created` has yet to be verified. This is the case for payment methods,
29+
which have an asynchronous verification process, e.g., paydirekt (waiting for an email).
30+
*/
31+
var status: Status? = null
2632
/* indicates if the payment method kind requires two factors later on */
2733
var twoFactor: Boolean? = null
2834
/* PACE resource name(s) to payment method vendor */
2935
var vendorPRN: String? = null
3036

37+
/* The desired status for a payment method is `verified`, this means the method is ready to use.
38+
A payment method that has the status `created` has yet to be verified. This is the case for payment methods,
39+
which have an asynchronous verification process, e.g., paydirekt (waiting for an email).
40+
*/
41+
enum class Status(val value: String) {
42+
@SerializedName("created")
43+
@Json(name = "created")
44+
CREATED("created"),
45+
@SerializedName("verified")
46+
@Json(name = "verified")
47+
VERIFIED("verified"),
48+
@SerializedName("pending")
49+
@Json(name = "pending")
50+
PENDING("pending"),
51+
@SerializedName("unacceptable")
52+
@Json(name = "unacceptable")
53+
UNACCEPTABLE("unacceptable")
54+
}
55+
56+
/* Mandatory transaction attribute validator */
57+
class MandatoryAuthorisationAttributes {
58+
59+
var maxLength: Int? = null
60+
var name: String? = null
61+
var regex: String? = null
62+
}
63+
3164

3265
class Meta {
3366

library/src/main/java/cloud/pace/sdk/api/fueling/generated/model/PaymentMethodKind.kt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ This field is optional and if not present should be assumed to indicate `implici
3333
var twoFactor: Boolean? = null
3434
/* PACE resource name(s) to payment method vendors */
3535
var vendorPRNs: List<String>? = null
36+
var vendors: List<Vendors>? = null
3637

3738
/* data privacy information */
3839
class DataPrivacy {
@@ -57,4 +58,24 @@ This field is optional and if not present should be assumed to indicate `implici
5758
}
5859
}
5960

61+
class Vendors {
62+
63+
var logo: Logo? = null
64+
var name: String? = null
65+
var paymentMethodKindId: String? = null
66+
var slug: String? = null
67+
68+
class Logo {
69+
70+
var href: String? = null
71+
/* variants of the vendor's logo */
72+
var variants: List<Variants>? = null
73+
74+
class Variants {
75+
76+
var href: String? = null
77+
}
78+
}
79+
}
80+
6081
}

library/src/main/java/cloud/pace/sdk/api/fueling/generated/model/ProcessPaymentResponse.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class ProcessPaymentResponse : Resource() {
2121
var vat: VAT? = null
2222
/* Currency as specified in ISO-4217. */
2323
var currency: String? = null
24+
/* Amount that was discounted. Only if any discounts were applied earlier. */
25+
var discountAmount: Double? = null
2426
var gasStationId: String? = null
2527
/* Mileage in meters */
2628
var mileage: Int? = null

library/src/main/java/cloud/pace/sdk/api/fueling/generated/model/Pump.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class Pump : Resource() {
4646
* `outOfOrder` the pump has a technical problem, this can only be resolved by the gas station staff on site, possible transitions *free*, *locked*. Note: The customer has to pay in the shop
4747
*/
4848
var status: Status? = null
49+
var transaction: Transaction? = null
4950
/* Provided if the user pre-authorized the pump */
5051
var transactionId: String? = null
5152

library/src/main/java/cloud/pace/sdk/api/fueling/generated/model/PumpResponse.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class PumpResponse : Resource() {
4646
* `outOfOrder` the pump has a technical problem, this can only be resolved by the gas station staff on site, possible transitions *free*, *locked*. Note: The customer has to pay in the shop
4747
*/
4848
var status: Status? = null
49+
var transaction: Transaction? = null
4950
/* Provided if the user pre-authorized the pump */
5051
var transactionId: String? = null
5152

0 commit comments

Comments
 (0)