Function: updateSubscription()
updateSubscription(
session
,id
,updateRequest
,query
?):Promise
<Subscription
>
Updating parameters like frequency, charge_interval_frequency, order_interval_frequency, order_interval_unit will cause our algorithm to automatically recalculate the next charge date (next_charge_scheduled_at). WARNING: This update will remove skipped and manually changed charges. If you want to change the next charge date (next_charge_scheduled_at) we recommend you to update these parameters first. When updating order_interval_unit OR order_interval_frequency OR charge_interval_frequency all three parameters are required.
Parameters
Parameter | Type |
---|---|
session | Session |
id | string | number |
updateRequest | UpdateSubscriptionRequest |
query ? | UpdateSubscriptionParams |
Returns
Promise
<Subscription
>