Skip to content

Commit 6697d3c

Browse files
committed
Merge branch '337-forward-brand-id-from-tiles' into 'master'
Resolve "Forward brand id from tiles" Closes #337 See merge request pace/mobile/ios/pace-cloud-sdk!389
2 parents 14835ce + dc53111 commit 6697d3c

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

PACECloudSDK/POIKit/Models/GasStation.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import Foundation
1010

1111
public extension POIKit {
1212
class GasStation: PCPOIGasStation {
13+
public var brandId: String?
14+
1315
public var prices: [PCPOIFuelPrice] = []
1416
public var currency: String?
1517

PACECloudSDK/POIKit/POISearch/Model/VectorTile+POI.swift

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,21 @@ extension VectorTile_Tile {
4141
private func loadGasStation(for values: [String: String]) -> POIKit.GasStation {
4242
let gasStation = POIKit.GasStation()
4343

44-
if let id = values["id"] { gasStation.id = id }
45-
if let name = values["n"] { gasStation.stationName = name }
46-
if let brand = values["b"] { gasStation.brand = brand }
44+
if let id = values["id"] {
45+
gasStation.id = id
46+
}
47+
48+
if let name = values["n"] {
49+
gasStation.stationName = name
50+
}
51+
52+
if let brand = values["b"] {
53+
gasStation.brand = brand
54+
}
55+
56+
if let brandId = values["brand_id"] {
57+
gasStation.brandId = brandId
58+
}
4759

4860
if let openingHoursValue = values["oh"] {
4961
loadOpeningHourRules(for: gasStation, from: openingHoursValue)

0 commit comments

Comments
 (0)