示例#1
0
 /// <summary>
 /// Payment creation
 /// </summary>
 /// <param name="payment">Payment information, <see cref="NewPayment"/></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="Payment"/></returns>
 public Task <Payment> CreatePaymentAsync(NewPayment payment, string idempotenceKey = null, CancellationToken cancellationToken = default(CancellationToken))
 => QueryAsync <Payment>(HttpMethod.Post, payment, "payments", idempotenceKey, cancellationToken);
示例#2
0
 /// <summary>
 /// Payment creation
 /// </summary>
 /// <param name="payment">Payment information, <see cref="NewPayment"/></param>
 /// <param name="idempotenceKey">Idempotence key, use <value>null</value> to generate a new one</param>
 /// <returns><see cref="Payment"/></returns>
 public Payment CreatePayment(NewPayment payment, string idempotenceKey = null)
 => Query <Payment>("POST", payment, "payments/", idempotenceKey);
示例#3
0
 /// <summary>
 /// Payment creation
 /// </summary>
 /// <param name="payment">Payment information, <see cref="NewPayment"/></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="Payment"/></returns>
 public Task <Payment> CreatePaymentAsync(NewPayment payment, CancellationToken cancellationToken, string idempotenceKey = null)
 => QueryAsync <Payment>(HttpMethod.Post, payment, $"{_apiUrl}payments", idempotenceKey ?? Guid.NewGuid().ToString(), cancellationToken);
示例#4
0
 /// <inheritdoc cref="CreatePaymentAsync(Yandex.Checkout.V3.NewPayment,System.Threading.CancellationToken,string)"/>
 public Task <Payment> CreatePaymentAsync(NewPayment payment, string idempotenceKey = null)
 => CreatePaymentAsync(payment, CancellationToken.None, idempotenceKey);
示例#5
0
 /// <summary>
 /// Payment creation
 /// </summary>
 /// <param name="payment">Payment information, <see cref="NewPayment"/></param>
 /// <param name="idempotenceKey">Idempotence key, use <value>null</value> to generate new one</param>
 /// <returns><see cref="Payment"/></returns>
 public Payment CreatePayment(NewPayment payment, string idempotenceKey = null)
 => Query <Payment>("POST", payment, $"{_apiUrl}payments/", idempotenceKey ?? Guid.NewGuid().ToString());