From 609e7a19b3c770a206e828679874913df281c41e Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Fri, 24 Jan 2020 18:29:45 -0800 Subject: [PATCH 1/9] Adding new fields to transactions API Adding new fields to transactions API --- .../preview/2019-10-01-preview/billing.json | 72 +++++++++++++++++++ .../examples/Transaction.json | 32 ++++++++- .../TransactionsListByBillingAccount.json | 64 ++++++++++++++++- .../TransactionsListByBillingProfile.json | 64 ++++++++++++++++- .../examples/TransactionsListByCustomer.json | 64 ++++++++++++++++- .../TransactionsListByInvoiceSection.json | 64 ++++++++++++++++- 6 files changed, 351 insertions(+), 9 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 35ec35e909a5..31622d783315 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -6810,6 +6810,78 @@ "description": "The subscription name.", "type": "string", "readOnly": true + }, + "azureCreditApplied": { + "description": "The azure credit applied.", + "readOnly": true, + "$ref": "#/definitions/Amount" + }, + "billingCurrency": { + "description": "The billing currency.", + "type": "string", + "readOnly": true + }, + "discount": { + "description": "The discount percentage.", + "type": "number", + "readOnly": true + }, + "effectivePrice": { + "description": "The effective price.", + "readOnly": true, + "$ref": "#/definitions/Amount" + }, + "exchangeRate": { + "description": "The exchange rate.", + "type": "number", + "readOnly": true + }, + "marketPrice": { + "description": "The market price.", + "readOnly": true, + "$ref": "#/definitions/Amount" + }, + "pricingCurrency": { + "description": "The pricing currency.", + "type": "string", + "readOnly": true + }, + "servicePeriodStartDate": { + "description": "The service period start date.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "servicePeriodEndDate": { + "description": "The service period end date.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "subTotal": { + "description": "Last charge associated with the purchase without tax.", + "readOnly": true, + "$ref": "#/definitions/Amount" + }, + "tax": { + "description": "The tax associated with the purchase.", + "readOnly": true, + "$ref": "#/definitions/Amount" + }, + "unitOfMeasure": { + "description": "Unit of measure.", + "type": "string", + "readOnly": true + }, + "units": { + "description": "Number of units.", + "type": "number", + "readOnly": true + }, + "unitType": { + "description": "The unit type.", + "type": "string", + "readOnly": true } } }, diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Transaction.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Transaction.json index 206b2e3dc338..092e1ccca619 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Transaction.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Transaction.json @@ -29,7 +29,37 @@ "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", "invoiceSectionDisplayName": "Contoso operations invoiceSection", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", - "billingProfileDisplayName": "Contoso operations billing" + "billingProfileDisplayName": "Contoso operations billing", + "azureCreditApplied": { + "currency": "USD", + "value": 2000.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 4500.00 + }, + "tax": { + "currency": "USD", + "value": 500.00 + }, + "unitOfMeasure": "1 Minute", + "units": 11.25, + "unitType": "1 Runtime Minute" } } } diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByBillingAccount.json index e31eb448ca25..09387b9e3177 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByBillingAccount.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByBillingAccount.json @@ -29,7 +29,37 @@ "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000", "invoiceSectionDisplayName": "Contoso operations invoiceSection", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", - "billingProfileDisplayName": "Contoso operations billing" + "billingProfileDisplayName": "Contoso operations billing", + "azureCreditApplied": { + "currency": "USD", + "value": 2000.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 4500.00 + }, + "tax": { + "currency": "USD", + "value": 500.00 + }, + "unitOfMeasure": "1 Minute", + "units": 11.25, + "unitType": "1 Runtime Minute" } }, { @@ -52,7 +82,37 @@ "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000", "invoiceSectionDisplayName": "Contoso operations invoiceSection", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", - "billingProfileDisplayName": "Contoso operations billing" + "billingProfileDisplayName": "Contoso operations billing", + "azureCreditApplied": { + "currency": "USD", + "value": 20.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 45.00 + }, + "tax": { + "currency": "USD", + "value": 5.00 + }, + "unitOfMeasure": "1 Minute", + "units": 1.25, + "unitType": "1 Runtime Minute" } } ] diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByBillingProfile.json index 38d31b0f6e87..68f04b76f6cc 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByBillingProfile.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByBillingProfile.json @@ -30,7 +30,37 @@ "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", "invoiceSectionDisplayName": "Contoso operations invoiceSection", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", - "billingProfileDisplayName": "Contoso operations billing" + "billingProfileDisplayName": "Contoso operations billing", + "azureCreditApplied": { + "currency": "USD", + "value": 2000.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 4500.00 + }, + "tax": { + "currency": "USD", + "value": 500.00 + }, + "unitOfMeasure": "1 Minute", + "units": 11.25, + "unitType": "1 Runtime Minute" } }, { @@ -53,7 +83,37 @@ "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", "invoiceSectionDisplayName": "Contoso operations invoiceSection", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", - "billingProfileDisplayName": "Contoso operations billing" + "billingProfileDisplayName": "Contoso operations billing", + "azureCreditApplied": { + "currency": "USD", + "value": 20.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 45.00 + }, + "tax": { + "currency": "USD", + "value": 5.00 + }, + "unitOfMeasure": "1 Minute", + "units": 1.25, + "unitType": "1 Runtime Minute" } } ] diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByCustomer.json index 2d559b560cb3..418913b5c1c6 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByCustomer.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByCustomer.json @@ -28,7 +28,37 @@ "value": 5000.00 }, "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", - "customerDisplayName": "Contoso operations customer" + "customerDisplayName": "Contoso operations customer", + "azureCreditApplied": { + "currency": "USD", + "value": 2000.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 4500.00 + }, + "tax": { + "currency": "USD", + "value": 500.00 + }, + "unitOfMeasure": "1 Minute", + "units": 11.25, + "unitType": "1 Runtime Minute" } }, { @@ -49,7 +79,37 @@ "value": 50.00 }, "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", - "customerDisplayName": "Contoso operations customer" + "customerDisplayName": "Contoso operations customer", + "azureCreditApplied": { + "currency": "USD", + "value": 20.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 45.00 + }, + "tax": { + "currency": "USD", + "value": 5.00 + }, + "unitOfMeasure": "1 Minute", + "units": 1.25, + "unitType": "1 Runtime Minute" } } ] diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByInvoiceSection.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByInvoiceSection.json index 2d9017ed9ebe..2a2d00de78fc 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByInvoiceSection.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByInvoiceSection.json @@ -31,7 +31,37 @@ "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", "invoiceSectionDisplayName": "Contoso operations invoiceSection", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", - "billingProfileDisplayName": "Contoso operations billing" + "billingProfileDisplayName": "Contoso operations billing", + "azureCreditApplied": { + "currency": "USD", + "value": 2000.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 4500.00 + }, + "tax": { + "currency": "USD", + "value": 500.00 + }, + "unitOfMeasure": "1 Minute", + "units": 11.25, + "unitType": "1 Runtime Minute" } }, { @@ -54,7 +84,37 @@ "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", "invoiceSectionDisplayName": "Contoso operations invoiceSection", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", - "billingProfileDisplayName": "Contoso operations billing" + "billingProfileDisplayName": "Contoso operations billing", + "azureCreditApplied": { + "currency": "USD", + "value": 20.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 45.00 + }, + "tax": { + "currency": "USD", + "value": 5.00 + }, + "unitOfMeasure": "1 Minute", + "units": 1.25, + "unitType": "1 Runtime Minute" } } ] From 680ef78b5a2d1d2d27ea8d7e5cb8bec0ffcd3905 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Tue, 28 Jan 2020 18:02:30 -0800 Subject: [PATCH 2/9] Updated the field description Updated the field description --- .../preview/2019-10-01-preview/billing.json | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 3a503538cde6..fbe340eded3b 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -6940,37 +6940,37 @@ "readOnly": true }, "azureCreditApplied": { - "description": "The azure credit applied.", + "description": "The amount of azure credits that are automatically applied to this transaction.", "readOnly": true, "$ref": "#/definitions/Amount" }, "billingCurrency": { - "description": "The billing currency.", + "description": "The ISO 4217 code for the currency in which this transaction is billed.", "type": "string", "readOnly": true }, "discount": { - "description": "The discount percentage.", + "description": "The percentage of discount (if any) applied to this transaction.", "type": "number", "readOnly": true }, "effectivePrice": { - "description": "The effective price.", + "description": "The price of the product after applying any discounts.", "readOnly": true, "$ref": "#/definitions/Amount" }, "exchangeRate": { - "description": "The exchange rate.", + "description": "The exchange rate used to convert the amounts in billing currency.", "type": "number", "readOnly": true }, "marketPrice": { - "description": "The market price.", + "description": "The price of the product before applying any discounts.", "readOnly": true, "$ref": "#/definitions/Amount" }, "pricingCurrency": { - "description": "The pricing currency.", + "description": "The ISO 4217 code for the currency in which the product is priced.", "type": "string", "readOnly": true }, @@ -6987,27 +6987,27 @@ "readOnly": true }, "subTotal": { - "description": "Last charge associated with the purchase without tax.", + "description": "The pre-tax amount for the transaction.", "readOnly": true, "$ref": "#/definitions/Amount" }, "tax": { - "description": "The tax associated with the purchase.", + "description": "The tax applied to the transaction.", "readOnly": true, "$ref": "#/definitions/Amount" }, "unitOfMeasure": { - "description": "Unit of measure.", + "description": "The unit of measure used to bill for the service. For example, compute services are billed per hour.", "type": "string", "readOnly": true }, "units": { - "description": "Number of units.", + "description": "The number of units used.", "type": "number", "readOnly": true }, "unitType": { - "description": "The unit type.", + "description": "The description for the unit of measure.", "type": "string", "readOnly": true } From 5259473024a6f29e68a754893c46027b06d097b6 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 29 Jan 2020 17:36:56 -0800 Subject: [PATCH 3/9] Updated few descriptions --- .../preview/2019-10-01-preview/billing.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index fbe340eded3b..44d83fd0abbe 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -6940,7 +6940,7 @@ "readOnly": true }, "azureCreditApplied": { - "description": "The amount of azure credits that are automatically applied to this transaction.", + "description": "The amount of any Azure credits automatically applied to this transaction.", "readOnly": true, "$ref": "#/definitions/Amount" }, @@ -6950,7 +6950,7 @@ "readOnly": true }, "discount": { - "description": "The percentage of discount (if any) applied to this transaction.", + "description": "The percentage discount, if any, applied to this transaction.", "type": "number", "readOnly": true }, @@ -6960,12 +6960,12 @@ "$ref": "#/definitions/Amount" }, "exchangeRate": { - "description": "The exchange rate used to convert the amounts in billing currency.", + "description": "The exchange rate used to convert charged amount to billing currency, if applicable.", "type": "number", "readOnly": true }, "marketPrice": { - "description": "The price of the product before applying any discounts.", + "description": "The retail price of the product.", "readOnly": true, "$ref": "#/definitions/Amount" }, @@ -6975,39 +6975,39 @@ "readOnly": true }, "servicePeriodStartDate": { - "description": "The service period start date.", + "description": "The date of the purchase of the product, or the start date of the month in which usage started.", "type": "string", "format": "date-time", "readOnly": true }, "servicePeriodEndDate": { - "description": "The service period end date.", + "description": "The end date of the product term, or the end date of the month in which usage ended.", "type": "string", "format": "date-time", "readOnly": true }, "subTotal": { - "description": "The pre-tax amount for the transaction.", + "description": "The pre-tax charged amount for the transaction.", "readOnly": true, "$ref": "#/definitions/Amount" }, "tax": { - "description": "The tax applied to the transaction.", + "description": "The tax amount applied to the transaction.", "readOnly": true, "$ref": "#/definitions/Amount" }, "unitOfMeasure": { - "description": "The unit of measure used to bill for the service. For example, compute services are billed per hour.", + "description": "The unit of measure used to bill for the product. For example, compute services are billed per hour.", "type": "string", "readOnly": true }, "units": { - "description": "The number of units used.", + "description": "The number of units used for a given product.", "type": "number", "readOnly": true }, "unitType": { - "description": "The description for the unit of measure.", + "description": "The description for the unit of measure for a given product.", "type": "string", "readOnly": true } From 0b7a7f7ea46a9a6593694bb761b07d40064676b6 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 5 Feb 2020 17:38:29 -0800 Subject: [PATCH 4/9] [BillingRP] New API to list transactions by invoice [BillingRP] New API to list transactions by invoice --- .../preview/2019-10-01-preview/billing.json | 45 +++++++ .../examples/TransactionsListByInvoice.json | 122 ++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByInvoice.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 51db4fb34e87..193adc7b9675 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -2723,6 +2723,51 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/transactions": { + "get": { + "tags": [ + "Transactions" + ], + "operationId": "Transactions_ListByInvoice", + "description": "Lists the transactions by invoice.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "TransactionsListByInvoice": { + "$ref": "./examples/TransactionsListByInvoice.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "$ref": "#/parameters/invoiceNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TransactionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/{transactionName}": { "get": { "tags": [ diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByInvoice.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByInvoice.json new file mode 100644 index 000000000000..7c1da9f1e531 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByInvoice.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}", + "invoiceName": "{invoiceName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/{billingProfileName}/transactions/41000000-0000-0000-0000-000000000000", + "name": "41000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions", + "properties": { + "kind": "all", + "date": "2018-05-01T00:00:00Z", + "invoice": "2344233", + "productFamily": "Storage", + "productTypeId": "A12345", + "productType": "VM Instance", + "productDescription": "Standard D1, US West 3", + "transactionType": "Purchase", + "transactionAmount": { + "currency": "USD", + "value": 5000.00 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso operations billing", + "azureCreditApplied": { + "currency": "USD", + "value": 2000.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 4500.00 + }, + "tax": { + "currency": "USD", + "value": 500.00 + }, + "unitOfMeasure": "1 Minute", + "units": 11.25, + "unitType": "1 Runtime Minute" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/{billingProfileName}/transactions/51000000-0000-0000-0000-000000000000", + "name": "51000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions", + "properties": { + "kind": "all", + "date": "2018-04-01T00:00:00Z", + "invoice": "pending", + "productFamily": "Storage", + "productTypeId": "A12345", + "productType": "VM Instance", + "productDescription": "Standard Support", + "transactionType": "Cancel", + "transactionAmount": { + "currency": "USD", + "value": 50.00 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso operations billing", + "azureCreditApplied": { + "currency": "USD", + "value": 20.00 + }, + "billingCurrency": "USD", + "discount": 0.1, + "effectivePrice": { + "currency": "USD", + "value": 10.00 + }, + "exchangeRate": 1, + "marketPrice": { + "currency": "USD", + "value": 20.00 + }, + "pricingCurrency": "USD", + "quantity": 1, + "servicePeriodStartDate": "2018-05-01T00:00:00Z", + "servicePeriodEndDate": "2018-09-30T00:00:00Z", + "subTotal": { + "currency": "USD", + "value": 45.00 + }, + "tax": { + "currency": "USD", + "value": 5.00 + }, + "unitOfMeasure": "1 Minute", + "units": 1.25, + "unitType": "1 Runtime Minute" + } + } + ] + } + } + } +} From 0b093235f888d096cf9d2f23acb832ad97cbfe4a Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Thu, 6 Feb 2020 16:45:51 -0800 Subject: [PATCH 5/9] Incorporating review comments Incorporating review comments --- .../Microsoft.Billing/preview/2019-10-01-preview/billing.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 193adc7b9675..95b2e97cd51c 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -2765,6 +2765,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, From aaaad007b4ae6044b08e4170092572ee46d2a515 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Fri, 7 Feb 2020 18:47:38 -0800 Subject: [PATCH 6/9] Updated description --- .../Microsoft.Billing/preview/2019-10-01-preview/billing.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 95b2e97cd51c..d0c7615238c8 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -2729,7 +2729,7 @@ "Transactions" ], "operationId": "Transactions_ListByInvoice", - "description": "Lists the transactions by invoice.", + "description": "Lists all billed and unbilled transactions by invoice. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice ID and do not include tax. Tax is added to the amount once an invoice is generated.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, From 4c91f5020c5c79b4052322108d3c027620bf2768 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Fri, 7 Feb 2020 19:01:52 -0800 Subject: [PATCH 7/9] Updated transaction description --- .../preview/2019-10-01-preview/billing.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index d0c7615238c8..dbf14b072ac6 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -1312,7 +1312,7 @@ "Transactions" ], "operationId": "Transactions_ListByCustomer", - "description": "Lists the transactions by customer id for given start date and end date.", + "description": "Lists the billed and unbilled transactions by customer id for given start date and end date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice Id and do not include tax. Tax is added to the amount once an invoice is generated.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" }, @@ -2528,7 +2528,7 @@ "Transactions" ], "operationId": "Transactions_ListByBillingAccount", - "description": "Lists the transactions by billing account name for given start and end date.", + "description": "Lists the billed and unbilled transactions by billing account name for given start and end date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice ID and do not include tax. Tax is added to the amount once an invoice is generated.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, @@ -2594,7 +2594,7 @@ "Transactions" ], "operationId": "Transactions_ListByBillingProfile", - "description": "Lists the transactions by billing profile name for given start date and end date.", + "description": "Lists the billed and unbilled transactions by billing profile name for given start date and end date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice Id and do not include tax. Tax is added to the amount once an invoice is generated.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, @@ -2660,7 +2660,7 @@ "Transactions" ], "operationId": "Transactions_ListByInvoiceSection", - "description": "Lists the transactions by invoice section name for given start date and end date.", + "description": "Lists the billed and unbilled transactions by invoice section name for given start date and end date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice Id and do not include tax. Tax is added to the amount once an invoice is generated.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, @@ -2729,7 +2729,7 @@ "Transactions" ], "operationId": "Transactions_ListByInvoice", - "description": "Lists all billed and unbilled transactions by invoice. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice ID and do not include tax. Tax is added to the amount once an invoice is generated.", + "description": "Lists the billed and unbilled transactions by invoice. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice Id and do not include tax. Tax is added to the amount once an invoice is generated.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, From 7ba4442696a46d1d74ad3ebd3fc51735b4a786c9 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Fri, 7 Feb 2020 19:23:47 -0800 Subject: [PATCH 8/9] Updated description --- .../Microsoft.Billing/preview/2019-10-01-preview/billing.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index dbf14b072ac6..3f7c002c9e65 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -2729,7 +2729,7 @@ "Transactions" ], "operationId": "Transactions_ListByInvoice", - "description": "Lists the billed and unbilled transactions by invoice. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice Id and do not include tax. Tax is added to the amount once an invoice is generated.", + "description": "Lists the transactions by invoice. Transactions include purchases, refunds and Azure usage charges.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, From 2ab3b9dcb270ee0f8e65a52add27f6a93ea16cc7 Mon Sep 17 00:00:00 2001 From: Anirban Sarkar <33848291+asarkar84@users.noreply.github.com> Date: Sun, 9 Feb 2020 11:19:58 -0800 Subject: [PATCH 9/9] Added unbilled to custom words --- custom-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/custom-words.txt b/custom-words.txt index 424af84e7c41..2cf188a4b212 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1509,6 +1509,7 @@ ukwest Ulaanbaatar unallocated unattend +unbilled Unclaim Undelete undeleted