예제 #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());