Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wpforms-.../vendor_p.../stripe/stripe-p.../lib
File: SubscriptionSchedule.php
<?php
[0] Fix | Delete
[1] Fix | Delete
// File generated from our OpenAPI spec
[2] Fix | Delete
namespace WPForms\Vendor\Stripe;
[3] Fix | Delete
[4] Fix | Delete
/**
[5] Fix | Delete
* A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
[6] Fix | Delete
*
[7] Fix | Delete
* Related guide: <a href="https://stripe.com/docs/billing/subscriptions/subscription-schedules">Subscription schedules</a>
[8] Fix | Delete
*
[9] Fix | Delete
* @property string $id Unique identifier for the object.
[10] Fix | Delete
* @property string $object String representing the object's type. Objects of the same type share the same value.
[11] Fix | Delete
* @property null|string|\Stripe\Application $application ID of the Connect Application that created the schedule.
[12] Fix | Delete
* @property null|int $canceled_at Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
[13] Fix | Delete
* @property null|int $completed_at Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
[14] Fix | Delete
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
[15] Fix | Delete
* @property null|\Stripe\StripeObject $current_phase Object representing the start and end dates for the current phase of the subscription schedule, if it is <code>active</code>.
[16] Fix | Delete
* @property string|\Stripe\Customer $customer ID of the customer who owns the subscription schedule.
[17] Fix | Delete
* @property \Stripe\StripeObject $default_settings
[18] Fix | Delete
* @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends. Possible values are <code>release</code> or <code>cancel</code> with the default being <code>release</code>. <code>release</code> will end the subscription schedule and keep the underlying subscription running. <code>cancel</code> will end the subscription schedule and cancel the underlying subscription.
[19] Fix | Delete
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
[20] Fix | Delete
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
[21] Fix | Delete
* @property \Stripe\StripeObject[] $phases Configuration for the subscription schedule's phases.
[22] Fix | Delete
* @property null|int $released_at Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
[23] Fix | Delete
* @property null|string $released_subscription ID of the subscription once managed by the subscription schedule (if it is released).
[24] Fix | Delete
* @property string $status The present status of the subscription schedule. Possible values are <code>not_started</code>, <code>active</code>, <code>completed</code>, <code>released</code>, and <code>canceled</code>. You can read more about the different states in our <a href="https://stripe.com/docs/billing/subscriptions/subscription-schedules">behavior guide</a>.
[25] Fix | Delete
* @property null|string|\Stripe\Subscription $subscription ID of the subscription managed by the subscription schedule.
[26] Fix | Delete
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription schedule belongs to.
[27] Fix | Delete
*/
[28] Fix | Delete
class SubscriptionSchedule extends ApiResource
[29] Fix | Delete
{
[30] Fix | Delete
const OBJECT_NAME = 'subscription_schedule';
[31] Fix | Delete
use ApiOperations\All;
[32] Fix | Delete
use ApiOperations\Create;
[33] Fix | Delete
use ApiOperations\Retrieve;
[34] Fix | Delete
use ApiOperations\Update;
[35] Fix | Delete
const END_BEHAVIOR_CANCEL = 'cancel';
[36] Fix | Delete
const END_BEHAVIOR_NONE = 'none';
[37] Fix | Delete
const END_BEHAVIOR_RELEASE = 'release';
[38] Fix | Delete
const END_BEHAVIOR_RENEW = 'renew';
[39] Fix | Delete
const STATUS_ACTIVE = 'active';
[40] Fix | Delete
const STATUS_CANCELED = 'canceled';
[41] Fix | Delete
const STATUS_COMPLETED = 'completed';
[42] Fix | Delete
const STATUS_NOT_STARTED = 'not_started';
[43] Fix | Delete
const STATUS_RELEASED = 'released';
[44] Fix | Delete
/**
[45] Fix | Delete
* @param null|array $params
[46] Fix | Delete
* @param null|array|string $opts
[47] Fix | Delete
*
[48] Fix | Delete
* @throws \Stripe\Exception\ApiErrorException if the request fails
[49] Fix | Delete
*
[50] Fix | Delete
* @return \Stripe\SubscriptionSchedule the canceled subscription schedule
[51] Fix | Delete
*/
[52] Fix | Delete
public function cancel($params = null, $opts = null)
[53] Fix | Delete
{
[54] Fix | Delete
$url = $this->instanceUrl() . '/cancel';
[55] Fix | Delete
list($response, $opts) = $this->_request('post', $url, $params, $opts);
[56] Fix | Delete
$this->refreshFrom($response, $opts);
[57] Fix | Delete
return $this;
[58] Fix | Delete
}
[59] Fix | Delete
/**
[60] Fix | Delete
* @param null|array $params
[61] Fix | Delete
* @param null|array|string $opts
[62] Fix | Delete
*
[63] Fix | Delete
* @throws \Stripe\Exception\ApiErrorException if the request fails
[64] Fix | Delete
*
[65] Fix | Delete
* @return \Stripe\SubscriptionSchedule the released subscription schedule
[66] Fix | Delete
*/
[67] Fix | Delete
public function release($params = null, $opts = null)
[68] Fix | Delete
{
[69] Fix | Delete
$url = $this->instanceUrl() . '/release';
[70] Fix | Delete
list($response, $opts) = $this->_request('post', $url, $params, $opts);
[71] Fix | Delete
$this->refreshFrom($response, $opts);
[72] Fix | Delete
return $this;
[73] Fix | Delete
}
[74] Fix | Delete
}
[75] Fix | Delete
[76] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function