HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/ielts-store/wp-content/plugins/woo-razorpay/razorpay-sdk/src/Subscription.php
<?php

namespace Razorpay\Api;

class Subscription extends Entity
{
    public function create($attributes = array())
    {
        return parent::create($attributes);
    }

    public function fetch($id)
    {
        return parent::fetch($id);
    }

    public function all($options = array())
    {
        return parent::all($options);
    }

    public function cancel($attributes = array())
    {
        $relativeUrl = $this->getEntityUrl() . $this->id . '/cancel';

        return $this->request('POST', $relativeUrl, $attributes);
    }

    public function createAddon($attributes = array())
    {
        $relativeUrl = $this->getEntityUrl() . $this->id . '/addons';

        return $this->request('POST', $relativeUrl, $attributes);
    }

    /**
     * Create a Registration Link
     * @param  array $attributes
     * @return array
     */
    public function createSubscriptionRegistration($attributes = array())
    {
        $relativeUrl = 'subscription_registration/auth_links';

        return $this->request('POST', $relativeUrl, $attributes);
    }

    public function update($attributes = array())
    {
        $relativeUrl = $this->getEntityUrl() . $this->id;

        return $this->request('PATCH', $relativeUrl, $attributes);
    }

    public function pendingUpdate()
    {
        $relativeUrl = $this->getEntityUrl() . $this->id . '/retrieve_scheduled_changes';

        return $this->request('GET', $relativeUrl, null);
    }

    public function cancelScheduledChanges()
    {
        $relativeUrl = $this->getEntityUrl() . $this->id . '/cancel_scheduled_changes';

        return $this->request('POST', $relativeUrl, null);
    }

    public function pause($attributes = array())
    {
        $relativeUrl = $this->getEntityUrl() . $this->id.'/pause';

        return $this->request('POST', $relativeUrl, $attributes);
    }

    public function resume($attributes = array())
    {
        $relativeUrl = $this->getEntityUrl() . $this->id.'/resume';

        return $this->request('POST', $relativeUrl, $attributes);
    }

    public function deleteOffer($offerId)
    {
        $relativeUrl = $this->getEntityUrl() . $this->id.'/'.$offerId;

        return $this->request('DELETE', $relativeUrl);
    }

}