-
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 on_resume support to subscription resume and pause operatio…
…ns (#86)
- Loading branch information
1 parent
5cbf524
commit c2ba603
Showing
12 changed files
with
88 additions
and
4 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
6 changes: 6 additions & 0 deletions
6
paddle_billing/Entities/Subscriptions/SubscriptionOnResume.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,6 @@ | ||
from paddle_billing.PaddleStrEnum import PaddleStrEnum, PaddleStrEnumMeta | ||
|
||
|
||
class SubscriptionOnResume(PaddleStrEnum, metaclass=PaddleStrEnumMeta): | ||
ContinueExistingBillingPeriod: "SubscriptionOnResume" = "continue_existing_billing_period" | ||
StartNewBillingPeriod: "SubscriptionOnResume" = "start_new_billing_period" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
|
||
setup( | ||
version="1.3.1", | ||
version="1.4.0", | ||
author="Paddle and contributors", | ||
author_email="[email protected]", | ||
description="Paddle's Python SDK for Paddle Billing", | ||
|
5 changes: 5 additions & 0 deletions
5
...ional/Resources/Subscriptions/_fixtures/request/pause_resume_existing_billing_period.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,5 @@ | ||
{ | ||
"effective_from": "next_billing_period", | ||
"resume_at": "2023-10-09T16:30:00.000000Z", | ||
"on_resume": "continue_existing_billing_period" | ||
} |
5 changes: 5 additions & 0 deletions
5
...Functional/Resources/Subscriptions/_fixtures/request/pause_resume_new_billing_period.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,5 @@ | ||
{ | ||
"effective_from": "next_billing_period", | ||
"resume_at": "2023-10-09T16:30:00.000000Z", | ||
"on_resume": "start_new_billing_period" | ||
} |
4 changes: 4 additions & 0 deletions
4
.../Functional/Resources/Subscriptions/_fixtures/request/resume_existing_billing_period.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,4 @@ | ||
{ | ||
"effective_from": "immediately", | ||
"on_resume": "continue_existing_billing_period" | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/Functional/Resources/Subscriptions/_fixtures/request/resume_new_billing_period.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,4 @@ | ||
{ | ||
"effective_from": "immediately", | ||
"on_resume": "start_new_billing_period" | ||
} |
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