-
Notifications
You must be signed in to change notification settings - Fork 159
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
refactor: billing endpoints #697
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Left a query. Also where are the similar changes for billingAddresses?
@@ -211,7 +211,10 @@ export async function checkPaymentAuthorizationRequired(org: Organization) { | |||
|
|||
export async function paymentExpired(org: Organization) { | |||
if (!org?.paymentMethodId) return; | |||
const payment = await sdk.forConsole.billing.getPaymentMethod(org.paymentMethodId); | |||
const payment = await sdk.forConsole.billing.getOrganizationPaymentMethod( |
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.
Where is this method used?
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 use this on load to check if there are any expired payments
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 need similar changes applied for billingAddress
as well. I don't see those.
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.
@lohanidamodar there's no change because we only fetch all the addresses never only one. If there's also a new endpoint for listing addresses, I wasn't informed and it's not mentioned in the linear task either 🤔 |
How do you display the Organization's assigned billing address? don't you need to fetch the billing address by ID when people are looking at the billing tab for the organization? |
We are already fetching the addressList when we load the page so I'm just finding it among them
|
As we discussed, lets use the new endpoint through |
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.
Looks good. However I think this should target cloud
branch.
No description provided.