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

stripe / stripe-php / #7087

pending completion
#7087

push

php-coveralls

pakrym-stripe
Bump version to 10.14.0-beta.2

1831 of 2732 relevant lines covered (67.02%)

3.81 hits per line

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

0.0
/lib/QuotePhase.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe;
6

7
/**
8
 * A quote phase describes the line items, coupons, and trialing status of a subscription for a predefined time period.
9
 *
10
 * @property string $id Unique identifier for the object.
11
 * @property string $object String representing the object's type. Objects of the same type share the same value.
12
 * @property int $amount_subtotal Total before any discounts or taxes are applied.
13
 * @property int $amount_total Total after discounts and taxes are applied.
14
 * @property null|string $billing_cycle_anchor If set to <code>reset</code>, the billing_cycle_anchor of the subscription is set to the start of the phase when entering the phase. If unset, then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle <a href="https://stripe.com/docs/billing/subscriptions/billing-cycle">documentation</a>.
15
 * @property null|string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as <code>active</code>.
16
 * @property null|(string|\Stripe\TaxRate)[] $default_tax_rates The default tax rates to apply to the subscription during this phase of the quote.
17
 * @property (string|\Stripe\Discount)[] $discounts The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
18
 * @property null|int $end_date The end of this phase of the quote
19
 * @property null|\Stripe\StripeObject $invoice_settings The invoice settings applicable during this phase.
20
 * @property null|int $iterations Integer representing the multiplier applied to the price interval. For example, <code>iterations=2</code> applied to a price with <code>interval=month</code> and <code>interval_count=3</code> results in a phase of duration <code>2 * 3 months = 6 months</code>.
21
 * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
22
 * @property string $proration_behavior If the quote will prorate when transitioning to this phase. Possible values are <code>create_prorations</code> and <code>none</code>.
23
 * @property \Stripe\StripeObject $total_details
24
 * @property null|bool $trial If set to true the entire phase is counted as a trial and the customer will not be charged for any recurring fees.
25
 * @property null|int $trial_end When the trial ends within the phase.
26
 */
27
class QuotePhase extends ApiResource
28
{
29
    const OBJECT_NAME = 'quote_phase';
30

31
    use ApiOperations\All;
32
    use ApiOperations\Retrieve;
33

34
    const BILLING_CYCLE_ANCHOR_RESET = 'reset';
35

36
    const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically';
37
    const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice';
38

39
    const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice';
40
    const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations';
41
    const PRORATION_BEHAVIOR_NONE = 'none';
42

43
    /**
44
     * @param string $id
45
     * @param null|array $params
46
     * @param null|array|string $opts
47
     *
48
     * @throws \Stripe\Exception\ApiErrorException if the request fails
49
     *
50
     * @return \Stripe\Collection<\Stripe\LineItem> list of LineItems
51
     */
52
    public static function allLineItems($id, $params = null, $opts = null)
53
    {
54
        $url = static::resourceUrl($id) . '/line_items';
×
55
        list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
×
56
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
57
        $obj->setLastResponse($response);
×
58

59
        return $obj;
×
60
    }
61
}
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