-
Notifications
You must be signed in to change notification settings - Fork 93
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
Client::createSubscriptionChange() returning EmptyResource throws Fatal Exception #648
Comments
Appears to be expected behavior per https://developers.recurly.com/api/v2021-02-25/index.html#operation/create_subscription_change |
The issue is in the SDK, not the API. The return result from the SDK is returning a type not defined in the signature. This is causing the exception I outlined. |
that is a bug, It can be reproduced with stub code of that calls, like this
exception is thrown because it is EmptyResource is not an instance of SubscriptionChange, this is not modeled properly |
We've just experienced this issue with a call to Did anybody try raising a support ticket for this? As the issue template states "Github issues are not an official support channel for Recurly" I have raised a ticket through their Zendesk support portal. Let's see if that has any effect... |
I can only recommend a workaround, we surrounded that call with try/catch like this
kinda sad but works :) |
Thanks for the suggestion Paweł. I've implemented something similar as a workaround, was hoping they could resolve the issue. The only response I've had to my support ticket is an acknowledgement. |
Warning: Github issues are not an official support channel for Recurly. If you have an urgent request we suggest you contact us through an official channel: [email protected] or https://recurly.zendesk.com
Describe the bug
If a subscription already has a pending change, then a new change is created that matches the existing subscription, per the API docs, the change is removed and a 204 No Content is sent.
To Reproduce
Have an account with an existing subscription change, then submit a change that matches the current subscription values.
Expected behavior
Recurly\Client::createSubscriptionChange()
should add a union return type for PHP8+ to support returningRecurly\Resources\EmptyResource
as well as the normalRecurly\Resources\SubscriptionChange
Your Environment
Recurly SDK: 4.9.0
PHP: 8.0
The text was updated successfully, but these errors were encountered: