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

added a new method Subscription::clearPendingCancellation #32

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

esokullu
Copy link

@esokullu esokullu commented Aug 8, 2019

just read CONTRIBUTING.md (sorry for the duplicate)

@esokullu
Copy link
Author

esokullu commented Aug 8, 2019

sorry I had to release this on packagist for a package we use internally, hence the composer.json name change. messed things up a bit, will roll it back.

@esokullu
Copy link
Author

esokullu commented Aug 8, 2019

You may add manually:

    /**
     * Clears the pending cancellation from a subscription in delayed cancellation
     *
     * @param int $id
     *
     * @return Subscription
     * @see Subscription::cancelDelayed()
     */
    public function clearPendingCancellation($id)
    {
        $service = $this->getService();
        $response = $service->request('subscriptions/' . (int)$id .'/delayed_cancel', 'DELETE', []);
        $responseArray = $this->getResponseArray($response);
        if (!$this->isError()) {
            $this->_data = $responseArray['subscription'];
        } else {
            $this->_data = array();
        }

        return $this;
    }

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.

1 participant