/// <summary> /// Updates a Preapproval. /// Just send in <paramref name="request"/> the properties you want to update. /// </summary> /// <param name="id">The Preapproval ID.</param> /// <param name="request">The data to update the Preapproval.</param> /// <param name="requestOptions"><see cref="RequestOptions"/></param> /// <returns>The updated Preapproval.</returns> /// <exception cref="MercadoPagoException">If a unexpected exception occurs.</exception> /// <exception cref="MercadoPagoApiException">If the API returns a error.</exception> public Preapproval Update( string id, PreapprovalUpdateRequest request, RequestOptions requestOptions = null) { return(Send($"/preapproval/{id}", HttpMethod.PUT, request, requestOptions)); }
/// <summary> /// Updates a Preapproval as an asynchronous operation. /// Just send in <paramref name="request"/> the properties you want to update. /// </summary> /// <param name="id">The Preapproval ID.</param> /// <param name="request">The data to update the Preapproval.</param> /// <param name="requestOptions"><see cref="RequestOptions"/></param> /// <param name="cancellationToken">Cancellation token.</param> /// <returns>A task whose the result is the updated Preapproval.</returns> /// <exception cref="MercadoPagoException">If a unexpected exception occurs.</exception> /// <exception cref="MercadoPagoApiException">If the API returns a error.</exception> public Task <Preapproval> UpdateAsync( string id, PreapprovalUpdateRequest request, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { return(SendAsync($"/preapproval/{id}", HttpMethod.PUT, request, requestOptions, cancellationToken)); }