Skip to content

Commit 3e2fc8c

Browse files
committed
Merge branch '374-update-fueling-api' into 'master'
Resolve "Update fueling api" Closes #374 See merge request pace/mobile/ios/pace-cloud-sdk!429
2 parents b9cc8fb + 98ecac8 commit 3e2fc8c

File tree

7 files changed

+36
-6
lines changed

7 files changed

+36
-6
lines changed

PACECloudSDK/API/Fueling/Generated/FuelingAPI.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public struct FuelingAPI {
2222
public enum FuelingAPIServer {
2323
/** Production server (preview release 2024-3) **/
2424
public static let main = "https://api.pace.cloud/fueling/2024-3"
25+
/** Production server (deprecated) **/
26+
public static let server2 = "https://api.pace.cloud/fueling/beta"
2527
}
2628
}
2729

PACECloudSDK/API/Fueling/Generated/Requests/Fueling/FuelingAPIProcessPayment.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2410,7 +2410,7 @@ Example:
24102410
case status409(Status409)
24112411

24122412
/** A preconditon for the payment process failed. The following codes may be seen:
2413-
* `FUELING_PUMP_BUSY_ON_SITE`: The pump is aready unlocked.
2413+
* `FUELING_PUMP_BUSY_ON_SITE`: The pump is already unlocked.
24142414
* `FUELING_PROVIDER_FORCED_PRE_AUTH`: The pump is already in use. This code is only used for a specific integration in ifsf360 to show an errorscreen in our app.
24152415
*/
24162416
case status412(Status412)

PACECloudSDK/API/Generated/Models/PCFuelingFuelPrice.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public class PCFuelingFuelPrice: APIModel {
4242
case truckDieselPremium = "truckDieselPremium"
4343
case truckLpg = "truckLpg"
4444
case heatingOil = "heatingOil"
45+
case washerFluid = "washerFluid"
46+
case twoStroke = "twoStroke"
4547
}
4648

4749
/** Fuel Price ID */

PACECloudSDK/API/Generated/Models/PCFuelingFuelPriceResponse.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public class PCFuelingFuelPriceResponse: APIModel {
4646
case truckDieselPremium = "truckDieselPremium"
4747
case truckLpg = "truckLpg"
4848
case heatingOil = "heatingOil"
49+
case washerFluid = "washerFluid"
50+
case twoStroke = "twoStroke"
4951
}
5052

5153
/** Fuel Price ID */

PACECloudSDK/API/Generated/Models/PCFuelingPaymentMethodKind.swift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@ public class PCFuelingPaymentMethodKind: APIModel {
2525
/** Indicates whether the payment method is a fuel card. Fuelcard `no` means no. */
2626
public var fuelcard: Bool?
2727

28-
/** Indicates whether the payment method can be onboarded/modified. Implict `true` means no. Otherwise yes.
29-
Most payment method kinds are no implicit, i.e., `implicit=false`.
28+
/** Indicates whether the payment method has been onboarded implicitely, e.g., an on-device payment method such as Apple Pay or Google Pay.
3029
This field is optional and if not present should be assumed to indicate `implicit=false`.
3130
*/
3231
public var implicit: Bool?
3332

33+
/** Indicates whether the payment method can be onboarded/modified. Managed `true` means no. Otherwise yes.
34+
Most payment method kinds are not managed, i.e., `managed=false`.
35+
*/
36+
public var managed: Bool?
37+
3438
/** localized name */
3539
public var name: String?
3640

@@ -240,13 +244,14 @@ This field is optional and if not present should be assumed to indicate `implici
240244
}
241245
}
242246

243-
public init(id: String? = nil, type: PCFuelingType? = nil, currencies: [String]? = nil, dataPrivacy: DataPrivacy? = nil, fuelcard: Bool? = nil, implicit: Bool? = nil, name: String? = nil, twoFactor: Bool? = nil, vendorPRNs: [String]? = nil, vendors: [Vendors]? = nil) {
247+
public init(id: String? = nil, type: PCFuelingType? = nil, currencies: [String]? = nil, dataPrivacy: DataPrivacy? = nil, fuelcard: Bool? = nil, implicit: Bool? = nil, managed: Bool? = nil, name: String? = nil, twoFactor: Bool? = nil, vendorPRNs: [String]? = nil, vendors: [Vendors]? = nil) {
244248
self.id = id
245249
self.type = type
246250
self.currencies = currencies
247251
self.dataPrivacy = dataPrivacy
248252
self.fuelcard = fuelcard
249253
self.implicit = implicit
254+
self.managed = managed
250255
self.name = name
251256
self.twoFactor = twoFactor
252257
self.vendorPRNs = vendorPRNs
@@ -262,6 +267,7 @@ This field is optional and if not present should be assumed to indicate `implici
262267
dataPrivacy = try container.decodeIfPresent("dataPrivacy")
263268
fuelcard = try container.decodeIfPresent("fuelcard")
264269
implicit = try container.decodeIfPresent("implicit")
270+
managed = try container.decodeIfPresent("managed")
265271
name = try container.decodeIfPresent("name")
266272
twoFactor = try container.decodeIfPresent("twoFactor")
267273
vendorPRNs = try container.decodeArrayIfPresent("vendorPRNs")
@@ -277,6 +283,7 @@ This field is optional and if not present should be assumed to indicate `implici
277283
try container.encodeIfPresent(dataPrivacy, forKey: "dataPrivacy")
278284
try container.encodeIfPresent(fuelcard, forKey: "fuelcard")
279285
try container.encodeIfPresent(implicit, forKey: "implicit")
286+
try container.encodeIfPresent(managed, forKey: "managed")
280287
try container.encodeIfPresent(name, forKey: "name")
281288
try container.encodeIfPresent(twoFactor, forKey: "twoFactor")
282289
try container.encodeIfPresent(vendorPRNs, forKey: "vendorPRNs")
@@ -291,6 +298,7 @@ This field is optional and if not present should be assumed to indicate `implici
291298
guard self.dataPrivacy == object.dataPrivacy else { return false }
292299
guard self.fuelcard == object.fuelcard else { return false }
293300
guard self.implicit == object.implicit else { return false }
301+
guard self.managed == object.managed else { return false }
294302
guard self.name == object.name else { return false }
295303
guard self.twoFactor == object.twoFactor else { return false }
296304
guard self.vendorPRNs == object.vendorPRNs else { return false }

PACECloudSDK/API/Generated/Models/PCFuelingProcessPaymentResponse.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public class PCFuelingProcessPaymentResponse: APIModel {
4040

4141
public var pumpId: ID?
4242

43+
/** Additional information that will be rendered on the receipt */
44+
public var receiptInformation: [String]?
45+
4346
/** Vehicle identification number */
4447
public var vin: String?
4548

@@ -80,7 +83,7 @@ public class PCFuelingProcessPaymentResponse: APIModel {
8083
}
8184
}
8285

83-
public init(id: ID? = nil, type: PCFuelingType? = nil, vat: VAT? = nil, currency: String? = nil, discountAmount: Decimal? = nil, driverVehicleID: String? = nil, gasStationId: ID? = nil, mileage: Int? = nil, paymentToken: String? = nil, priceIncludingVAT: Decimal? = nil, priceWithoutVAT: Decimal? = nil, pumpId: ID? = nil, vin: String? = nil) {
86+
public init(id: ID? = nil, type: PCFuelingType? = nil, vat: VAT? = nil, currency: String? = nil, discountAmount: Decimal? = nil, driverVehicleID: String? = nil, gasStationId: ID? = nil, mileage: Int? = nil, paymentToken: String? = nil, priceIncludingVAT: Decimal? = nil, priceWithoutVAT: Decimal? = nil, pumpId: ID? = nil, receiptInformation: [String]? = nil, vin: String? = nil) {
8487
self.id = id
8588
self.type = type
8689
self.vat = vat
@@ -93,6 +96,7 @@ public class PCFuelingProcessPaymentResponse: APIModel {
9396
self.priceIncludingVAT = priceIncludingVAT
9497
self.priceWithoutVAT = priceWithoutVAT
9598
self.pumpId = pumpId
99+
self.receiptInformation = receiptInformation
96100
self.vin = vin
97101
}
98102

@@ -111,6 +115,7 @@ public class PCFuelingProcessPaymentResponse: APIModel {
111115
priceIncludingVAT = try container.decodeLosslessDecimal("priceIncludingVAT")
112116
priceWithoutVAT = try container.decodeLosslessDecimal("priceWithoutVAT")
113117
pumpId = try container.decodeIfPresent("pumpId")
118+
receiptInformation = try container.decodeArrayIfPresent("receiptInformation")
114119
vin = try container.decodeIfPresent("vin")
115120
}
116121

@@ -129,6 +134,7 @@ public class PCFuelingProcessPaymentResponse: APIModel {
129134
try container.encodeIfPresent(priceIncludingVAT, forKey: "priceIncludingVAT")
130135
try container.encodeIfPresent(priceWithoutVAT, forKey: "priceWithoutVAT")
131136
try container.encodeIfPresent(pumpId, forKey: "pumpId")
137+
try container.encodeIfPresent(receiptInformation, forKey: "receiptInformation")
132138
try container.encodeIfPresent(vin, forKey: "vin")
133139
}
134140

@@ -146,6 +152,7 @@ public class PCFuelingProcessPaymentResponse: APIModel {
146152
guard self.priceIncludingVAT == object.priceIncludingVAT else { return false }
147153
guard self.priceWithoutVAT == object.priceWithoutVAT else { return false }
148154
guard self.pumpId == object.pumpId else { return false }
155+
guard self.receiptInformation == object.receiptInformation else { return false }
149156
guard self.vin == object.vin else { return false }
150157
return true
151158
}

PACECloudSDK/API/Generated/Models/PCFuelingTransactionRequest.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public class PCFuelingTransactionRequest: APIModel {
5454
case truckDieselPremium = "truckDieselPremium"
5555
case truckLpg = "truckLpg"
5656
case heatingOil = "heatingOil"
57+
case washerFluid = "washerFluid"
58+
case twoStroke = "twoStroke"
5759
}
5860

5961
/** 'Value' field of the payment token (not the payment token ID) */
@@ -87,13 +89,16 @@ public class PCFuelingTransactionRequest: APIModel {
8789

8890
public var priceIncludingVAT: Decimal?
8991

92+
/** Additional information that will be rendered on the receipt */
93+
public var receiptInformation: [String]?
94+
9095
/** Set to 'true' if you want the payment to be cleared automatically in the background after fueling */
9196
public var unattendedPayment: Bool?
9297

9398
/** Vehicle identification number */
9499
public var vin: String?
95100

96-
public init(paymentToken: String, pumpId: ID, additionalData: String? = nil, callbackURL: String? = nil, carFuelType: PCFuelingCarFuelType? = nil, currency: String? = nil, driverVehicleID: String? = nil, metadata: [PCFuelingTransactionMetadata]? = nil, mileage: Int? = nil, numberPlate: String? = nil, priceIncludingVAT: Decimal? = nil, unattendedPayment: Bool? = nil, vin: String? = nil) {
101+
public init(paymentToken: String, pumpId: ID, additionalData: String? = nil, callbackURL: String? = nil, carFuelType: PCFuelingCarFuelType? = nil, currency: String? = nil, driverVehicleID: String? = nil, metadata: [PCFuelingTransactionMetadata]? = nil, mileage: Int? = nil, numberPlate: String? = nil, priceIncludingVAT: Decimal? = nil, receiptInformation: [String]? = nil, unattendedPayment: Bool? = nil, vin: String? = nil) {
97102
self.paymentToken = paymentToken
98103
self.pumpId = pumpId
99104
self.additionalData = additionalData
@@ -105,6 +110,7 @@ public class PCFuelingTransactionRequest: APIModel {
105110
self.mileage = mileage
106111
self.numberPlate = numberPlate
107112
self.priceIncludingVAT = priceIncludingVAT
113+
self.receiptInformation = receiptInformation
108114
self.unattendedPayment = unattendedPayment
109115
self.vin = vin
110116
}
@@ -123,6 +129,7 @@ public class PCFuelingTransactionRequest: APIModel {
123129
mileage = try container.decodeIfPresent("mileage")
124130
numberPlate = try container.decodeIfPresent("numberPlate")
125131
priceIncludingVAT = try container.decodeLosslessDecimal("priceIncludingVAT")
132+
receiptInformation = try container.decodeArrayIfPresent("receiptInformation")
126133
unattendedPayment = try container.decodeIfPresent("unattendedPayment")
127134
vin = try container.decodeIfPresent("vin")
128135
}
@@ -141,6 +148,7 @@ public class PCFuelingTransactionRequest: APIModel {
141148
try container.encodeIfPresent(mileage, forKey: "mileage")
142149
try container.encodeIfPresent(numberPlate, forKey: "numberPlate")
143150
try container.encodeIfPresent(priceIncludingVAT, forKey: "priceIncludingVAT")
151+
try container.encodeIfPresent(receiptInformation, forKey: "receiptInformation")
144152
try container.encodeIfPresent(unattendedPayment, forKey: "unattendedPayment")
145153
try container.encodeIfPresent(vin, forKey: "vin")
146154
}
@@ -158,6 +166,7 @@ public class PCFuelingTransactionRequest: APIModel {
158166
guard self.mileage == object.mileage else { return false }
159167
guard self.numberPlate == object.numberPlate else { return false }
160168
guard self.priceIncludingVAT == object.priceIncludingVAT else { return false }
169+
guard self.receiptInformation == object.receiptInformation else { return false }
161170
guard self.unattendedPayment == object.unattendedPayment else { return false }
162171
guard self.vin == object.vin else { return false }
163172
return true

0 commit comments

Comments
 (0)