From 1976481764dd04f50d306d5ecfc836381043b9d1 Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 21 Sep 2020 14:27:21 +0530 Subject: [PATCH 01/10] Swagger for EA invoice pay now API Adding EA invoice pay now API to payoff the EA invoices. --- .../preview/2019-10-01-preview/billing.json | 256 ++++++++++++++++++ .../examples/GetPayNow.json | 25 ++ .../examples/InitiatePayNow.json | 30 ++ .../examples/PayNowListByBillingAccount.json | 28 ++ 4 files changed, 339 insertions(+) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.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 680b35022642..956dc38b0432 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 @@ -5392,6 +5392,143 @@ } } } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/initiatePayNow": { + "post": { + "tags": [ + "PayNow" + ], + "summary": "Initiates a pay now request.", + "operationId": "payNow_Initiate", + "x-ms-examples": { + "InitiateTransfer": { + "$ref": "./examples/InitiatePayNow.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/invoiceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/InitiatePayNowRequest" + }, + "description": "Request parameters that are provided to the initiated pay now operation." + } + ], + "responses": { + "200": { + "description": "Details of the initiated pay now.", + "schema": { + "$ref": "#/definitions/PayNowDetails" + } + }, + "default": { + "description": "Unexpected error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/payNows/{payNowName}": { + "get": { + "tags": [ + "PayNow" + ], + "description": "Gets a pay now request by ID. The operation is supported only for billing accounts with agreement type EA.", + "operationId": "PayNow_Get", + "x-ms-examples": { + "PayNowGet": { + "$ref": "./examples/GetPayNow.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/invoiceNameParameter" + }, + { + "$ref": "#/parameters/payNowNameParameter" + } + ], + "responses": { + "200": { + "description": "Details of pay now.", + "schema": { + "$ref": "#/definitions/PayNowDetails" + } + }, + "default": { + "description": "Unexpected error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/paynows": { + "get": { + "tags": [ + "PayNow" + ], + "x-ms-examples": { + "PayNowListByBillingAccount": { + "$ref": "./examples/PayNowListByBillingAccount.json" + } + }, + "operationId": "PayNows_ListByBillingAccount", + "description": "Lists the pay nows that are initiated for the billing account. The operation is supported only for billing accounts with agreement type EA.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "name": "$filter", + "description": "May be used to filter the list of pay nows.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/PayNowListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { @@ -8593,6 +8730,117 @@ "description": "The set of actions that the caller is not allowed to perform.", "type": "string", "readOnly": true + }, + "InitiatePayNowRequest": { + "type": "object", + "description": "Request parameters to initiate pay now.", + "properties": { + "properties": { + "description": "Request parameters to initiate pay now.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/InitiatePayNowProperties" + } + } + }, + "InitiatePayNowProperties": { + "type": "object", + "description": "Request parameters to initiate pay now.", + "properties": { + "sourceBillingAccountName": { + "type": "string", + "description": "The billing account to choose payoff balance." + }, + "paymentInstrumentType": { + "type": "string", + "description": "enum..." + } + } + }, + "PayNowDetails": { + "type": "object", + "description": "Details of the pay now.", + "properties": { + "properties": { + "description": "Details of the pay now.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/PayNowProperties" + } + } + }, + "PayNowProperties": { + "type": "object", + "description": "Request parameters to initiate pay now.", + "properties": { + "creationTime": { + "type": "string", + "format": "date-time", + "description": "The time at which the pay now request was created.", + "readOnly": true + }, + "errorCode": { + "description": "The error code for failed pay now.", + "type": "string" + }, + "errorMessage": { + "description": "The error message for failed pay now.", + "type": "string" + }, + "id": { + "description": "The pay now operation id for the initated pay now.", + "type": "string" + }, + "invoiceNumber": { + "description": "The invoice number being paid off.", + "type": "string" + }, + "overageAmount": { + "description": "The total overage amount.", + "type": "string" + }, + "percentComplete": { + "description": "The percent of operation completed.", + "type": "string" + }, + "lastModifiedTime": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "The time at which the pay now request was last modified." + }, + "state": { + "description": "Identifies the state of the pay now operation.", + "type": "string", + "enum": [ + "NotStarted", + "Running", + "Succeeded", + "Failed" + ], + "readOnly": true, + "x-ms-enum": { + "name": "PayNowState", + "modelAsString": true + } + } + } + }, + "PayNowListResult": { + "description": "The list of pay nows initiated.", + "properties": { + "value": { + "description": "The list of pay nows initiated.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/PayNowDetails" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } } }, "parameters": { @@ -8747,6 +8995,14 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "payNowNameParameter": { + "name": "payNowName", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "The ID that uniquely identifies a pay now request." } }, "security": [ diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json new file mode 100644 index 000000000000..d00fd8c64063 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "invoiceName": "{invoiceName}", + "payNowName":"{payNowName}" + }, + "responses": { + "200": { + "body": { + "properties": { + "creationTime": "2020-09-10T17:32:28Z", + "errorCode": "", + "errorMessage": "", + "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", + "invoiceNumber": "EA00001", + "overageAmount": "100.00", + "percentComplete": "0", + "state": "NotStarted", + "lastModifiedTime": "2020-09-10T17:32:28Z" + } + } + } + } + } \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json new file mode 100644 index 000000000000..93020f0f1006 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "invoiceName": "{invoiceName}", + "parameters": { + "properties": { + "sourceBillingAccountName": "4999919", + "paymentInstrumentType": "monetaryPrepaymentBalance" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "creationTime": "2020-09-10T17:32:28Z", + "errorCode": "", + "errorMessage": "", + "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", + "invoiceNumber": "EA00001", + "overageAmount": "100.00", + "percentComplete": "0", + "state": "NotStarted", + "lastModifiedTime": "2020-09-10T17:32:28Z" + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json new file mode 100644 index 000000000000..68a0abaf53c6 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "creationTime": "2020-09-10T17:32:28Z", + "errorCode": "", + "errorMessage": "", + "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", + "invoiceNumber": "EA00001", + "overageAmount": "100.00", + "percentComplete": "0", + "state": "NotStarted", + "lastModifiedTime": "2020-09-10T17:32:28Z" + } + } + ] + } + } + } + } + \ No newline at end of file From b751748572cf4f3a73703867b20627fcb6ba41a5 Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 5 Oct 2020 11:11:28 +0530 Subject: [PATCH 02/10] Updating the initiate paynow params. --- .../preview/2019-10-01-preview/billing.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 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 956dc38b0432..59620cbbe181 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 @@ -8750,9 +8750,17 @@ "type": "string", "description": "The billing account to choose payoff balance." }, - "paymentInstrumentType": { + "sourcePayoffDate": { "type": "string", - "description": "enum..." + "description": "The payoff date to get balance from source enrollment. The date should be specified in MM-DD-YYYY format." + }, + "invoicePeriodStartDate": { + "type": "string", + "description": "The start date to fetch the total Azure service overages. The date should be specified in MM-DD-YYYY format." + }, + "invoicePeriodEndDate": { + "type": "string", + "description": "The end date to fetch the total Azure service overages. The date should be specified in MM-DD-YYYY format." } } }, @@ -8793,7 +8801,7 @@ "description": "The invoice number being paid off.", "type": "string" }, - "overageAmount": { + "totalOverageAmount": { "description": "The total overage amount.", "type": "string" }, From d2d899bb03aa68ca2183cc9078bbf3e42b6a73c0 Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 5 Oct 2020 11:41:20 +0530 Subject: [PATCH 03/10] Updating initiate paynow params. --- .../preview/2019-10-01-preview/billing.json | 8 -------- 1 file changed, 8 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 59620cbbe181..0d0ef02cc494 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 @@ -8753,14 +8753,6 @@ "sourcePayoffDate": { "type": "string", "description": "The payoff date to get balance from source enrollment. The date should be specified in MM-DD-YYYY format." - }, - "invoicePeriodStartDate": { - "type": "string", - "description": "The start date to fetch the total Azure service overages. The date should be specified in MM-DD-YYYY format." - }, - "invoicePeriodEndDate": { - "type": "string", - "description": "The end date to fetch the total Azure service overages. The date should be specified in MM-DD-YYYY format." } } }, From 7983ed042b996dcaba8f00201747e6764e64c498 Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 5 Oct 2020 12:08:59 +0530 Subject: [PATCH 04/10] paynow response --- .../preview/2019-10-01-preview/billing.json | 6 +++--- 1 file changed, 3 insertions(+), 3 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 0d0ef02cc494..f58cd8c682f9 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 @@ -5443,7 +5443,7 @@ "tags": [ "PayNow" ], - "description": "Gets a pay now request by ID. The operation is supported only for billing accounts with agreement type EA.", + "description": "Gets a pay now request by ID. The operation is supported only for billing accounts with agreement type Enterprise Agreement..", "operationId": "PayNow_Get", "x-ms-examples": { "PayNowGet": { @@ -5488,7 +5488,7 @@ } }, "operationId": "PayNows_ListByBillingAccount", - "description": "Lists the pay nows that are initiated for the billing account. The operation is supported only for billing accounts with agreement type EA.", + "description": "Lists the pay nows that are initiated for the billing account. The operation is supported only for billing accounts with agreement type Enterprise Agreement..", "parameters": [ { "$ref": "#/parameters/apiVersionParameter" @@ -8793,7 +8793,7 @@ "description": "The invoice number being paid off.", "type": "string" }, - "totalOverageAmount": { + "overageAmount": { "description": "The total overage amount.", "type": "string" }, From b795a5f6f6dddc2404178ff15282be4434b56140 Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 5 Oct 2020 15:54:42 +0530 Subject: [PATCH 05/10] updating description for overage amount --- .../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 f58cd8c682f9..a603bf5d25c8 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 @@ -8794,7 +8794,7 @@ "type": "string" }, "overageAmount": { - "description": "The total overage amount.", + "description": "The total pre-payment eligible overage amount.", "type": "string" }, "percentComplete": { From 3cc9c76dfebd4895c00fbb17809b6e38d749a20d Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 19 Oct 2020 15:53:13 +0530 Subject: [PATCH 06/10] adding swagger for getPayableOverage API for EA pay now. --- .../preview/2019-10-01-preview/billing.json | 133 +++++++++++++++--- .../examples/GetPayNow.json | 44 +++--- .../examples/GetPayableOverage.json | 27 ++++ .../examples/InitiatePayNow.json | 16 ++- 4 files changed, 176 insertions(+), 44 deletions(-) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.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 a603bf5d25c8..48280acb76d0 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 @@ -5393,12 +5393,12 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/initiatePayNow": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/initiatePayNow": { "post": { "tags": [ "PayNow" ], - "summary": "Initiates a pay now request.", + "summary": "Initiates a pay now request. The operation is supported only for billing accounts with agreement type Enterprise Agreement.", "operationId": "payNow_Initiate", "x-ms-examples": { "InitiateTransfer": { @@ -5407,10 +5407,10 @@ }, "parameters": [ { - "$ref": "#/parameters/billingAccountNameParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/invoiceNameParameter" + "$ref": "#/parameters/billingAccountNameParameter" }, { "name": "parameters", @@ -5438,12 +5438,12 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/payNows/{payNowName}": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/payNow/{payNowName}": { "get": { "tags": [ "PayNow" ], - "description": "Gets a pay now request by ID. The operation is supported only for billing accounts with agreement type Enterprise Agreement..", + "description": "Gets a pay now request by ID. The operation is supported only for billing accounts with agreement type Enterprise Agreement.", "operationId": "PayNow_Get", "x-ms-examples": { "PayNowGet": { @@ -5452,10 +5452,10 @@ }, "parameters": [ { - "$ref": "#/parameters/billingAccountNameParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/invoiceNameParameter" + "$ref": "#/parameters/billingAccountNameParameter" }, { "$ref": "#/parameters/payNowNameParameter" @@ -5477,7 +5477,7 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/paynows": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/payNow": { "get": { "tags": [ "PayNow" @@ -5487,7 +5487,7 @@ "$ref": "./examples/PayNowListByBillingAccount.json" } }, - "operationId": "PayNows_ListByBillingAccount", + "operationId": "PayNow_ListByBillingAccount", "description": "Lists the pay nows that are initiated for the billing account. The operation is supported only for billing accounts with agreement type Enterprise Agreement..", "parameters": [ { @@ -5529,6 +5529,51 @@ "nextLinkName": "nextLink" } } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/payableOverage": { + "get": { + "tags": [ + "PayNow" + ], + "description": "Get the payable overage amount for payNow. The operation is supported only for billing accounts with agreement type Enterprise Agreement.", + "operationId": "PayNow_GetPayableOverage", + "x-ms-examples": { + "PayNowGet": { + "$ref": "./examples/GetPayableOverage.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/InitiatePayNowRequest" + }, + "description": "Request parameters that are provided to the initiated pay now operation." + } + ], + "responses": { + "200": { + "description": "The payable overage amount for payNow.", + "schema": { + "$ref": "#/definitions/PayableOverage" + } + }, + "default": { + "description": "Unexpected error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": { @@ -8746,13 +8791,17 @@ "type": "object", "description": "Request parameters to initiate pay now.", "properties": { - "sourceBillingAccountName": { + "invoiceName": { + "type": "string", + "description": "The ID that uniquely identifies an invoice which is being paid off." + }, + "payOffBillingAccountName": { "type": "string", - "description": "The billing account to choose payoff balance." + "description": "The ID of the billing account whose pre-payment balance will be used to pay off the overage.. Currently only within billing account pay-off is supported." }, - "sourcePayoffDate": { + "payOffDate": { "type": "string", - "description": "The payoff date to get balance from source enrollment. The date should be specified in MM-DD-YYYY format." + "description": "The date used to get the pre-payment balance from pay off billing account. The date should be specified in MM-DD-YYYY format." } } }, @@ -8779,26 +8828,47 @@ }, "errorCode": { "description": "The error code for failed pay now.", + "readOnly": true, "type": "string" }, "errorMessage": { "description": "The error message for failed pay now.", + "readOnly": true, "type": "string" }, "id": { "description": "The pay now operation id for the initated pay now.", + "readOnly": true, "type": "string" }, - "invoiceNumber": { + "initiatorEmailAddress": { + "description": "The email ID of the user who intitated the pay now request.", + "readOnly": true, + "type": "string" + }, + "invoiceName": { "description": "The invoice number being paid off.", + "readOnly": true, "type": "string" }, "overageAmount": { "description": "The total pre-payment eligible overage amount.", - "type": "string" + "readOnly": true, + "$ref": "#/definitions/Amount" + }, + "payOffBillingAccountName": { + "type": "string", + "readOnly": true, + "description": "The ID of the billing account whose pre-payment balance will be used to pay off the overage." + }, + "payOffDate": { + "type": "string", + "readOnly": true, + "description": "The effective date used to get the pre-payment balance from pay off billing account." }, "percentComplete": { "description": "The percent of operation completed.", + "readOnly": true, "type": "string" }, "lastModifiedTime": { @@ -8811,8 +8881,9 @@ "description": "Identifies the state of the pay now operation.", "type": "string", "enum": [ - "NotStarted", - "Running", + "Accepted", + "Initiated", + "Processing", "Succeeded", "Failed" ], @@ -8841,6 +8912,32 @@ "readOnly": true } } + }, + "PayableOverage": { + "description": "The latest Azure payable overage amount for pay now.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PayableOverageProperties", + "title": "Available payable overage properties" + } + } + }, + "PayableOverageProperties": { + "description": "The properties of payable overage.", + "properties": { + "amount": { + "description": "Overage amount.", + "readOnly": true, + "$ref": "#/definitions/Amount" + } + } } }, "parameters": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json index d00fd8c64063..dbaeda7f3a37 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json @@ -1,25 +1,27 @@ { - "parameters": { - "api-version": "2019-10-01-preview", - "billingAccountName": "{billingAccountName}", - "invoiceName": "{invoiceName}", - "payNowName":"{payNowName}" - }, - "responses": { - "200": { - "body": { - "properties": { - "creationTime": "2020-09-10T17:32:28Z", - "errorCode": "", - "errorMessage": "", - "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", - "invoiceNumber": "EA00001", - "overageAmount": "100.00", - "percentComplete": "0", - "state": "NotStarted", - "lastModifiedTime": "2020-09-10T17:32:28Z" - } + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "payNowName":"{payNowName}" + }, + "responses": { + "200": { + "body": { + "properties": { + "creationTime": "2020-09-10T17:32:28Z", + "errorCode": "", + "errorMessage": "", + "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", + "invoiceNumber": "EA00001", + "overageAmount": { + "currency": "USD", + "value": 500.00 + }, + "percentComplete": "0", + "state": "Accepted", + "lastModifiedTime": "2020-09-10T17:32:28Z" } } } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json new file mode 100644 index 000000000000..90b56a362e12 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "invoiceName": "{invoiceName}", + "parameters": { + "properties": { + "invoiceNumber": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "amount": { + "currency": "USD", + "value": 500.00 + } + } + } + } + } + } + \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json index 93020f0f1006..a3eb607c4394 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json @@ -5,8 +5,9 @@ "invoiceName": "{invoiceName}", "parameters": { "properties": { - "sourceBillingAccountName": "4999919", - "paymentInstrumentType": "monetaryPrepaymentBalance" + "invoiceName": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10" } } }, @@ -18,10 +19,15 @@ "errorCode": "", "errorMessage": "", "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", - "invoiceNumber": "EA00001", - "overageAmount": "100.00", + "invoiceName": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10", + "overageAmount": { + "currency": "USD", + "value": 500.00 + }, "percentComplete": "0", - "state": "NotStarted", + "state": "Accepted", "lastModifiedTime": "2020-09-10T17:32:28Z" } } From afbdce69b59eb7ed9dbecda16ed842d93b884d1d Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 19 Oct 2020 17:02:53 +0530 Subject: [PATCH 07/10] prettier check and fix --- .../preview/2019-10-01-preview/billing.json | 2 +- .../examples/GetPayNow.json | 4 +- .../examples/GetPayableOverage.json | 37 ++++++++------- .../examples/PayNowListByBillingAccount.json | 45 +++++++++---------- 4 files changed, 43 insertions(+), 45 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 48280acb76d0..17fe61c1f69c 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 @@ -5477,7 +5477,7 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/payNow": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/payNow": { "get": { "tags": [ "PayNow" diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json index dbaeda7f3a37..d0b38ef00af7 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json @@ -2,7 +2,7 @@ "parameters": { "api-version": "2019-10-01-preview", "billingAccountName": "{billingAccountName}", - "payNowName":"{payNowName}" + "payNowName": "{payNowName}" }, "responses": { "200": { @@ -24,4 +24,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json index 90b56a362e12..f0eca757d2ba 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json @@ -1,27 +1,26 @@ { + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "invoiceName": "{invoiceName}", "parameters": { - "api-version": "2019-10-01-preview", - "billingAccountName": "{billingAccountName}", - "invoiceName": "{invoiceName}", - "parameters": { - "properties": { - "invoiceNumber": "EA00001", - "payOffBillingAccountName": "4999919", - "payOffDate": "2020-09-10" - } + "properties": { + "invoiceNumber": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10" } - }, - "responses": { - "200": { - "body": { - "properties": { - "amount": { - "currency": "USD", - "value": 500.00 - } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "amount": { + "currency": "USD", + "value": 500.00 } } } } } - \ No newline at end of file +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json index 68a0abaf53c6..2b1400885a40 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json @@ -1,28 +1,27 @@ { - "parameters": { - "api-version": "2019-10-01-preview", - "billingAccountName": "{billingAccountName}" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "properties": { - "creationTime": "2020-09-10T17:32:28Z", - "errorCode": "", - "errorMessage": "", - "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", - "invoiceNumber": "EA00001", - "overageAmount": "100.00", - "percentComplete": "0", - "state": "NotStarted", - "lastModifiedTime": "2020-09-10T17:32:28Z" - } + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "creationTime": "2020-09-10T17:32:28Z", + "errorCode": "", + "errorMessage": "", + "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", + "invoiceNumber": "EA00001", + "overageAmount": "100.00", + "percentComplete": "0", + "state": "NotStarted", + "lastModifiedTime": "2020-09-10T17:32:28Z" } - ] - } + } + ] } } } - \ No newline at end of file +} From ab84accd7f74baea417bdebe6d47a1a5078f49bb Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 19 Oct 2020 17:28:52 +0530 Subject: [PATCH 08/10] PayNow API model validation and fix --- .../preview/2019-10-01-preview/billing.json | 7 +++---- .../2019-10-01-preview/examples/GetPayNow.json | 6 ++++-- .../examples/GetPayableOverage.json | 2 +- .../2019-10-01-preview/examples/InitiatePayNow.json | 2 +- .../examples/PayNowListByBillingAccount.json | 11 ++++++++--- 5 files changed, 17 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 17fe61c1f69c..4b7ff4a40330 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 @@ -8881,10 +8881,9 @@ "description": "Identifies the state of the pay now operation.", "type": "string", "enum": [ - "Accepted", - "Initiated", - "Processing", - "Succeeded", + "Pending", + "InProgress", + "Completed", "Failed" ], "readOnly": true, diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json index d0b38ef00af7..02ef84121cc4 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json @@ -12,13 +12,15 @@ "errorCode": "", "errorMessage": "", "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", - "invoiceNumber": "EA00001", + "invoiceName": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10", "overageAmount": { "currency": "USD", "value": 500.00 }, "percentComplete": "0", - "state": "Accepted", + "state": "Pending", "lastModifiedTime": "2020-09-10T17:32:28Z" } } diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json index f0eca757d2ba..786dfafd8c4b 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json @@ -5,7 +5,7 @@ "invoiceName": "{invoiceName}", "parameters": { "properties": { - "invoiceNumber": "EA00001", + "invoiceName": "EA00001", "payOffBillingAccountName": "4999919", "payOffDate": "2020-09-10" } diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json index a3eb607c4394..4064294cac9d 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json @@ -27,7 +27,7 @@ "value": 500.00 }, "percentComplete": "0", - "state": "Accepted", + "state": "Pending", "lastModifiedTime": "2020-09-10T17:32:28Z" } } diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json index 2b1400885a40..cb8ee4487356 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json @@ -13,10 +13,15 @@ "errorCode": "", "errorMessage": "", "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", - "invoiceNumber": "EA00001", - "overageAmount": "100.00", + "invoiceName": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10", + "overageAmount": { + "currency": "USD", + "value": 500.00 + }, "percentComplete": "0", - "state": "NotStarted", + "state": "Pending", "lastModifiedTime": "2020-09-10T17:32:28Z" } } From ab468ac1e2a675e95df7847561fb7e02090e2803 Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 19 Oct 2020 17:41:44 +0530 Subject: [PATCH 09/10] spell check fix --- .../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 4b7ff4a40330..47d957173d54 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 @@ -8837,7 +8837,7 @@ "type": "string" }, "id": { - "description": "The pay now operation id for the initated pay now.", + "description": "The pay now operation id for the initiated pay now.", "readOnly": true, "type": "string" }, From 5a2145a35b4b57dd6cea327f85ff4fc658a4d881 Mon Sep 17 00:00:00 2001 From: Sourav Dash <55159415+so-dash@users.noreply.github.com> Date: Mon, 19 Oct 2020 18:01:00 +0530 Subject: [PATCH 10/10] spellcheck fix --- .../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 47d957173d54..404cec56c9c1 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 @@ -8842,7 +8842,7 @@ "type": "string" }, "initiatorEmailAddress": { - "description": "The email ID of the user who intitated the pay now request.", + "description": "The email ID of the user who initiated the pay now request.", "readOnly": true, "type": "string" },