Skip to content

APP-4415: Add machine cost protos to billing endpoint #486

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

Merged
merged 6 commits into from
Apr 23, 2024

Conversation

jr22
Copy link
Member

@jr22 jr22 commented Apr 17, 2024

APP-4415

Adding in params for monthly machines + cost per machine per month to GetCurrentMonthUsageResponse so we can show those on the billing page.

Designs for page:
https://www.figma.com/file/2hs9zGWN9nTLqcm8pR38ip/Management?type=design&node-id=6622-7383&mode=design

@jr22 jr22 requested a review from RoxyFarhad April 17, 2024 21:32
@github-actions github-actions bot added the safe to test committer is a member of this org label Apr 17, 2024
@@ -71,6 +71,8 @@ message GetCurrentMonthUsageResponse {
double discount_amount = 8;
double total_usage_with_discount = 9;
double total_usage_without_discount = 10;
double monthly_machines_usage_cost = 11;
double cost_per_machine_per_month = 12;
Copy link
Member

Choose a reason for hiding this comment

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

This field seems unnecessary for the same reason we don't have it for other resources.

Copy link
Member Author

Choose a reason for hiding this comment

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

chatted offline, removing and will omit from FE design as well. users can look at invoice for the sku information like this.

@@ -71,6 +71,8 @@ message GetCurrentMonthUsageResponse {
double discount_amount = 8;
double total_usage_with_discount = 9;
double total_usage_without_discount = 10;
double monthly_machines_usage_cost = 11;
Copy link
Member

Choose a reason for hiding this comment

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

"monthly" is redundant since "Month" is in the message name

nit: "machine_usage_cost" can be vague as it can mean the sum of above costs. something like "total_per_machine_usage_cost" is clearer to me. I don't feel strongly about this.

Copy link
Member Author

Choose a reason for hiding this comment

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

the "total" is a bit confusing because the other fields that start with "total" represent the full total cost whereas this could be one of many SKUs in the future potentially (although i know right now its the only sku applicable for the billing tier with it). made it per_machine_usage_cost instead?

@@ -71,6 +71,7 @@ message GetCurrentMonthUsageResponse {
double discount_amount = 8;
double total_usage_with_discount = 9;
double total_usage_without_discount = 10;
double per_machine_usage_cost = 11;
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should somehow indicate whether or not this field is in use for the current customer. There's a risk of ambiguity if someone has a 0 value for this (did not use their machines) versus being on a different model entirely.

So the question is should this billing.proto communicate what fields are in use given the current tier.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah agreed it could be ambiguous, but also true of any of the other usage counts in this API now. users can see the breakdown of costs in their invoice (along with the cost per unit). we could also add an a separate endpoint at some point that displays the billing tier information?

@jr22 jr22 added ready-for-protos add this when you want protos to compile on every commit and removed ready-for-protos add this when you want protos to compile on every commit labels Apr 23, 2024
@jr22 jr22 removed the ready-for-protos add this when you want protos to compile on every commit label Apr 23, 2024
@jr22 jr22 merged commit cf260f4 into viamrobotics:main Apr 23, 2024
3 checks passed
@jr22 jr22 deleted the APP-4415 branch April 23, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protos-compiled safe to test committer is a member of this org
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants