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

Documentation updated for Lots, Events and Credits #14314

Merged
merged 6 commits into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4933,16 +4933,41 @@
"type": "string",
"readOnly": true
},
"creditCurrency": {
"description": "The credit currency of the event.",
"type": "string",
"readOnly": true
},
"billingCurrency": {
"description": "The billing currency of the event.",
"type": "string",
"readOnly": true
},
"reseller": {
"description": "The reseller of the event.",
"readOnly": true,
"$ref": "#/definitions/Reseller"
},
"newCredit": {
"description": "The amount of new credit or commitment for NewCredit or SettleCharges event.",
"readOnly": true,
"$ref": "#/definitions/amount"
},
"newCreditInBillingCurrency": {
"description": "The amount of new credit or commitment for NewCredit or SettleCharges event in billing currency.",
"readOnly": true,
"$ref": "#/definitions/AmountWithExchangeRate"
},
"adjustments": {
"description": "The amount of balance adjustment. The property is not available for ConsumptionCommitment lots.",
"readOnly": true,
"$ref": "#/definitions/amount"
},
"adjustmentsInBillingCurrency": {
"description": "The amount of balance adjustment in billing currency.",
"readOnly": true,
"$ref": "#/definitions/AmountWithExchangeRate"
},
"creditExpired": {
"description": "The amount of expired credit or commitment for NewCredit or SettleCharges event.",
"readOnly": true,
Expand All @@ -4953,11 +4978,21 @@
"readOnly": true,
"$ref": "#/definitions/amount"
},
"chargesInBillingCurrency": {
"description": "The amount of charges for events of type SettleCharges and PendingEligibleCharges in billing currency.",
"readOnly": true,
"$ref": "#/definitions/AmountWithExchangeRate"
},
"closedBalance": {
"description": "The balance after the event. ",
"readOnly": true,
"$ref": "#/definitions/amount"
},
"closedBalanceInBillingCurrency": {
"description": "The balance in billing currency after the event.",
"readOnly": true,
"$ref": "#/definitions/AmountWithExchangeRate"
},
"eventType": {
"description": "Identifies the type of the event.",
"type": "string",
Expand Down Expand Up @@ -4999,6 +5034,11 @@
"description": "Identifies the source of the lot for which the event happened. ",
"type": "string",
"readOnly": true
},
"canceledCredit": {
"description": "Amount of canceled credit.",
"readOnly": true,
"$ref": "#/definitions/Amount"
}
}
},
Expand Down Expand Up @@ -5039,16 +5079,41 @@
"LotProperties": {
"description": "The lot properties.",
"properties": {
"creditCurrency": {
"description": "The currency of the lot.",
"type": "string",
"readOnly": true
},
"billingCurrency": {
"description": "The billing currency of the lot.",
"type": "string",
"readOnly": true
},
"originalAmount": {
"description": "The original amount of a lot.",
"readOnly": true,
"$ref": "#/definitions/amount"
},
"originalAmountInBillingCurrency": {
"description": "The original amount of a lot in billing currency.",
"readOnly": true,
"$ref": "#/definitions/AmountWithExchangeRate"
},
"closedBalance": {
"description": "The balance as of the last invoice.",
"readOnly": true,
"$ref": "#/definitions/amount"
},
"closedBalanceInBillingCurrency": {
"description": "The balance as of the last invoice in billing currency.",
"readOnly": true,
"$ref": "#/definitions/AmountWithExchangeRate"
},
"reseller": {
"description": "The reseller of the lot.",
"readOnly": true,
"$ref": "#/definitions/Reseller"
},
"source": {
"description": "The source of the lot.",
"type": "string",
Expand Down Expand Up @@ -5089,7 +5154,19 @@
"status": {
"description": "The status of the lot.",
"type": "string",
"readOnly": true
"enum": [
"None",
"Active",
"Inactive",
"Expired",
"Complete",
"Canceled"
],
Copy link
Contributor

Choose a reason for hiding this comment

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

The following needs to be added

"x-ms-enum": {
"name": "Status",
"modelAsString": true
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

"readOnly": true,
"x-ms-enum": {
"name": "Status",
"modelAsString": true
}
}
}
},
Expand All @@ -5113,6 +5190,16 @@
"description": "The properties of the credit summary.",
"type": "object",
"properties": {
"creditCurrency": {
"description": "The credit currency.",
"type": "string",
"readOnly": true
},
"billingCurrency": {
"description": "The billing currency.",
"type": "string",
"readOnly": true
},
"balanceSummary": {
"description": "Summary of balances associated with this credit summary.",
"readOnly": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

CreditBalanceSummary definition is missing "EstimatedBalanceInBillingCurrency"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

Expand All @@ -5132,6 +5219,11 @@
"description": "Pending eligible charges.",
"readOnly": true,
"$ref": "#/definitions/amount"
},
"reseller": {
"description": "Reseller.",
"readOnly": true,
"$ref": "#/definitions/Reseller"
}
}
},
Expand All @@ -5143,6 +5235,11 @@
"readOnly": true,
"$ref": "#/definitions/amount"
},
"estimatedBalanceInBillingCurrency": {
"description": "Estimated balance in billing currency.",
"readOnly": true,
"$ref": "#/definitions/AmountWithExchangeRate"
},
"currentBalance": {
"description": "Current balance.",
"readOnly": true,
Expand All @@ -5166,6 +5263,39 @@
}
}
},
"AmountWithExchangeRate": {
"description": "The amount with exchange rate.",
"properties": {
"exchangeRate": {
"description": "The exchange rate.",
"type": "number",
"format": "decimal",
"readOnly": true
},
"exchangeRateMonth": {
"description": "The exchange rate month.",
"type": "integer",
"format": "int32",
"readOnly": true
}
}
},
"Reseller": {
"description": "The reseller properties.",
"type": "object",
"properties": {
"resellerId": {
"description": "The reseller property ID.",
"type": "string",
"readOnly": true
},
"resellerDescription": {
"description": "The reseller property description.",
"type": "string",
"readOnly": true
}
}
},
"Resource": {
"description": "The Resource model definition.",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"name": "balanceSummary1",
"type": "Microsoft.Consumption/credits/balanceSummary",
"properties": {
"creditCurrency": "USD",
"billingCurrency": "USD",
"balanceSummary": {
"estimatedBalance": {
"currency": "USD",
Expand All @@ -32,6 +34,10 @@
"pendingEligibleCharges": {
"currency": "USD",
"value": 0.00
},
"reseller": {
"resellerId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/reseller/reseller1",
"resellerDescription": 1
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
"name": "eventId1",
"type": "Microsoft.Consumption/events",
"properties": {
"newCredit": {
"currency": "USD",
"value": 500
},
"creditExpired": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be canceledCredit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

"currency": "USD",
"value": 200
},
"lotSource": "ConsumptionCommitment",
"lotId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/Microsoft.Consumption/lots/G202001083926600XXXXX",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/X3TD-KVTT-BG7-TGB",
Expand All @@ -34,6 +42,14 @@
"name": "eventId2",
"type": "Microsoft.Consumption/events",
"properties": {
"newCredit": {
"currency": "USD",
"value": 500
},
"creditExpired": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above. This should be canceledCredit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

"currency": "USD",
"value": 200
},
"lotSource": "AzurePrepayment",
"lotId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/Microsoft.Consumption/lots/7004bc39-974d-482e-8e45-caf91dba0870",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/X3TD-KVTT-BG7-TGB",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
"name": "eventId1",
"type": "Microsoft.Consumption/events",
"properties": {
"newCredit": {
"currency": "USD",
"value": 500
},
"creditExpired": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be canceledCredit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

"currency": "USD",
"value": 200
},
"lotSource": "ConsumptionCommitment",
"lotId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/Microsoft.Consumption/lots/G202001083926600XXXXX",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/X3TD-KVTT-BG7-TGB",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"currency": "USD",
"value": 0.00
},
"canceledCredit": {
"currency": "USD",
"value": 5000
},
"adjustments": {
"currency": "USD",
"value": 0.00
Expand Down Expand Up @@ -52,6 +56,10 @@
"currency": "USD",
"value": 400.00
},
"canceledCredit": {
"currency": "USD",
"value": 5000
},
"adjustments": {
"currency": "USD",
"value": 0.00
Expand Down Expand Up @@ -83,6 +91,10 @@
"currency": "USD",
"value": 0.00
},
"canceledCredit": {
"currency": "USD",
"value": 5000
},
"adjustments": {
"currency": "USD",
"value": 0.00
Expand Down Expand Up @@ -114,6 +126,10 @@
"currency": "USD",
"value": 300.00
},
"canceledCredit": {
"currency": "USD",
"value": 5000
},
"adjustments": {
"currency": "USD",
"value": -200.00
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,28 @@
"name": "lot1",
"type": "Microsoft.Consumption/lots",
"properties": {
"creditCurrency": "USD",
"billingCurrency": "USD",
"originalAmount": {
"currency": "USD",
"value": 5000.00
},
"originalAmountInBillingCurrency": {
"exchangeRate": 5000.00,
"exchangeRateMonth": 1
},
"closedBalance": {
"currency": "USD",
"value": 60.90
},
"closedBalanceInBillingCurrency": {
"exchangeRate": 5000.00,
"exchangeRateMonth": 1
},
"reseller": {
"resellerId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/reseller/reseller1",
"resellerDescription": 1
},
"source": "PurchasedCredit",
"startDate": "2021-05-01T00:00:00Z",
"expirationDate": "2021-05-01T00:00:00Z",
Expand All @@ -32,14 +46,28 @@
"name": "lot2",
"type": "Microsoft.Consumption/lots",
"properties": {
"creditCurrency": "USD",
"billingCurrency": "USD",
"originalAmount": {
"currency": "USD",
"value": 6000.00
},
"originalAmountInBillingCurrency": {
"exchangeRate": 5000.00,
"exchangeRateMonth": 1
},
"closedBalance": {
"currency": "USD",
"value": 80.90
},
"closedBalanceInBillingCurrency": {
"exchangeRate": 5000.00,
"exchangeRateMonth": 1
},
"reseller": {
"resellerId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/reseller/reseller2",
"resellerDescription": 2
},
"source": "PurchasedCredit",
"startDate": "2021-05-01T00:00:00Z",
"expirationDate": "2019-12-31T00:00:00Z",
Expand Down