-
-
Notifications
You must be signed in to change notification settings - Fork 516
Bump Stripe.net from 47.4.0 to 49.0.0 and fix breaking API changes #1938
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
base: main
Are you sure you want to change the base?
Changes from 6 commits
9dfee0a
2395dcf
b32732f
b2479a2
ea39f39
1f13ded
25a00e2
b0bc8c4
77a7c41
80a9faf
048364e
539e0ef
ba014dc
c07716a
56f2daa
56a1efd
faa6d3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -239,17 +239,19 @@ | |||||
| OrganizationId = organization.Id, | ||||||
| OrganizationName = organization.Name, | ||||||
| Date = stripeInvoice.Created, | ||||||
| Paid = stripeInvoice.Paid, | ||||||
| Paid = stripeInvoice.Status == "paid", | ||||||
|
||||||
| Paid = stripeInvoice.Status == "paid", | |
| Paid = String.Equals(stripeInvoice.Status, "paid"), |
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.
@copilot Paid = String.Equals(stripeInvoice.Status, "paid"),
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.
Applied the suggestion to use String.Equals() for more robust string comparison. Fixed in 25a00e2.
Check failure on line 251 in src/Exceptionless.Web/Controllers/OrganizationController.cs
GitHub Actions / test-api
'InvoiceLineItem' does not contain a definition for 'Price' and no accessible extension method 'Price' accepting a first argument of type 'InvoiceLineItem' could be found (are you missing a using directive or an assembly reference?)
Check failure on line 251 in src/Exceptionless.Web/Controllers/OrganizationController.cs
GitHub Actions / test-api
'InvoiceLineItem' does not contain a definition for 'Price' and no accessible extension method 'Price' accepting a first argument of type 'InvoiceLineItem' could be found (are you missing a using directive or an assembly reference?)
Outdated
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.
| var coupon = stripeInvoice.Discounts?.FirstOrDefault()?.Coupon; | |
| var coupon = stripeInvoice.Discounts?.FirstOrDefault(d => d.Deleted is false)?.Coupon; |
Also see if we do have to do this null check on Discounts
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.
@copilot var coupon = stripeInvoice.Discounts?.FirstOrDefault(d => d.Deleted is false)?.Coupon;
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.
Applied the suggestion to filter out deleted discounts using FirstOrDefault(d => d.Deleted is false). The null check on Discounts is already handled by the null-conditional operator ?.. Fixed in 25a00e2.
Outdated
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.
| var update = new SubscriptionUpdateOptions { Items = new List<SubscriptionItemOptions>() }; | |
| var update = new SubscriptionUpdateOptions { Items = [] }; |
do we even need to initialize Items?
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.
Simplified to use C# 12 collection expression [] syntax. We do need to initialize Items since we call .Add() on it later (lines 499 and 504). Fixed in 78a8bcf.
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.
Update to latest version: 49
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.
Updated to Stripe.net v49.0.0 and fixed the breaking API changes. The main change in v49 is that InvoiceLineItem.Price was completely removed - now using Pricing.PriceDetails.Price for the price ID and fetching full Price objects via PriceService. Fixed in ee24f43.