Skip to content

Commit 4212085

Browse files
author
yse
committed
fix: csharp and swift
1 parent 9a4dc9e commit 4212085

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

snippets/csharp/Metadata.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ public void FilterPaymentMetadata(BlockingBreezServices sdk)
1515
// ANCHOR: filter-payment-metadata
1616
try
1717
{
18-
var metadataFilters = new List<MetadataFilter>(
18+
var metadataFilters = new List<MetadataFilter>() {
1919
new MetadataFilter(
2020
jsonPath: "myCustomValue",
2121
jsonValue: "true"
2222
)
23-
);
23+
};
2424

2525
var payments = sdk.ListPayments(
2626
new ListPaymentsRequest(
@@ -38,7 +38,7 @@ public void FilterPaymentMetadata(BlockingBreezServices sdk)
3838
public void FilterPaymentMetadataString(BlockingBreezServices sdk)
3939
{
4040
// ANCHOR: filter-payment-metadata-string
41-
var metadataFilters = new List<MetadataFilter>(
41+
var metadataFilters = new List<MetadataFilter>() {
4242
new MetadataFilter(
4343
jsonPath: "customerName",
4444
jsonValue: "\"Satoshi Nakamoto\""
@@ -47,23 +47,23 @@ public void FilterPaymentMetadataString(BlockingBreezServices sdk)
4747
jsonPath: "customerName",
4848
jsonValue: JsonSerializer.Serialize("Satoshi Nakamoto")
4949
)
50-
);
50+
};
5151
// ANCHOR_END: filter-payment-metadata-string
5252
}
5353

5454
public void FilterPaymentMetadataObject(BlockingBreezServices sdk)
5555
{
5656
// ANCHOR: filter-payment-metadata-object
5757
// This will *NOT* work
58-
var _metadataFilters = new List<MetadataFilter>(
58+
var _metadataFilters = new List<MetadataFilter>() {
5959
new MetadataFilter(
6060
jsonPath: "parent.nestedArray",
6161
jsonValue: "[1, 2, 3]"
6262
)
63-
);
63+
};
6464

6565
// Any of these will work
66-
var metadataFilters = new List<MetadataFilter>(
66+
var metadataFilters = new List<MetadataFilter>() {
6767
new MetadataFilter(
6868
jsonPath: "parent.nestedArray",
6969
jsonValue: "[1,2,3]"
@@ -72,7 +72,7 @@ public void FilterPaymentMetadataObject(BlockingBreezServices sdk)
7272
jsonPath: "parent.nestedArray",
7373
jsonValue: JsonSerializer.Serialize(new int[] {1, 2, 3})
7474
)
75-
);
75+
};
7676
// ANCHOR_END: filter-payment-metadata-object
7777
}
7878
}

snippets/swift/BreezSDKExamples/Sources/Metadata.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func FilterPaymentMetadata(sdk: BlockingBreezServices) throws {
1919
MetadataFilter(
2020
jsonPath: "myCustomValue",
2121
jsonValue: "true",
22-
),
22+
)
2323
]
2424

2525
try? sdk.listPayments(
@@ -36,7 +36,7 @@ func FilterPaymentMetadataString(sdk: BlockingBreezServices) throws {
3636
MetadataFilter(
3737
jsonPath: "myCustomValue",
3838
jsonValue: #""true""#,
39-
),
39+
)
4040
]
4141
// ANCHOR_END: filter-payment-metadata-string
4242
}
@@ -48,15 +48,15 @@ func FilterPaymentMetadataObject(sdk: BlockingBreezServices) throws {
4848
MetadataFilter(
4949
jsonPath: "myCustomValue",
5050
jsonValue: #"[1, 2, 3]"#,
51-
),
51+
)
5252
]
5353

5454
// Any of these will work
5555
let metadataFilters = [
5656
MetadataFilter(
5757
jsonPath: "myCustomValue",
5858
jsonValue: #"[1,2,3]"#,
59-
),
59+
)
6060
]
6161
// ANCHOR_END: filter-payment-metadata-object
6262
}

0 commit comments

Comments
 (0)