diff --git a/init.php b/init.php index 446610108..5e4ddba3d 100644 --- a/init.php +++ b/init.php @@ -150,6 +150,7 @@ require __DIR__ . '/lib/Product.php'; require __DIR__ . '/lib/PromotionCode.php'; require __DIR__ . '/lib/Quote.php'; +require __DIR__ . '/lib/QuoteLine.php'; require __DIR__ . '/lib/QuotePhase.php'; require __DIR__ . '/lib/Radar/EarlyFraudWarning.php'; require __DIR__ . '/lib/Radar/ValueList.php'; diff --git a/lib/FinancialConnections/Account.php b/lib/FinancialConnections/Account.php index cac53e891..33081b87f 100644 --- a/lib/FinancialConnections/Account.php +++ b/lib/FinancialConnections/Account.php @@ -115,7 +115,7 @@ public function refreshAccount($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\FinancialConnections\FinancialConnectionsAccountInferredBalance> the list of financial connections account inferred balances + * @return \Stripe\Collection<\Stripe\FinancialConnections\InferredBalance> the list of financial connections account inferred balances */ public static function allInferredBalances($id, $params = null, $opts = null) { diff --git a/lib/QuoteLine.php b/lib/QuoteLine.php new file mode 100644 index 000000000..96cf95d94 --- /dev/null +++ b/lib/QuoteLine.php @@ -0,0 +1,35 @@ +starts_at timestamp. + * @property null|\Stripe\StripeObject $ends_at Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at starts_at, and a restricted set of attributes is supported on the quote line. + * @property null|string $proration_behavior Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + * @property null|string $set_schedule_end Timestsamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + * @property null|\Stripe\StripeObject $starts_at Details to identify the earliest timestamp where the proposed change should take effect. + * @property null|\Stripe\StripeObject $trial_settings Settings related to subscription trials. + */ +class QuoteLine extends ApiResource +{ + const OBJECT_NAME = 'quote_line'; + + const BILLING_CYCLE_ANCHOR_AUTOMATIC = 'automatic'; + const BILLING_CYCLE_ANCHOR_LINE_STARTS_AT = 'line_starts_at'; + + const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice'; + const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations'; + const PRORATION_BEHAVIOR_NONE = 'none'; + + const SET_SCHEDULE_END_LINE_ENDS_AT = 'line_ends_at'; + const SET_SCHEDULE_END_LINE_STARTS_AT = 'line_starts_at'; +} diff --git a/lib/Service/QuoteService.php b/lib/Service/QuoteService.php index 59e2ff209..446e34227 100644 --- a/lib/Service/QuoteService.php +++ b/lib/Service/QuoteService.php @@ -85,7 +85,7 @@ public function allLineItems($id, $params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\Quote> + * @return \Stripe\Collection<\Stripe\QuoteLine> */ public function allLines($id, $params = null, $opts = null) { diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php index c81da1e56..c3beb853f 100644 --- a/lib/Util/ObjectTypes.php +++ b/lib/Util/ObjectTypes.php @@ -82,6 +82,7 @@ class ObjectTypes \Stripe\Product::OBJECT_NAME => \Stripe\Product::class, \Stripe\PromotionCode::OBJECT_NAME => \Stripe\PromotionCode::class, \Stripe\Quote::OBJECT_NAME => \Stripe\Quote::class, + \Stripe\QuoteLine::OBJECT_NAME => \Stripe\QuoteLine::class, \Stripe\QuotePhase::OBJECT_NAME => \Stripe\QuotePhase::class, \Stripe\Radar\EarlyFraudWarning::OBJECT_NAME => \Stripe\Radar\EarlyFraudWarning::class, \Stripe\Radar\ValueList::OBJECT_NAME => \Stripe\Radar\ValueList::class,