Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions lib/services/billingManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2018 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 7 additions & 5 deletions lib/services/billingManagement/lib/billingManagementClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

import { ServiceClientCredentials } from 'ms-rest';
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure';
import * as models from "./models";
import * as operations from "./operations";

declare class BillingManagementClient extends AzureServiceClient {
export default class BillingManagementClient extends AzureServiceClient {
/**
* Initializes a new instance of the BillingManagementClient class.
* @constructor
Expand All @@ -33,11 +34,11 @@ declare class BillingManagementClient extends AzureServiceClient {
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {string} [options.acceptLanguage] - The preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);
Expand All @@ -55,9 +56,10 @@ declare class BillingManagementClient extends AzureServiceClient {
generateClientRequestId: boolean;

// Operation groups
enrollmentAccounts: operations.EnrollmentAccounts;
billingPeriods: operations.BillingPeriods;
invoices: operations.Invoices;
operations: operations.Operations;
}

export = BillingManagementClient;
export { BillingManagementClient, models as BillingManagementModels };
12 changes: 8 additions & 4 deletions lib/services/billingManagement/lib/billingManagementClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class BillingManagementClient extends ServiceClient {
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {string} [options.acceptLanguage] - The preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*/
constructor(credentials, subscriptionId, baseUri, options) {
if (credentials === null || credentials === undefined) {
Expand All @@ -50,7 +50,7 @@ class BillingManagementClient extends ServiceClient {

super(credentials, options);

this.apiVersion = '2017-04-24-preview';
this.apiVersion = '2018-03-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand All @@ -72,6 +72,7 @@ class BillingManagementClient extends ServiceClient {
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.enrollmentAccounts = new operations.EnrollmentAccounts(this);
this.billingPeriods = new operations.BillingPeriods(this);
this.invoices = new operations.Invoices(this);
this.operations = new operations.Operations(this);
Expand All @@ -82,3 +83,6 @@ class BillingManagementClient extends ServiceClient {
}

module.exports = BillingManagementClient;
module.exports['default'] = BillingManagementClient;
module.exports.BillingManagementClient = BillingManagementClient;
module.exports.BillingManagementModels = models;
81 changes: 81 additions & 0 deletions lib/services/billingManagement/lib/models/enrollmentAccount.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

const models = require('./index');

/**
* An enrollment account resource.
*
* @extends models['Resource']
*/
class EnrollmentAccount extends models['Resource'] {
/**
* Create a EnrollmentAccount.
* @member {string} [principalName] The account owner's principal name.
*/
constructor() {
super();
}

/**
* Defines the metadata of EnrollmentAccount
*
* @returns {object} metadata of EnrollmentAccount
*
*/
mapper() {
return {
required: false,
serializedName: 'EnrollmentAccount',
type: {
name: 'Composite',
className: 'EnrollmentAccount',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
principalName: {
required: false,
readOnly: true,
serializedName: 'properties.principalName',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = EnrollmentAccount;
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* Result of listing enrollment accounts.
*/
class EnrollmentAccountListResult extends Array {
/**
* Create a EnrollmentAccountListResult.
* @member {string} [nextLink] The link (url) to the next page of results.
*/
constructor() {
super();
}

/**
* Defines the metadata of EnrollmentAccountListResult
*
* @returns {object} metadata of EnrollmentAccountListResult
*
*/
mapper() {
return {
required: false,
serializedName: 'EnrollmentAccountListResult',
type: {
name: 'Composite',
className: 'EnrollmentAccountListResult',
modelProperties: {
value: {
required: false,
readOnly: true,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'EnrollmentAccountElementType',
type: {
name: 'Composite',
className: 'EnrollmentAccount'
}
}
}
},
nextLink: {
required: false,
readOnly: true,
serializedName: 'nextLink',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = EnrollmentAccountListResult;
2 changes: 0 additions & 2 deletions lib/services/billingManagement/lib/models/errorResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* Error response indicates that the service is not able to process the
* incoming request. The reason is provided in the error message.
Expand Down
24 changes: 24 additions & 0 deletions lib/services/billingManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ export interface Resource extends BaseResource {
readonly type?: string;
}

/**
* @class
* Initializes a new instance of the EnrollmentAccount class.
* @constructor
* An enrollment account resource.
*
* @member {string} [principalName] The account owner's principal name.
*/
export interface EnrollmentAccount extends Resource {
readonly principalName?: string;
}

/**
* @class
* Initializes a new instance of the BillingPeriod class.
Expand Down Expand Up @@ -162,6 +174,18 @@ export interface Operation {
}


/**
* @class
* Initializes a new instance of the EnrollmentAccountListResult class.
* @constructor
* Result of listing enrollment accounts.
*
* @member {string} [nextLink] The link (url) to the next page of results.
*/
export interface EnrollmentAccountListResult extends Array<EnrollmentAccount> {
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the BillingPeriodsListResult class.
Expand Down
2 changes: 2 additions & 0 deletions lib/services/billingManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ var msRestAzure = require('ms-rest-azure');
exports.BaseResource = msRestAzure.BaseResource;
exports.CloudError = msRestAzure.CloudError;
exports.Resource = require('./resource');
exports.EnrollmentAccount = require('./enrollmentAccount');
exports.BillingPeriod = require('./billingPeriod');
exports.DownloadUrl = require('./downloadUrl');
exports.ErrorDetails = require('./errorDetails');
exports.ErrorResponse = require('./errorResponse');
exports.Invoice = require('./invoice');
exports.OperationDisplay = require('./operationDisplay');
exports.Operation = require('./operation');
exports.EnrollmentAccountListResult = require('./enrollmentAccountListResult');
exports.BillingPeriodsListResult = require('./billingPeriodsListResult');
exports.InvoicesListResult = require('./invoicesListResult');
exports.OperationListResult = require('./operationListResult');
2 changes: 0 additions & 2 deletions lib/services/billingManagement/lib/models/operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* A Billing REST API operation.
*
Expand Down
Loading