diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c05fbc9..fbd6cf33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx ### Added +- Support `retained_fee` field on totals objects to show the fees retained by Paddle for the adjustment. - Added support for new payment methods `blik`, `mb_way`, `pix` and `upi`. See [related changelog](https://developer.paddle.com/changelog/2025/blik-mbway-payment-methods?utm_source=dx&utm_medium=paddle-python-sdk). ## 1.10.0 - 2025-08-15 diff --git a/paddle_billing/Entities/Shared/AdjustmentTotals.py b/paddle_billing/Entities/Shared/AdjustmentTotals.py index 4fb0dd9a..f5f7e8c2 100644 --- a/paddle_billing/Entities/Shared/AdjustmentTotals.py +++ b/paddle_billing/Entities/Shared/AdjustmentTotals.py @@ -13,6 +13,7 @@ class AdjustmentTotals: fee: str earnings: str currency_code: CurrencyCode + retained_fee: str @staticmethod def from_dict(data: dict[str, Any]) -> AdjustmentTotals: @@ -23,4 +24,5 @@ def from_dict(data: dict[str, Any]) -> AdjustmentTotals: fee=data["fee"], earnings=data["earnings"], currency_code=CurrencyCode(data["currency_code"]), + retained_fee=data["retained_fee"], ) diff --git a/paddle_billing/Entities/Shared/PayoutTotalsAdjustment.py b/paddle_billing/Entities/Shared/PayoutTotalsAdjustment.py index 7b24e99e..e3b37999 100644 --- a/paddle_billing/Entities/Shared/PayoutTotalsAdjustment.py +++ b/paddle_billing/Entities/Shared/PayoutTotalsAdjustment.py @@ -15,6 +15,7 @@ class PayoutTotalsAdjustment: chargeback_fee: ChargebackFee | None earnings: str currency_code: CurrencyCodePayouts + retained_fee: str @staticmethod def from_dict(data: dict[str, Any]) -> PayoutTotalsAdjustment: @@ -26,4 +27,5 @@ def from_dict(data: dict[str, Any]) -> PayoutTotalsAdjustment: chargeback_fee=ChargebackFee.from_dict(data["chargeback_fee"]) if data.get("chargeback_fee") else None, earnings=data["earnings"], currency_code=CurrencyCodePayouts(data["currency_code"]), + retained_fee=data["retained_fee"], ) diff --git a/paddle_billing/Entities/Shared/TransactionPayoutTotalsAdjusted.py b/paddle_billing/Entities/Shared/TransactionPayoutTotalsAdjusted.py index 994afdd0..4254fd28 100644 --- a/paddle_billing/Entities/Shared/TransactionPayoutTotalsAdjusted.py +++ b/paddle_billing/Entities/Shared/TransactionPayoutTotalsAdjusted.py @@ -16,6 +16,7 @@ class TransactionPayoutTotalsAdjusted: earnings: str currency_code: CurrencyCodePayouts exchange_rate: str + retained_fee: str @staticmethod def from_dict(data: dict[str, Any]) -> TransactionPayoutTotalsAdjusted: @@ -28,4 +29,5 @@ def from_dict(data: dict[str, Any]) -> TransactionPayoutTotalsAdjusted: earnings=data["earnings"], currency_code=CurrencyCodePayouts(data["currency_code"]), exchange_rate=data["exchange_rate"], + retained_fee=data["retained_fee"], ) diff --git a/paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py b/paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py index 4d15063a..01c24523 100644 --- a/paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py +++ b/paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py @@ -14,6 +14,7 @@ class TransactionTotalsAdjusted: fee: str | None earnings: str | None currency_code: CurrencyCode + retained_fee: str @staticmethod def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted: @@ -25,4 +26,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted: fee=data.get("fee"), earnings=data.get("earnings"), currency_code=CurrencyCode(data["currency_code"]), + retained_fee=data["retained_fee"], ) diff --git a/paddle_billing/Notifications/Entities/Shared/AdjustmentTotals.py b/paddle_billing/Notifications/Entities/Shared/AdjustmentTotals.py index e8a913d5..eb9fb753 100644 --- a/paddle_billing/Notifications/Entities/Shared/AdjustmentTotals.py +++ b/paddle_billing/Notifications/Entities/Shared/AdjustmentTotals.py @@ -13,6 +13,7 @@ class AdjustmentTotals: fee: str earnings: str currency_code: CurrencyCode + retained_fee: str | None @staticmethod def from_dict(data: dict[str, Any]) -> AdjustmentTotals: @@ -23,4 +24,5 @@ def from_dict(data: dict[str, Any]) -> AdjustmentTotals: fee=data["fee"], earnings=data["earnings"], currency_code=CurrencyCode(data["currency_code"]), + retained_fee=data.get("retained_fee"), ) diff --git a/paddle_billing/Notifications/Entities/Shared/PayoutTotalsAdjustment.py b/paddle_billing/Notifications/Entities/Shared/PayoutTotalsAdjustment.py index f458e800..7c3e063d 100644 --- a/paddle_billing/Notifications/Entities/Shared/PayoutTotalsAdjustment.py +++ b/paddle_billing/Notifications/Entities/Shared/PayoutTotalsAdjustment.py @@ -15,6 +15,7 @@ class PayoutTotalsAdjustment: chargeback_fee: ChargebackFee | None earnings: str currency_code: CurrencyCodePayouts + retained_fee: str | None @staticmethod def from_dict(data: dict[str, Any]) -> PayoutTotalsAdjustment: @@ -26,4 +27,5 @@ def from_dict(data: dict[str, Any]) -> PayoutTotalsAdjustment: chargeback_fee=ChargebackFee.from_dict(data["chargeback_fee"]) if data.get("chargeback_fee") else None, earnings=data["earnings"], currency_code=CurrencyCodePayouts(data["currency_code"]), + retained_fee=data.get("retained_fee"), ) diff --git a/paddle_billing/Notifications/Entities/Shared/TransactionPayoutTotalsAdjusted.py b/paddle_billing/Notifications/Entities/Shared/TransactionPayoutTotalsAdjusted.py index cea84e11..6f4a8ff3 100644 --- a/paddle_billing/Notifications/Entities/Shared/TransactionPayoutTotalsAdjusted.py +++ b/paddle_billing/Notifications/Entities/Shared/TransactionPayoutTotalsAdjusted.py @@ -16,6 +16,7 @@ class TransactionPayoutTotalsAdjusted: earnings: str currency_code: CurrencyCodePayouts exchange_rate: str | None + retained_fee: str | None @staticmethod def from_dict(data: dict[str, Any]) -> TransactionPayoutTotalsAdjusted: @@ -28,4 +29,5 @@ def from_dict(data: dict[str, Any]) -> TransactionPayoutTotalsAdjusted: earnings=data["earnings"], currency_code=CurrencyCodePayouts(data["currency_code"]), exchange_rate=data.get("exchange_rate"), + retained_fee=data.get("retained_fee"), ) diff --git a/paddle_billing/Notifications/Entities/Shared/TransactionTotalsAdjusted.py b/paddle_billing/Notifications/Entities/Shared/TransactionTotalsAdjusted.py index ea62a629..e8fbc8d9 100644 --- a/paddle_billing/Notifications/Entities/Shared/TransactionTotalsAdjusted.py +++ b/paddle_billing/Notifications/Entities/Shared/TransactionTotalsAdjusted.py @@ -14,6 +14,7 @@ class TransactionTotalsAdjusted: fee: str | None earnings: str | None currency_code: CurrencyCode + retained_fee: str | None @staticmethod def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted: @@ -25,4 +26,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted: fee=data.get("fee"), earnings=data.get("earnings"), currency_code=CurrencyCode(data["currency_code"]), + retained_fee=data.get("retained_fee"), ) diff --git a/tests/Functional/Resources/Adjustments/_fixtures/response/full_entity.json b/tests/Functional/Resources/Adjustments/_fixtures/response/full_entity.json index 6058bb27..851d7a0f 100644 --- a/tests/Functional/Resources/Adjustments/_fixtures/response/full_entity.json +++ b/tests/Functional/Resources/Adjustments/_fixtures/response/full_entity.json @@ -41,7 +41,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "92", @@ -49,7 +50,8 @@ "total": "2049", "fee": "20", "earnings": "2029", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2023-08-21T13:57:15.489634Z", "updated_at": "0001-01-01T00:00:00Z", diff --git a/tests/Functional/Resources/Adjustments/_fixtures/response/list_default.json b/tests/Functional/Resources/Adjustments/_fixtures/response/list_default.json index 6909dbb8..019eda30 100644 --- a/tests/Functional/Resources/Adjustments/_fixtures/response/list_default.json +++ b/tests/Functional/Resources/Adjustments/_fixtures/response/list_default.json @@ -30,7 +30,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "92", @@ -38,7 +39,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2023-08-21T13:57:15.489634Z", "updated_at": "2023-08-21T13:57:15.489634Z", @@ -90,7 +92,8 @@ "total": "163297", "fee": "8215", "earnings": "141771", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "149986", @@ -98,7 +101,8 @@ "total": "163297", "fee": "8215", "earnings": "141771", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2023-08-21T11:25:13.138521Z", "updated_at": "2023-08-21T11:25:13.138521Z", @@ -150,7 +154,8 @@ "total": "71984", "fee": "3631", "earnings": "56356", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "59987", @@ -158,7 +163,8 @@ "total": "71984", "fee": "3631", "earnings": "56356", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2023-08-11T14:46:04.811464Z", "updated_at": "2023-08-11T14:46:05.13404Z", @@ -210,7 +216,8 @@ "total": "35986", "fee": "1837", "earnings": "28151", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "29988", @@ -218,7 +225,8 @@ "total": "35986", "fee": "1837", "earnings": "28151", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2023-08-11T14:15:01.225381Z", "updated_at": "2023-08-11T14:15:03.54843Z", @@ -288,7 +296,8 @@ "total": "76990", "fee": "3897", "earnings": "66094", - "currency_code": "AUD" + "currency_code": "AUD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "45120", @@ -296,7 +305,8 @@ "total": "49633", "fee": "2512", "earnings": "42608", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2023-06-30T13:46:24.240375Z", "updated_at": "2023-06-30T13:46:24.240376Z", diff --git a/tests/Functional/Resources/Adjustments/_fixtures/response/minimal_entity.json b/tests/Functional/Resources/Adjustments/_fixtures/response/minimal_entity.json index d6fea647..c7b98e6d 100644 --- a/tests/Functional/Resources/Adjustments/_fixtures/response/minimal_entity.json +++ b/tests/Functional/Resources/Adjustments/_fixtures/response/minimal_entity.json @@ -29,7 +29,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "92", @@ -37,7 +38,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2023-08-21T13:57:15.489634Z", "updated_at": "0001-01-01T00:00:00Z", diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/adjustment.created.json b/tests/Functional/Resources/Simulations/_fixtures/payload/adjustment.created.json index 391ea49c..6c6d0431 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/adjustment.created.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/adjustment.created.json @@ -23,7 +23,8 @@ "total": "100", "earnings": "87", "subtotal": "92", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2024-04-15T08:48:20.239695Z", "updated_at": "2024-04-15T08:48:20.239695Z", @@ -39,7 +40,8 @@ "total": "100", "earnings": "87", "subtotal": "92", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y", "subscription_id": "sub_01hvccbx32q2gb40sqx7n42430", diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/adjustment.updated.json b/tests/Functional/Resources/Simulations/_fixtures/payload/adjustment.updated.json index d1c34a93..28228956 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/adjustment.updated.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/adjustment.updated.json @@ -23,7 +23,8 @@ "total": "100", "earnings": "87", "subtotal": "92", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2024-04-15T08:48:20.239695Z", "updated_at": "2024-04-15T08:54:10.646377Z", @@ -39,7 +40,8 @@ "total": "100", "earnings": "87", "subtotal": "92", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y", "subscription_id": "sub_01hvccbx32q2gb40sqx7n42430", diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.billed.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.billed.json index 695cb6a1..a2566ebd 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.billed.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.billed.json @@ -236,7 +236,8 @@ "earnings": "0", "subtotal": "2537910", "grand_total": "2763149", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.canceled.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.canceled.json index 30012da6..ff894336 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.canceled.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.canceled.json @@ -236,7 +236,8 @@ "earnings": "0", "subtotal": "2537910", "grand_total": "2763149", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.completed.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.completed.json index 20813c12..0cc9f88e 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.completed.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.completed.json @@ -253,7 +253,8 @@ "earnings": "56589", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.created.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.created.json index 7be7c4c4..e87249e0 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.created.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.created.json @@ -239,7 +239,8 @@ "earnings": "0", "subtotal": "47924", "grand_total": "57509", - "currency_code": "GBP" + "currency_code": "GBP", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.paid.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.paid.json index 1f455cd0..6bbd91fd 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.paid.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.paid.json @@ -239,7 +239,8 @@ "earnings": "0", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.past_due.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.past_due.json index 2001222d..55b19811 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.past_due.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.past_due.json @@ -203,7 +203,8 @@ "earnings": "0", "subtotal": "40000", "grand_total": "43549", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.payment_failed.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.payment_failed.json index ff3e544a..28b5c82e 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.payment_failed.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.payment_failed.json @@ -239,7 +239,8 @@ "earnings": "0", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.ready.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.ready.json index e1338345..5296f242 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.ready.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.ready.json @@ -239,7 +239,8 @@ "earnings": "0", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.revised.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.revised.json index f7b00edb..de2b2815 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.revised.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.revised.json @@ -239,7 +239,8 @@ "earnings": "0", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.updated.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.updated.json index 36c94520..df408eb2 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.updated.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.updated.json @@ -236,7 +236,8 @@ "earnings": "0", "subtotal": "2537910", "grand_total": "2763149", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "adjusted_payout_totals": null }, diff --git a/tests/Functional/Resources/Simulations/_fixtures/request/adjustment_updated_payload.json b/tests/Functional/Resources/Simulations/_fixtures/request/adjustment_updated_payload.json index 3ec5b3dc..76916ea1 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/request/adjustment_updated_payload.json +++ b/tests/Functional/Resources/Simulations/_fixtures/request/adjustment_updated_payload.json @@ -28,7 +28,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "chargeback_fee": { @@ -43,7 +44,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2024-04-15T08:48:20.239695Z", "updated_at": "2024-04-15T08:48:20.239695Z" diff --git a/tests/Functional/Resources/Simulations/_fixtures/request/update_full.json b/tests/Functional/Resources/Simulations/_fixtures/request/update_full.json index bffca547..87ffbd24 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/request/update_full.json +++ b/tests/Functional/Resources/Simulations/_fixtures/request/update_full.json @@ -33,7 +33,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "chargeback_fee": { @@ -48,7 +49,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2024-04-15T08:48:20.239695Z", "updated_at": "2024-04-15T08:48:20.239695Z" diff --git a/tests/Functional/Resources/Simulations/_fixtures/response/full_entity_adjustment_updated.json b/tests/Functional/Resources/Simulations/_fixtures/response/full_entity_adjustment_updated.json index ddf035ea..d15dbc7d 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/response/full_entity_adjustment_updated.json +++ b/tests/Functional/Resources/Simulations/_fixtures/response/full_entity_adjustment_updated.json @@ -35,7 +35,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "92", @@ -43,7 +44,8 @@ "total": "100", "fee": "5", "earnings": "87", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2024-04-15T08:48:20.239695Z", "updated_at": "2024-04-15T08:48:20.239695Z" diff --git a/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity_with_includes.json b/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity_with_includes.json index 69aa43ff..9fc9b206 100644 --- a/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity_with_includes.json +++ b/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity_with_includes.json @@ -155,7 +155,8 @@ "total": "97987", "fee": "4949", "earnings": "85051", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } } ] diff --git a/tests/Functional/Resources/Subscriptions/_fixtures/response/get_payment_method_change_transaction_entity.json b/tests/Functional/Resources/Subscriptions/_fixtures/response/get_payment_method_change_transaction_entity.json index 214ddd0c..c1055eef 100644 --- a/tests/Functional/Resources/Subscriptions/_fixtures/response/get_payment_method_change_transaction_entity.json +++ b/tests/Functional/Resources/Subscriptions/_fixtures/response/get_payment_method_change_transaction_entity.json @@ -97,7 +97,8 @@ "grand_total": "0", "fee": "0", "earnings": "0", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_charge_full_entity.json b/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_charge_full_entity.json index 3e4d6a29..b0a4f5db 100644 --- a/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_charge_full_entity.json +++ b/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_charge_full_entity.json @@ -500,7 +500,8 @@ "total": "43546", "fee": "2211", "earnings": "37786", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } } ] diff --git a/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_update_full_entity.json b/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_update_full_entity.json index f070ae76..c4748379 100644 --- a/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_update_full_entity.json +++ b/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_update_full_entity.json @@ -351,7 +351,8 @@ "total": "43546", "fee": "2211", "earnings": "37786", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } } ] @@ -557,7 +558,8 @@ "total": "43546", "fee": "2211", "earnings": "37786", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } } ] diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/full_entity.json b/tests/Functional/Resources/Transactions/_fixtures/response/full_entity.json index 0c28bbbf..08f1381a 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/full_entity.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/full_entity.json @@ -113,7 +113,8 @@ "grand_total": "2915", "fee": "0", "earnings": "0", - "currency_code": "GBP" + "currency_code": "GBP", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/full_entity_with_includes.json b/tests/Functional/Resources/Transactions/_fixtures/response/full_entity_with_includes.json index 65eb9c4a..bb67cded 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/full_entity_with_includes.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/full_entity_with_includes.json @@ -113,7 +113,8 @@ "grand_total": "2915", "fee": "0", "earnings": "0", - "currency_code": "GBP" + "currency_code": "GBP", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/list_default.json b/tests/Functional/Resources/Transactions/_fixtures/response/list_default.json index baf9381f..d3185c81 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/list_default.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/list_default.json @@ -150,7 +150,8 @@ "grand_total": "901387", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -405,7 +406,8 @@ "grand_total": "72479", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -660,7 +662,8 @@ "grand_total": "59900", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -865,7 +868,8 @@ "grand_total": "40000", "fee": "2050", "earnings": "37950", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "40000", @@ -893,7 +897,8 @@ }, "earnings": "37950", "currency_code": "USD", - "exchange_rate": "0.70194147" + "exchange_rate": "0.70194147", + "retained_fee": "0" }, "line_items": [ { @@ -1091,7 +1096,8 @@ "grand_total": "5000", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -1248,7 +1254,8 @@ "grand_total": "43549", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_one.json b/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_one.json index 0dec7189..4310c98d 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_one.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_one.json @@ -148,7 +148,8 @@ "grand_total": "901387", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -397,7 +398,8 @@ "grand_total": "72479", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -646,7 +648,8 @@ "grand_total": "59900", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -851,7 +854,8 @@ "grand_total": "40000", "fee": "2050", "earnings": "37950", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "40000", @@ -878,8 +882,9 @@ "original": null }, "earnings": "37950", - "currency_code": "USD", - "exchange_rate": "0.70194147" + "currency_code": "USD", + "exchange_rate": "0.70194147", + "retained_fee": "0" }, "line_items": [ { @@ -1057,7 +1062,8 @@ "grand_total": "5000", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -1214,7 +1220,8 @@ "grand_total": "43549", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_two.json b/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_two.json index d844c00a..94aa826d 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_two.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_two.json @@ -148,7 +148,8 @@ "grand_total": "901387", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -397,7 +398,8 @@ "grand_total": "72479", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -646,7 +648,8 @@ "grand_total": "59900", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -851,7 +854,8 @@ "grand_total": "40000", "fee": "2050", "earnings": "37950", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": { "subtotal": "40000", @@ -879,7 +883,8 @@ }, "earnings": "37950", "currency_code": "USD", - "exchange_rate": "0.70194147" + "exchange_rate": "0.70194147", + "retained_fee": "0" }, "line_items": [ { @@ -1057,7 +1062,8 @@ "grand_total": "5000", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -1214,7 +1220,8 @@ "grand_total": "43549", "fee": null, "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/minimal_entity.json b/tests/Functional/Resources/Transactions/_fixtures/response/minimal_entity.json index 9f5578d4..dd289765 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/minimal_entity.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/minimal_entity.json @@ -81,7 +81,8 @@ "grand_total": "0", "fee": "0", "earnings": "0", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Unit/Entities/_fixtures/notification/entity/adjustment.created.json b/tests/Unit/Entities/_fixtures/notification/entity/adjustment.created.json index 8643f369..7655237f 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/adjustment.created.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/adjustment.created.json @@ -23,7 +23,8 @@ "total": "100", "earnings": "87", "subtotal": "92", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2024-04-15T08:48:20.239695Z", "updated_at": "2024-04-15T08:48:20.239695Z", @@ -36,7 +37,8 @@ "earnings": "87", "subtotal": "92", "currency_code": "USD", - "chargeback_fee": null + "chargeback_fee": null, + "retained_fee": "0" }, "transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y", "subscription_id": "sub_01hvccbx32q2gb40sqx7n42430", diff --git a/tests/Unit/Entities/_fixtures/notification/entity/adjustment.updated.json b/tests/Unit/Entities/_fixtures/notification/entity/adjustment.updated.json index 262c5634..73060445 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/adjustment.updated.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/adjustment.updated.json @@ -23,7 +23,8 @@ "total": "100", "earnings": "87", "subtotal": "92", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" }, "created_at": "2024-04-15T08:48:20.239695Z", "updated_at": "2024-04-15T08:54:10.646377Z", @@ -36,7 +37,8 @@ "earnings": "87", "subtotal": "92", "currency_code": "USD", - "chargeback_fee": null + "chargeback_fee": null, + "retained_fee": "0" }, "transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y", "subscription_id": "sub_01hvccbx32q2gb40sqx7n42430", diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.billed.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.billed.json index c83c49dc..0cd9d0f3 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.billed.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.billed.json @@ -237,7 +237,8 @@ "earnings": "0", "subtotal": "2537910", "grand_total": "2763149", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } }, "checkout": { diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.canceled.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.canceled.json index 3cd1ecf6..be97ead0 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.canceled.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.canceled.json @@ -237,7 +237,8 @@ "earnings": "0", "subtotal": "2537910", "grand_total": "2763149", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } }, "checkout": { diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.completed.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.completed.json index 355193b6..37623a2b 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.completed.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.completed.json @@ -254,7 +254,8 @@ "earnings": "56589", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } }, "checkout": { diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.created.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.created.json index 9da6342e..fce9056d 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.created.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.created.json @@ -240,7 +240,8 @@ "earnings": "0", "subtotal": "47924", "grand_total": "57509", - "currency_code": "GBP" + "currency_code": "GBP", + "retained_fee": "0" } }, "checkout": { diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.paid.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.paid.json index 8fc81b20..52ef9095 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.paid.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.paid.json @@ -240,7 +240,8 @@ "earnings": "0", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } }, "checkout": { diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.past_due.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.past_due.json index 1b2a9b8c..a2af329b 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.past_due.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.past_due.json @@ -204,7 +204,8 @@ "earnings": "0", "subtotal": "40000", "grand_total": "43549", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } }, "checkout": { diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.payment_failed.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.payment_failed.json index 4886c9c6..41bed503 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.payment_failed.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.payment_failed.json @@ -240,7 +240,8 @@ "earnings": "0", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } }, "checkout": { diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.ready.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.ready.json index 013b88cd..353e1c9e 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.ready.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.ready.json @@ -240,7 +240,8 @@ "earnings": "0", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } }, "checkout": { diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.revised.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.revised.json index 18a335f2..d33c293b 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.revised.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.revised.json @@ -257,7 +257,8 @@ "earnings": "56589", "subtotal": "59900", "currency_code": "USD", - "exchange_rate": "0.70194147" + "exchange_rate": "0.70194147", + "retained_fee": "0" }, "adjusted_totals": { "fee": "3311", @@ -266,7 +267,8 @@ "earnings": "56589", "subtotal": "59900", "grand_total": "65215", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } }, "checkout": { diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.updated.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.updated.json index 8f2b915f..b211984f 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.updated.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.updated.json @@ -237,7 +237,8 @@ "earnings": "0", "subtotal": "2537910", "grand_total": "2763149", - "currency_code": "USD" + "currency_code": "USD", + "retained_fee": "0" } }, "checkout": {