-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from rees46/feat/in-app-push-permission
feat: Added parsing data and routing to set permissions
- Loading branch information
Showing
9 changed files
with
140 additions
and
53 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
11 changes: 11 additions & 0 deletions
11
...c/main/kotlin/com/personalization/sdk/data/mappers/popup/action/PushSubscriptionMapper.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 com.personalization.sdk.data.mappers.popup.action | ||
|
||
import com.personalization.sdk.data.models.dto.popUp.PushSubscribe | ||
import com.personalization.sdk.data.models.params.SdkInitializationParams.PARAM_BUTTON_TEXT | ||
import org.json.JSONObject | ||
|
||
object PushSubscriptionMapper { | ||
fun map(json: JSONObject): PushSubscribe = PushSubscribe( | ||
buttonText = json.optString(PARAM_BUTTON_TEXT) | ||
) | ||
} |
13 changes: 13 additions & 0 deletions
13
...zation-sdk/src/main/kotlin/com/personalization/sdk/data/models/dto/popUp/DialogDataDto.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,13 @@ | ||
package com.personalization.sdk.data.models.dto.popUp | ||
|
||
data class DialogDataDto( | ||
val title: String, | ||
val message: String, | ||
val imageUrl: String, | ||
val buttonPositiveColor: Int, | ||
val buttonNegativeColor: Int, | ||
val buttonPositiveText: String, | ||
val buttonNegativeText: String, | ||
val onPositiveClick: () -> Unit, | ||
val position: Position | ||
) |
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
5 changes: 5 additions & 0 deletions
5
...zation-sdk/src/main/kotlin/com/personalization/sdk/data/models/dto/popUp/PushSubscribe.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,5 @@ | ||
package com.personalization.sdk.data.models.dto.popUp | ||
|
||
data class PushSubscribe( | ||
val buttonText: String? | ||
) |
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