Ejemplo n.º 1
0
 /// <summary>
 /// Updates a Merchant Order.
 /// </summary>
 /// <param name="id">The ID of the Merchant Order.</param>
 /// <param name="request">The data to update the Merchant Order.</param>
 /// <param name="requestOptions"><see cref="RequestOptions"/></param>
 /// <returns>A task whose the result is the updated Merchant Order.</returns>
 /// <exception cref="MercadoPagoException">If a unexpected exception occurs.</exception>
 /// <exception cref="MercadoPagoApiException">If the API returns a error.</exception>
 /// <remarks>
 /// Check the API documentation
 /// <a href="https://www.mercadopago.com/developers/en/reference/merchant_orders/_merchant_orders_id/put/">here</a>.
 /// </remarks>
 public MerchantOrder Update(
     long id,
     MerchantOrderUpdateRequest request,
     RequestOptions requestOptions = null)
 {
     return(Send(
                $"/merchant_orders/{id}",
                HttpMethod.PUT,
                request,
                requestOptions));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Updates a Merchant Order as an asynchronous operation.
 /// </summary>
 /// <param name="id">The ID of the Merchant Order.</param>
 /// <param name="request">The data to update the Merchant Order.</param>
 /// <param name="requestOptions"><see cref="RequestOptions"/></param>
 /// <param name="cancellationToken">Cancellation token.</param>
 /// <returns>A task whose the result is the updated Merchant Order.</returns>
 /// <exception cref="MercadoPagoException">If a unexpected exception occurs.</exception>
 /// <exception cref="MercadoPagoApiException">If the API returns a error.</exception>
 /// <remarks>
 /// Check the API documentation
 /// <a href="https://www.mercadopago.com/developers/en/reference/merchant_orders/_merchant_orders_id/put/">here</a>.
 /// </remarks>
 public Task <MerchantOrder> UpdateAsync(
     long id,
     MerchantOrderUpdateRequest request,
     RequestOptions requestOptions       = null,
     CancellationToken cancellationToken = default)
 {
     return(SendAsync(
                $"/merchant_orders/{id}",
                HttpMethod.PUT,
                request,
                requestOptions,
                cancellationToken));
 }