BulkAccountCallRecordingsResource bulkAccountCallRecordingsResource = new BulkAccountCallRecordingsResource
{
addedExtensions = new CallRecordingExtensionResource
{
id = "123456789",
callDirection = 'Inbound'
}
};
Using the above(I've removed my extensionID and made it 123456789), I'm getting an error for the first single quote in "callDirection": CS1012: Too many characters in character literal. When changing them to double quotes I get: Cannot implicitly convert type 'RingCentral.CallRecordingExtensionResource' to 'RingCentral.CallRecordingExtensionResource[]'
A while ago I made a Python script that does what I'm attempting to do with my C# program, the issue was pretty similar and had to do with the structure of the param, it needed to have "[ ]" brackets before "id" and after "callDirection".
Is the structure in my code accurate, or do I need to change it?
Here is what I had to do with Python to get it to work a long time ago(notice the "[ ]" brackets), but when trying this fix in C# it tells me it's invalid.
body = {
'addedExtensions': [
{
'id': <ENTER VALUE>,
'callDirection': 'Outbound'
}
]
}
On the API documentation it states to use this in Python: https://developers.ringcentral.com/api-reference/Call-Recording-Settings/updateCallRecordingExtensionList
body = {
'addedExtensions': {
'id': '<ENTER VALUE>',
'callDirection': 'Outbound'
}
}
Not having any luck on where Phong pointed me to for the other issue earlier: https://github.com/ringcentral/RingCentral.Net/blob/master/samples.md
Also, when looking at the SDK, it looks like 'Inbound' is correct, that I'm using a string for callDirection under CallRecordingExtensionResource:
namespace RingCentral
{
public class CallRecordingExtensionResource
{
public CallRecordingExtensionResource();
public string id { get; set; }
public string uri { get; set; }
public string extensionNumber { get; set; }
public string type { get; set; }
public string callDirection { get; set; }
}
}
Any help is appreciated!