add csharp snippets

This commit is contained in:
Jesse de Wit
2023-11-03 15:19:58 +01:00
parent 5ad88cde81
commit 2400d565f4
30 changed files with 1041 additions and 276 deletions

View File

@@ -0,0 +1,37 @@
using Breez.Sdk;
public class ListPaymentsSnippets
{
public void ListPayments(BlockingBreezServices sdk)
{
// ANCHOR: list-payments
try
{
var payments = sdk.ListPayments(
new ListPaymentsRequest(PaymentTypeFilter.ALL));
}
catch (Exception)
{
// Handle error
}
// ANCHOR_END: list-payments
}
public void ListPaymentsFiltered(BlockingBreezServices sdk)
{
// ANCHOR: list-payments-filtered
try
{
var payments = sdk.ListPayments(
new ListPaymentsRequest(
PaymentTypeFilter.SENT,
fromTimestamp: 1696880000,
includeFailures: true));
}
catch (Exception)
{
// Handle error
}
// ANCHOR_END: list-payments-filtered
}
}