/// <summary>
 /// Lists all agreements for a billing account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the participants.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AgreementListResult> ListByBillingAccountAsync(this IAgreementsOperations operations, string billingAccountName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByBillingAccountWithHttpMessagesAsync(billingAccountName, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Lists the agreements for a billing account.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </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 <Agreement> > ListByBillingAccountNextAsync(this IAgreementsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByBillingAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Gets an integration account agreement.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='integrationAccountName'>
 /// The integration account name.
 /// </param>
 /// <param name='agreementName'>
 /// The integration account agreement name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IntegrationAccountAgreementInner> GetAsync(this IAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, agreementName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     BillingAccounts        = new BillingAccountsOperations(this);
     PaymentMethods         = new PaymentMethodsOperations(this);
     AvailableBalances      = new AvailableBalancesOperations(this);
     BillingProfiles        = new BillingProfilesOperations(this);
     InvoiceSections        = new InvoiceSectionsOperations(this);
     Departments            = new DepartmentsOperations(this);
     EnrollmentAccounts     = new EnrollmentAccountsOperations(this);
     Invoices               = new InvoicesOperations(this);
     PriceSheet             = new PriceSheetOperations(this);
     BillingSubscriptions   = new BillingSubscriptionsOperations(this);
     Products               = new ProductsOperations(this);
     Transactions           = new TransactionsOperations(this);
     Policies               = new PoliciesOperations(this);
     BillingProperty        = new BillingPropertyOperations(this);
     Transfers              = new TransfersOperations(this);
     RecipientTransfers     = new RecipientTransfersOperations(this);
     Operations             = new Operations(this);
     BillingPermissions     = new BillingPermissionsOperations(this);
     BillingRoleDefinitions = new BillingRoleDefinitionsOperations(this);
     BillingRoleAssignments = new BillingRoleAssignmentsOperations(this);
     Agreements             = new AgreementsOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2018-11-01-preview";
     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>
 /// Get the agreement by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='agreementName'>
 /// Agreement Id.
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the participants.
 /// </param>
 public static Agreement Get(this IAgreementsOperations operations, string billingAccountName, string agreementName, string expand = default(string))
 {
     return(operations.GetAsync(billingAccountName, agreementName, expand).GetAwaiter().GetResult());
 }
Beispiel #6
0
 /// <summary>
 /// Lists the agreements for a billing account.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// The ID that uniquely identifies a billing account.
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the participants.
 /// </param>
 public static IPage <Agreement> ListByBillingAccount(this IAgreementsOperations operations, string billingAccountName, string expand = default(string))
 {
     return(operations.ListByBillingAccountAsync(billingAccountName, expand).GetAwaiter().GetResult());
 }
Beispiel #7
0
 /// <summary>
 /// Lists the agreements for a billing account.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </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 <Agreement> ListByBillingAccountNext(this IAgreementsOperations operations, string nextPageLink)
 {
     return(operations.ListByBillingAccountNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Beispiel #8
0
 /// <summary>
 /// Gets a list of integration account agreements.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='integrationAccountName'>
 /// The integration account name.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <IntegrationAccountAgreementInner> > ListByIntegrationAccountsAsync(this IAgreementsOperations operations, string resourceGroupName, string integrationAccountName, ODataQuery <IntegrationAccountAgreementFilterInner> odataQuery = default(ODataQuery <IntegrationAccountAgreementFilterInner>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByIntegrationAccountsWithHttpMessagesAsync(resourceGroupName, integrationAccountName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #9
0
 /// <summary>
 /// Deletes an integration account agreement.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='integrationAccountName'>
 /// The integration account name.
 /// </param>
 /// <param name='agreementName'>
 /// The integration account agreement name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, agreementName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }