Skip to content

Commit

Permalink
docs(release): 0.3.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeymike committed Feb 9, 2024
1 parent 97f8baa commit 012ace0
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 1 deletion.
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<Entity>` and `<Entity>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
Expand Down
57 changes: 57 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<Entity>` and `<Entity>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 `<type>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`.
Expand Down
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 012ace0

Please sign in to comment.