Exemplo n.º 1
0
 /// <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);
Exemplo n.º 2
0
 /// <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);
Exemplo n.º 3
0
 /// <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);
Exemplo n.º 4
0
 /// <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);
Exemplo n.º 5
0
 /// <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());