intuit / QuickBooks-V3-Java-SDK

Java SDK for QuickBooks REST API v3 services
Apache License 2.0
70 stars 144 forks source link

UnmarshalException retrieving company Entitlements #190

Closed genachka closed 1 year ago

genachka commented 2 years ago

Using QBO Java SDK 6.2.1 when retrieving a company's Entitlements where the company is on the Simple Start plan started getting an UnmarshalException error with code that worked several months ago. Plus plan and others work just fine.

Issuing: EntitlementsResponse er = service.getEntitlements();

results in: com.intuit.ipp.exception.SerializationException: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.intuit.com/sb/cdm/baseexceptionmodel/xsd", local:"FaultInfo"). Expected elements are <{}EntitlementsResponse>

How can this be resolved? And the URI in the exception leads to an invalid page on Intuit so that's useless!

genachka commented 2 years ago

I discovered that the company for which this is happening has a SubscriptionStatus = RESTRICTED but according to https://developer.intuit.com/app/developer/qbo/docs/develop/troubleshooting/subscription-states this status still has Read/Write access but it looks like the QBO API is not returning back data? I've tested same code against a company where SubscriptionStatus = SUBSCRIBED and it works fine.

The exception is very misleading and wasted days on this. I would expect a) a better exception. And b) unless the status is CANCELLED or EXPIRED or SUSPENDED I would expect to still be able to retrieve the Entitlements on RESTRICTED

Can someone explain?

henryjcee commented 2 years ago

Can't help but also running into the same issue with 6.2.2. @IntuitDeveloperRelations

sujitharamadass commented 1 year ago

With SubscriptionStatus = Restricted, it is read only. Confirmed with the API team.

genachka commented 1 year ago

@sujitharamadass please read my description The issue isn't whether it's read only or read write. If it's read only, that's fine and what I was expecting but that's not what is happening. It doesn't return data which would be read-only right? Instead it throws an exception.