Calculate contracts in first billing cycle#4297
Draft
fatmaebrahim wants to merge 4 commits intodevelopmentfrom
Draft
Calculate contracts in first billing cycle#4297fatmaebrahim wants to merge 4 commits intodevelopmentfrom
fatmaebrahim wants to merge 4 commits intodevelopmentfrom
Conversation
Contributor
why? If you have enough balance, you will get the discount no matter the billing cycle number |
0oM4R
reviewed
Jul 20, 2025
| const gqlConsumption: GqlConsumption = response["data"] as GqlConsumption; | ||
| const billReports = gqlConsumption.contractBillReports; | ||
| if (billReports.length === 0) { | ||
| const contractCostUSD = await this.getContractCost(contract, proxy); |
Contributor
There was a problem hiding this comment.
no need to pass the contract only proxy client can handle that
const contract = (await proxy.contracts.list({ contractId: options.id }))[0];
0oM4R
requested changes
Jul 20, 2025
| async getConsumption( | ||
| options: GetConsumptionOptions, | ||
| contract: Contract, | ||
| proxy: GridProxyClient, |
Contributor
There was a problem hiding this comment.
We may have a new function called, for example, getConsumptionWithEstimation,
As these changes will break the current usage of this function in other places, and maybe in other clients
Contributor
|
Test scenarios:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Calculated the contract cost to be used as the billing rate instead of the consumption in the first billing cycle
Changes
Related Issues
Tested Scenarios
Documentation PR
For UI changes, Please provide the Documentation PR on info_grid
To consider
Preliminary Checks:
UI Checks:
Code Quality Checks:
Testing Checklist
General Checklist