You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling the ListEntitlements method, the client returns a Pager<Entitlements> instead of a Pager<Entitlement> object. This causes improper deserialization of the response and fails to return the Entitlement data for an Account.
To Reproduce
Create an Entitlement, and have it assigned to an Account.
var entitlementPager = client.ListEntitlements("code-...");
var page = entitlementPager.FetchNextPage();
// See that `page.Data` is a `List<Entitlement>`, and that list does not contain the expected Entitlement
Taking the RawResponse of the page, we can manually deserialize it into a Pager<Entitlement> and successfully retrieve the data.
var raw = page.GetResponse().RawResponse;
var restResponse = new RestResponse
{
Content = raw
};
var deserialized = JsonSerializer.Default.Deserialize<Pager<Recurly.Resources.Entitlement>>(restResponse);
Expected behavior
The client correctly deserializes the response from the API.
Your Environment
Which version of this library are you using? 4.58.0
The text was updated successfully, but these errors were encountered:
Describe the bug
When calling the
ListEntitlements
method, the client returns aPager<Entitlements>
instead of aPager<Entitlement>
object. This causes improper deserialization of the response and fails to return the Entitlement data for an Account.To Reproduce
Create an Entitlement, and have it assigned to an Account.
Taking the
RawResponse
of thepage
, we can manually deserialize it into aPager<Entitlement>
and successfully retrieve the data.Expected behavior
The client correctly deserializes the response from the API.
Your Environment
The text was updated successfully, but these errors were encountered: