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..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 @@ -5392,6 +5392,188 @@ } } } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/initiatePayNow": { + "post": { + "tags": [ + "PayNow" + ], + "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": { + "$ref": "./examples/InitiatePayNow.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": "Details of the initiated pay now.", + "schema": { + "$ref": "#/definitions/PayNowDetails" + } + }, + "default": { + "description": "Unexpected error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/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.", + "operationId": "PayNow_Get", + "x-ms-examples": { + "PayNowGet": { + "$ref": "./examples/GetPayNow.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$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}/payNow": { + "get": { + "tags": [ + "PayNow" + ], + "x-ms-examples": { + "PayNowListByBillingAccount": { + "$ref": "./examples/PayNowListByBillingAccount.json" + } + }, + "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": [ + { + "$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" + } + } + }, + "/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": { @@ -8593,6 +8775,168 @@ "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": { + "invoiceName": { + "type": "string", + "description": "The ID that uniquely identifies an invoice which is being paid off." + }, + "payOffBillingAccountName": { + "type": "string", + "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." + }, + "payOffDate": { + "type": "string", + "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." + } + } + }, + "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.", + "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 initiated pay now.", + "readOnly": true, + "type": "string" + }, + "initiatorEmailAddress": { + "description": "The email ID of the user who initiated 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.", + "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": { + "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": [ + "Pending", + "InProgress", + "Completed", + "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 + } + } + }, + "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": { @@ -8747,6 +9091,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..02ef84121cc4 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayNow.json @@ -0,0 +1,29 @@ +{ + "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", + "invoiceName": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10", + "overageAmount": { + "currency": "USD", + "value": 500.00 + }, + "percentComplete": "0", + "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 new file mode 100644 index 000000000000..786dfafd8c4b --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/GetPayableOverage.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "invoiceName": "{invoiceName}", + "parameters": { + "properties": { + "invoiceName": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "amount": { + "currency": "USD", + "value": 500.00 + } + } + } + } + } +} 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..4064294cac9d --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InitiatePayNow.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "invoiceName": "{invoiceName}", + "parameters": { + "properties": { + "invoiceName": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "creationTime": "2020-09-10T17:32:28Z", + "errorCode": "", + "errorMessage": "", + "id": "b6ae2cc6-c1c1-4f98-bb47-e38bcbacf348", + "invoiceName": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10", + "overageAmount": { + "currency": "USD", + "value": 500.00 + }, + "percentComplete": "0", + "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 new file mode 100644 index 000000000000..cb8ee4487356 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PayNowListByBillingAccount.json @@ -0,0 +1,32 @@ +{ + "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", + "invoiceName": "EA00001", + "payOffBillingAccountName": "4999919", + "payOffDate": "2020-09-10", + "overageAmount": { + "currency": "USD", + "value": 500.00 + }, + "percentComplete": "0", + "state": "Pending", + "lastModifiedTime": "2020-09-10T17:32:28Z" + } + } + ] + } + } + } +}