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 5852662bd8d3..443f231fe941 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 @@ -2692,6 +2692,48 @@ } } }, + "/providers/Microsoft.Billing/transfers/{transferName}/validateTransfer": { + "post": { + "tags": [ + "RecipientTransfers" + ], + "summary": "Validates if the products can be transferred in the context of the given transfer name.", + "operationId": "RecipientTransfers_Validate", + "x-ms-examples": { + "ValidateTransfer": { + "$ref": "./examples/ValidateTransfer.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/transferNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AcceptTransferRequest" + }, + "description": "Parameters supplied to validate the transfer." + } + ], + "responses": { + "200": { + "description": "Results of the transfer validation.", + "schema": { + "$ref": "#/definitions/ValidateTransferListResponse" + } + }, + "default": { + "description": "Unexpected error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/transfers/{transferName}/declineTransfer": { "post": { "tags": [ @@ -6209,6 +6251,73 @@ } } }, + "ValidateTransferListResponse": { + "description": "Result of transfer validation.", + "properties": { + "value": { + "description": "The list of transfer validation results.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ValidateTransferResponse" + } + } + } + }, + "ValidateTransferResponse": { + "type": "object", + "description": "Transfer validation response.", + "properties": { + "properties": { + "description": "Transfer validation response properties.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/ValidateTransferResponseProperties" + } + } + }, + "ValidateTransferResponseProperties": { + "type": "object", + "description": "Properties of transfer validation response.", + "properties": { + "status": { + "description": "The status of validation", + "type": "string", + "readOnly": true + }, + "productId": { + "description": "The product id for which this result applies.", + "type": "string", + "readOnly": true + }, + "results": { + "description": "Array of validation results.", + "type": "array", + "items": { + "$ref": "#/definitions/ValidationResultProperties" + } + } + } + }, + "ValidationResultProperties": { + "description": "The properties of the validation result.", + "properties": { + "level": { + "description": "Result Level.", + "type": "string", + "readOnly": true + }, + "code": { + "description": "Result Code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The validation message.", + "type": "string", + "readOnly": true + } + } + }, "Participants": { "description": "Details about the participant or signer.", "properties": { @@ -6453,4 +6562,4 @@ } } } -} +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ValidateTransfer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ValidateTransfer.json new file mode 100644 index 000000000000..71676be98274 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ValidateTransfer.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "transferName": "transferName", + "parameters": { + "properties": { + "productDetails": [ + { + "productType": "AzureSubscription", + "productId": "subscriptionId" + }, + { + "productType": "AzureReservation", + "productId": "reservedInstanceId" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "productId": "subscriptionId", + "status": "Failed", + "results": [ + { + "level": "Error", + "code": "NotIntendedRecipient", + "message": "Intented recipient is different." + } + ] + } + } + ] + } + } + } +} \ No newline at end of file