diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json index e4b9fcd940d2..3eadd91378b2 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json @@ -452,7 +452,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/InvoiceSectionProperties" + "$ref": "#/definitions/InvoiceSectionCreationRequest" }, "description": "Parameters supplied to the Create InvoiceSection operation." } @@ -3261,6 +3261,106 @@ } } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingAccounts/default/lineOfCredit/default": { + "get": { + "tags": [ + "LineOfCredits" + ], + "x-ms-examples": { + "LineOfCreditBySubscription": { + "$ref": "./examples/LineOfCreditBySubscription.json" + } + }, + "operationId": "LineOfCredits_Get", + "description": "Get the current line of credit.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/LineOfCredit" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "LineOfCredits" + ], + "operationId": "LineOfCredits_Update", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "IncreaseLineOfCreditBySubscription": { + "$ref": "./examples/IncreaseLineOfCreditBySubscription.json" + } + }, + "description": "Increase the current line of credit.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LineOfCredit" + }, + "description": "Parameters supplied to the increase line of credit operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/LineOfCredit" + } + }, + "202": { + "description": "Accepted. Line of credit increase is in progress.", + "headers": { + "Location": { + "description": "Location URI to poll for result.", + "type": "string" + }, + "Retry-After": { + "description": "Recommends the retryable time after receiving this.", + "type": "integer" + }, + "Azure-AsyncOperation": { + "description": "URI to poll for the operation status", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": { @@ -4198,6 +4298,19 @@ } } }, + "InvoiceSectionCreationRequest": { + "description": "The properties of an InvoiceSection.", + "properties": { + "displayName": { + "description": "The name of the InvoiceSection.", + "type": "string" + }, + "billingProfileId": { + "description": "The billing profile id.", + "type": "string" + } + } + }, "InvoiceSectionListResult": { "description": "Result of listing invoice sections.", "properties": { @@ -4998,8 +5111,7 @@ }, "value": { "description": "Amount value.", - "type": "number", - "readOnly": true + "type": "number" } } }, @@ -5142,13 +5254,11 @@ "properties": { "principalId": { "description": "The user's principal id that the role gets assigned to", - "type": "string", - "readOnly": true + "type": "string" }, - "billingRoleDefinitionName": { + "billingRoleDefinitionId": { "description": "The role definition id", - "type": "string", - "readOnly": true + "type": "string" } } }, @@ -5394,6 +5504,54 @@ } } }, + "LineOfCredit": { + "description": "Line of credit resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "description": "A line of credit.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/LineOfCreditProperties" + } + } + }, + "LineOfCreditProperties": { + "description": "The properties of the line of credit.", + "properties": { + "creditLimit": { + "description": "The current credit limit.", + "$ref": "#/definitions/Amount", + "readOnly": false + }, + "reason": { + "description": "The reason for the line of credit status when not approved.", + "type": "string", + "readOnly": true + }, + "remainingBalance": { + "description": "Remaining balance.", + "$ref": "#/definitions/Amount", + "readOnly": true + }, + "status": { + "description": "The line of credit status.", + "type": "string", + "enum": [ + "Approved", + "Rejected" + ], + "x-ms-enum": { + "name": "status", + "modelAsString": true + } + } + } + }, "Action": { "description": "the action the caller allowed to do", "type": "string", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToBillingAccount.json index eb49ecf69253..ce7497ed96d7 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToBillingAccount.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToBillingAccount.json @@ -4,7 +4,7 @@ "billingAccountName": "{billingAccountName}", "parameters": { "principalId": "00000000-0000-0000-0000-000000000000", - "billingRoleDefinitionName": "10000000-aaaa-bbbb-cccc-100000000000" + "billingRoleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleDefinition/10000000-aaaa-bbbb-cccc-100000000000" } }, "responses": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToBillingProfile.json index cd517a9f64e0..620efb6d2376 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToBillingProfile.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToBillingProfile.json @@ -5,7 +5,7 @@ "billingProfileName": "{billingProfileName}", "parameters": { "principalId": "00000000-0000-0000-0000-000000000000", - "billingRoleDefinitionName": "10000000-aaaa-bbbb-cccc-100000000000" + "billingRoleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/billingRoleDefinition/10000000-aaaa-bbbb-cccc-100000000000" } }, "responses": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToInvoiceSection.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToInvoiceSection.json index 147fc6e98e1b..dd28f30193fb 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToInvoiceSection.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AddRoleAssignmentToInvoiceSection.json @@ -5,7 +5,7 @@ "invoiceSectionName": "{invoiceSectionName}", "parameters": { "principalId": "00000000-0000-0000-0000-000000000000", - "billingRoleDefinitionName": "10000000-aaaa-bbbb-cccc-100000000000" + "billingRoleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleDefinition/10000000-aaaa-bbbb-cccc-100000000000" } }, "responses": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CreateInvoiceSection.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CreateInvoiceSection.json index 8ae4027a6062..18115ac60ade 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CreateInvoiceSection.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CreateInvoiceSection.json @@ -4,43 +4,7 @@ "billingAccountName": "{billingAccountName}", "parameters": { "displayName": "invoiceSection1", - "billingProfiles": [ - { - "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", - "name": "11000000-0000-0000-0000-000000000000", - "type": "Microsoft.Billing/billingProfiles", - "properties": { - "displayName": "BillingProfile1", - "address": { - "companyName": "Contoso", - "firstName": "Test", - "lastName": "User", - "addressLine1": "Test Address1", - "addressLine2": "Test Address2", - "addressLine3": "Test Address3", - "city": "City", - "postalCode": "00000", - "region": "WA", - "country": "US" - }, - "currency": "USD", - "enabledAzureSKUs": [ - { - "skuId": "0001", - "skuDescription": "Microsoft Azure Dev/Test" - }, - { - "skuId": "0002", - "skuDescription": "Microsoft Azure Standard" - } - ], - "isClassic": false, - "invoiceDay": 5, - "invoiceEmailOptIn": true, - "poNumber": "ABC12345" - } - } - ] + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000" } }, "responses": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/IncreaseLineOfCreditBySubscription.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/IncreaseLineOfCreditBySubscription.json new file mode 100644 index 000000000000..1f774348c076 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/IncreaseLineOfCreditBySubscription.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "subscriptionId": "{subscriptionId}", + "parameters": { + "properties": { + "creditLimit": { + "value": 20000.00 + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingAccounts/default/lineOfCredit/default", + "name": "default", + "type": "Microsoft.Billing/lineOfCredit", + "properties": { + "creditLimit": { + "currency": "USD", + "value": 20000.00 + }, + "reason": null, + "remainingBalance": { + "currency": "USD", + "value": 6000.00 + }, + "status": "Approved" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/operationResults/44000000-0000-0000-0000-000000000000?api-version=2018-11-01-preview", + "Retry-After": "60", + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Billing/operationStatus/44000000-0000-0000-0000-000000000000?api-version=2018-11-01-preview", + "OData-EntityId": "44000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/LineOfCreditBySubscription.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/LineOfCreditBySubscription.json new file mode 100644 index 000000000000..56ec57a1abe9 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/LineOfCreditBySubscription.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingAccounts/default/lineOfCredit/default", + "name": "default", + "type": "Microsoft.Billing/lineOfCredit", + "properties": { + "creditLimit": { + "currency": "USD", + "value": 20000.00 + }, + "reason": null, + "remainingBalance": { + "currency": "USD", + "value": 6000.00 + }, + "status": "Approved" + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/UpdateBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/UpdateBillingProfile.json index 7ac6eef2413b..f4599bd453b7 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/UpdateBillingProfile.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/UpdateBillingProfile.json @@ -6,8 +6,7 @@ "parameters": { "properties": { "displayName": "BillingProfile11", - "poNumber": "ABC12345", - "isClassic": false + "poNumber": "ABC12345" } } },