From 6f3287b234805951da10659608411a4fc1e8fd60 Mon Sep 17 00:00:00 2001 From: Stephan Vock Date: Tue, 6 Jul 2021 14:59:14 +0100 Subject: [PATCH] Subscription: add option to update at end of term --- lib/recurly/subscription.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/recurly/subscription.php b/lib/recurly/subscription.php index afc64f69..429a8624 100644 --- a/lib/recurly/subscription.php +++ b/lib/recurly/subscription.php @@ -172,6 +172,16 @@ public function updateAtNextBillDate() { $this->_save(Recurly_Client::PUT, $this->uri()); } + /** + * Make an update that applies at the term end date of the subscription. + * + * @throws Recurly_Error + */ + public function updateAtTermEnd() { + $this->timeframe = 'term_end'; + $this->_save(Recurly_Client::PUT, $this->uri()); + } + /** * Terminate the subscription immediately and issue a full refund of the last renewal *