Skip to content

Commit c03e548

Browse files
Merge branch 'main' into feat/api-key-exposure-support
2 parents df69ff2 + d252df9 commit c03e548

41 files changed

Lines changed: 6769 additions & 6596 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx
1212

1313
- Added support for `wechat_pay` payment method type. See [related changelog](https://developer.paddle.com/changelog/2025/wechat-pay-payment-method?utm_source=dx&utm_medium=paddle-python-sdk)
1414
- Added `api_key_exposure.created` event support. See [related changelog](https://developer.paddle.com/changelog/2025/secret-scanning?utm_source=dx&utm_medium=paddle-python-sdk)
15+
- Added `grand_total_tax` to transaction totals and adjusted totals. See [related changelog](https://developer.paddle.com/changelog/2026/grand-total-tax-field?utm_source=dx&utm_medium=paddle-python-sdk)
1516

1617
## 1.12.0 - 2025-11-12
1718

paddle_billing/Entities/Shared/TransactionPayoutTotals.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class TransactionPayoutTotals:
2020
credit_to_balance: str
2121
exchange_rate: str
2222
fee_rate: str
23+
grand_total_tax: str
2324

2425
@staticmethod
2526
def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals:
@@ -37,4 +38,5 @@ def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals:
3738
credit_to_balance=data["credit_to_balance"],
3839
exchange_rate=data["exchange_rate"],
3940
fee_rate=data["fee_rate"],
41+
grand_total_tax=data["grand_total_tax"],
4042
)

paddle_billing/Entities/Shared/TransactionTotals.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class TransactionTotals:
1818
earnings: str | None
1919
currency_code: CurrencyCode
2020
credit_to_balance: str
21+
grand_total_tax: str
2122

2223
@staticmethod
2324
def from_dict(data: dict[str, Any]) -> TransactionTotals:
@@ -33,4 +34,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotals:
3334
earnings=data.get("earnings"),
3435
currency_code=CurrencyCode(data["currency_code"]),
3536
credit_to_balance=data["credit_to_balance"],
37+
grand_total_tax=data["grand_total_tax"],
3638
)

paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class TransactionTotalsAdjusted:
1515
earnings: str | None
1616
currency_code: CurrencyCode
1717
retained_fee: str
18+
grand_total_tax: str
1819

1920
@staticmethod
2021
def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
@@ -27,4 +28,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
2728
earnings=data.get("earnings"),
2829
currency_code=CurrencyCode(data["currency_code"]),
2930
retained_fee=data["retained_fee"],
31+
grand_total_tax=data["grand_total_tax"],
3032
)

paddle_billing/Notifications/Entities/Shared/TransactionPayoutTotals.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class TransactionPayoutTotals:
2020
credit_to_balance: str
2121
exchange_rate: str | None
2222
fee_rate: str | None
23+
grand_total_tax: str | None
2324

2425
@staticmethod
2526
def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals:
@@ -37,4 +38,5 @@ def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals:
3738
credit_to_balance=data["credit_to_balance"],
3839
exchange_rate=data.get("exchange_rate"),
3940
fee_rate=data.get("fee_rate"),
41+
grand_total_tax=data.get("grand_total_tax"),
4042
)

paddle_billing/Notifications/Entities/Shared/TransactionTotals.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class TransactionTotals:
1818
earnings: str | None
1919
currency_code: CurrencyCode
2020
credit_to_balance: str
21+
grand_total_tax: str | None
2122

2223
@staticmethod
2324
def from_dict(data: dict[str, Any]) -> TransactionTotals:
@@ -33,4 +34,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotals:
3334
earnings=data.get("earnings"),
3435
currency_code=CurrencyCode(data["currency_code"]),
3536
credit_to_balance=data["credit_to_balance"],
37+
grand_total_tax=data.get("grand_total_tax"),
3638
)

paddle_billing/Notifications/Entities/Shared/TransactionTotalsAdjusted.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class TransactionTotalsAdjusted:
1515
earnings: str | None
1616
currency_code: CurrencyCode
1717
retained_fee: str | None
18+
grand_total_tax: str | None
1819

1920
@staticmethod
2021
def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
@@ -27,4 +28,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
2728
earnings=data.get("earnings"),
2829
currency_code=CurrencyCode(data["currency_code"]),
2930
retained_fee=data.get("retained_fee"),
31+
grand_total_tax=data.get("grand_total_tax"),
3032
)

tests/Functional/Resources/Events/_fixtures/response/list_default.json

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@
413413
"subtotal": "55000",
414414
"grand_total": "66000",
415415
"currency_code": "GBP",
416-
"credit_to_balance": "0"
416+
"credit_to_balance": "0",
417+
"grand_total_tax": "11000"
417418
},
418419
"line_items": [
419420
{
@@ -517,7 +518,8 @@
517518
"earnings": "0",
518519
"subtotal": "55000",
519520
"grand_total": "66000",
520-
"currency_code": "GBP"
521+
"currency_code": "GBP",
522+
"grand_total_tax": "11000"
521523
}
522524
},
523525
"payments": [
@@ -745,7 +747,8 @@
745747
"subtotal": "55000",
746748
"grand_total": "66000",
747749
"currency_code": "GBP",
748-
"credit_to_balance": "0"
750+
"credit_to_balance": "0",
751+
"grand_total_tax": "11000"
749752
},
750753
"line_items": [
751754
{
@@ -849,7 +852,8 @@
849852
"earnings": "0",
850853
"subtotal": "55000",
851854
"grand_total": "66000",
852-
"currency_code": "GBP"
855+
"currency_code": "GBP",
856+
"grand_total_tax": "11000"
853857
}
854858
},
855859
"payments": [
@@ -1077,7 +1081,8 @@
10771081
"subtotal": "55000",
10781082
"grand_total": "66000",
10791083
"currency_code": "GBP",
1080-
"credit_to_balance": "0"
1084+
"credit_to_balance": "0",
1085+
"grand_total_tax": "11000"
10811086
},
10821087
"line_items": [
10831088
{
@@ -1181,7 +1186,8 @@
11811186
"earnings": "0",
11821187
"subtotal": "55000",
11831188
"grand_total": "66000",
1184-
"currency_code": "GBP"
1189+
"currency_code": "GBP",
1190+
"grand_total_tax": "11000"
11851191
}
11861192
},
11871193
"payments": [
@@ -1409,7 +1415,8 @@
14091415
"subtotal": "55000",
14101416
"grand_total": "66000",
14111417
"currency_code": "GBP",
1412-
"credit_to_balance": "0"
1418+
"credit_to_balance": "0",
1419+
"grand_total_tax": "11000"
14131420
},
14141421
"line_items": [
14151422
{
@@ -1513,7 +1520,8 @@
15131520
"earnings": "0",
15141521
"subtotal": "55000",
15151522
"grand_total": "66000",
1516-
"currency_code": "GBP"
1523+
"currency_code": "GBP",
1524+
"grand_total_tax": "11000"
15171525
}
15181526
},
15191527
"payments": [],
@@ -1720,7 +1728,8 @@
17201728
"subtotal": "55000",
17211729
"grand_total": "66000",
17221730
"currency_code": "GBP",
1723-
"credit_to_balance": "0"
1731+
"credit_to_balance": "0",
1732+
"grand_total_tax": "11000"
17241733
},
17251734
"line_items": [
17261735
{
@@ -1824,7 +1833,8 @@
18241833
"earnings": "0",
18251834
"subtotal": "55000",
18261835
"grand_total": "66000",
1827-
"currency_code": "GBP"
1836+
"currency_code": "GBP",
1837+
"grand_total_tax": "11000"
18281838
}
18291839
},
18301840
"payments": [],
@@ -2077,7 +2087,8 @@
20772087
"subtotal": "59900",
20782088
"grand_total": "63494",
20792089
"currency_code": "USD",
2080-
"credit_to_balance": "0"
2090+
"credit_to_balance": "0",
2091+
"grand_total_tax": "3594"
20812092
},
20822093
"line_items": [
20832094
{
@@ -2197,7 +2208,8 @@
21972208
"earnings": "0",
21982209
"subtotal": "59900",
21992210
"grand_total": "63494",
2200-
"currency_code": "USD"
2211+
"currency_code": "USD",
2212+
"grand_total_tax": "3594"
22012213
}
22022214
},
22032215
"payments": [],
@@ -2404,7 +2416,8 @@
24042416
"subtotal": "55000",
24052417
"grand_total": "66000",
24062418
"currency_code": "GBP",
2407-
"credit_to_balance": "0"
2419+
"credit_to_balance": "0",
2420+
"grand_total_tax": "11000"
24082421
},
24092422
"line_items": [
24102423
{
@@ -2502,7 +2515,8 @@
25022515
"grand_total": "81066",
25032516
"currency_code": "USD",
25042517
"exchange_rate": "1.2282731999999998",
2505-
"credit_to_balance": "0"
2518+
"credit_to_balance": "0",
2519+
"grand_total_tax": "13511"
25062520
},
25072521
"tax_rates_used": [
25082522
{
@@ -2522,7 +2536,8 @@
25222536
"earnings": "51660",
25232537
"subtotal": "55000",
25242538
"grand_total": "66000",
2525-
"currency_code": "GBP"
2539+
"currency_code": "GBP",
2540+
"grand_total_tax": "11000"
25262541
}
25272542
},
25282543
"payments": [
@@ -2770,7 +2785,8 @@
27702785
"subtotal": "55000",
27712786
"grand_total": "66000",
27722787
"currency_code": "GBP",
2773-
"credit_to_balance": "0"
2788+
"credit_to_balance": "0",
2789+
"grand_total_tax": "11000"
27742790
},
27752791
"line_items": [
27762792
{
@@ -2868,7 +2884,8 @@
28682884
"grand_total": "81066",
28692885
"currency_code": "USD",
28702886
"exchange_rate": "1.2282731999999998",
2871-
"credit_to_balance": "0"
2887+
"credit_to_balance": "0",
2888+
"grand_total_tax": "13511"
28722889
},
28732890
"tax_rates_used": [
28742891
{
@@ -2888,7 +2905,8 @@
28882905
"earnings": "51660",
28892906
"subtotal": "55000",
28902907
"grand_total": "66000",
2891-
"currency_code": "GBP"
2908+
"currency_code": "GBP",
2909+
"grand_total_tax": "11000"
28922910
}
28932911
},
28942912
"payments": [

0 commit comments

Comments
 (0)