/// <summary> /// Lists the available billing periods for a subscription in reverse /// chronological order. /// <see href="https://go.microsoft.com/fwlink/?linkid=844490" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <BillingPeriodInner> > ListNextAsync(this IBillingPeriodsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a named billing period. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='billingPeriodName'> /// The name of a BillingPeriod resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <BillingPeriodInner> GetAsync(this IBillingPeriodsOperations operations, string billingPeriodName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(billingPeriodName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the available billing periods for a subscription in reverse /// chronological order. /// <see href="https://go.microsoft.com/fwlink/?linkid=844490" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='filter'> /// May be used to filter billing periods by billingPeriodEndDate. The filter /// supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently /// support 'ne', 'or', or 'not'. /// </param> /// <param name='skiptoken'> /// 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. /// </param> /// <param name='top'> /// May be used to limit the number of results to the most recent N billing /// periods. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <BillingPeriodInner> > ListAsync(this IBillingPeriodsOperations operations, string filter = default(string), string skiptoken = default(string), int?top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(filter, skiptoken, top, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { BillingAccounts = new BillingAccountsOperations(this); Address = new AddressOperations(this); AvailableBalances = new AvailableBalancesOperations(this); Instructions = new InstructionsOperations(this); BillingProfiles = new BillingProfilesOperations(this); Customers = new CustomersOperations(this); InvoiceSections = new InvoiceSectionsOperations(this); BillingPermissions = new BillingPermissionsOperations(this); BillingSubscriptions = new BillingSubscriptionsOperations(this); Products = new ProductsOperations(this); Invoices = new InvoicesOperations(this); Transactions = new TransactionsOperations(this); Policies = new PoliciesOperations(this); BillingProperty = new BillingPropertyOperations(this); Operations = new Operations(this); BillingRoleDefinitions = new BillingRoleDefinitionsOperations(this); BillingRoleAssignments = new BillingRoleAssignmentsOperations(this); Agreements = new AgreementsOperations(this); EnrollmentAccounts = new EnrollmentAccountsOperations(this); BillingPeriods = new BillingPeriodsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Lists the available billing periods for a subscription in reverse /// 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. /// <see href="https://go.microsoft.com/fwlink/?linkid=844490" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='filter'> /// May be used to filter billing periods by billingPeriodEndDate. The filter /// supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently /// support 'ne', 'or', or 'not'. /// </param> /// <param name='skiptoken'> /// 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. /// </param> /// <param name='top'> /// May be used to limit the number of results to the most recent N billing /// periods. /// </param> public static IPage <BillingPeriod> List(this IBillingPeriodsOperations operations, string filter = default(string), string skiptoken = default(string), int?top = default(int?)) { return(operations.ListAsync(filter, skiptoken, top).GetAwaiter().GetResult()); }
/// <summary> /// Lists the available billing periods for a subscription in reverse /// 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. /// <see href="https://go.microsoft.com/fwlink/?linkid=844490" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <BillingPeriod> ListNext(this IBillingPeriodsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// 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. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='billingPeriodName'> /// The name of a BillingPeriod resource. /// </param> public static BillingPeriod Get(this IBillingPeriodsOperations operations, string billingPeriodName) { return(operations.GetAsync(billingPeriodName).GetAwaiter().GetResult()); }