From 14223dfee8ca7a8da6b73c76c8064b3a3d3f3f2e Mon Sep 17 00:00:00 2001 From: Anirban Sarkar Date: Mon, 24 Aug 2020 20:02:21 -0700 Subject: [PATCH 1/8] Added rebill details for invoice Added rebill details for invoice --- .../stable/2020-05-01/billing.json | 71 +++++++- .../examples/BillingAccountInvoicesList.json | 2 + ...gAccountInvoicesListWithRebillDetails.json | 161 ++++++++++++++++ .../2020-05-01/examples/CreditNote.json | 85 +++++++++ .../stable/2020-05-01/examples/Invoice.json | 1 + .../examples/InvoiceWithRebillDetails.json | 93 ++++++++++ .../InvoicesListByBillingProfile.json | 2 + ...ListByBillingProfileWithRebillDetails.json | 172 ++++++++++++++++++ .../2020-05-01/examples/VoidInvoice.json | 85 +++++++++ 9 files changed, 671 insertions(+), 1 deletion(-) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json index 965ec56e3691..28e27ed7f26d 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json @@ -1064,6 +1064,9 @@ "x-ms-examples": { "BillingAccountInvoicesList": { "$ref": "./examples/BillingAccountInvoicesList.json" + }, + "BillingAccountInvoicesListWithRebillDetails": { + "$ref": "./examples/BillingAccountInvoicesListWithRebillDetails.json" } }, "operationId": "Invoices_ListByBillingAccount", @@ -1120,6 +1123,9 @@ "x-ms-examples": { "InvoicesListByBillingProfile": { "$ref": "./examples/InvoicesListByBillingProfile.json" + }, + "InvoicesListByBillingProfileWithRebillDetails": { + "$ref": "./examples/InvoicesListByBillingProfileWithRebillDetails.json" } }, "operationId": "Invoices_ListByBillingProfile", @@ -1179,6 +1185,15 @@ "x-ms-examples": { "Invoice": { "$ref": "./examples/Invoice.json" + }, + "InvoiceWithRebillDetails": { + "$ref": "./examples/InvoiceWithRebillDetails.json" + }, + "VoidInvoice": { + "$ref": "./examples/VoidInvoice.json" + }, + "CreditNote": { + "$ref": "./examples/CreditNote.json" } }, "operationId": "Invoices_Get", @@ -4704,7 +4719,8 @@ "enum": [ "Due", "OverDue", - "Paid" + "Paid", + "Void" ], "readOnly": true, "x-ms-enum": { @@ -4814,6 +4830,36 @@ "$ref": "#/definitions/PaymentProperties" } }, + "rebillDetails": { + "description": "Rebill details for an invoice.", + "type": "object", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/RebillDetails" + } + }, + "documentType": { + "description": "The type of the document.", + "type": "string", + "enum": [ + "Invoice", + "CreditNote" + ], + "x-ms-enum": { + "name": "InvoiceDocumentType", + "modelAsString": true + } + }, + "billedDocumentId": { + "description": "The Id of the active invoice which is originally billed after this invoice was voided. This field is applicable to the void invoices only.", + "type": "string", + "readOnly": true + }, + "creditForDocumentId": { + "description": "The Id of the invoice which got voided and this credit note was issued as a result. This field is applicable to the credit notes only.", + "type": "string", + "readOnly": true + }, "subscriptionId": { "description": "The ID of the subscription for which the invoice is generated.", "type": "string", @@ -4861,6 +4907,29 @@ } } }, + "RebillDetails": { + "description": "The rebill details of an invoice.", + "properties": { + "creditNoteDocumentId": { + "description": "The ID of credit note.", + "type": "string", + "readOnly": true + }, + "invoiceDocumentId": { + "description": "The ID of invoice.", + "type": "string", + "readOnly": true + }, + "rebillDetails": { + "description": "Rebill details for an invoice.", + "type": "object", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/RebillDetails" + } + } + } + }, "Document": { "description": "The properties of a document.", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesList.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesList.json index 843c4e2bc85a..d95c28a8d7a4 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesList.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesList.json @@ -55,6 +55,7 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", "billingProfileDisplayName": "Contoso Operations Billing", "purchaseOrderNumber": "123456", + "documentType": "Invoice", "documents": [ { "kind": "Invoice", @@ -122,6 +123,7 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", "billingProfileDisplayName": "Contoso Operations Billing", "purchaseOrderNumber": "123456", + "documentType": "Invoice", "documents": [ { "kind": "TaxReceipt", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json new file mode 100644 index 000000000000..a006490b4839 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json @@ -0,0 +1,161 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "periodStartDate": "2018-01-01", + "periodEndDate": "2018-06-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000003", + "name": "I000003", + "type": "Microsoft.Billing/billingAccounts/invoices", + "properties": { + "dueDate": "2018-01-16T17:32:28Z", + "invoiceDate": "2018-01-01T17:32:28Z", + "status": "Due", + "amountDue": { + "currency": "USD", + "value": 8.53 + }, + "billedAmount": { + "currency": "USD", + "value": 33.99 + }, + "azurePrepaymentApplied": { + "currency": "USD", + "value": 25.46 + }, + "creditAmount": { + "currency": "USD", + "value": 1.00 + }, + "freeAzureCreditApplied": { + "currency": "USD", + "value": 0.00 + }, + "subTotal": { + "currency": "USD", + "value": 33.99 + }, + "taxAmount": { + "currency": "USD", + "value": 0.00 + }, + "totalAmount": { + "currency": "USD", + "value": 7.53 + }, + "invoicePeriodStartDate": "2018-01-01T17:32:28Z", + "invoicePeriodEndDate": "2018-01-15T17:32:28Z", + "isMonthlyInvoice": false, + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso Operations Billing", + "purchaseOrderNumber": "123456", + "documentType": "Invoice", + "documents": [ + { + "kind": "Invoice", + "url": "https://microsoft.com/invoice.pdf", + "source": "DRS" + } + ], + "payments": [ + { + "date": "2018-01-14T17:32:28Z", + "paymentType": "credited", + "amount": { + "currency": "USD", + "value": 1.00 + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" + } + ], + "rebillDetails": { + "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote2", + "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000002", + "rebillDetails": { + "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote1", + "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001", + "rebillDetail": null + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/1383724", + "name": "1383724", + "type": "Microsoft.Billing/billingAccounts/invoices", + "properties": { + "dueDate": "2018-03-01T17:32:28Z", + "invoiceDate": "2018-02-01T17:32:28Z", + "status": "PastDue", + "amountDue": { + "currency": "USD", + "value": 16.53 + }, + "billedAmount": { + "currency": "USD", + "value": 33.99 + }, + "azurePrepaymentApplied": { + "currency": "USD", + "value": 15.46 + }, + "creditAmount": { + "currency": "USD", + "value": 2.00 + }, + "freeAzureCreditApplied": { + "currency": "USD", + "value": 0.00 + }, + "subTotal": { + "currency": "USD", + "value": 33.99 + }, + "taxAmount": { + "currency": "USD", + "value": 0.00 + }, + "totalAmount": { + "currency": "USD", + "value": 16.53 + }, + "invoicePeriodStartDate": "2018-02-01T17:32:28Z", + "invoicePeriodEndDate": "2018-02-28T17:32:28Z", + "isMonthlyInvoice": true, + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso Operations Billing", + "purchaseOrderNumber": "123456", + "documentType": "Invoice", + "documents": [ + { + "kind": "TaxReceipt", + "url": "https://microsoft.com/taxreceipt.pdf", + "source": "DRS" + } + ], + "payments": [ + { + "date": "2018-01-14T17:32:28Z", + "paymentType": "credited", + "amount": { + "currency": "USD", + "value": 2.00 + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json new file mode 100644 index 000000000000..718e9eb8c407 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "invoiceName": "{invoiceName}" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", + "name": "{invoiceName}", + "type": "Microsoft.Billing/billingAccounts/invoices", + "properties": { + "dueDate": "2018-01-16T17:32:28Z", + "invoiceDate": "2018-01-01T17:32:28Z", + "status": "Paid", + "amountDue": { + "currency": "USD", + "value": 16.53 + }, + "billedAmount": { + "currency": "USD", + "value": 33.99 + }, + "azurePrepaymentApplied": { + "currency": "USD", + "value": 15.46 + }, + "creditAmount": { + "currency": "USD", + "value": 2.00 + }, + "freeAzureCreditApplied": { + "currency": "USD", + "value": 0.00 + }, + "subTotal": { + "currency": "USD", + "value": 33.99 + }, + "taxAmount": { + "currency": "USD", + "value": 0.00 + }, + "totalAmount": { + "currency": "USD", + "value": 16.53 + }, + "invoicePeriodStartDate": "2018-01-01T17:32:28Z", + "invoicePeriodEndDate": "2018-01-15T17:32:28Z", + "isMonthlyInvoice": false, + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso Operations Billing", + "purchaseOrderNumber": "123456", + "documentType": "CreditNote", + "creditForDocumentId": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001", + "documents": [ + { + "kind": "Invoice", + "url": "https://microsoft.com/invoice.pdf", + "source": "DRS" + }, + { + "kind": "TaxReceipt", + "url": "https://microsoft.com/taxDoc.pdf", + "source": "DRS" + } + ], + "payments": [ + { + "date": "2018-01-14T17:32:28Z", + "paymentType": "credited", + "amount": { + "currency": "USD", + "value": 2.00 + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" + } + ] + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Invoice.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Invoice.json index a956b6a06d95..652192cd7474 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Invoice.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Invoice.json @@ -52,6 +52,7 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", "billingProfileDisplayName": "Contoso Operations Billing", "purchaseOrderNumber": "123456", + "documentType": "Invoice", "documents": [ { "kind": "Invoice", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json new file mode 100644 index 000000000000..9f5eb3a0cfd1 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "invoiceName": "{invoiceName}" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", + "name": "{invoiceName}", + "type": "Microsoft.Billing/billingAccounts/invoices", + "properties": { + "dueDate": "2018-01-16T17:32:28Z", + "invoiceDate": "2018-01-01T17:32:28Z", + "status": "Due", + "amountDue": { + "currency": "USD", + "value": 16.53 + }, + "billedAmount": { + "currency": "USD", + "value": 33.99 + }, + "azurePrepaymentApplied": { + "currency": "USD", + "value": 15.46 + }, + "creditAmount": { + "currency": "USD", + "value": 2.00 + }, + "freeAzureCreditApplied": { + "currency": "USD", + "value": 0.00 + }, + "subTotal": { + "currency": "USD", + "value": 33.99 + }, + "taxAmount": { + "currency": "USD", + "value": 0.00 + }, + "totalAmount": { + "currency": "USD", + "value": 16.53 + }, + "invoicePeriodStartDate": "2018-01-01T17:32:28Z", + "invoicePeriodEndDate": "2018-01-15T17:32:28Z", + "isMonthlyInvoice": false, + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso Operations Billing", + "purchaseOrderNumber": "123456", + "documentType": "Invoice", + "documents": [ + { + "kind": "Invoice", + "url": "https://microsoft.com/invoice.pdf", + "source": "DRS" + }, + { + "kind": "TaxReceipt", + "url": "https://microsoft.com/taxDoc.pdf", + "source": "DRS" + } + ], + "payments": [ + { + "date": "2018-01-14T17:32:28Z", + "paymentType": "credited", + "amount": { + "currency": "USD", + "value": 2.00 + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" + } + ], + "rebillDetails": { + "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote2", + "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000002", + "rebillDetails": { + "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote1", + "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001", + "rebillDetail": null + } + } + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfile.json index f2dd0ffc9c42..c3300eaa6ae8 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfile.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfile.json @@ -56,6 +56,7 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", "billingProfileDisplayName": "Contoso Operations Billing", "purchaseOrderNumber": "123456", + "documentType": "Invoice", "documents": [ { "kind": "Invoice", @@ -128,6 +129,7 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", "billingProfileDisplayName": "Contoso Operations Billing", "purchaseOrderNumber": "123456", + "documentType": "Invoice", "documents": [ { "kind": "Invoice", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json new file mode 100644 index 000000000000..82b820d2a868 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json @@ -0,0 +1,172 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}", + "periodStartDate": "2018-01-01", + "periodEndDate": "2018-06-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000003", + "name": "I000003", + "type": "Microsoft.Billing/billingAccounts/invoices", + "properties": { + "dueDate": "2018-01-16T17:32:28Z", + "invoiceDate": "2018-01-01T17:32:28Z", + "status": "Due", + "amountDue": { + "currency": "USD", + "value": 8.53 + }, + "billedAmount": { + "currency": "USD", + "value": 33.99 + }, + "azurePrepaymentApplied": { + "currency": "USD", + "value": 25.46 + }, + "creditAmount": { + "currency": "USD", + "value": 1.00 + }, + "freeAzureCreditApplied": { + "currency": "USD", + "value": 0.00 + }, + "subTotal": { + "currency": "USD", + "value": 33.99 + }, + "taxAmount": { + "currency": "USD", + "value": 0.00 + }, + "totalAmount": { + "currency": "USD", + "value": 7.53 + }, + "invoicePeriodStartDate": "2018-01-01T17:32:28Z", + "invoicePeriodEndDate": "2018-01-15T17:32:28Z", + "isMonthlyInvoice": false, + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso Operations Billing", + "purchaseOrderNumber": "123456", + "documentType": "Invoice", + "documents": [ + { + "kind": "Invoice", + "url": "https://microsoft.com/invoice.pdf", + "source": "DRS" + }, + { + "kind": "TaxReceipt", + "url": "https://microsoft.com/taxDoc.pdf", + "source": "DRS" + } + ], + "payments": [ + { + "date": "2018-01-14T17:32:28Z", + "paymentType": "credited", + "amount": { + "currency": "USD", + "value": 1.00 + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" + } + ], + "rebillDetails": { + "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote2", + "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000002", + "rebillDetails": { + "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote1", + "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001", + "rebillDetail": null + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/1383724", + "name": "1383724", + "type": "Microsoft.Billing/billingAccounts/invoices", + "properties": { + "dueDate": "2018-03-01T17:32:28Z", + "invoiceDate": "2018-01-01T17:32:28Z", + "status": "Due", + "amountDue": { + "currency": "USD", + "value": 16.53 + }, + "billedAmount": { + "currency": "USD", + "value": 33.99 + }, + "azurePrepaymentApplied": { + "currency": "USD", + "value": 15.46 + }, + "creditAmount": { + "currency": "USD", + "value": 2.00 + }, + "freeAzureCreditApplied": { + "currency": "USD", + "value": 0.00 + }, + "subTotal": { + "currency": "USD", + "value": 33.99 + }, + "taxAmount": { + "currency": "USD", + "value": 0.00 + }, + "totalAmount": { + "currency": "USD", + "value": 16.53 + }, + "invoicePeriodStartDate": "2018-02-01T17:32:28Z", + "invoicePeriodEndDate": "2018-02-28T17:32:28Z", + "isMonthlyInvoice": true, + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso Operations Billing", + "purchaseOrderNumber": "123456", + "documentType": "Invoice", + "documents": [ + { + "kind": "Invoice", + "url": "https://microsoft.com/invoice.pdf", + "source": "DRS" + }, + { + "kind": "TaxReceipt", + "url": "https://microsoft.com/taxDoc.pdf", + "source": "DRS" + } + ], + "payments": [ + { + "date": "2018-01-14T17:32:28Z", + "paymentType": "credited", + "amount": { + "currency": "USD", + "value": 2.00 + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json new file mode 100644 index 000000000000..5731ee659f69 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "invoiceName": "{invoiceName}" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", + "name": "{invoiceName}", + "type": "Microsoft.Billing/billingAccounts/invoices", + "properties": { + "dueDate": "2018-01-16T17:32:28Z", + "invoiceDate": "2018-01-01T17:32:28Z", + "status": "Void", + "amountDue": { + "currency": "USD", + "value": 16.53 + }, + "billedAmount": { + "currency": "USD", + "value": 33.99 + }, + "azurePrepaymentApplied": { + "currency": "USD", + "value": 15.46 + }, + "creditAmount": { + "currency": "USD", + "value": 2.00 + }, + "freeAzureCreditApplied": { + "currency": "USD", + "value": 0.00 + }, + "subTotal": { + "currency": "USD", + "value": 33.99 + }, + "taxAmount": { + "currency": "USD", + "value": 0.00 + }, + "totalAmount": { + "currency": "USD", + "value": 16.53 + }, + "invoicePeriodStartDate": "2018-01-01T17:32:28Z", + "invoicePeriodEndDate": "2018-01-15T17:32:28Z", + "isMonthlyInvoice": false, + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso Operations Billing", + "purchaseOrderNumber": "123456", + "documentType": "Invoice", + "rebillDocumentId": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000002", + "documents": [ + { + "kind": "Invoice", + "url": "https://microsoft.com/invoice.pdf", + "source": "DRS" + }, + { + "kind": "TaxReceipt", + "url": "https://microsoft.com/taxDoc.pdf", + "source": "DRS" + } + ], + "payments": [ + { + "date": "2018-01-14T17:32:28Z", + "paymentType": "credited", + "amount": { + "currency": "USD", + "value": 2.00 + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" + } + ] + } + } + } + } +} From 1002c5b143d8868edfda93d3df803bad0157cfcd Mon Sep 17 00:00:00 2001 From: Anirban Sarkar Date: Mon, 24 Aug 2020 20:14:43 -0700 Subject: [PATCH 2/8] Fixed Prettier Check failures Fixed Prettier Check failures --- .../Microsoft.Billing/stable/2020-05-01/billing.json | 2 +- .../stable/2020-05-01/examples/CreditNote.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json index 28e27ed7f26d..988edf2f5541 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json @@ -4909,7 +4909,7 @@ }, "RebillDetails": { "description": "The rebill details of an invoice.", - "properties": { + "properties": { "creditNoteDocumentId": { "description": "The ID of credit note.", "type": "string", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json index 718e9eb8c407..76cebe868374 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json @@ -52,7 +52,7 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", "billingProfileDisplayName": "Contoso Operations Billing", "purchaseOrderNumber": "123456", - "documentType": "CreditNote", + "documentType": "CreditNote", "creditForDocumentId": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001", "documents": [ { From 7230a6d0abbbe2c5cf420bd17abac7d5327578e4 Mon Sep 17 00:00:00 2001 From: Anirban Sarkar Date: Mon, 24 Aug 2020 20:20:57 -0700 Subject: [PATCH 3/8] Fixed model validation errors Fixed model validation errors --- .../examples/BillingAccountInvoicesListWithRebillDetails.json | 2 +- .../stable/2020-05-01/examples/InvoiceWithRebillDetails.json | 2 +- .../examples/InvoicesListByBillingProfileWithRebillDetails.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json index a006490b4839..e694e63e81fc 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json @@ -81,7 +81,7 @@ "rebillDetails": { "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote1", "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001", - "rebillDetail": null + "rebillDetails": null } } } diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json index 9f5eb3a0cfd1..48739531a7e3 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json @@ -83,7 +83,7 @@ "rebillDetails": { "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote1", "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001", - "rebillDetail": null + "rebillDetails": null } } } diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json index 82b820d2a868..f41c87f12b2b 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json @@ -87,7 +87,7 @@ "rebillDetails": { "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote1", "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001", - "rebillDetail": null + "rebillDetails": null } } } From b6887b7b8e6de21a95fc6a47f0c6c6ae7d7c64b3 Mon Sep 17 00:00:00 2001 From: Anirban Sarkar Date: Mon, 24 Aug 2020 20:24:32 -0700 Subject: [PATCH 4/8] Fixed model validation error Fixed model validation error --- .../stable/2020-05-01/examples/VoidInvoice.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json index 5731ee659f69..ba821b57182a 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json @@ -53,7 +53,7 @@ "billingProfileDisplayName": "Contoso Operations Billing", "purchaseOrderNumber": "123456", "documentType": "Invoice", - "rebillDocumentId": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000002", + "billedDocumentId": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000002", "documents": [ { "kind": "Invoice", From 7d21cc73ab8b8b0abb02a4e2ba7a76ec82e274f9 Mon Sep 17 00:00:00 2001 From: Anirban Sarkar Date: Mon, 24 Aug 2020 20:33:12 -0700 Subject: [PATCH 5/8] Added readonly property to document type and rebill details Added readonly property to document type and rebill details --- .../Microsoft.Billing/stable/2020-05-01/billing.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json index 988edf2f5541..bfd6b71940d6 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json @@ -4833,6 +4833,7 @@ "rebillDetails": { "description": "Rebill details for an invoice.", "type": "object", + "readOnly": true, "additionalProperties": { "type": "object", "$ref": "#/definitions/RebillDetails" @@ -4845,6 +4846,7 @@ "Invoice", "CreditNote" ], + "readOnly": true, "x-ms-enum": { "name": "InvoiceDocumentType", "modelAsString": true From a5522df6521450e594d2ed8fe81f09dcc5c72ddd Mon Sep 17 00:00:00 2001 From: Anirban Sarkar Date: Fri, 28 Aug 2020 20:35:17 -0700 Subject: [PATCH 6/8] Updated examples Updated examples --- .../examples/BillingAccountInvoicesListWithRebillDetails.json | 4 ++-- .../stable/2020-05-01/examples/CreditNote.json | 2 +- .../Microsoft.Billing/stable/2020-05-01/examples/Invoice.json | 2 +- .../stable/2020-05-01/examples/InvoiceWithRebillDetails.json | 2 +- .../InvoicesListByBillingProfileWithRebillDetails.json | 4 ++-- .../stable/2020-05-01/examples/VoidInvoice.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json index e694e63e81fc..6a6f68ce064d 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesListWithRebillDetails.json @@ -10,7 +10,7 @@ "body": { "value": [ { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000003", + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000003", "name": "I000003", "type": "Microsoft.Billing/billingAccounts/invoices", "properties": { @@ -87,7 +87,7 @@ } }, { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/1383724", + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/1383724", "name": "1383724", "type": "Microsoft.Billing/billingAccounts/invoices", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json index 76cebe868374..436f1f56ee11 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json @@ -7,7 +7,7 @@ "responses": { "200": { "body": { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", "name": "{invoiceName}", "type": "Microsoft.Billing/billingAccounts/invoices", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Invoice.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Invoice.json index 652192cd7474..431057fff203 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Invoice.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Invoice.json @@ -7,7 +7,7 @@ "responses": { "200": { "body": { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", "name": "{invoiceName}", "type": "Microsoft.Billing/billingAccounts/invoices", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json index 48739531a7e3..7d9962a235e2 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceWithRebillDetails.json @@ -7,7 +7,7 @@ "responses": { "200": { "body": { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", "name": "{invoiceName}", "type": "Microsoft.Billing/billingAccounts/invoices", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json index f41c87f12b2b..e86609b85ef8 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfileWithRebillDetails.json @@ -11,7 +11,7 @@ "body": { "value": [ { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000003", + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000003", "name": "I000003", "type": "Microsoft.Billing/billingAccounts/invoices", "properties": { @@ -93,7 +93,7 @@ } }, { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/1383724", + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/1383724", "name": "1383724", "type": "Microsoft.Billing/billingAccounts/invoices", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json index ba821b57182a..30e3f1b71cbe 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/VoidInvoice.json @@ -7,7 +7,7 @@ "responses": { "200": { "body": { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", "name": "{invoiceName}", "type": "Microsoft.Billing/billingAccounts/invoices", "properties": { From ab6e3ef42c56af8ac6bf5289e7177fbbebe3fed5 Mon Sep 17 00:00:00 2001 From: Anirban Sarkar Date: Sun, 30 Aug 2020 23:35:31 -0700 Subject: [PATCH 7/8] Setting readonly property on rebillDetails Setting readonly property on rebillDetails --- .../Microsoft.Billing/stable/2020-05-01/billing.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json index bfd6b71940d6..d615d7e968a7 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json @@ -4924,7 +4924,8 @@ }, "rebillDetails": { "description": "Rebill details for an invoice.", - "type": "object", + "type": "object", + "readOnly": true, "additionalProperties": { "type": "object", "$ref": "#/definitions/RebillDetails" From 496a7b7d65b61555ad20808a4ec42d5fa825fb87 Mon Sep 17 00:00:00 2001 From: Anirban Sarkar Date: Sun, 30 Aug 2020 23:50:18 -0700 Subject: [PATCH 8/8] Fixed prettier-check error Fixed prettier-check error --- .../Microsoft.Billing/stable/2020-05-01/billing.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json index d615d7e968a7..fecbec2a08c9 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json @@ -4924,7 +4924,7 @@ }, "rebillDetails": { "description": "Rebill details for an invoice.", - "type": "object", + "type": "object", "readOnly": true, "additionalProperties": { "type": "object",