/// <summary> /// Exchange Reservation(s) /// </summary> /// <remarks> /// Returns one or more `Reservations` in exchange for one or more /// `Reservation` purchases. /// /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// Request containing the refunds and purchases that need to be executed. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ExchangeOperationResultResponse> PostAsync(this IExchangeOperations operations, ExchangeRequest body, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Exchange Reservation(s) /// </summary> /// <remarks> /// Returns one or more `Reservations` in exchange for one or more /// `Reservation` purchases. /// /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// Request containing the refunds and purchases that need to be executed. /// </param> public static ExchangeOperationResultResponse BeginPost(this IExchangeOperations operations, ExchangeRequest body) { return(operations.BeginPostAsync(body).GetAwaiter().GetResult()); }