/// <summary> /// Gets information about a specific private offer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// Subscription id of the private offers /// </param> /// <param name='privateStoreId'> /// The store ID - must use the tenant ID /// </param> /// <param name='offerId'> /// The offer ID to update or delete /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Offer> GetAsync(this IPrivateStorePrivateOfferOperations operations, string subscriptionId, string privateStoreId, string offerId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(subscriptionId, privateStoreId, offerId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update or add a private offer to the default collection of the private /// store. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// Subscription id of the private offers /// </param> /// <param name='privateStoreId'> /// The store ID - must use the tenant ID /// </param> /// <param name='offerId'> /// The offer ID to update or delete /// </param> /// <param name='payload'> /// </param> public static Offer CreateOrUpdate(this IPrivateStorePrivateOfferOperations operations, string subscriptionId, string privateStoreId, string offerId, Offer payload = default(Offer)) { return(operations.CreateOrUpdateAsync(subscriptionId, privateStoreId, offerId, payload).GetAwaiter().GetResult()); }
/// <summary> /// Gets information about a specific private offer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// Subscription id of the private offers /// </param> /// <param name='privateStoreId'> /// The store ID - must use the tenant ID /// </param> /// <param name='offerId'> /// The offer ID to update or delete /// </param> public static Offer Get(this IPrivateStorePrivateOfferOperations operations, string subscriptionId, string privateStoreId, string offerId) { return(operations.GetAsync(subscriptionId, privateStoreId, offerId).GetAwaiter().GetResult()); }