Skip to content
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

[euvr] Separate Billing Payment/History APIs #1932

Merged
merged 4 commits into from
Apr 4, 2022

Conversation

vincentsalucci
Copy link
Member

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Because of changes to the UI structure for the Settings -> Subscription components, the GetBilling API needs to be separated in order to maintain components being self-contained for data.
SG-19

Code changes

  • AccountsController.cs: Added billing-history and billing-payment API endpoints
  • BillingHistoryResponseModel.cs: Created response model for housing Invoices and Transactions
  • BillingPaymentResponseModel.cs: Created response model for housing Balance and PaymentSource
  • IPaymentService.cs: Added new methods to interface: GetBillingHistoryAsync and GetBillingBalanceAndSourceAsync
  • StripePaymentService.cs: Cleaned up existing GetBillingAsync method by breaking out different properties into functions that can be used independently. Created new methods GetBillingHistoryAsync and GetBillingBalanceAndSourceAsync for grabbing only the necessary information.

Testing requirements

  • Test new tabs available in Settings -> Subscription
  • Test Organization Settings -> Billing as that will still use the GetBilling API that's in place (backwards-compat)

Before you submit

  • I have checked for formatting errors (dotnet tool run dotnet-format --check) (required)
  • If making database changes - I have also updated Entity Framework queries and/or migrations
  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

@vincentsalucci vincentsalucci requested a review from a team March 30, 2022 17:36
@vincentsalucci vincentsalucci self-assigned this Mar 30, 2022
Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to target this to master?

@@ -640,6 +640,34 @@ public async Task<BillingResponseModel> GetBilling()
return new BillingResponseModel(billingInfo);
}
Copy link
Member

@Hinton Hinton Mar 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this now that it's split into two requests? (I believe we're only fetching it from web which is a place that gets released in sync with server.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While that generally is the case, I feel more comfortable not committing breaking changes to the API at the initial release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a tech debt to remove this before the next release?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created tech debt item and self-assigned for a future release. 👍

src/Api/Controllers/AccountsController.cs Outdated Show resolved Hide resolved
src/Core/Services/Implementations/StripePaymentService.cs Outdated Show resolved Hide resolved
@vincentsalucci vincentsalucci marked this pull request as ready for review March 31, 2022 22:08
@vincentsalucci
Copy link
Member Author

Do we want to target this to master?

Since this is only net-new with no breaking changes, I don't see why not. However, I'm 100% okay with pointing this to an euvr feature branch!

@Hinton Hinton added the hold Hold this PR or item until later; DO NOT MERGE label Apr 4, 2022
@Hinton
Copy link
Member

Hinton commented Apr 4, 2022

Added hold label to ensure we don't merge this before the code freeze elapses.

@vincentsalucci
Copy link
Member Author

rc branches were cut 4/4/2022. Removing hold tag.

@vincentsalucci vincentsalucci removed the hold Hold this PR or item until later; DO NOT MERGE label Apr 4, 2022
@vincentsalucci vincentsalucci merged commit 9a1a754 into master Apr 4, 2022
@vincentsalucci vincentsalucci deleted the feature/subscription branch April 4, 2022 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants