mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
38 lines
892 B
C#
38 lines
892 B
C#
using Breez.Sdk;
|
|
|
|
public class ListPaymentsSnippets
|
|
{
|
|
public void ListPayments(BlockingBreezServices sdk)
|
|
{
|
|
// ANCHOR: list-payments
|
|
try
|
|
{
|
|
var payments = sdk.ListPayments(
|
|
new ListPaymentsRequest());
|
|
}
|
|
catch (Exception)
|
|
{
|
|
// Handle error
|
|
}
|
|
// ANCHOR_END: list-payments
|
|
}
|
|
|
|
public void ListPaymentsFiltered(BlockingBreezServices sdk)
|
|
{
|
|
// ANCHOR: list-payments-filtered
|
|
try
|
|
{
|
|
var payments = sdk.ListPayments(
|
|
new ListPaymentsRequest(
|
|
new() { PaymentTypeFilter.SENT },
|
|
fromTimestamp: 1696880000,
|
|
includeFailures: true));
|
|
}
|
|
catch (Exception)
|
|
{
|
|
// Handle error
|
|
}
|
|
// ANCHOR_END: list-payments-filtered
|
|
}
|
|
}
|