How to partially update a listing with PatchListingsItem method #3570
-
I am trying to make API calls from my C# SDK. In this program. The model I am using is listings-items-api-model. I deserialize a JSON string into C# objects and pass them as arguments into some methods to make API calls. The issue I have is the objects are not the same type with the arguments in the method signature. Below is my code. Pay attention to the "error" comments I make in the Main() method: `/*
using System; namespace SellingPartnerAPI.ListingsItemsAPI.Test /// Class for testing ListingsApi /// /// /// This file is automatically generated by Swagger Codegen. /// Please update the test case below to test the API endpoint. /// [TestFixture] public class ListingsApiTests { private ListingsApi instance;
}` Here's the error (I also commented them in my code above):
The third argument of PatchOperation accepts a List<object> type, but it does not accept List<Value>. I thought "Value" is also an object? The classes I use in the above code can be viewed here: So the problem I have is the arguments I pass into the method are not the same type with the method's signature. How can I fixed them? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Your patch value should be a generic object list. Here's an example of what works for me:
|
Beta Was this translation helpful? Give feedback.
Your patch value should be a generic object list. Here's an example of what works for me: