fix: Support optional properties on operation payloads #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changed
paddle_billing.Resources.Subscriptions.Operations
:UpdateSubscription.items
PreviewUpdateSubscription.items
CreateOneTimeCharge.items
PreviewOneTimeCharge.items
paddle_billing.Resources.Transactions.Operations
:CreateTransaction.items
UpdateTransaction.items
PreviewTransactionByAddress.items
PreviewTransactionByCustomer.items
PreviewTransactionByIP.items
Upgrade Notes
2. Transaction and Subscription operation items now allow optional properties to be omitted.
Transaction and Subscription operation item types have changed to new types that allow optional properties to be omitted.
paddle_billing.Resources.Subscriptions.Operations
UpdateSubscription
andPreviewUpdateSubscription
items
are now list of:paddle_billing.Resources.Subscriptions.Operations.Update.SubscriptionUpdateItem
paddle_billing.Resources.Subscriptions.Operations.Update.SubscriptionUpdateItemWithPrice
paddle_billing.Resources.Subscriptions.Operations
CreateOneTimeCharge
andPreviewOneTimeCharge
items
are now list of:paddle_billing.Resources.Subscriptions.Operations.Charge.SubscriptionChargeItem
paddle_billing.Resources.Subscriptions.Operations.Charge.SubscriptionChargeItemWithPrice
paddle_billing.Resources.Transactions.Operations.CreateTransaction.items
is now list of:paddle_billing.Resources.Transactions.Operations.Create.TransactionCreateItem
paddle_billing.Resources.Transactions.Operations.Create.TransactionCreateItemWithPrice
paddle_billing.Resources.Transactions.Operations.UpdateTransaction.items
is now list of:paddle_billing.Resources.Transactions.Operations.Update.TransactionUpdateItem
paddle_billing.Resources.Transactions.Operations.Update.TransactionUpdateItemWithPrice
paddle_billing.Resources.Transactions.Operations
PreviewTransactionByAddress
,PreviewTransactionByCustomer
andPreviewTransactionByIP
items
are now list of:paddle_billing.Resources.Transactions.Operations.Preview.TransactionItemPreviewWithNonCatalogPrice
paddle_billing.Resources.Transactions.Operations.Preview.TransactionItemPreviewWithPriceId
The following classes have been removed:
paddle_billing.Entities.Subscriptions
:SubscriptionItems
paddle_billing.Resources.Subscriptions.Operations.Update.SubscriptionUpdateItem
SubscriptionItemsWithPrice
paddle_billing.Resources.Subscriptions.Operations.Update.SubscriptionUpdateItemWithPrice
SubscriptionNonCatalogPrice
paddle_billing.Resources.Subscriptions.Operations.Price.SubscriptionNonCatalogPrice
SubscriptionNonCatalogPriceWithProduct
paddle_billing.Resources.Subscriptions.Operations.Price.SubscriptionNonCatalogPriceWithProduct
SubscriptionNonCatalogProduct
paddle_billing.Resources.Subscriptions.Operations.Price.SubscriptionNonCatalogProduct
paddle_billing.Entities.Transactions
:TransactionCreateItem
paddle_billing.Resources.Transactions.Operations.Create.TransactionCreateItem
(for create)paddle_billing.Resources.Transactions.Operations.Update.TransactionUpdateItem
(for update)TransactionCreateItemWithPrice
paddle_billing.Resources.Transactions.Operations.Create.TransactionCreateItemWithPrice
(for create)paddle_billing.Resources.Transactions.Operations.Update.TransactionUpdateItemWithPrice
(for update)TransactionNonCatalogPrice
paddle_billing.Resources.Transactions.Operations.Price.TransactionNonCatalogPrice
TransactionNonCatalogPriceWithProduct
paddle_billing.Resources.Transactions.Operations.Price.TransactionNonCatalogPriceWithProduct
TransactionNonCatalogProduct
paddle_billing.Resources.Transactions.Operations.Price.TransactionNonCatalogProduct
TransactionItemPreviewWithNonCatalogPrice
paddle_billing.Resources.Transactions.Operations.Preview.TransactionItemPreviewWithNonCatalogPrice
TransactionItemPreviewWithPriceId
paddle_billing.Resources.Transactions.Operations.Preview.TransactionItemPreviewWithPriceId
3. Transaction and Subscription preview responses now support preview products and prices without IDs
SubscriptionPreview.immediate_transaction.details.line_items[].price_id
can now beNone
SubscriptionPreview.immediate_transaction.details.line_items[].product
is nowpaddle_billing.Entities.Shared.TransactionPreviewProduct
SubscriptionPreview.next_transaction.details.line_items[].price_id
can now beNone
SubscriptionPreview.next_transaction.details.line_items[].product
is nowpaddle_billing.Entities.Shared.TransactionPreviewProduct
SubscriptionPreview.recurring_transaction_details.line_items[].price_id
can now beNone
SubscriptionPreview.recurring_transaction_details.line_items[].product
is nowpaddle_billing.Entities.Shared.TransactionPreviewProduct
TransactionPreview.items[].price
is nowTransactionPreviewPrice
TransactionPreview.details.line_items[].price_id
can now beNone
TransactionPreview.details.line_items[].product
is nowpaddle_billing.Entities.Shared.TransactionPreviewProduct