Skip to content

Commit 482a8de

Browse files
author
Martin Dinh
committed
Merge branch '184-add-properties-to-cofugasstation' into 'master'
Resolve "Add properties to CofuGasStation" Closes #184 See merge request pace/mobile/android/pace-cloud-sdk!187
2 parents aa0a230 + d2719b3 commit 482a8de

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ x.y.z Release notes (yyyy-MM-dd)
99
### Breaking changes
1010

1111
* Combine IDKit setup with PACECloudSDK setup. `IDKit.setup(...)` is no longer accessible. The `IDKit` is now initialized via `PACECloudSDK.setup(...)`. Therefore an optional `OIDConfiguration` parameter was added to the `Configuration` class of the `PACECloudSDK`, which must be initialized with at least the `clientId` and the `redirectUri`.
12+
* Change properties of `CofuGasStation` from `var` to `val`
13+
14+
### Enhancements
15+
16+
* Add the attribute `properties: Map<String, Any>` to the `CofuGasStation` which includes different information of the gas station e.g. app URL
1217

1318
### Fixes
1419

library/src/main/java/cloud/pace/sdk/poikit/geo/GeoAPIManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class GeoAPIManagerImpl(
185185
ConnectedFuelingStatus.values().associateBy(ConnectedFuelingStatus::value)[status]
186186
}
187187
if (lat != null && lng != null && status != null) {
188-
CofuGasStation(it.id, LatLng(lat, lng), status)
188+
CofuGasStation(it.id, LatLng(lat, lng), status, it.properties)
189189
} else {
190190
null
191191
}

library/src/main/java/cloud/pace/sdk/poikit/geo/GeoAPIResponse.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ data class GeoGasStation(
2929
val appUrls: List<String>
3030
)
3131

32-
data class CofuGasStation(
33-
var id: String,
34-
var coordinate: LatLng,
35-
var connectedFuelingStatus: ConnectedFuelingStatus
32+
data class CofuGasStation @JvmOverloads constructor(
33+
val id: String,
34+
val coordinate: LatLng,
35+
val connectedFuelingStatus: ConnectedFuelingStatus,
36+
val properties: Map<String, Any> = emptyMap()
3637
)
3738

3839
enum class ConnectedFuelingStatus(val value: String) {

0 commit comments

Comments
 (0)