From 8b56389878f404887100ef6a8ac9010aaa599b49 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Tue, 25 Jun 2019 11:32:51 -0700 Subject: [PATCH] Add new constants for collection_method on Invoice --- lib/Invoice.php | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/lib/Invoice.php b/lib/Invoice.php index 1ef9035ff..31a845854 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -79,6 +79,25 @@ class Invoice extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; + /** + * Possible string representations of the billing reason. + * @link https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason + */ + const BILLING_REASON_MANUAL = 'manual'; + const BILLING_REASON_SUBSCRIPTION = 'subscription'; + const BILLING_REASON_SUBSCRIPTION_CREATE = 'subscription_create'; + const BILLING_REASON_SUBSCRIPTION_CYCLE = 'subscription_cycle'; + const BILLING_REASON_SUBSCRIPTION_THRESHOLD = 'subscription_threshold'; + const BILLING_REASON_SUBSCRIPTION_UPDATE = 'subscription_update'; + const BILLING_REASON_UPCOMING = 'upcoming'; + + /** + * Possible string representations of the `collection_method` property. + * @link https://stripe.com/docs/api/invoices/object#invoice_object-collection_method + */ + const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; + const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; + /** * Possible string representations of the invoice status. * @link https://stripe.com/docs/api/invoices/object#invoice_object-status @@ -90,23 +109,12 @@ class Invoice extends ApiResource const STATUS_VOID = 'void'; /** - * Possible string representations of the billing. + * Possible string representations of the `billing` property. + * @deprecated Use `collection_method` instead. * @link https://stripe.com/docs/api/invoices/object#invoice_object-billing */ - const BILLING_SEND_INVOICE = 'send_invoice'; const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically'; - - /** - * Possible string representations of the billing reason. - * @link https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason - */ - const BILLING_REASON_SUBSCRIPTION = 'subscription'; - const BILLING_REASON_SUBSCRIPTION_CREATE = 'subscription_create'; - const BILLING_REASON_SUBSCRIPTION_CYCLE = 'subscription_cycle'; - const BILLING_REASON_SUBSCRIPTION_UPDATE = 'subscription_update'; - const BILLING_REASON_SUBSCRIPTION_THRESHOLD = 'subscription_threshold'; - const BILLING_REASON_MANUAL = 'manual'; - const BILLING_REASON_UPCOMING = 'upcoming'; + const BILLING_SEND_INVOICE = 'send_invoice'; /** * @param array|null $params