/// <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);
/// <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);
/// <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);
/// <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);
/// <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());