-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Amaga/update customer policy #7210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f76db3f
1f21132
f2c897f
041a564
74c6216
a48d205
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2629,6 +2629,94 @@ | |
| } | ||
| } | ||
| } | ||
| }, | ||
| "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default": { | ||
| "get": { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I noticed that there's no delete support here. Does the resource always exist? (As in GET always returns a successful response?)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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": { | ||
|
|
@@ -6452,6 +6540,39 @@ | |
| } | ||
| } | ||
| } | ||
| }, | ||
| "CustomerPolicy": { | ||
majastrz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "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.", | ||
|
|
||
| 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" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.