/// <summary> /// Executes the operations associated with the cmdlet. /// </summary> public override void ExecuteCmdlet() { Scheduler.RunTask(async() => { IPartner partner = await PartnerSession.Instance.ClientFactory.CreatePartnerOperationsAsync(CorrelationId, CancellationToken).ConfigureAwait(false); ServiceCostsSummary summary = await partner.Customers[CustomerId].ServiceCosts.ByBillingPeriod(BillingPeriod).Summary.GetAsync(CancellationToken).ConfigureAwait(false); WriteObject(new PSServiceCostsSummary(summary)); }, true); }
/// <summary> /// Executes the operations associated with the cmdlet. /// </summary> public override void ExecuteCmdlet() { ServiceCostsSummary summary = Partner.Customers[CustomerId].ServiceCosts.ByBillingPeriod(BillingPeriod).Summary.Get(); WriteObject(new PSServiceCostsSummary(summary)); }
/// <summary> /// Initializes a new instance of the <see cref="PSServiceCostsSummary" /> class. /// </summary> /// <param name="summary">The base summary for this instance.</param> public PSServiceCostsSummary(ServiceCostsSummary summary) { this.CopyFrom(summary); }
/// <summary> /// Executes the operations associated with the cmdlet. /// </summary> public override void ExecuteCmdlet() { ServiceCostsSummary summary = Partner.Customers[CustomerId].ServiceCosts.ByBillingPeriod(BillingPeriod).Summary.GetAsync().ConfigureAwait(false).GetAwaiter().GetResult(); WriteObject(new PSServiceCostsSummary(summary)); }