Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReportSubscriptionsApi not parsing the response retrieved from the API #44

Open
jgarnica-cs opened this issue Jan 8, 2020 · 1 comment

Comments

@jgarnica-cs
Copy link

Hi,

I'm actually working using the cybersource rest client java and I'm working with ReportSubscriptionsApi to retrieve the Report subscriptions.

Right now I'm facing up with an issue that happens when I'm calling the rest endpoint in order to get that info. The object which should have the reports information is coming as null. I've been debugging directly the response and it is successful and as well, it matches with the response given on the documentation page using my API key and secret.

Digging into the code and doing some research, I'm looking that it may be for the GSON anotation inside that class and the response given by the webservice, seems that there is a mismatch between them.

Please check it up the info below, as you can see the object is coming as Subscriptions
"_embedded": { "Subscriptions": [ { "_links": { "self": { "href": "https://apitest.cybersource.com/reporting/v3/report-subscriptions/..." } },

And, this is on your code, inside the ReportingV3ReportSubscriptionsGet200Response class.

public class ReportingV3ReportSubscriptionsGet200Response { @SerializedName("subscriptions") private List<ReportingV3ReportSubscriptionsGet200ResponseSubscriptions> subscriptions = null;

At a glance, it seems that you're waiting for a property called "subscriptions" instead of "Subscriptions". Hence, seems that this would be a potential reason why I'm getting the report info inside of the object as null even when the call to the webservice is successful and the response is coming with data that would be parsed without issues.

Can you please reproduce and confirm if this is an issue?

Kind regards!

@gnongsie
Copy link
Contributor

gnongsie commented Jan 9, 2020

Hi @jgarnica-cs ,

Thanks for bringing this to our attention. We have relayed this information to the relevant team and will keep you updated with any developments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants