-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #772 from prorena/main
Fixed confusing exception message for ParameterPatchListingItem
- Loading branch information
Showing
3 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters