-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Transaction Preview Price #89
Conversation
7f50dff
to
0b39445
Compare
@@ -16,7 +16,7 @@ | |||
class TransactionItemPreviewWithPrice | |||
{ | |||
private function __construct( | |||
public Price $price, | |||
public Price|TransactionPreviewPrice $price, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make this TransactionPreviewPrice
only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just TransactionPreviewPrice
would make it breaking so lets stick with the union 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The non catalog prices are shared between operations, so have put them in their own namespace Paddle\SDK\Resources\Transactions\Operations\Price
Fixed
TransactionsClient::preview()
TransactionPreview
response now allows null price ID for non-catalog prices:TransactionPreview
items[]->price
can now returnPrice
(withid
) orTransactionPreviewPrice
(with nullableid
)TransactionPreview
details->lineItems[]->priceId
is now nullableAdded
TransactionsClient::create()
now supports operation items with optional properties:Resources\Transactions\Operations\Create\TransactionCreateItem
Resources\Transactions\Operations\Create\TransactionCreateItemWithPrice
TransactionsClient::update()
now supports operation items with optional properties:Resources\Transactions\Operations\Update\TransactionUpdateItem
Resources\Transactions\Operations\Update\TransactionUpdateItemWithPrice
TransactionsClient::preview()
now supports operation items with optional properties:Resources\Transactions\Operations\Preview\TransactionItemPreviewWithNonCatalogPrice
Resources\Transactions\Operations\Preview\TransactionItemPreviewWithPriceId
Deprecated
TransactionsClient::create()
operation items have been deprecated:Entities\Transaction\TransactionCreateItem
Entities\Transaction\TransactionCreateItemWithPrice
TransactionsClient::update()
operation items have been deprecated:Entities\Transaction\TransactionUpdateTransactionItem
TransactionsClient::preview()
operation items have been deprecated:Entities\Transaction\TransactionItemPreviewWithNonCatalogPrice
Entities\Transaction\TransactionItemPreviewWithPriceId
Relates to #87 and #88