Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
@@ -0,0 +1,20 @@
{
"parameters": {
"api-version": "2020-11-01-privatepreview",
"billingAccountName": "{billingAccountName}",
"invoiceName": "{invoiceName}",
"$filter": "properties/date gt '2020-10-01'",
"$search": "azure"
},
"responses": {
"200": {
"body": {
"azureCreditApplied": 100.00,
"billingCurrency": "USD",
"subTotal": 5000.00,
"tax": 500.00,
"total": 5400.00
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
{
"swagger": "2.0",
"info": {
"version": "2020-11-01-privatepreview",
Comment thread
asarkar84 marked this conversation as resolved.
"title": "BillingManagementClient",
"description": "Billing client provides access to billing resources."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactionSummary": {
"get": {
"tags": [
"TransactionSummary"
],
"operationId": "TransactionSummary_GetByInvoice",
"description": "Gets the transaction summary for an invoice. Transactions include purchases, refunds and Azure usage charges.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/billing/"
},
"x-ms-examples": {
"TransactionSummaryByInvoice": {
"$ref": "./examples/TransactionSummaryByInvoice.json"
}
},
"parameters": [
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"$ref": "#/parameters/invoiceNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"name": "$filter",
"description": "May be used to filter the results by azure plan, azure credit applied, date, invoice section, product description, product family, sub total, tax, transaction amount and transaction type. Optional.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "$search",
"in": "query",
"required": false,
"type": "string",
"description": "A search expression to match for whether a particular transaction should be considered in aggregation. Any transaction with azure plan, transaction type, invoice section name, product description, product family containing the search text will be included in the aggregation."
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/TransactionSummaryProperties"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"ErrorDetails": {
"description": "The details of the error.",
"properties": {
"code": {
"description": "Error code.",
"type": "string",
"readOnly": true
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string",
"readOnly": true
},
"target": {
"description": "The target of the particular error.",
"type": "string",
"readOnly": true
},
"details": {
"description": "The sub details of the error.",
"readOnly": true,
"$ref": "#/definitions/ErrorSubDetails"
}
}
},
"ErrorResponse": {
"description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.",
"type": "object",
"properties": {
"error": {
"description": "The details of the error.",
"$ref": "#/definitions/ErrorDetails"
}
}
},
"ErrorSubDetails": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"description": "Error code.",
"type": "string",
"readOnly": true
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string",
"readOnly": true
},
"target": {
"description": "The target of the particular error.",
"type": "string",
"readOnly": true
}
}
}
},
"TransactionSummaryProperties": {
"description": "The properties of transaction summary.",
"properties": {
"azureCreditApplied": {
"description": "The total amount of any Azure credits applied.",
"readOnly": true,
"type": "number"
},
"billingCurrency": {
"description": "The ISO 4217 code for the currency in which the transactions are billed.",
"readOnly": true,
"type": "string"
},
"subTotal": {
"description": "The total pre-tax charged amount.",
"readOnly": true,
"type": "number"
},
"tax": {
"description": "The total tax amount applied.",
"readOnly": true,
"type": "number"
},
"total": {
"description": "The total charges.",
"readOnly": true,
"type": "number"
}
}
}
},
"parameters": {
"apiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "The version of the API to be used with the client request. The current version is 2020-11-01-privatepreview."
},
"billingAccountNameParameter": {
"name": "billingAccountName",
"in": "path",
"description": "The ID that uniquely identifies a billing account.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
"invoiceNameParameter": {
"name": "invoiceName",
"in": "path",
"description": "The ID that uniquely identifies an invoice.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
}
}
11 changes: 11 additions & 0 deletions specification/billing/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ input-file:
- Microsoft.Billing/preview/2018-03-01-preview/billingV2.json
```

### Tag: package-2020-11-preview

These settings apply only when `--tag=package-2020-11-preview` is specified on the command line.

``` yaml $(tag) == 'package-preview-2020-11'
input-file:
- Microsoft.Billing/preview/2020-11-01-privatepreview/transactions.json
- Microsoft.Billing/stable/2020-05-01/billing.json
- Microsoft.Billing/preview/2018-03-01-preview/billingV2.json
```

### Tag: package-2019-10-preview

These settings apply only when `--tag=package-2019-10-preview` is specified on the command line.
Expand Down