diff --git a/lib/BalanceTransaction.php b/lib/BalanceTransaction.php index ebe01bea3..d32548c33 100644 --- a/lib/BalanceTransaction.php +++ b/lib/BalanceTransaction.php @@ -25,7 +25,7 @@ * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective. * @property null|string|\Stripe\StripeObject $source The Stripe object to which this transaction is related. * @property string $status If the transaction's net funds are available in the Stripe balance yet. Either available or pending. - * @property string $type Transaction type: adjustment, advance, advance_funding, application_fee, application_fee_refund, charge, connect_collection_transfer, issuing_authorization_hold, issuing_authorization_release, issuing_transaction, payment, payment_failure_refund, payment_refund, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead. + * @property string $type Transaction type: adjustment, advance, advance_funding, application_fee, application_fee_refund, charge, connect_collection_transfer, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead. */ class BalanceTransaction extends ApiResource { @@ -43,6 +43,7 @@ class BalanceTransaction extends ApiResource const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer'; const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold'; const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release'; + const TYPE_ISSUING_DISPUTE = 'issuing_dispute'; const TYPE_ISSUING_TRANSACTION = 'issuing_transaction'; const TYPE_PAYMENT = 'payment'; const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund'; diff --git a/lib/Issuing/Dispute.php b/lib/Issuing/Dispute.php index 5ba3f0480..3e4a77c32 100644 --- a/lib/Issuing/Dispute.php +++ b/lib/Issuing/Dispute.php @@ -14,6 +14,7 @@ * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this dispute. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. */ class Dispute extends \Stripe\ApiResource diff --git a/lib/Issuing/Transaction.php b/lib/Issuing/Transaction.php index 324529364..7b7b4b03a 100644 --- a/lib/Issuing/Transaction.php +++ b/lib/Issuing/Transaction.php @@ -26,6 +26,7 @@ * @property string $merchant_currency The currency with which the merchant is taking payment. * @property \Stripe\StripeObject $merchant_data * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant. * @property string $type The nature of the transaction. */ class Transaction extends \Stripe\ApiResource diff --git a/lib/LineItem.php b/lib/LineItem.php index c4f57fa81..6d3eec5ac 100644 --- a/lib/LineItem.php +++ b/lib/LineItem.php @@ -11,7 +11,7 @@ * @property null|int $amount_total Total after discounts and taxes. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. - * @property \Stripe\Price $price

Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.

Related guides: Set up a subscription, create an invoice, and more about products and prices.

+ * @property \Stripe\Price $price

Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.

Related guides: Set up a subscription, create an invoice, and more about products and prices.

* @property null|int $quantity The quantity of products being purchased. * @property null|\Stripe\StripeObject[] $taxes The taxes applied to the line item. */ diff --git a/lib/Plan.php b/lib/Plan.php index f82dfee58..ae4f4a6d5 100644 --- a/lib/Plan.php +++ b/lib/Plan.php @@ -3,12 +3,16 @@ namespace Stripe; /** + * You can now model subscriptions more flexibly using the Prices API. It replaces the Plans + * API and is backwards compatible to simplify your migration. + * * Plans define the base price, currency, and billing cycle for recurring purchases - * of products. Products help you track inventory or provisioning, and plans help - * you track pricing. Different physical goods or levels of service should be - * represented by products, and pricing options should be represented by plans. - * This approach lets you change prices without having to change your provisioning - * scheme. + * of products. Products help + * you track inventory or provisioning, and plans help you track pricing. Different + * physical goods or levels of service should be represented by products, and + * pricing options should be represented by plans. This approach lets you change + * prices without having to change your provisioning scheme. * * For example, you might have a single "gold" product that has plans for * $10/month, $100/year, €9/month, and €90/year. @@ -16,8 +20,8 @@ * Related guides: Set up * a subscription and more about products - * and plans. + * href="https://stripe.com/docs/billing/subscriptions/products-and-prices">products + * and prices. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Price.php b/lib/Price.php index 29190a11b..c457718d0 100644 --- a/lib/Price.php +++ b/lib/Price.php @@ -4,11 +4,12 @@ /** * Prices define the unit cost, currency, and (optional) billing cycle for both - * recurring and one-time purchases of products. Products help you track inventory - * or provisioning, and prices help you track payment terms. Different physical - * goods or levels of service should be represented by products, and pricing - * options should be represented by prices. This approach lets you change prices - * without having to change your provisioning scheme. + * recurring and one-time purchases of products. Products help you track + * inventory or provisioning, and prices help you track payment terms. Different + * physical goods or levels of service should be represented by products, and + * pricing options should be represented by prices. This approach lets you change + * prices without having to change your provisioning scheme. * * For example, you might have a single "gold" product that has prices * for $10/month, $100/year, and €9 once. diff --git a/lib/Product.php b/lib/Product.php index 1fd07f9cb..60cb2682b 100644 --- a/lib/Product.php +++ b/lib/Product.php @@ -6,17 +6,16 @@ * Products describe the specific goods or services you offer to your customers. * For example, you might offer a Standard and Premium version of your goods or * service; each version would be a separate Product. They can be used in - * conjunction with SKUs and Plans to configure pricing in - * Checkout and Subscriptions. + * conjunction with Prices to + * configure pricing in Checkout and Subscriptions. * * Related guides: Set up * a subscription or accept one-time * payments with Checkout and more about Products - * and Plans + * href="https://stripe.com/docs/billing/subscriptions/products-and-prices">Products + * and Prices * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Service/InvoiceService.php b/lib/Service/InvoiceService.php index 9431c8756..1abf5783e 100644 --- a/lib/Service/InvoiceService.php +++ b/lib/Service/InvoiceService.php @@ -58,9 +58,10 @@ public function create($params = null, $opts = null) } /** - * Permanently deletes a draft invoice. This cannot be undone. Attempts to delete - * invoices that are no longer in a draft state will fail; once an invoice has been - * finalized, it must be voided. + * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to + * delete invoices that are no longer in a draft state will fail; once an invoice + * has been finalized or if an invoice is for a subscription, it must be voided. * * @param string $id * @param null|array $params diff --git a/lib/Service/ProductService.php b/lib/Service/ProductService.php index 2cf49fe3e..0ce24f7b7 100644 --- a/lib/Service/ProductService.php +++ b/lib/Service/ProductService.php @@ -36,10 +36,9 @@ public function create($params = null, $opts = null) } /** - * Delete a product. Deleting a product with type=good is only - * possible if it has no SKUs associated with it. Deleting a product with - * type=service is only possible if it has no plans associated with - * it. + * Delete a product. Deleting a product is only possible if it has no prices + * associated with it. Additionally, deleting a product with type=good + * is only possible if it has no SKUs associated with it. * * @param string $id * @param null|array $params diff --git a/lib/SubscriptionItem.php b/lib/SubscriptionItem.php index f7d40a5bd..3b77c129e 100644 --- a/lib/SubscriptionItem.php +++ b/lib/SubscriptionItem.php @@ -11,8 +11,8 @@ * @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - * @property \Stripe\Plan $plan

Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.

Related guides: Set up a subscription and more about products and plans.

- * @property \Stripe\Price $price

Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.

Related guides: Set up a subscription, create an invoice, and more about products and prices.

+ * @property \Stripe\Plan $plan

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.

Related guides: Set up a subscription and more about products and prices.

+ * @property \Stripe\Price $price

Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.

Related guides: Set up a subscription, create an invoice, and more about products and prices.

* @property int $quantity The quantity of the plan to which the customer should be subscribed. * @property string $subscription The subscription this subscription_item belongs to. * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item.