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..29086647300f 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 @@ -2478,7 +2478,7 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/initiateTransfer": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/initiateTransfer": { "post": { "tags": [ "Transfers" @@ -2494,9 +2494,6 @@ { "$ref": "#/parameters/billingAccountNameParameter" }, - { - "$ref": "#/parameters/billingProfileNameParameter" - }, { "$ref": "#/parameters/customerNameParameter" }, @@ -2526,7 +2523,7 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers/{transferName}": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/transfers/{transferName}": { "get": { "tags": [ "Transfers" @@ -2542,9 +2539,6 @@ { "$ref": "#/parameters/billingAccountNameParameter" }, - { - "$ref": "#/parameters/billingProfileNameParameter" - }, { "$ref": "#/parameters/customerNameParameter" }, @@ -2582,9 +2576,6 @@ { "$ref": "#/parameters/billingAccountNameParameter" }, - { - "$ref": "#/parameters/billingProfileNameParameter" - }, { "$ref": "#/parameters/customerNameParameter" }, @@ -2608,7 +2599,7 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/transfers": { "get": { "tags": [ "Transfers" @@ -2624,9 +2615,6 @@ { "$ref": "#/parameters/billingAccountNameParameter" }, - { - "$ref": "#/parameters/billingProfileNameParameter" - }, { "$ref": "#/parameters/customerNameParameter" } @@ -2692,6 +2680,48 @@ } } }, + "/providers/Microsoft.Billing/transfers/{transferName}/validateTransfer": { + "post": { + "tags": [ + "RecipientTransfers" + ], + "summary": "Validates if the products can be transfered 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/ValidateTransferResponse" + } + }, + "default": { + "description": "Unexpected error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/transfers/{transferName}/declineTransfer": { "post": { "tags": [ @@ -6207,6 +6237,73 @@ "type": "string", "readOnly": true } + }, + "ValidationResults": { + "description": "Array containing the results of transfer validation.", + "properties": { + "value": { + "description": "List of validation results.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ValidationResultProperties" + } + } + } + }, + "ValidationResultProperties": { + "description": "The properties of the validation result.", + "properties": { + "productId": { + "description": "The product id for which this result applies.", + "type": "string", + "readOnly": true + }, + "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 + } + } + }, + "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": { + "validationStatus": { + "description": "The status of validation", + "type": "string", + "readOnly": true + }, + "ValidationResults": { + "description": "Array of validation results.", + "type": "array", + "items": { + "$ref": "#/definitions/ValidationResult" + } + } + } } }, "Participants": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerCancelTransfer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerCancelTransfer.json index d028698305f9..baf92ee116e1 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerCancelTransfer.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerCancelTransfer.json @@ -2,7 +2,6 @@ "parameters": { "api-version": "2019-10-01-preview", "billingAccountName": "{billingAccountName}", - "billingProfileName": "{billingProfileName}", "customerName": "{customerName}", "transferName": "transferName" }, @@ -13,8 +12,7 @@ "creationTime": "2018-10-10T17:32:28Z", "expirationTime": "2018-11-05T17:32:28Z", "billingAccountId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}", - "billingProfileId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", - "invoiceSectionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}", + "invoiceSectionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}", "transferStatus": "Pending", "recipientEmailId": "user@contoso.com", "initiatorEmailId": "xyz@contoso.com", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerGetTransfer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerGetTransfer.json index 5c7540f29c58..0b75930a6d79 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerGetTransfer.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerGetTransfer.json @@ -2,7 +2,6 @@ "parameters": { "api-version": "2019-10-01-preview", "billingAccountName": "{billingAccountName}", - "billingProfileName": "{billingProfileName}", "customerName": "{customerName}", "transferName": "transferName" }, @@ -13,8 +12,7 @@ "creationTime": "2018-10-10T17:32:28Z", "expirationTime": "2018-11-05T17:32:28Z", "billingAccountId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}", - "billingProfileId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", - "invoiceSectionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}", + "invoiceSectionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}", "initiatorCustomerType": "Partner", "transferStatus": "InProgress", "recipientEmailId": "user@contoso.com", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerInitiateTransfer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerInitiateTransfer.json index d9f14dde3aae..31e158a5bead 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerInitiateTransfer.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerInitiateTransfer.json @@ -2,7 +2,6 @@ "parameters": { "api-version": "2019-10-01-preview", "billingAccountName": "{billingAccountName}", - "billingProfileName": "{billingProfileName}", "customerName": "{customerName}", "parameters": { "properties": { @@ -17,8 +16,7 @@ "creationTime": "2018-10-10T17:32:28Z", "expirationTime": "2018-11-05T17:32:28Z", "billingAccountId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}", - "billingProfileId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", - "invoiceSectionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}", + "invoiceSectionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}", "transferStatus": "Pending", "recipientEmailId": "user@contoso.com", "initiatorEmailId": "xyz@contoso.com", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerListTransfers.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerListTransfers.json index 34ca3d04c1dc..bc338e9406d1 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerListTransfers.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PartnerListTransfers.json @@ -2,7 +2,6 @@ "parameters": { "api-version": "2019-10-01-preview", "billingAccountName": "{billingAccountName}", - "billingProfileName": "{billingProfileName}", "customerName": "{customerName}" }, "responses": { @@ -14,8 +13,7 @@ "creationTime": "2018-10-10T17:32:28Z", "expirationTime": "2018-11-05T17:32:28Z", "billingAccountId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}", - "billingProfileId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", - "invoiceSectionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}", + "invoiceSectionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}", "transferStatus": "InProgress", "recipientEmailId": "user@contoso.com", "initiatorEmailId": "xyz@contoso.com", 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..6e39b6e88d72 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ValidateTransfer.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "transferName": "transferName", + "parameters": { + "properties": { + "productDetails": [ + { + "productType": "AzureSubscription", + "productId": "subscriptionId" + }, + { + "productType": "AzureReservation", + "productId": "reservedInstanceId" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "validationStatus": "Succeeded", + "ValidationResults": [ + { + "level": "Error", + "productId": "subscriptionId", + "code": "NotIntendedRecipient", + "message" : "Intented recipient is different." + } + ] + } + } + } + } +}