299 строки
8.9 KiB
JSON
299 строки
8.9 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"version": "2021-10-01",
|
|
"title": "PaymentManagementClient",
|
|
"description": "The billing client allows you to view and manage your billing details programmatically."
|
|
},
|
|
"host": "management.azure.com",
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethodLinks/{paymentMethodName}": {
|
|
"delete": {
|
|
"tags": [
|
|
"PaymentMethods"
|
|
],
|
|
"operationId": "PaymentMethods_DeleteAtBillingProfile",
|
|
"x-ms-long-running-operation": true,
|
|
"description": "Deletes a payment method link and removes the payment method from a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.",
|
|
"externalDocs": {
|
|
"url": "https://docs.microsoft.com/en-us/rest/api/billing/"
|
|
},
|
|
"x-ms-examples": {
|
|
"PaymentMethodAtBillingProfileDelete": {
|
|
"$ref": "./examples/PaymentMethodAtBillingProfile_Delete.json"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/parameters/apiVersionParameter"
|
|
},
|
|
{
|
|
"$ref": "#/parameters/billingAccountNameParameter"
|
|
},
|
|
{
|
|
"$ref": "#/parameters/billingProfileNameParameter"
|
|
},
|
|
{
|
|
"$ref": "#/parameters/paymentMethodNameParameter"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK. The request has succeeded.",
|
|
"schema": {
|
|
"$ref": "#/definitions/DeleteAtBillingProfileResult"
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "The resource was not found.",
|
|
"schema": {
|
|
"$ref": "#/definitions/DeleteAtBillingProfileResult"
|
|
}
|
|
},
|
|
"202": {
|
|
"description": "Accepted",
|
|
"headers": {
|
|
"Location": {
|
|
"description": "Location URI to poll for result",
|
|
"type": "string"
|
|
},
|
|
"Retry-After": {
|
|
"description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.",
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "Conflict. Payment method cannot be detached from billing profile.",
|
|
"x-ms-error-response": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/DetachPaymentMethodEligibilityResult"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Error response describing why the operation failed.",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"DeleteAtBillingProfileResult": {
|
|
"properties": {
|
|
"name": {
|
|
"readOnly": true,
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"ErrorResponse": {
|
|
"description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.",
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"description": "The details of the error.",
|
|
"$ref": "#/definitions/ErrorDetails"
|
|
}
|
|
}
|
|
},
|
|
"ErrorDetails": {
|
|
"description": "The details of the error.",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "Error code.",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"message": {
|
|
"description": "Error message indicating why the operation failed.",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"target": {
|
|
"description": "The target of the particular error.",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"details": {
|
|
"description": "The sub details of the error.",
|
|
"$ref": "#/definitions/ErrorSubDetails"
|
|
}
|
|
}
|
|
},
|
|
"ErrorSubDetails": {
|
|
"description": "The sub details of the error.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "Error code.",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"message": {
|
|
"description": "Error message indicating why the operation failed.",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"target": {
|
|
"description": "The target of the particular error.",
|
|
"type": "string",
|
|
"readOnly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Resource": {
|
|
"description": "The resource model definition.",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"readOnly": true,
|
|
"type": "string",
|
|
"description": "Resource Id."
|
|
},
|
|
"name": {
|
|
"readOnly": true,
|
|
"type": "string",
|
|
"description": "Resource name."
|
|
},
|
|
"type": {
|
|
"readOnly": true,
|
|
"type": "string",
|
|
"description": "Resource type."
|
|
}
|
|
},
|
|
"x-ms-azure-resource": true
|
|
},
|
|
"DetachPaymentMethodEligibilityResult": {
|
|
"description": "Error response indicates that payment method cannot be detached from billing profile.",
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"description": "The details of the error.",
|
|
"$ref": "#/definitions/DetachPaymentMethodEligibilityError"
|
|
}
|
|
}
|
|
},
|
|
"DetachPaymentMethodEligibilityError": {
|
|
"type": "object",
|
|
"description": "The details of the error.",
|
|
"properties": {
|
|
"code": {
|
|
"description": "Error code.",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"message": {
|
|
"description": "Error message.",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"details": {
|
|
"description": "The list of detach payment method eligibility errors.",
|
|
"type": "array",
|
|
"readOnly": true,
|
|
"items": {
|
|
"$ref": "#/definitions/DetachPaymentMethodErrorDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"DetachPaymentMethodErrorDetails": {
|
|
"type": "object",
|
|
"description": "Error details of the detach payment method eligibility validation.",
|
|
"properties": {
|
|
"code": {
|
|
"description": "Error code for the detach payment method eligibility validation.",
|
|
"$ref": "#/definitions/DetachPaymentMethodEligibilityErrorCode"
|
|
},
|
|
"message": {
|
|
"description": "Error message for the detach payment method eligibility validation.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"DetachPaymentMethodEligibilityErrorCode": {
|
|
"type": "string",
|
|
"description": "Error code of the detach payment method eligibility validation response.",
|
|
"enum": [
|
|
"AzureSubscriptions",
|
|
"RecurringCharges",
|
|
"ReservedInstances",
|
|
"OutstandingCharges",
|
|
"PendingCharges"
|
|
],
|
|
"x-ms-enum": {
|
|
"name": "detachPaymentMethodEligibilityErrorCode",
|
|
"modelAsString": true
|
|
}
|
|
}
|
|
},
|
|
"parameters": {
|
|
"apiVersionParameter": {
|
|
"name": "api-version",
|
|
"in": "query",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "The version of the API to be used with the client request. The current version is 2021-10-01."
|
|
},
|
|
"paymentMethodNameParameter": {
|
|
"name": "paymentMethodName",
|
|
"in": "path",
|
|
"description": "The ID that uniquely identifies a payment method.",
|
|
"required": true,
|
|
"type": "string",
|
|
"x-ms-parameter-location": "method"
|
|
},
|
|
"billingAccountNameParameter": {
|
|
"name": "billingAccountName",
|
|
"in": "path",
|
|
"description": "The ID that uniquely identifies a billing account.",
|
|
"required": true,
|
|
"type": "string",
|
|
"x-ms-parameter-location": "method"
|
|
},
|
|
"billingProfileNameParameter": {
|
|
"name": "billingProfileName",
|
|
"in": "path",
|
|
"description": "The ID that uniquely identifies a billing profile.",
|
|
"required": true,
|
|
"type": "string",
|
|
"x-ms-parameter-location": "method"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"azure_auth": [
|
|
"user_impersonation"
|
|
]
|
|
}
|
|
],
|
|
"securityDefinitions": {
|
|
"azure_auth": {
|
|
"type": "oauth2",
|
|
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
|
|
"flow": "implicit",
|
|
"description": "Azure Active Directory OAuth2 Flow.",
|
|
"scopes": {
|
|
"user_impersonation": "impersonate your user account"
|
|
}
|
|
}
|
|
}
|
|
}
|