-
Notifications
You must be signed in to change notification settings - Fork 204
/
Copy pathListingstemsSample.cs
39 lines (33 loc) · 1.22 KB
/
ListingstemsSample.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using FikaAmazonAPI.Parameter.ListingItem;
using FikaAmazonAPI.Utils;
namespace FikaAmazonAPI.SampleCode
{
public class ListingsItemsSample
{
private readonly AmazonConnection amazonConnection;
public ListingsItemsSample(AmazonConnection amazonConnection)
{
this.amazonConnection = amazonConnection;
}
public async Task SetListingsItemAttribute(string sellerId)
{
var sku = "MP-23Q3W00058-Q898-03";
var marketPlace = MarketPlace.Germany;
PatchOperation[] patches = new PatchOperation[1];
patches[0] = new PatchOperation()
{
op = Op.replace,
path = "/attributes/gpsr_safety_attestation",
value = new object[] { true }
};
ParameterPatchListingItem parameter = new()
{
listingsItemPatchRequest = new ListingsItemPatchRequest() { patches = patches, productType = "BRA" },
sellerId = sellerId,
sku = sku,
marketplaceIds = new string[] { marketPlace.ID }
};
await amazonConnection.ListingsItem.PatchListingsItemAsync(parameter);
}
}
}