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 9d0f890cf182..4c0327656ae6 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 @@ -33,7 +33,7 @@ } }, "operationId": "BillingAccounts_List", - "description": "Lists all billing accounts for a user which he has access to.", + "description": "Lists all billing accounts for which a user has access.", "parameters": [ { "$ref": "#/parameters/apiVersionParameter" @@ -59,6 +59,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -368,6 +371,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } }, "post": { @@ -538,6 +544,108 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers": { + "get": { + "tags": [ + "Customers" + ], + "x-ms-examples": { + "CustomersListByBillingAccountName": { + "$ref": "./examples/CustomersListByBillingAccountName.json" + } + }, + "operationId": "Customers_ListByBillingAccountName", + "description": "Lists all customers which the current user can work with on-behalf of a partner.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "name": "$filter", + "description": "May be used to filter using hasPermission('{permissionId}') to only return customers for which the caller has the specified permission.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CustomerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}": { + "get": { + "tags": [ + "Customers" + ], + "x-ms-examples": { + "Customer": { + "$ref": "./examples/Customer.json" + }, + "CustomerWithExpand": { + "$ref": "./examples/CustomerWithExpand.json" + } + }, + "operationId": "Customers_Get", + "description": "Get the customer by id.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand enabledAzureSkus, resellers.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Customer" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections": { "get": { "tags": [ @@ -552,7 +660,7 @@ } }, "operationId": "InvoiceSections_ListByBillingAccountName", - "description": "Lists all invoice sections for a user which he has access to.", + "description": "Lists all invoice sections for which a user has access.", "parameters": [ { "$ref": "#/parameters/apiVersionParameter" @@ -656,7 +764,7 @@ } }, "operationId": "InvoiceSections_ListByBillingProfileName", - "description": "Lists all invoice sections under a billing profile for a user which he has access to.", + "description": "Lists all invoice sections under a billing profile for which a user has access.", "parameters": [ { "$ref": "#/parameters/apiVersionParameter" @@ -681,6 +789,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -727,6 +838,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -853,7 +967,7 @@ } }, "operationId": "Departments_ListByBillingAccountName", - "description": "Lists all departments for a user which he has access to.", + "description": "Lists all departments for which a user has access.", "parameters": [ { "$ref": "#/parameters/apiVersionParameter" @@ -889,6 +1003,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -962,7 +1079,7 @@ } }, "operationId": "EnrollmentAccounts_ListByBillingAccountName", - "description": "Lists all Enrollment Accounts for a user which he has access to.", + "description": "Lists all Enrollment Accounts for which a user has access.", "parameters": [ { "$ref": "#/parameters/apiVersionParameter" @@ -998,6 +1115,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -1104,6 +1224,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -1229,6 +1352,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -1355,6 +1481,99 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_ListByCustomerName", + "description": "Lists billing subscription by customer name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BillingSubscriptionsListByCustomer": { + "$ref": "./examples/BillingSubscriptionsListByCustomer.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_GetByCustomerName", + "description": "Get a single billing subscription by name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BillingSubscriptionByCustomerName": { + "$ref": "./examples/BillingSubscriptionByCustomerName.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionSummary" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } } } }, @@ -1397,6 +1616,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -1651,6 +1873,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -1944,6 +2169,78 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/transactions": { + "get": { + "tags": [ + "Transactions" + ], + "operationId": "Transactions_ListByCustomerName", + "description": "Lists the transactions by invoice section name for given start date and end date.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "TransactionsListByCustomer": { + "$ref": "./examples/TransactionsListByCustomer.json" + }, + "ReservationTransactionsListByCustomer": { + "$ref": "./examples/ReservationTransactionsListByCustomer.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "startDate", + "in": "query", + "description": "Start date", + "required": true, + "type": "string" + }, + { + "name": "endDate", + "in": "query", + "description": "End date", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TransactionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -2010,6 +2307,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -2614,6 +2914,45 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/providers/Microsoft.Billing/billingPermissions": { + "get": { + "tags": [ + "BillingPermissions" + ], + "x-ms-examples": { + "CustomerPermissionsList": { + "$ref": "./examples/CustomerPermissionsList.json" + } + }, + "operationId": "BillingPermissions_ListByCustomers", + "description": "Lists all billing permissions for the caller under customer.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingPermissionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingPermissions": { "get": { "tags": [ @@ -3464,6 +3803,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -4679,6 +5021,63 @@ } } }, + "CustomerListResult": { + "description": "Result of listing customers.", + "properties": { + "value": { + "description": "The list of customers.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Customer" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "Customer": { + "description": "A partner's customer.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "description": "The customer.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/CustomerProperties" + } + } + }, + "CustomerProperties": { + "description": "The properties of a customer.", + "properties": { + "displayName": { + "description": "The name of the customer.", + "type": "string" + }, + "enabledAzureSKUs": { + "description": "Information about the product.", + "type": "array", + "items": { + "$ref": "#/definitions/EnabledAzureSKUs" + } + }, + "resellers": { + "description": "The resellers which are allowed to provide service to this customer.", + "type": "array", + "items": { + "$ref": "#/definitions/Reseller" + } + } + } + }, "InvoiceSectionCreationRequest": { "description": "The properties of an InvoiceSection.", "properties": { @@ -4756,6 +5155,21 @@ } } }, + "Reseller": { + "description": "Details about a reseller.", + "properties": { + "resellerId": { + "description": "The reseller id.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "A description of the reseller.", + "type": "string", + "readOnly": true + } + } + }, "OperationStatus": { "description": "status of the Billing POST/PUT operation.", "properties": { @@ -5286,6 +5700,16 @@ "type": "string", "readOnly": true }, + "customerId": { + "description": "Customer id to which this product belongs.", + "type": "string", + "readOnly": true + }, + "customerDisplayName": { + "description": "Display name of customer to which this product belongs.", + "type": "string", + "readOnly": true + }, "invoiceSectionId": { "description": "Invoice section id to which this product belongs.", "type": "string", @@ -5304,6 +5728,11 @@ "description": "The sku description.", "type": "string", "readOnly": true + }, + "reseller": { + "description": "Reseller for this subscription.", + "readOnly": true, + "$ref": "#/definitions/Reseller" } } }, @@ -5442,6 +5871,16 @@ "type": "integer", "readOnly": true }, + "customerId": { + "description": "Customer id to which this product belongs.", + "type": "string", + "readOnly": true + }, + "customerDisplayName": { + "description": "Display name of customer to which this product belongs.", + "type": "string", + "readOnly": true + }, "invoiceSectionId": { "description": "Invoice section id to which this product belongs.", "type": "string", @@ -6006,14 +6445,22 @@ "subscriptionIdParameter": { "name": "subscriptionId", "in": "path", - "description": "Azure Subscription ID.", + "description": "Azure Subscription Id.", "required": true, "type": "string" }, "billingAccountNameParameter": { "name": "billingAccountName", "in": "path", - "description": "billing Account Id.", + "description": "Billing Account Id.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "customerNameParameter": { + "name": "customerName", + "in": "path", + "description": "Customer Id.", "required": true, "type": "string", "x-ms-parameter-location": "method" diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscription.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscription.json index 77bb958f69e5..caebe45d22cd 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscription.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscription.json @@ -3,8 +3,7 @@ "api-version": "2018-11-01-preview", "billingAccountName": "{billingAccountName}", "invoiceSectionName": "{invoiceSectionName}", - "billingSubscriptionName": "{billingSubscriptionName}", - "$expand": "billingProfile" + "billingSubscriptionName": "{billingSubscriptionName}" }, "responses": { "200": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscriptionByCustomerName.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscriptionByCustomerName.json new file mode 100644 index 000000000000..6f586bf7f748 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscriptionByCustomerName.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}", + "billingSubscriptionName": "{billingSubscriptionName}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}", + "name": "{billingSubscriptionName}", + "type": "Microsoft.Billing/billingSubscriptions", + "properties": { + "displayName": "My Subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer1", + "reseller": { + "resellerId": "3b65b5a8-bd4f-4084-90e9-e1bd667a2b19", + "description": "Reseller2" + }, + "skuId": "0002", + "skuDescription": "Microsoft Azure Standard" + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscriptionsListByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscriptionsListByCustomer.json new file mode 100644 index 000000000000..3a93ce1c1092 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/BillingSubscriptionsListByCustomer.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/billinSubscriptionId1", + "name": "billingSubscriptionId1", + "type": "Microsoft.Billing/billingSubscriptions", + "properties": { + "displayName": "My subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer1", + "reseller": { + "resellerId": "89e87bdf-a2a2-4687-925f-4c18b27bccfd", + "description": "Reseller1" + }, + "skuId": "0002", + "skuDescription": "Microsoft Azure Standard" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/billinSubscriptionId2", + "name": "billingSubscriptionId2", + "type": "Microsoft.Billing/billingSubscriptions", + "properties": { + "displayName": "Test subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 1000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 400 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer1", + "reseller": { + "resellerId": "3b65b5a8-bd4f-4084-90e9-e1bd667a2b19", + "description": "Reseller3" + }, + "skuId": "0002", + "skuDescription": "Microsoft Azure Standard" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/Customer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/Customer.json new file mode 100644 index 000000000000..475cce8af447 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/Customer.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "name": "{customerName}", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customer1" + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CustomerPermissionsList.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CustomerPermissionsList.json new file mode 100644 index 000000000000..57e3e251267c --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CustomerPermissionsList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "actions": [ + "30000000-aaaa-bbbb-cccc-200000000007", + "30000000-aaaa-bbbb-cccc-200000000004", + "30000000-aaaa-bbbb-cccc-200000000015", + "30000000-aaaa-bbbb-cccc-200000000009", + "30000000-aaaa-bbbb-cccc-200000000000", + "30000000-aaaa-bbbb-cccc-200000000010", + "30000000-aaaa-bbbb-cccc-200000000001" + ], + "notActions": [ ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CustomerWithExpand.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CustomerWithExpand.json new file mode 100644 index 000000000000..ae20d0141e0f --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CustomerWithExpand.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}", + "$expand": "enabledAzureSkus,resellers" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "name": "{customerName}", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customerName1", + "enabledAzureSKUs": [ + { + "skuId": "0002", + "skuDescription": "Microsoft Azure Standard" + } + ], + "resellers": [ + { + "resellerId": "89e87bdf-a2a2-4687-925f-4c18b27bccfd", + "description": "Reseller1" + }, + { + "resellerId": "3b65b5a8-bd4f-4084-90e9-e1bd667a2b19", + "description": "Reseller2" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CustomersListByBillingAccountName.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CustomersListByBillingAccountName.json new file mode 100644 index 000000000000..bcfb3ff1638e --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CustomersListByBillingAccountName.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000000", + "name": "22000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customer1" + } + }, + { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000011", + "name": "22000000-0000-0000-0000-000000000011", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customer2" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/PaymentMethodsListByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/PaymentMethodsListByBillingAccount.json index e9a2974d9f4f..a3c60fad1a81 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/PaymentMethodsListByBillingAccount.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/PaymentMethodsListByBillingAccount.json @@ -14,7 +14,7 @@ "properties": { "currency": "USD", "details": "Credits", - "expiration": "4/2020", + "expiration": "2014-03-18T18:25:43.511Z", "paymentMethodType": "Credits" } }, diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/PaymentMethodsListByBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/PaymentMethodsListByBillingProfile.json index 63a34f586995..58b96f9d9a57 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/PaymentMethodsListByBillingProfile.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/PaymentMethodsListByBillingProfile.json @@ -15,7 +15,7 @@ "properties": { "currency": "USD", "details": "Credits", - "expiration": "4/2020", + "expiration": "2014-03-18T18:25:43.511Z", "paymentMethodType": "Credits" } }, diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/ReservationTransactionsListByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/ReservationTransactionsListByCustomer.json new file mode 100644 index 000000000000..a26e20bb3ab6 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/ReservationTransactionsListByCustomer.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}", + "startDate": "2018-04-01", + "endDate": "2018-05-30", + "$filter": "properties/kind eq 'Reservation'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/transactions/41000000-0000-0000-0000-000000000000", + "name": "41000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/transactions", + "properties": { + "kind": "reservation", + "date": "2018-04-23T00:00:00Z", + "invoice": "2344233", + "orderName": "Contoso Reserved", + "orderId": "6d8e7ed9-d3be-48b0-8c7a-e19246a6d30c", + "productDescription": "Standard D1, US West 3", + "transactionType": "Cancel", + "transactionAmount": { + "currency": "USD", + "value": 5000.00 + }, + "quantity": 4, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Contoso operations customer", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "subscriptionName": "Contoso operations billing" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/transactions/82000000-0000-0000-0000-000000000000", + "name": "82000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/transactions", + "properties": { + "kind": "reservation", + "date": "2018-05-05T00:00:00Z", + "invoice": "Pending", + "orderName": "Test Reserved", + "orderId": "1c24006f-8350-4315-ad8f-6d11180448f9", + "productDescription": "Standard D1, US West 3", + "transactionType": "Purchase", + "transactionAmount": { + "currency": "USD", + "value": 6000.00 + }, + "quantity": 5, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Contoso operations customer", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "subscriptionName": "Contoso operations billing" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/TransactionsListByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/TransactionsListByCustomer.json new file mode 100644 index 000000000000..48a57d755e6f --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/TransactionsListByCustomer.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}", + "startDate": "2018-04-01", + "endDate": "2018-05-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/transactions/41000000-0000-0000-0000-000000000000", + "name": "41000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/transactions", + "properties": { + "kind": "all", + "date": "2018-05-01T00:00:00Z", + "invoice": "2344233", + "productFamily": "Storage", + "productTypeId": "A12345", + "productType": "Reserved VM Instance", + "productDescription": "Standard D1, US West 3", + "transactionType": "Purchase", + "transactionAmount": { + "currency": "USD", + "value": 5000.00 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Contoso operations customer" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/transactions/51000000-0000-0000-0000-000000000000", + "name": "51000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/transactions", + "properties": { + "kind": "all", + "date": "2018-04-01T00:00:00Z", + "invoice": "pending", + "productFamily": "Storage", + "productTypeId": "A12345", + "productType": "VM Instance", + "productDescription": "Standard Support", + "transactionType": "Cancel", + "transactionAmount": { + "currency": "USD", + "value": 50.00 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Contoso operations customer" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 5852662bd8d3..041933c43746 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -163,7 +163,7 @@ "tags": [ "PaymentMethods" ], - "operationId": "PaymentMethods_ListByBillingAccountName", + "operationId": "PaymentMethods_ListByBillingAccount", "description": "Lists the Payment Methods by billing account Id.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/2019-10-01-preview/paymentmethods" @@ -288,7 +288,7 @@ "tags": [ "PaymentMethods" ], - "operationId": "PaymentMethods_ListByBillingProfileName", + "operationId": "PaymentMethods_ListByBillingProfile", "description": "Lists the Payment Methods by billing profile Id.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -334,14 +334,14 @@ "BillingProfiles" ], "x-ms-examples": { - "BillingProfilesListByBillingAccountName": { - "$ref": "./examples/BillingProfilesListByBillingAccountName.json" + "BillingProfilesListByBillingAccount": { + "$ref": "./examples/BillingProfilesListByBillingAccount.json" }, "BillingProfilesListWithExpand": { "$ref": "./examples/BillingProfilesListWithExpand.json" } }, - "operationId": "BillingProfiles_ListByBillingAccountName", + "operationId": "BillingProfiles_ListByBillingAccount", "description": "Lists all billing profiles for a user which that user has access to.", "parameters": [ { @@ -543,17 +543,73 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers": { + "get": { + "tags": [ + "Customers" + ], + "x-ms-examples": { + "CustomersListByBillingAccount": { + "$ref": "./examples/CustomersListByBillingProfile.json" + } + }, + "operationId": "Customers_ListByBillingProfile", + "description": "Lists customers by billing profile which the current user can work with on-behalf of a partner.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "name": "$filter", + "description": "May be used to filter the list of customers.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CustomerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections": { "get": { "tags": [ "InvoiceSections" ], "x-ms-examples": { - "InvoiceSectionsListByBillingProfileName": { - "$ref": "./examples/InvoiceSectionsListByBillingProfileName.json" + "InvoiceSectionsListByBillingProfile": { + "$ref": "./examples/InvoiceSectionsListByBillingProfile.json" } }, - "operationId": "InvoiceSections_ListByBillingProfileName", + "operationId": "InvoiceSections_ListByBillingProfile", "description": "Lists all invoice sections for a user which he has access to.", "parameters": [ { @@ -750,17 +806,411 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers": { + "get": { + "tags": [ + "Customers" + ], + "x-ms-examples": { + "CustomersListByBillingAccount": { + "$ref": "./examples/CustomersListByBillingAccount.json" + } + }, + "operationId": "Customers_ListByBillingAccount", + "description": "Lists customers which the current user can work with on-behalf of a partner.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "name": "$filter", + "description": "May be used to filter the list of customers.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CustomerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}": { + "get": { + "tags": [ + "Customers" + ], + "x-ms-examples": { + "Customer": { + "$ref": "./examples/Customer.json" + }, + "CustomerWithExpand": { + "$ref": "./examples/CustomerWithExpand.json" + } + }, + "operationId": "Customers_Get", + "description": "Gets a customer by its id.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand enabledAzurePlans, resellers.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Customer" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingPermissions": { + "get": { + "tags": [ + "BillingPermissions" + ], + "x-ms-examples": { + "BillingProfilePermissionsList": { + "$ref": "./examples/CustomerPermissionsList.json" + } + }, + "operationId": "BillingPermissions_ListByCustomer", + "description": "Lists all billing permissions the caller has for a customer.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingPermissionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_ListByCustomer", + "description": "Lists billing subscription by customer id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BillingSubscriptionsListByCustomer": { + "$ref": "./examples/BillingSubscriptionsListByCustomer.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_GetByCustomer", + "description": "Get a single billing subscription by id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BillingSubscriptionByCustomer": { + "$ref": "./examples/BillingSubscriptionByCustomer.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscription" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products": { + "get": { + "tags": [ + "Products" + ], + "operationId": "Products_ListByCustomer", + "description": "Lists products by customer id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "ProductsListByInvoiceSection": { + "$ref": "./examples/ProductsListByCustomer.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$filter", + "description": "May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ProductsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products/{productName}": { + "get": { + "tags": [ + "Products" + ], + "operationId": "Products_GetByCustomer", + "description": "Get a customer's product by name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "Product": { + "$ref": "./examples/ProductByCustomer.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "$ref": "#/parameters/productNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Product" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/transactions": { + "get": { + "tags": [ + "Transactions" + ], + "operationId": "Transactions_ListByCustomer", + "description": "Lists the transactions by customer id for given start date and end date.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "TransactionsListByCustomer": { + "$ref": "./examples/TransactionsListByCustomer.json" + }, + "ReservationTransactionsListByCustomer": { + "$ref": "./examples/ReservationTransactionsListByCustomer.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "startDate", + "in": "query", + "description": "Start date", + "required": true, + "type": "string" + }, + { + "name": "endDate", + "in": "query", + "description": "End date", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TransactionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments": { "get": { "tags": [ "Departments" ], "x-ms-examples": { - "DepartmentsListByBillingAccountName": { - "$ref": "./examples/DepartmentsListByBillingAccountName.json" + "DepartmentsListByBillingAccount": { + "$ref": "./examples/DepartmentsListByBillingAccount.json" }, - "DepartmentsListByBillingAccountNameWithExpand": { - "$ref": "./examples/DepartmentsListByBillingAccountNameWithExpand.json" + "DepartmentsListByBillingAccountWithExpand": { + "$ref": "./examples/DepartmentsListByBillingAccountWithExpand.json" } }, "operationId": "Departments_ListByBillingAccountName", @@ -865,11 +1315,11 @@ "EnrollmentAccounts" ], "x-ms-examples": { - "EnrollmentAccountsListByBillingAccountName": { - "$ref": "./examples/EnrollmentAccountsListByBillingAccountName.json" + "EnrollmentAccountsListByBillingAccount": { + "$ref": "./examples/EnrollmentAccountsListByBillingAccount.json" }, - "EnrollmentAccountsListByBillingAccountNameWithExpand": { - "$ref": "./examples/EnrollmentAccountsListByBillingAccountNameWithExpand.json" + "EnrollmentAccountsListByBillingAccountWithExpand": { + "$ref": "./examples/EnrollmentAccountsListByBillingAccountWithExpand.json" } }, "operationId": "EnrollmentAccounts_ListByBillingAccountName", @@ -978,7 +1428,7 @@ "$ref": "./examples/BillingAccountInvoicesList.json" } }, - "operationId": "Invoices_ListByBillingAccountName", + "operationId": "Invoices_ListByBillingAccount", "description": "List of invoices for a billing account.", "parameters": [ { @@ -1087,11 +1537,11 @@ "PriceSheet" ], "x-ms-examples": { - "PricesheetDownloadByBillingProfileName": { - "$ref": "./examples/PricesheetDownloadByBillingProfileName.json" + "PricesheetDownloadByBillingProfile": { + "$ref": "./examples/PricesheetDownloadByBillingProfile.json" } }, - "operationId": "PriceSheet_DownloadByBillingProfileName", + "operationId": "PriceSheet_DownloadByBillingProfile", "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" @@ -1241,7 +1691,7 @@ "tags": [ "BillingSubscriptions" ], - "operationId": "BillingSubscriptions_ListByBillingAccountName", + "operationId": "BillingSubscriptions_ListByBillingAccount", "description": "Lists billing subscriptions by billing account name.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -1283,7 +1733,7 @@ "tags": [ "BillingSubscriptions" ], - "operationId": "BillingSubscriptions_ListByBillingProfileName", + "operationId": "BillingSubscriptions_ListByBillingProfile", "description": "Lists billing subscriptions by billing profile name.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -1325,7 +1775,7 @@ "tags": [ "BillingSubscriptions" ], - "operationId": "BillingSubscriptions_ListByInvoiceSectionName", + "operationId": "BillingSubscriptions_ListByInvoiceSection", "description": "Lists billing subscription by invoice section name.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -1531,7 +1981,7 @@ "tags": [ "Products" ], - "operationId": "Products_ListByBillingAccountName", + "operationId": "Products_ListByBillingAccount", "description": "Lists products by billing account name.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -1580,7 +2030,7 @@ "tags": [ "Products" ], - "operationId": "Products_ListByInvoiceSectionName", + "operationId": "Products_ListByInvoiceSection", "description": "Lists products by invoice section name.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -1798,7 +2248,7 @@ "tags": [ "Transactions" ], - "operationId": "Transactions_ListByBillingAccountName", + "operationId": "Transactions_ListByBillingAccount", "description": "Lists the transactions by billing account name for given start and end date.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -1864,7 +2314,7 @@ "tags": [ "Transactions" ], - "operationId": "Transactions_ListByBillingProfileName", + "operationId": "Transactions_ListByBillingProfile", "description": "Lists the transactions by billing profile name for given start date and end date.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -1930,7 +2380,7 @@ "tags": [ "Transactions" ], - "operationId": "Transactions_ListByInvoiceSectionName", + "operationId": "Transactions_ListByInvoiceSection", "description": "Lists the transactions by invoice section name for given start date and end date.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -2058,7 +2508,7 @@ "tags": [ "Policies" ], - "operationId": "Policies_GetByBillingProfileName", + "operationId": "Policies_GetByBillingProfile", "description": "The policy for a given billing account name and billing profile name.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -2185,7 +2635,7 @@ "tags": [ "Products" ], - "operationId": "Products_UpdateAutoRenewByBillingAccountName", + "operationId": "Products_UpdateAutoRenewByBillingAccount", "description": "Cancel auto renew for product by product id and billing account name", "x-ms-examples": { "ProductsCancelByBillingAccount": { @@ -2227,7 +2677,7 @@ "tags": [ "Products" ], - "operationId": "Products_UpdateAutoRenewByInvoiceSectionName", + "operationId": "Products_UpdateAutoRenewByInvoiceSection", "description": "Cancel auto renew for product by product id and invoice section name", "x-ms-examples": { "CancelProductForInvoiceSection": { @@ -2909,7 +3359,7 @@ } }, "operationId": "BillingPermissions_ListByBillingProfile", - "description": "Lists all billing permissions for the caller has for a billing account.", + "description": "Lists all billing permissions the caller has for a billing account.", "parameters": [ { "$ref": "#/parameters/apiVersionParameter" @@ -2947,7 +3397,7 @@ "$ref": "./examples/BillingAccountRoleDefinition.json" } }, - "operationId": "BillingRoleDefinitions_GetByBillingAccountName", + "operationId": "BillingRoleDefinitions_GetByBillingAccount", "description": "Gets the role definition for a role", "parameters": [ { @@ -2986,7 +3436,7 @@ "$ref": "./examples/InvoiceSectionRoleDefinition.json" } }, - "operationId": "BillingRoleDefinitions_GetByInvoiceSectionName", + "operationId": "BillingRoleDefinitions_GetByInvoiceSection", "description": "Gets the role definition for a role", "parameters": [ { @@ -3031,7 +3481,7 @@ "$ref": "./examples/BillingProfileRoleDefinition.json" } }, - "operationId": "BillingRoleDefinitions_GetByBillingProfileName", + "operationId": "BillingRoleDefinitions_GetByBillingProfile", "description": "Gets the role definition for a role", "parameters": [ { @@ -3073,7 +3523,7 @@ "$ref": "./examples/BillingAccountRoleDefinitionsList.json" } }, - "operationId": "BillingRoleDefinitions_ListByBillingAccountName", + "operationId": "BillingRoleDefinitions_ListByBillingAccount", "description": "Lists the role definition for a billing account", "parameters": [ { @@ -3109,7 +3559,7 @@ "$ref": "./examples/InvoiceSectionRoleDefinitionsList.json" } }, - "operationId": "BillingRoleDefinitions_ListByInvoiceSectionName", + "operationId": "BillingRoleDefinitions_ListByInvoiceSection", "description": "Lists the role definition for an invoice Section", "parameters": [ { @@ -3151,7 +3601,7 @@ "$ref": "./examples/BillingProfileRoleDefinitionsList.json" } }, - "operationId": "BillingRoleDefinitions_ListByBillingProfileName", + "operationId": "BillingRoleDefinitions_ListByBillingProfile", "description": "Lists the role definition for a Billing Profile", "parameters": [ { @@ -3227,7 +3677,7 @@ "$ref": "./examples/BillingAccountRoleAssignmentDelete.json" } }, - "operationId": "BillingRoleAssignments_DeleteByBillingAccountName", + "operationId": "BillingRoleAssignments_DeleteByBillingAccount", "description": "Delete the role assignment on this billing account", "parameters": [ { @@ -3266,7 +3716,7 @@ "$ref": "./examples/InvoiceSectionRoleAssignment.json" } }, - "operationId": "BillingRoleAssignments_GetByInvoiceSectionName", + "operationId": "BillingRoleAssignments_GetByInvoiceSection", "description": "Get the role assignment for the caller on the invoice Section", "parameters": [ { @@ -3309,7 +3759,7 @@ "$ref": "./examples/InvoiceSectionRoleAssignmentDelete.json" } }, - "operationId": "BillingRoleAssignments_DeleteByInvoiceSectionName", + "operationId": "BillingRoleAssignments_DeleteByInvoiceSection", "description": "Delete the role assignment on the invoice Section", "parameters": [ { @@ -3354,7 +3804,7 @@ "$ref": "./examples/BillingProfileRoleAssignment.json" } }, - "operationId": "BillingRoleAssignments_GetByBillingProfileName", + "operationId": "BillingRoleAssignments_GetByBillingProfile", "description": "Get the role assignment for the caller on the Billing Profile", "parameters": [ { @@ -3394,7 +3844,7 @@ "$ref": "./examples/BillingProfileRoleAssignmentDelete.json" } }, - "operationId": "BillingRoleAssignments_DeleteByBillingProfileName", + "operationId": "BillingRoleAssignments_DeleteByBillingProfile", "description": "Delete the role assignment on this Billing Profile", "parameters": [ { @@ -3436,7 +3886,7 @@ "$ref": "./examples/BillingAccountRoleAssignmentList.json" } }, - "operationId": "BillingRoleAssignments_ListByBillingAccountName", + "operationId": "BillingRoleAssignments_ListByBillingAccount", "description": "Get the role assignments on the Billing Account", "parameters": [ { @@ -3467,7 +3917,7 @@ "tags": [ "BillingRoleAssignments" ], - "operationId": "BillingRoleAssignments_AddByBillingAccountName", + "operationId": "BillingRoleAssignments_AddByBillingAccount", "description": "The operation to add a role assignment to a billing account.", "x-ms-examples": { "AddRoleAssignmentToBillingAccount": { @@ -3517,7 +3967,7 @@ "$ref": "./examples/InvoiceSectionRoleAssignmentList.json" } }, - "operationId": "BillingRoleAssignments_ListByInvoiceSectionName", + "operationId": "BillingRoleAssignments_ListByInvoiceSection", "description": "Get the role assignments on the invoice Section", "parameters": [ { @@ -3554,7 +4004,7 @@ "tags": [ "BillingRoleAssignments" ], - "operationId": "BillingRoleAssignments_AddByInvoiceSectionName", + "operationId": "BillingRoleAssignments_AddByInvoiceSection", "description": "The operation to add a role assignment to a invoice Section.", "x-ms-examples": { "AddRoleAssignmentToInvoiceSection": { @@ -3610,7 +4060,7 @@ "$ref": "./examples/BillingProfileRoleAssignmentList.json" } }, - "operationId": "BillingRoleAssignments_ListByBillingProfileName", + "operationId": "BillingRoleAssignments_ListByBillingProfile", "description": "Get the role assignments on the Billing Profile", "parameters": [ { @@ -3644,7 +4094,7 @@ "tags": [ "BillingRoleAssignments" ], - "operationId": "BillingRoleAssignments_AddByBillingProfileName", + "operationId": "BillingRoleAssignments_AddByBillingProfile", "description": "The operation to add a role assignment to a billing profile.", "x-ms-examples": { "AddRoleAssignmentToBillingProfile": { @@ -3693,11 +4143,11 @@ "Agreements" ], "x-ms-examples": { - "AgreementsListByBillingAccountName": { - "$ref": "./examples/AgreementsListByBillingAccountName.json" + "AgreementsListByBillingAccount": { + "$ref": "./examples/AgreementsListByBillingAccount.json" } }, - "operationId": "Agreements_ListByBillingAccountName", + "operationId": "Agreements_ListByBillingAccount", "description": "Lists all agreements for a billing account.", "parameters": [ { @@ -3874,6 +4324,63 @@ } }, "definitions": { + "CustomerListResult": { + "description": "Result of listing customers.", + "properties": { + "value": { + "description": "The list of customers.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Customer" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "Customer": { + "description": "A partner's customer.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "description": "The customer.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/CustomerProperties" + } + } + }, + "CustomerProperties": { + "description": "The properties of a customer.", + "properties": { + "displayName": { + "description": "The name of the customer.", + "type": "string" + }, + "enabledAzurePlans": { + "description": "Information about the product.", + "type": "array", + "items": { + "$ref": "#/definitions/AzurePlan" + } + }, + "resellers": { + "description": "The resellers which are allowed to provide service to this customer.", + "type": "array", + "items": { + "$ref": "#/definitions/Reseller" + } + } + } + }, "InitiateTransferRequest": { "type": "object", "description": "Request parameters to initiate transfer.", @@ -5082,6 +5589,21 @@ } } }, + "Reseller": { + "description": "Details about a reseller.", + "properties": { + "resellerId": { + "description": "The reseller id.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "A description of the reseller.", + "type": "string", + "readOnly": true + } + } + }, "Resource": { "description": "The Resource model definition.", "properties": { @@ -5418,6 +5940,16 @@ "description": "Billing Profile display name to which this product belongs.", "type": "string", "readOnly": true + }, + "customerId": { + "description": "Customer id to which this product belongs.", + "type": "string", + "readOnly": true + }, + "customerDisplayName": { + "description": "Display name of customer to which this product belongs.", + "type": "string", + "readOnly": true } } }, @@ -5556,6 +6088,16 @@ "type": "string", "readOnly": true }, + "customerId": { + "description": "Customer id to which this product belongs.", + "type": "string", + "readOnly": true + }, + "customerDisplayName": { + "description": "Display name of customer to which this product belongs.", + "type": "string", + "readOnly": true + }, "invoiceSectionId": { "description": "Invoice section id to which this product belongs.", "type": "string", @@ -5566,6 +6108,11 @@ "type": "string", "readOnly": true }, + "reseller": { + "description": "Reseller for this subscription.", + "readOnly": true, + "$ref": "#/definitions/Reseller" + }, "skuId": { "description": "The sku id.", "type": "string" @@ -5732,6 +6279,16 @@ "type": "string", "readOnly": true }, + "customerId": { + "description": "Customer id to which this product belongs.", + "type": "string", + "readOnly": true + }, + "customerDisplayName": { + "description": "Display name of customer to which this product belongs.", + "type": "string", + "readOnly": true + }, "subscriptionId": { "description": "The subscription id.", "type": "string", @@ -6110,7 +6667,7 @@ "description": "Result of list billingPermissions a caller has on a billing account.", "properties": { "value": { - "description": "The list OF billingPermissions a caller has on a billing account.", + "description": "The list of billingPermissions a caller has on a billing account.", "type": "array", "readOnly": true, "items": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/AgreementsListByBillingAccountName.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/AgreementsListByBillingAccount.json similarity index 100% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/AgreementsListByBillingAccountName.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/AgreementsListByBillingAccount.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingProfilesListByBillingAccountName.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingProfilesListByBillingAccount.json similarity index 100% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingProfilesListByBillingAccountName.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingProfilesListByBillingAccount.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingSubscriptionByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingSubscriptionByCustomer.json new file mode 100644 index 000000000000..6f586bf7f748 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingSubscriptionByCustomer.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}", + "billingSubscriptionName": "{billingSubscriptionName}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}", + "name": "{billingSubscriptionName}", + "type": "Microsoft.Billing/billingSubscriptions", + "properties": { + "displayName": "My Subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer1", + "reseller": { + "resellerId": "3b65b5a8-bd4f-4084-90e9-e1bd667a2b19", + "description": "Reseller2" + }, + "skuId": "0002", + "skuDescription": "Microsoft Azure Standard" + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingSubscriptionsListByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingSubscriptionsListByCustomer.json new file mode 100644 index 000000000000..09810d36eef7 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingSubscriptionsListByCustomer.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/billinSubscriptionId1", + "name": "billingSubscriptionId1", + "type": "Microsoft.Billing/billingSubscriptions", + "properties": { + "displayName": "My subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600.00 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer1", + "reseller": { + "resellerId": "89e87bdf-a2a2-4687-925f-4c18b27bccfd", + "description": "Reseller1" + }, + "skuId": "0002", + "skuDescription": "Microsoft Azure Standard" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/billinSubscriptionId2", + "name": "billingSubscriptionId2", + "type": "Microsoft.Billing/billingSubscriptions", + "properties": { + "displayName": "Test subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 1000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 400 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer1", + "reseller": { + "resellerId": "3b65b5a8-bd4f-4084-90e9-e1bd667a2b19", + "description": "Reseller3" + }, + "skuId": "0002", + "skuDescription": "Microsoft Azure Standard" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Customer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Customer.json new file mode 100644 index 000000000000..475cce8af447 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Customer.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "name": "{customerName}", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customer1" + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomerPermissionsList.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomerPermissionsList.json new file mode 100644 index 000000000000..57e3e251267c --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomerPermissionsList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "actions": [ + "30000000-aaaa-bbbb-cccc-200000000007", + "30000000-aaaa-bbbb-cccc-200000000004", + "30000000-aaaa-bbbb-cccc-200000000015", + "30000000-aaaa-bbbb-cccc-200000000009", + "30000000-aaaa-bbbb-cccc-200000000000", + "30000000-aaaa-bbbb-cccc-200000000010", + "30000000-aaaa-bbbb-cccc-200000000001" + ], + "notActions": [ ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomerWithExpand.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomerWithExpand.json new file mode 100644 index 000000000000..ad08eac6b7e9 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomerWithExpand.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}", + "$expand": "enabledAzurePlans,resellers" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "name": "{customerName}", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customerName1", + "enabledAzurePlans": [ + { + "skuId": "0002", + "skuDescription": "Microsoft Azure Standard" + } + ], + "resellers": [ + { + "resellerId": "89e87bdf-a2a2-4687-925f-4c18b27bccfd", + "description": "Reseller1" + }, + { + "resellerId": "3b65b5a8-bd4f-4084-90e9-e1bd667a2b19", + "description": "Reseller2" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomersListByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomersListByBillingAccount.json new file mode 100644 index 000000000000..bcfb3ff1638e --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomersListByBillingAccount.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000000", + "name": "22000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customer1" + } + }, + { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000011", + "name": "22000000-0000-0000-0000-000000000011", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customer2" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomersListByBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomersListByBillingProfile.json new file mode 100644 index 000000000000..cd19b9cdb9d9 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/CustomersListByBillingProfile.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000000", + "name": "22000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customer1" + } + }, + { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000011", + "name": "22000000-0000-0000-0000-000000000011", + "type": "Microsoft.Billing/customers", + "properties": { + "displayName": "customer2" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/DepartmentsListByBillingAccountName.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/DepartmentsListByBillingAccount.json similarity index 100% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/DepartmentsListByBillingAccountName.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/DepartmentsListByBillingAccount.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/DepartmentsListByBillingAccountNameWithExpand.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/DepartmentsListByBillingAccountWithExpand.json similarity index 100% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/DepartmentsListByBillingAccountNameWithExpand.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/DepartmentsListByBillingAccountWithExpand.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/EnrollmentAccountsListByBillingAccountName.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/EnrollmentAccountsListByBillingAccount.json similarity index 100% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/EnrollmentAccountsListByBillingAccountName.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/EnrollmentAccountsListByBillingAccount.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/EnrollmentAccountsListByBillingAccountNameWithExpand.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/EnrollmentAccountsListByBillingAccountWithExpand.json similarity index 100% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/EnrollmentAccountsListByBillingAccountNameWithExpand.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/EnrollmentAccountsListByBillingAccountWithExpand.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoiceSectionsListByBillingProfileName.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoiceSectionsListByBillingProfile.json similarity index 100% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoiceSectionsListByBillingProfileName.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoiceSectionsListByBillingProfile.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PricesheetDownloadByBillingProfileName.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PricesheetDownloadByBillingProfile.json similarity index 100% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PricesheetDownloadByBillingProfileName.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/PricesheetDownloadByBillingProfile.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductByCustomer.json new file mode 100644 index 000000000000..e455c28950aa --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductByCustomer.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}", + "productName": "{productName}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/products/{productName}", + "name": "{productName}", + "type": "Microsoft.Billing/billingAccounts/customers/products", + "properties": { + "productTypeId": "A12345", + "productType": "Subscription", + "displayName": "AIP Dev", + "status": "Active", + "purchaseDate": "2018-05-01T17:32:28Z", + "lastCharge": { + "currency": "USD", + "value": 5000.00 + }, + "lastChargeDate": "2018-06-15T17:32:28Z", + "billingFrequency": "Monthly", + "quantity": 4, + "skuId": "0001", + "skuDescription": "Enterprise Agreement Development", + "availabilityId": "AvailabilityId1", + "parentProductId": "45000000-0000-0000-0000-0000000001242", + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer 1", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing" + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductsListByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductsListByCustomer.json new file mode 100644 index 000000000000..b0b423f7bd82 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductsListByCustomer.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/products/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/billingAccounts/customers/products", + "properties": { + "productTypeId": "A12345", + "productType": "Reservation", + "displayName": "Eng Reservation (1a13s21awe)", + "status": "Active", + "purchaseDate": "2018-05-01T17:32:28Z", + "lastCharge": { + "currency": "USD", + "value": 5000.00 + }, + "lastChargeDate": "2018-06-15T17:32:28Z", + "billingFrequency": "OneTime", + "quantity": 4, + "skuId": "0001", + "skuDescription": "Enterprise Agreement Development", + "availabilityId": "AvailabilityId1", + "parentProductId": "45000000-0000-0000-0000-0000000001242", + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer 1", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/products/10000000-0000-0000-0000-000000000001", + "name": "10000000-0000-0000-0000-000000000001", + "type": "Microsoft.Billing/billingAccounts/customers/products", + "properties": { + "productTypeId": "A12345", + "productType": "Azure subscription", + "displayName": "Engineering Email", + "status": "Active", + "purchaseDate": "2018-04-01T17:32:28Z", + "lastCharge": { + "currency": "USD", + "value": 500.00 + }, + "lastChargeDate": "2018-06-15T17:32:28Z", + "billingFrequency": "Monthly", + "quantity": 4, + "skuId": "0001", + "skuDescription": "Enterprise Agreement Development", + "availabilityId": "AvailabilityId1", + "parentProductId": "45000000-0000-0000-0000-0000000001242", + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer 1", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing" + } + } + ] + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ReservationTransactionsListByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ReservationTransactionsListByCustomer.json new file mode 100644 index 000000000000..79632f8e73a7 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ReservationTransactionsListByCustomer.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}", + "startDate": "2018-04-01", + "endDate": "2018-05-30", + "$filter": "properties/kind eq 'Reservation'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/41000000-0000-0000-0000-000000000000", + "name": "41000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions", + "properties": { + "kind": "reservation", + "date": "2018-04-23T00:00:00Z", + "invoice": "2344233", + "orderName": "Contoso Reserved", + "orderId": "6d8e7ed9-d3be-48b0-8c7a-e19246a6d30c", + "productDescription": "Standard D1, US West 3", + "transactionType": "Cancel", + "transactionAmount": { + "currency": "USD", + "value": 5000.00 + }, + "quantity": 4, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer 1", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "subscriptionName": "Contoso operations billing" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/82000000-0000-0000-0000-000000000000", + "name": "82000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions", + "properties": { + "kind": "reservation", + "date": "2018-05-05T00:00:00Z", + "invoice": "Pending", + "orderName": "Test Reserved", + "orderId": "1c24006f-8350-4315-ad8f-6d11180448f9", + "productDescription": "Standard D1, US West 3", + "transactionType": "Purchase", + "transactionAmount": { + "currency": "USD", + "value": 6000.00 + }, + "quantity": 5, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer 1", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "subscriptionName": "Contoso operations billing" + } + } + ] + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByCustomer.json new file mode 100644 index 000000000000..48a57d755e6f --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/TransactionsListByCustomer.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}", + "startDate": "2018-04-01", + "endDate": "2018-05-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/transactions/41000000-0000-0000-0000-000000000000", + "name": "41000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/transactions", + "properties": { + "kind": "all", + "date": "2018-05-01T00:00:00Z", + "invoice": "2344233", + "productFamily": "Storage", + "productTypeId": "A12345", + "productType": "Reserved VM Instance", + "productDescription": "Standard D1, US West 3", + "transactionType": "Purchase", + "transactionAmount": { + "currency": "USD", + "value": 5000.00 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Contoso operations customer" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/transactions/51000000-0000-0000-0000-000000000000", + "name": "51000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/transactions", + "properties": { + "kind": "all", + "date": "2018-04-01T00:00:00Z", + "invoice": "pending", + "productFamily": "Storage", + "productTypeId": "A12345", + "productType": "VM Instance", + "productDescription": "Standard Support", + "transactionType": "Cancel", + "transactionAmount": { + "currency": "USD", + "value": 50.00 + }, + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Contoso operations customer" + } + } + ] + } + } + } +} \ No newline at end of file