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

fix: wrong phpdoc return for cancelFor/cancelForId methods #746

Merged

Conversation

mheiduk
Copy link
Contributor

@mheiduk mheiduk commented Oct 13, 2024

the return for the subscription methods cancelFor/cancelForId in phpdoc comments is wrong. instead of null it should be mixed.

see https://docs.mollie.com/reference/cancel-subscription

@sandervanhooft
Copy link
Collaborator

Hi @mheiduk ,

Thanks for the PR.

On this package the return value actually is null here.

@mheiduk
Copy link
Contributor Author

mheiduk commented Oct 15, 2024

With the cancelForId method I get a response like the documentation says:

$subscription = $this->mollie->subscriptions->cancelForId($customer_id, $subscription_id);
return rest_ensure_response(['status' => $subscription->status]);

response is in this case:

{
  "status": "canceled"
}

EDIT: using the latest version 2.73.0

@mheiduk
Copy link
Contributor Author

mheiduk commented Oct 17, 2024

push @sandervanhooft

would be great if you can take a second look at this.

@sandervanhooft
Copy link
Collaborator

@mheiduk turns out you're right! 😅 Sorry about that.

@sandervanhooft
Copy link
Collaborator

I'd prefer to change the return type to Subscription here though.

@sandervanhooft
Copy link
Collaborator

Mollie\Api\Resources\Subscription

@mheiduk
Copy link
Contributor Author

mheiduk commented Oct 20, 2024

@sandervanhooft thanks, changed it to Subscription

@sandervanhooft sandervanhooft merged commit 45e57bf into mollie:master Oct 30, 2024
2 of 8 checks passed
@sandervanhooft
Copy link
Collaborator

Thanks @mheiduk, released it just now!

https://github.com/mollie/mollie-api-php/releases/tag/v2.74.0

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

Successfully merging this pull request may close these issues.

2 participants