/// <summary> /// Refund creation /// </summary> /// <param name="refund">Refund data</param> /// <param name="cancellationToken"><see cref="CancellationToken"/></param> /// <param name="idempotenceKey">Idempotence key, use <value>null</value> to generate a new one</param> /// <returns><see cref="Refund"/></returns> public Task <Refund> CreateRefundAsync(NewRefund refund, string idempotenceKey = null, CancellationToken cancellationToken = default(CancellationToken)) => QueryAsync <Refund>(HttpMethod.Post, refund, "refunds", idempotenceKey, cancellationToken);
/// <summary> /// Refund creation /// </summary> /// <param name="refund">Refund data</param> /// <param name="idempotenceKey">Idempotence key, use <value>null</value> to generate a new one</param> /// <returns><see cref="NewRefund"/></returns> public Refund CreateRefund(NewRefund refund, string idempotenceKey = null) => Query <Refund>("POST", refund, "refunds", idempotenceKey);
/// <summary> /// Refund creation /// </summary> /// <param name="refund">Refund data</param> /// <param name="cancellationToken"><see cref="CancellationToken"/></param> /// <param name="idempotenceKey">Idempotence key, use <value>null</value> to generate new one</param> /// <returns><see cref="Refund"/></returns> public Task <Refund> CreateRefundAsync(NewRefund refund, CancellationToken cancellationToken, string idempotenceKey = null) => QueryAsync <Refund>(HttpMethod.Post, refund, $"{_apiUrl}refunds", idempotenceKey ?? Guid.NewGuid().ToString(), cancellationToken);
/// <inheritdoc cref="CreateRefundAsync(Yandex.Checkout.V3.NewRefund,System.Threading.CancellationToken,string)"/> public Task <Refund> CreateRefundAsync(NewRefund refund, string idempotenceKey = null) => CreateRefundAsync(refund, CancellationToken.None, idempotenceKey);
/// <summary> /// Refund creation /// </summary> /// <param name="refund">Refund data</param> /// <param name="idempotenceKey">Idempotence key, use <value>null</value> to generate new one</param> /// <returns><see cref="NewRefund"/></returns> public Refund CreateRefund(NewRefund refund, string idempotenceKey = null) => Query <Refund>("POST", refund, $"{_apiUrl}refunds", idempotenceKey ?? Guid.NewGuid().ToString());