Hello everyone,
I’m trying to use the RingCentral.Net library (latest version 6.2.5) to do various things that all seem to work, except for one thing:
When trying to delete user extensions (API reference: https://developers.ringcentral.com/api-reference/User-Settings/bulkDeleteUsersV2), I’m getting following error:
Required request body is missing: public com.ringcentral.sith.model.ResponseRecordsWrapper<com.ringcentral.sith.model.DeleteExtensionResponseRecord> com.ringcentral.sith.controller.ExtensionsController.deleteExtension(long,com.ringcentral.sith.model.DeleteExtensionsRequest)","errorCode":"InvalidParameter"}
My code however looks like this:
var operation = new List<BulkOperationExtensionReference>
{
new()
{
id = extensionId,
},
};
var deleteRequest = new BulkDeleteUsersRequest
{
records = operation.ToArray(),
keepAssetsInInventory = true,
};
var responseDeleteExtension = await rcClient.Restapi().V2().Accounts().Extensions().Delete(
deleteRequest
);
So I do not see any error here. What’s more, when looking into the Delete function of the Client I saw the following:
As you can see, the Delete method calls the RestClient’s delete function, but instead of inputting the bulkDeleteUsersRequest as the content it instead inputs it as the queryParams value which in this case is incorrect. It should instead be “content: (object) bulkDeleteUsersRequest”, shouldn’t it?
When executing the call in Postman with a JSON body as the required content everything works fine, but in my .NET code I rather wanted to use the library. So is this a bug in the library or am I missing anything?
Feedback would be much appreciated!