Example #1
0
 /// <summary>
 /// Returns history operations base info.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceId'>
 /// Identifier of the invoice.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetHistoryByInvoiceAsync(this IPayHistoryAPI operations, string invoiceId = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetHistoryByInvoiceWithHttpMessagesAsync(invoiceId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #2
0
 /// <summary>
 /// Mark history operation as removed
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Identifier of the history operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ErrorResponse> SetRemovedAsync(this IPayHistoryAPI operations, string id = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SetRemovedWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #3
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IsAliveResponse> IsAliveAsync(this IPayHistoryAPI operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.IsAliveWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #4
0
 public static async Task <object> GetDetailsAsync(this IPayHistoryAPI operations, string merchantId = default(string), string id = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetDetailsWithHttpMessagesAsync(merchantId, id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #5
0
 /// <summary>
 /// Returns details of the history operation.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Identifier of the history operation.
 /// </param>
 public static object GetDetailsById(this IPayHistoryAPI operations, string id = default(string))
 {
     return(operations.GetDetailsByIdAsync(id).GetAwaiter().GetResult());
 }
Example #6
0
 /// <summary>
 /// Returns history operations base info.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceId'>
 /// Identifier of the invoice.
 /// </param>
 public static object GetHistoryByInvoice(this IPayHistoryAPI operations, string invoiceId = default(string))
 {
     return(operations.GetHistoryByInvoiceAsync(invoiceId).GetAwaiter().GetResult());
 }
Example #7
0
 /// <summary>
 /// Returns history operations base info.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='merchantId'>
 /// Identifier of the merchant.
 /// </param>
 public static object GetHistory(this IPayHistoryAPI operations, string merchantId = default(string))
 {
     return(operations.GetHistoryAsync(merchantId).GetAwaiter().GetResult());
 }
Example #8
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IsAliveResponse IsAlive(this IPayHistoryAPI operations)
 {
     return(operations.IsAliveAsync().GetAwaiter().GetResult());
 }
Example #9
0
 /// <summary>
 /// Mark history operation as removed
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Identifier of the history operation.
 /// </param>
 public static ErrorResponse SetRemoved(this IPayHistoryAPI operations, string id = default(string))
 {
     return(operations.SetRemovedAsync(id).GetAwaiter().GetResult());
 }
Example #10
0
 /// <summary>
 /// Set TxHash to the history operation.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Identifier of the history operation.
 /// </param>
 /// <param name='txHash'>
 /// TxHash of the history operation.
 /// </param>
 public static ErrorResponse SetTxHash(this IPayHistoryAPI operations, string id = default(string), string txHash = default(string))
 {
     return(operations.SetTxHashAsync(id, txHash).GetAwaiter().GetResult());
 }
Example #11
0
 public PayHistoryClient(string serviceUrl)
 {
     _service = new PayHistoryAPI(new Uri(serviceUrl));
 }