• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-php / #6977

pending completion
#6977

push

php-coveralls

anniel-stripe
Bump version to 10.13.0-beta.1

1802 of 2668 relevant lines covered (67.54%)

3.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/lib/Service/SubscriptionScheduleService.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Service;
6

7
class SubscriptionScheduleService extends \Stripe\Service\AbstractService
8
{
9
    /**
10
     * Retrieves the list of your subscription schedules.
11
     *
12
     * @param null|array $params
13
     * @param null|array|\Stripe\Util\RequestOptions $opts
14
     *
15
     * @throws \Stripe\Exception\ApiErrorException if the request fails
16
     *
17
     * @return \Stripe\Collection<\Stripe\SubscriptionSchedule>
18
     */
19
    public function all($params = null, $opts = null)
20
    {
21
        return $this->requestCollection('get', '/v1/subscription_schedules', $params, $opts);
1✔
22
    }
23

24
    /**
25
     * Amends an existing subscription schedule.
26
     *
27
     * @param string $id
28
     * @param null|array $params
29
     * @param null|array|\Stripe\Util\RequestOptions $opts
30
     *
31
     * @throws \Stripe\Exception\ApiErrorException if the request fails
32
     *
33
     * @return \Stripe\SubscriptionSchedule
34
     */
35
    public function amend($id, $params = null, $opts = null)
36
    {
37
        return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/amend', $id), $params, $opts);
×
38
    }
39

40
    /**
41
     * Cancels a subscription schedule and its associated subscription immediately (if
42
     * the subscription schedule has an active subscription). A subscription schedule
43
     * can only be canceled if its status is <code>not_started</code> or
44
     * <code>active</code>.
45
     *
46
     * @param string $id
47
     * @param null|array $params
48
     * @param null|array|\Stripe\Util\RequestOptions $opts
49
     *
50
     * @throws \Stripe\Exception\ApiErrorException if the request fails
51
     *
52
     * @return \Stripe\SubscriptionSchedule
53
     */
54
    public function cancel($id, $params = null, $opts = null)
55
    {
56
        return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/cancel', $id), $params, $opts);
1✔
57
    }
58

59
    /**
60
     * Creates a new subscription schedule object. Each customer can have up to 500
61
     * active or scheduled subscriptions.
62
     *
63
     * @param null|array $params
64
     * @param null|array|\Stripe\Util\RequestOptions $opts
65
     *
66
     * @throws \Stripe\Exception\ApiErrorException if the request fails
67
     *
68
     * @return \Stripe\SubscriptionSchedule
69
     */
70
    public function create($params = null, $opts = null)
71
    {
72
        return $this->request('post', '/v1/subscription_schedules', $params, $opts);
1✔
73
    }
74

75
    /**
76
     * Releases the subscription schedule immediately, which will stop scheduling of
77
     * its phases, but leave any existing subscription in place. A schedule can only be
78
     * released if its status is <code>not_started</code> or <code>active</code>. If
79
     * the subscription schedule is currently associated with a subscription, releasing
80
     * it will remove its <code>subscription</code> property and set the subscription’s
81
     * ID to the <code>released_subscription</code> property.
82
     *
83
     * @param string $id
84
     * @param null|array $params
85
     * @param null|array|\Stripe\Util\RequestOptions $opts
86
     *
87
     * @throws \Stripe\Exception\ApiErrorException if the request fails
88
     *
89
     * @return \Stripe\SubscriptionSchedule
90
     */
91
    public function release($id, $params = null, $opts = null)
92
    {
93
        return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/release', $id), $params, $opts);
1✔
94
    }
95

96
    /**
97
     * Retrieves the details of an existing subscription schedule. You only need to
98
     * supply the unique subscription schedule identifier that was returned upon
99
     * subscription schedule creation.
100
     *
101
     * @param string $id
102
     * @param null|array $params
103
     * @param null|array|\Stripe\Util\RequestOptions $opts
104
     *
105
     * @throws \Stripe\Exception\ApiErrorException if the request fails
106
     *
107
     * @return \Stripe\SubscriptionSchedule
108
     */
109
    public function retrieve($id, $params = null, $opts = null)
110
    {
111
        return $this->request('get', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts);
1✔
112
    }
113

114
    /**
115
     * Updates an existing subscription schedule.
116
     *
117
     * @param string $id
118
     * @param null|array $params
119
     * @param null|array|\Stripe\Util\RequestOptions $opts
120
     *
121
     * @throws \Stripe\Exception\ApiErrorException if the request fails
122
     *
123
     * @return \Stripe\SubscriptionSchedule
124
     */
125
    public function update($id, $params = null, $opts = null)
126
    {
127
        return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts);
1✔
128
    }
129
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc