Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2629,6 +2629,94 @@
}
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default": {
"get": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get [](start = 7, length = 3)

I noticed that there's no delete support here. Does the resource always exist? (As in GET always returns a successful response?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this resource always exist

"tags": [
"Policies"
],
"operationId": "Policies_GetByCustomer",
"description": "The policy for a given billing account name and customer name.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/billing/"
},
"x-ms-examples": {
"PolicyByCustomer": {
"$ref": "./examples/CustomerPolicy.json"
}
},
"parameters": [
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"$ref": "#/parameters/customerNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/CustomerPolicy"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Policies"
],
"operationId": "Policies_UpdateCustomer",
"description": "The operation to update a Customer policy.",
"x-ms-examples": {
"UpdateCustomer": {
"$ref": "./examples/UpdateCustomerPolicy.json"
}
},
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"$ref": "#/parameters/customerNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CustomerPolicy"
},
"description": "Parameters supplied to the update customer policy operation."
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/CustomerPolicy"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default": {
"get": {
Expand Down Expand Up @@ -6452,6 +6540,39 @@
}
}
}
},
"CustomerPolicy": {
"description": "The Customer's Policy.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/CustomerPolicyProperties",
"title": "Customer Policy properties"
}
}
},
"CustomerPolicyProperties": {
"description": "The properties of a Customer's policy.",
"properties": {
"viewCharges": {
"description": "Customer can view retail prices.",
"type": "string",
"enum": [
"Allowed",
"NotAllowed"
],
"x-ms-enum": {
"name": "ViewCharges",
"modelAsString": true
}
}
}
},
"AvailableBalance": {
"description": "Latest available balance on Monetary Credit PI.",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2019-10-01-preview",
"billingAccountName": "{billingAccountName}",
"customerName": "{customerName}"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default",
"name": "default",
"type": "Microsoft.Billing/billingAccounts/customers/policies",
"properties": {
"viewCharges": "Allowed"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"api-version": "2019-10-01-preview",
"billingAccountName": "{billingAccountName}",
"customerName": "{customerName}",
"eTag": "\"1d34d012214127f\"",
"parameters": {
"properties": {
"viewCharges": "NotAllowed"
}
}
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default",
"name": "default",
"type": "Microsoft.Billing/billingAccounts/customers/policies",
"properties": {
"viewCharges": "NotAllowed"
}
}
}
}
}