Closed jlambe closed 4 years ago
Hi! If you don't what the startDate
parameter to be used while updating you should set it to null
. That should prevent this issue.
@martinmollie Setting the startDate
value to null
does work. Thanks for pointing this out. Not sure then if the PHP client must be updated on some sort or perhaps add a note on the PHP example on the documentation.
@sandervanhooft
Thanks @willemstuursma . I have a ticket running with Mollie support, asking for NOT throwing an exception on update if the startDate was not changed.
PHP Client: v2.10.0
When following the Mollie API reference on a subscription update, the documentation is referencing the
update()
method on aSubscription
resource instance.On a current project, users can change their service plan so we need to only update the subscription amount. The issue I met when using the
update()
method on theSubscription
instance is that the method is always sending thestartDate
property with the request while this is optional. Because of this, the Mollie API always return a422
error because the sentstartDate
is in the past when updating.Here is the line of code I'm referencing to: https://github.com/mollie/mollie-api-php/blob/5292588e62d985ad844f5af7c62606bcf8062708/src/Resources/Subscription.php#L113
I'm not sure if this is intended but it seems for me that the
startDate
property should not be defined here especially if it is optional. Because of this, it is impossible to simply update the amount of an active subscription.I'm currently looking for another solution to update the amount of a subscription. Do you have any recommandation ?