From 012ace06d0e6346ef7a9934f18ca6a62346d9bb8 Mon Sep 17 00:00:00 2001 From: Michael Woodward Date: Fri, 2 Feb 2024 13:35:19 +0000 Subject: [PATCH] docs(release): 0.3.0 release --- CHANGELOG.md | 40 +++++++++++++++++++++++++++++++++++ UPGRADING.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/Client.php | 2 +- 3 files changed, 98 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60036e9..6326cfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,46 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-php-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools. +## [0.3.0] - 2024-02-01 + +### Added + +- Support for installing within Symfony 7 projects +- `EventTypeName` enum support for `customer.imported`, `address.imported` and `business.imported` +- `ReportFilterName` enum support for `action` +- `payment_method_id` to `TransactionPaymentAttempt` entity for Transaction payments +- List credit balances for a customer now supports filtering by `currency_code` +- Support for `receipt_data` on create and preview of a one-time charge for Subscriptions +- Support for `receipt_data` on Transactions +- Support for `import_meta` on Subscription notifications +- Support for `import_meta` and `custom_data` on Discount notifications + +### Fixed + +- Using the correct arguments for testing a Notification list `from` in `NotificationsClientTest` +- Refactored out duplicate entities where both `` and `WithIncludes` existed +- Renamed `AdjustmentsAdjustmentCollection` to `AdjustmentCollection` so it aligns with naming conventions +- Renamed Report objects for consistency within the SDK +- PHPCS has been upgraded and configured for `nullable_type_declaration` as well as `ordered_types` +- `ListNotification` operation uses consistent naming conventions with other operations +- Correct type of `current_billing_period` for Subscription notifications to be nullable +- Subscription preview fields `immediate_transaction`, `next_transaction` and `recurring_transaction_details` are optional +- `Transaction` entity now re-uses `Adjustment` entity for the `adjustments` field +- `SubscriptionNextTransaction` now maps `adjustments` to `SubscriptionAdjustmentPreview` objects +- Shared objects between `SubscriptionAdjustmentItem` and `AdjustmentItem` have been consolidated into the `Shared` namespace +- Conflicting request object `AdjustmentItem` has moved into the Operations namespace +- Make `currentBillingPeriod` nullable for Subscription notifications +- Status enums use consistent naming for `AdjustmentStatus`, `TransactionStatus` and `PaymentAttemptStatus` +- Renamed `TotalAdjustments` to `AdjustmentTotals` to align with naming conventions + +### Deprecated + +- `stored_payment_method_id` on `TransactionPaymentAttempt`, use `payment_method_id` instead + +### Removed + +- Unused Subscription objects have been removed, `SubscriptionTransaction`, `SubscriptionAdjustment` and `SubscriptionsTransactionCollection` + ## [0.2.2] - 2024-01-29 ### Fixed diff --git a/UPGRADING.md b/UPGRADING.md index 4f20cf7..8558872 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -2,6 +2,63 @@ All breaking changes prior to v1 will be documented in this file to assist with upgrading. +## v0.3.0 + +This version introduces several breaking changes. + +- Renamed classes to align with naming conventions + +`AdjustmentsAdjustmentCollection` => `AdjustmentCollection` +`TotalAdjustments` => `AdjustmentTotals` +`StatusAdjustment` => `AdjustmentStatus` +`StatusTransaction` => `TransactionStatus` +`StatusPaymentAttempt` => `PaymentAttemptStatus` + +Any usages of the previous class names should be refactored accordingly to avoid a class not found error. + +- Refactored out duplicate entities where both `` and `WithIncludes` existed + +Any typing on the following classes should be updated accordingly: + +`\Paddle\SDK\Entities\CustomerWithIncludes` => `\Paddle\SDK\Entities\Customer` +`\Paddle\SDK\Entities\PriceWithIncludes` => `\Paddle\SDK\Entities\Price` +`\Paddle\SDK\Entities\ProductWithIncludes` => `\Paddle\SDK\Entities\Product` +`\Paddle\SDK\Entities\SubscriptionWithIncludes` => `\Paddle\SDK\Entities\Subscription` +`\Paddle\SDK\Entities\TransactionWithIncludes` => `\Paddle\SDK\Entities\Transaction` +`\Paddle\SDK\Entities\TransactionWithIncludes` => `\Paddle\SDK\Entities\Transaction` +`\Paddle\SDK\Entities\Collections\CustomerIncludesCollection` => `\Paddle\SDK\Entities\Collections\CustomerCollection` +`\Paddle\SDK\Entities\Collections\PriceWithIncludesCollection` => `\Paddle\SDK\Entities\Collections\PriceCollection` +`\Paddle\SDK\Entities\Collections\ProductWithIncludesCollection` => `\Paddle\SDK\Entities\Collections\ProductCollection` +`\Paddle\SDK\Entities\Collections\SubscriptionWithIncludesCollection` => `\Paddle\SDK\Entities\Collections\SubscriptionCollection` +`\Paddle\SDK\Entities\Collections\TransactionWithIncludesCollection` => `\Paddle\SDK\Entities\Collections\TransactionCollection` + +- Report entity objects were renamed for better consistency with the SDK and prevent confusion. + +Any typing on the following classes should be updated accordingly: + +`\Paddle\SDK\Entities\Report\ReportFilters` => `\Paddle\SDK\Entities\Report\ReportFilter` +`\Paddle\SDK\Entities\Report\ReportName` => `\Paddle\SDK\Entities\Report\ReportFilterName` +`\Paddle\SDK\Entities\Report\ReportOperator` => `\Paddle\SDK\Entities\Report\ReportFilterOperator` + +- Adjustment and Subscription Preview Adjustment objects were refactored for consistency + +Any typing of the following classes should be updated accordingly: + +`\Paddle\SDK\Entities\Adjustment\AdjustmentItemTotals` => `\Paddle\SDK\Entities\Adjustment\AdjustmentItem` +`\Paddle\SDK\Entities\Adjustment\AdjustmentProration` => `\Paddle\SDK\Entities\Shared\AdjustmentProration` +`\Paddle\SDK\Entities\Adjustment\AdjustmentTimePeriod` => `\Paddle\SDK\Entities\Shared\AdjustmentTimePeriod` +`\Paddle\SDK\Entities\Adjustment\AdjustmentType` => `\Paddle\SDK\Entities\Shared\AdjustmentType` +`\Paddle\SDK\Entities\Subscription\SubscriptionProration` => `\Paddle\SDK\Entities\Shared\AdjustmentProration` +`\Paddle\SDK\Entities\Transaction\TransactionAdjustment` => `Paddle\SDK\Entities\Adjustment` + +- Conflicting request object `AdjustmentItem` has moved into the Operations namespace + +The type has changed when creating an Adjustment using the `CreateAdjustment` operation. To create an Adjustment you must now use the `\Paddle\SDK\Resources\Adjustments\Operations\Create\AdjustmentItem` instance for `items`. + +- Core entities (classes implementing `Entity`) are marked @internal and constructors are `protected` + +Any direct usage of these classes is not supported functionality by the SDK and has been removed to reduce the surface area for breaking changes. + ## v0.2.0 This version includes a breaking change to the naming of operations. Prior to this version operations were commonly named `Operation`, e.g. `CreateOperation` which posed problems when using more than one resource such as when creating a product and price. The new naming convention includes the resource to prevent the need of aliasing in these circumstances. e.g. `CreatePrice` and `CreateProduct`. diff --git a/src/Client.php b/src/Client.php index 64cb3a7..5642233 100644 --- a/src/Client.php +++ b/src/Client.php @@ -51,7 +51,7 @@ class Client { - private const SDK_VERSION = '0.2.2'; + private const SDK_VERSION = '0.3.0'; public readonly LoggerInterface $logger; public readonly Options $options;