BenjaminRamsay | 2017-01-25 15:59:50 UTC | #1
I have a workaround for this so I'm just mentioning it to help others or in case there's a better solution someone can recommend.
My C# app is listening for fax notifications via v2.users.{id}.fax.documents. As soon as a fax notification comes in, the following exception is thrown from somewhere outside my code:
Newtonsoft.Json.JsonSerializationException: A member with the name 'filename' already exists on 'ININ.PureCloudApi.Model.FaxDataNotification'. Use the JsonPropertyAttribute to specify another name.
I'm guessing this is related to the fact that the v2.users.{id}.fax.documents schema has two file name fields: filename and fileName. But that's just a guess.
My workaround was to make an empty class called FaxDataNotificationFixed that inherits from FaxDataNotification. I then use that class as the data type of my notification subscription rather than FaxDataNotification. Not sure why that works, but it seems to.
If anyone reading this is having similar issues, reply here and I'll be happy to post my code.
tim.smith | 2017-01-25 16:18:42 UTC | #2
BenjaminRamsay, post:1, topic:838
the v2.users.{id}.fax.documents schema has two file name fields: filename and fileName.
Yea, that's very wrong. I've logged TA-2364 to fix the notification schema. Once that's fixed, the generated class in the SDK will also be fixed. Thanks for reporting this!
BenjaminRamsay | 2017-01-25 16:33:47 UTC | #3
Thanks. While they're looking at the fax notification schema anyway, an "action" field would be useful. Like the "action" field in the voicemail notification, this would allow us to determine which event triggered the fax notification: a new fax, a deleted fax, an updated fax, etc.
system | 2017-08-28 19:31:20 UTC | #4
This post was migrated from the old Developer Forum.
ref: 838