Skip to content

Commit

Permalink
Add new constants for collection_method on Invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe committed Jun 25, 2019
1 parent 46b4a63 commit fc0c33f
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_SEND_INVOICE = 'send_invoice';
const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically';

/**
* Possible string representations of the invoice status.
* @link https://stripe.com/docs/api/invoices/object#invoice_object-status
Expand All @@ -90,24 +109,13 @@ 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';

/**
* @param array|null $params
* @param array|string|null $opts
Expand Down

0 comments on commit fc0c33f

Please sign in to comment.