Using the nuget release 2.1.1 and the current master branch, calling List() on ContactsClient results in a sucessful request and response but throws an exception when deserializing the response json into the Contacts class.
Inner Exception Message:
Unexpected character encountered while parsing value: {. Path 'pages.next', line 1, position 18348.
This appears to be due to the v2.0 API returning a 'next' pagination object, rather than a string as expected in the current class data structure.
This can be fixed by providing a Next class as follows:
namespace Intercom.Data
{
public class Next
{
public int page { get; set; }
public string starting_after { get; set; }
}
}
and switching next in Page.cs from a string to this the new object like so:
namespace Intercom.Data
{
public class Pages : Model
{
public Next next { get; set; }
public int page { get; set; }
public int per_page { get; set; }
public int total_pages { get; set; }
}
}
Using the nuget release 2.1.1 and the current master branch, calling List() on ContactsClient results in a sucessful request and response but throws an exception when deserializing the response json into the Contacts class.
Inner Exception Message:
This appears to be due to the v2.0 API returning a 'next' pagination object, rather than a string as expected in the current class data structure.
This can be fixed by providing a Next class as follows:
and switching next in Page.cs from a string to this the new object like so:
I will prepare a PR for this.