-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for notification settings traffic source (#72)
- Loading branch information
1 parent
c1614dc
commit 337ee58
Showing
19 changed files
with
225 additions
and
9 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
7 changes: 7 additions & 0 deletions
7
paddle_billing/Entities/NotificationSettings/NotificationSettingTrafficSource.py
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,7 @@ | ||
from paddle_billing.PaddleStrEnum import PaddleStrEnum, PaddleStrEnumMeta | ||
|
||
|
||
class NotificationSettingTrafficSource(PaddleStrEnum, metaclass=PaddleStrEnumMeta): | ||
All: "NotificationSettingTrafficSource" = "all" | ||
Platform: "NotificationSettingTrafficSource" = "platform" | ||
Simulation: "NotificationSettingTrafficSource" = "simulation" |
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
from paddle_billing.Entities.NotificationSettings.NotificationSettingTrafficSource import ( | ||
NotificationSettingTrafficSource, | ||
) | ||
from paddle_billing.Entities.NotificationSettings.NotificationSettingType import NotificationSettingType |
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
10 changes: 10 additions & 0 deletions
10
tests/Functional/Resources/NotificationSettings/_fixtures/request/create_traffic_all.json
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,10 @@ | ||
{ | ||
"description": "Slack notifications", | ||
"type": "url", | ||
"destination": "https://hooks.slack.com/example", | ||
"include_sensitive_fields": false, | ||
"subscribed_events": [ | ||
"transaction.created" | ||
], | ||
"traffic_source": "all" | ||
} |
10 changes: 10 additions & 0 deletions
10
.../Functional/Resources/NotificationSettings/_fixtures/request/create_traffic_platform.json
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,10 @@ | ||
{ | ||
"description": "Slack notifications", | ||
"type": "url", | ||
"destination": "https://hooks.slack.com/example", | ||
"include_sensitive_fields": false, | ||
"subscribed_events": [ | ||
"transaction.created" | ||
], | ||
"traffic_source": "platform" | ||
} |
10 changes: 10 additions & 0 deletions
10
...unctional/Resources/NotificationSettings/_fixtures/request/create_traffic_simulation.json
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,10 @@ | ||
{ | ||
"description": "Slack notifications", | ||
"type": "url", | ||
"destination": "https://hooks.slack.com/example", | ||
"include_sensitive_fields": false, | ||
"subscribed_events": [ | ||
"transaction.created" | ||
], | ||
"traffic_source": "simulation" | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/Functional/Resources/NotificationSettings/_fixtures/request/update_traffic_all.json
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,3 @@ | ||
{ | ||
"traffic_source": "all" | ||
} |
3 changes: 3 additions & 0 deletions
3
.../Functional/Resources/NotificationSettings/_fixtures/request/update_traffic_platform.json
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,3 @@ | ||
{ | ||
"traffic_source": "platform" | ||
} |
3 changes: 3 additions & 0 deletions
3
...unctional/Resources/NotificationSettings/_fixtures/request/update_traffic_simulation.json
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,3 @@ | ||
{ | ||
"traffic_source": "simulation" | ||
} |
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
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.