Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.Billing to add version p…
Browse files Browse the repository at this point in the history
…review/2018-11-01-preview (#6075)

* Microsoft.Billing: Add APIs for validation of subscription transfer and product transfer across invoice sections

* Microsoft.Billing: Add APIs for validation of subscription transfer and product transfer across invoice sections: Fix issues

* Microsoft.Billing: Add APIs for validation of subscription transfer and product transfer across invoice sections

* Microsoft.Billing: Add APIs for validation of subscription transfer and product transfer across invoice sections

* Microsoft.Billing: Add APIs for validation of subscription transfer and product transfer across invoice sections

* Microsoft.Billing: Add APIs for validation of subscription transfer and product transfer across invoice sections

* Microsoft.Billing: Add APIs for validation of subscription transfer and product transfer across invoice sections
  • Loading branch information
batman11235 authored and praries880 committed Jun 3, 2019
1 parent 1682639 commit de2b5ec
Show file tree
Hide file tree
Showing 7 changed files with 297 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,54 @@
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}/validateTransferEligibility": {
"post": {
"x-ms-examples": {
"SubscriptionTransferValidateSuccess": {
"$ref": "./examples/ValidateSubscriptionTransferSuccess.json"
},
"SubscriptionTransferValidateFailure": {
"$ref": "./examples/ValidateSubscriptionTransferFailure.json"
}
},
"operationId": "BillingSubscriptions_ValidateTransfer",
"description": "Validates the transfer of billing subscriptions across invoice sections.",
"parameters": [
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"$ref": "#/parameters/invoiceSectionNameParameter"
},
{
"$ref": "#/parameters/billingSubscriptionNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TransferBillingSubscriptionRequestProperties"
},
"description": "Parameters supplied to the Transfer Billing Subscription operation."
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/ValidateSubscriptionTransferEligibilityResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products": {
"get": {
"tags": [
Expand Down Expand Up @@ -1658,6 +1706,54 @@
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/products/{productName}/validateTransferEligibility": {
"post": {
"x-ms-examples": {
"SubscriptionTransferValidateSuccess": {
"$ref": "./examples/ValidateProductTransferSuccess.json"
},
"SubscriptionTransferValidateFailure": {
"$ref": "./examples/ValidateProductTransferFailure.json"
}
},
"operationId": "Products_ValidateTransfer",
"description": "Validates the transfer of products across invoice sections.",
"parameters": [
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"$ref": "#/parameters/invoiceSectionNameParameter"
},
{
"$ref": "#/parameters/productNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TransferProductRequestProperties"
},
"description": "Parameters supplied to the Transfer Products operation."
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/ValidateProductTransferEligibilityResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions": {
"get": {
"tags": [
Expand Down Expand Up @@ -3838,8 +3934,12 @@
"description": "The properties of the product to initiate a transfer.",
"properties": {
"destinationInvoiceSectionId": {
"description": "Destination invoice section id.",
"type": "string"
"type": "string",
"description": "The destination invoice section id."
},
"destinationBillingProfileId": {
"type": "string",
"description": "The destination billing profile id."
}
}
},
Expand Down Expand Up @@ -3882,9 +3982,64 @@
"destinationInvoiceSectionId": {
"type": "string",
"description": "The destination invoice section id."
},
"destinationBillingProfileId": {
"type": "string",
"description": "The destination billing profile id."
}
}
},
"ValidateSubscriptionTransferEligibilityResult": {
"type": "object",
"description": "Result of the transfer eligibility validation.",
"properties": {
"isTransferEligible": {
"description": "Specifies whether the transfer is eligible or not.",
"type": "boolean",
"readOnly": true
},
"errorDetails": {
"description": "Validation error details.",
"$ref": "#/definitions/ValidateSubscriptionTransferEligibilityError"
}
}
},
"ValidateSubscriptionTransferEligibilityError": {
"type": "object",
"description": "Error details of the transfer eligibility validation",
"properties": {
"code": {
"description": "Error code for the product transfer validation.",
"$ref": "#/definitions/SubscriptionTransferValidationErrorCode"
},
"message": {
"description": "The error message.",
"type": "string"
},
"details": {
"description": "Detailed error message explaining the error.",
"type": "string"
}
}
},
"SubscriptionTransferValidationErrorCode": {
"type": "string",
"description": "Error code of the transfer validation response.",
"enum": [
"InvalidSource",
"SubscriptionNotActive",
"InsufficientPermissionOnSource",
"InsufficientPermissionOnDestination",
"DestinationBillingProfilePastDue",
"SubscriptionTypeNotSupported",
"CrossBillingAccountNotAllowed",
"NotAvailableForDestinationMarket"
],
"x-ms-enum": {
"name": "subscriptionTransferValidationErrorCode",
"modelAsString": true
}
},
"UpdateAutoRenewOperationSummary": {
"type": "object",
"description": "Summary of cancel product operation",
Expand Down Expand Up @@ -4908,6 +5063,58 @@
}
}
},
"ValidateProductTransferEligibilityResult": {
"type": "object",
"description": "Result of the product transfer eligibility validation.",
"properties": {
"isTransferEligible": {
"description": "Specifies whether the transfer is eligible or not.",
"type": "boolean",
"readOnly": true
},
"errorDetails": {
"description": "Validation error details.",
"$ref": "#/definitions/ValidateProductTransferEligibilityError"
}
}
},
"ValidateProductTransferEligibilityError": {
"type": "object",
"description": "Error details of the product transfer eligibility validation.",
"properties": {
"code": {
"description": "Error code for the product transfer validation.",
"$ref": "#/definitions/ProductTransferValidationErrorCode"
},
"message": {
"description": "The error message.",
"type": "string"
},
"details": {
"description": "Detailed error message explaining the error.",
"type": "string"
}
}
},
"ProductTransferValidationErrorCode": {
"type": "string",
"description": "Error code of the transfer validation response.",
"enum": [
"InvalidSource",
"ProductNotActive",
"InsufficientPermissionOnSource",
"InsufficientPermissionOnDestination",
"DestinationBillingProfilePastDue",
"ProductTypeNotSupported",
"CrossBillingAccountNotAllowed",
"NotAvailableForDestinationMarket",
"OneTimePurchaseProductTransferNotAllowed"
],
"x-ms-enum": {
"name": "productTransferValidationErrorCode",
"modelAsString": true
}
},
"BillingSubscriptionsListResult": {
"description": "Result of listing billing subscriptions summary.",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"invoiceSectionName": "{invoiceSectionName}",
"billingSubscriptionName": "{billingSubscriptionName}",
"parameters": {
"destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{newInvoiceSectionName}"
"destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{newInvoiceSectionName}",
"destinationBillingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}"
}
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"invoiceSectionName": "{invoiceSectionName}",
"productName": "{productName}",
"parameters": {
"destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{newInvoiceSectionName}"
"destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{newInvoiceSectionName}",
"destinationBillingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}"
}
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"billingAccountName": "{billingAccountName}",
"invoiceSectionName": "{invoiceSectionName}",
"productName": "{productName}",
"parameters": {
"destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{newInvoiceSectionName}",
"destinationBillingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}"
}
},
"responses": {
"200": {
"body": {
"isTransferEligible": false,
"errorDetails": {
"code" : "ProductTypeNotSupported",
"message" : "Product '{productName}' is not allowed to be transferred."
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"billingAccountName": "{billingAccountName}",
"invoiceSectionName": "{invoiceSectionName}",
"productName": "{productName}",
"parameters": {
"destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{newInvoiceSectionName}",
"destinationBillingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}"
}
},
"responses": {
"200": {
"body": {
"isTransferEligible": true
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"billingAccountName": "{billingAccountName}",
"invoiceSectionName": "{invoiceSectionName}",
"billingSubscriptionName": "{billingSubscriptionName}",
"parameters": {
"destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{newInvoiceSectionName}",
"destinationBillingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}"
}
},
"responses": {
"200": {
"body": {
"isTransferEligible": false,
"errorDetails": {
"code" : "SubscriptionNotActive",
"message" : "Invoice Sections can only be changed for active subscriptions."
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"billingAccountName": "{billingAccountName}",
"invoiceSectionName": "{invoiceSectionName}",
"billingSubscriptionName": "{billingSubscriptionName}",
"parameters": {
"destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{newInvoiceSectionName}",
"destinationBillingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}"
}
},
"responses": {
"200": {
"body": {
"isTransferEligible": true
}
}
}
}

0 comments on commit de2b5ec

Please sign in to comment.