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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 Down Expand Up @@ -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 };
Original file line number Diff line number Diff line change
Expand Up @@ -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;
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');
36 changes: 27 additions & 9 deletions lib/services/billingManagement/lib/operations/billingPeriods.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const WebResource = msRest.WebResource;

/**
* Lists the available billing periods for a subscription in reverse
* chronological order.
* chronological order. This is only supported for Azure Web-Direct
* subscriptions. Other subscription types which were not purchased directly
* through the Azure web portal are not supported through this preview API.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -194,7 +196,9 @@ function _list(options, callback) {
}

/**
* Gets a named billing period.
* Gets a named billing period. This is only supported for Azure Web-Direct
* subscriptions. Other subscription types which were not purchased directly
* through the Azure web portal are not supported through this preview API.
*
* @param {string} billingPeriodName The name of a BillingPeriod resource.
*
Expand Down Expand Up @@ -335,7 +339,9 @@ function _get(billingPeriodName, options, callback) {

/**
* Lists the available billing periods for a subscription in reverse
* chronological order.
* chronological order. This is only supported for Azure Web-Direct
* subscriptions. Other subscription types which were not purchased directly
* through the Azure web portal are not supported through this preview API.
*
* @param {string} nextPageLink The NextLink from the previous successful call
* to List operation.
Expand Down Expand Up @@ -478,7 +484,9 @@ class BillingPeriods {

/**
* Lists the available billing periods for a subscription in reverse
* chronological order.
* chronological order. This is only supported for Azure Web-Direct
* subscriptions. Other subscription types which were not purchased directly
* through the Azure web portal are not supported through this preview API.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -519,7 +527,9 @@ class BillingPeriods {

/**
* Lists the available billing periods for a subscription in reverse
* chronological order.
* chronological order. This is only supported for Azure Web-Direct
* subscriptions. Other subscription types which were not purchased directly
* through the Azure web portal are not supported through this preview API.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -582,7 +592,9 @@ class BillingPeriods {
}

/**
* Gets a named billing period.
* Gets a named billing period. This is only supported for Azure Web-Direct
* subscriptions. Other subscription types which were not purchased directly
* through the Azure web portal are not supported through this preview API.
*
* @param {string} billingPeriodName The name of a BillingPeriod resource.
*
Expand Down Expand Up @@ -612,7 +624,9 @@ class BillingPeriods {
}

/**
* Gets a named billing period.
* Gets a named billing period. This is only supported for Azure Web-Direct
* subscriptions. Other subscription types which were not purchased directly
* through the Azure web portal are not supported through this preview API.
*
* @param {string} billingPeriodName The name of a BillingPeriod resource.
*
Expand Down Expand Up @@ -665,7 +679,9 @@ class BillingPeriods {

/**
* Lists the available billing periods for a subscription in reverse
* chronological order.
* chronological order. This is only supported for Azure Web-Direct
* subscriptions. Other subscription types which were not purchased directly
* through the Azure web portal are not supported through this preview API.
*
* @param {string} nextPageLink The NextLink from the previous successful call
* to List operation.
Expand Down Expand Up @@ -697,7 +713,9 @@ class BillingPeriods {

/**
* Lists the available billing periods for a subscription in reverse
* chronological order.
* chronological order. This is only supported for Azure Web-Direct
* subscriptions. Other subscription types which were not purchased directly
* through the Azure web portal are not supported through this preview API.
*
* @param {string} nextPageLink The NextLink from the previous successful call
* to List operation.
Expand Down
Loading