-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bank-sdk): Add BE integration to get configuration response
PP-450
- Loading branch information
1 parent
3978ea3
commit 05a22c0
Showing
16 changed files
with
456 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
bank-api-library/library/src/main/java/net/gini/android/bank/api/models/Configuration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package net.gini.android.bank.api.models | ||
|
||
data class Configuration( | ||
val clientID: String, | ||
val isUserJourneyAnalyticsEnabled: Boolean, | ||
val isSkontoEnabled: Boolean, | ||
val isReturnAssistantEnabled: Boolean, | ||
val mixpanelToken: String?, | ||
val amplitudeApiKey: String?, | ||
|
||
) |
25 changes: 25 additions & 0 deletions
25
...library/library/src/main/java/net/gini/android/bank/api/response/ConfigurationResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.gini.android.bank.api.response | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
import net.gini.android.bank.api.models.Configuration | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class ConfigurationResponse( | ||
@Json(name = "clientID") val clientID: String?, | ||
@Json(name = "userJourneyAnalyticsEnabled") val userJourneyAnalyticsEnabled: Boolean?, | ||
@Json(name = "skontoEnabled") val skontoEnabled: Boolean?, | ||
@Json(name = "returnAssistantEnabled") val returnAssistantEnabled: Boolean?, | ||
@Json(name = "mixpanelToken") val mixpanelToken: String?, | ||
@Json(name = "amplitudeApiKey") val amplitudeApiKey: String?, | ||
) | ||
|
||
internal fun ConfigurationResponse.toConfiguration() = Configuration( | ||
clientID = clientID ?: "", | ||
isUserJourneyAnalyticsEnabled = userJourneyAnalyticsEnabled ?: false, | ||
isSkontoEnabled = skontoEnabled ?: false, | ||
isReturnAssistantEnabled = returnAssistantEnabled ?: false, | ||
mixpanelToken = mixpanelToken, | ||
amplitudeApiKey = amplitudeApiKey | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.