Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for issuing_dispute as a type on BalanceTransaction #934

Merged
merged 1 commit into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/BalanceTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @property string $reporting_category <a href="https://stripe.com/docs/reports/reporting-categories">Learn more</a> 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 <code>available</code> or <code>pending</code>.
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_transaction</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. <a href="https://stripe.com/docs/reports/balance-transaction-types">Learn more</a> about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider <code>reporting_category</code> instead.
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. <a href="https://stripe.com/docs/reports/balance-transaction-types">Learn more</a> about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider <code>reporting_category</code> instead.
*/
class BalanceTransaction extends ApiResource
{
Expand All @@ -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';
Expand Down
1 change: 1 addition & 0 deletions lib/Issuing/Dispute.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
*/
class Dispute extends \Stripe\ApiResource
Expand Down
1 change: 1 addition & 0 deletions lib/Issuing/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @property null|int $amount_total Total after discounts and taxes.
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
* @property \Stripe\Price $price <p>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.</p><p>For example, you might have a single &quot;gold&quot; product that has prices for $10/month, $100/year, and €9 once.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a>, <a href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>, and more about <a href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.</p>
* @property \Stripe\Price $price <p>Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> 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.</p><p>For example, you might have a single &quot;gold&quot; product that has prices for $10/month, $100/year, and €9 once.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a>, <a href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>, and more about <a href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.</p>
* @property null|int $quantity The quantity of products being purchased.
* @property null|\Stripe\StripeObject[] $taxes The taxes applied to the line item.
*/
Expand Down
18 changes: 11 additions & 7 deletions lib/Plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@
namespace Stripe;

/**
* You can now model subscriptions more flexibly using the <a
* href="https://stripe.com/docs/api#prices">Prices API</a>. 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. <a href="https://stripe.com/docs/api#products">Products</a> 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 &quot;gold&quot; product that has plans for
* $10/month, $100/year, €9/month, and €90/year.
*
* Related guides: <a
* href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up
* a subscription</a> and more about <a
* href="https://stripe.com/docs/billing/subscriptions/products-and-plans">products
* and plans</a>.
* href="https://stripe.com/docs/billing/subscriptions/products-and-prices">products
* and prices</a>.
*
* @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.
Expand Down
11 changes: 6 additions & 5 deletions lib/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -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. <a
* href="https://stripe.com/docs/api#products">Products</a> 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 &quot;gold&quot; product that has prices
* for $10/month, $100/year, and €9 once.
Expand Down
9 changes: 4 additions & 5 deletions lib/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://stripe.com/docs/api#skus">SKUs</a> and <a
* href="https://stripe.com/docs/api#plans">Plans</a> to configure pricing in
* Checkout and Subscriptions.
* conjunction with <a href="https://stripe.com/docs/api#prices">Prices</a> to
* configure pricing in Checkout and Subscriptions.
*
* Related guides: <a
* href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up
* a subscription</a> or accept <a
* href="https://stripe.com/docs/payments/checkout/client#create-products">one-time
* payments with Checkout</a> and more about <a
* href="https://stripe.com/docs/billing/subscriptions/products-and-plans">Products
* and Plans</a>
* href="https://stripe.com/docs/billing/subscriptions/products-and-prices">Products
* and Prices</a>
*
* @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.
Expand Down
7 changes: 4 additions & 3 deletions lib/Service/InvoiceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="#void_invoice">voided</a>.
* 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 <a
* href="#void_invoice">voided</a>.
*
* @param string $id
* @param null|array $params
Expand Down
7 changes: 3 additions & 4 deletions lib/Service/ProductService.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ public function create($params = null, $opts = null)
}

/**
* Delete a product. Deleting a product with type=<code>good</code> is only
* possible if it has no SKUs associated with it. Deleting a product with
* type=<code>service</code> 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 <code>type=good</code>
* is only possible if it has no SKUs associated with it.
*
* @param string $id
* @param null|array $params
Expand Down
4 changes: 2 additions & 2 deletions lib/SubscriptionItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <p>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.</p><p>For example, you might have a single &quot;gold&quot; product that has plans for $10/month, $100/year, €9/month, and €90/year.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a> and more about <a href="https://stripe.com/docs/billing/subscriptions/products-and-plans">products and plans</a>.</p>
* @property \Stripe\Price $price <p>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.</p><p>For example, you might have a single &quot;gold&quot; product that has prices for $10/month, $100/year, and €9 once.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a>, <a href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>, and more about <a href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.</p>
* @property \Stripe\Plan $plan <p>You can now model subscriptions more flexibly using the <a href="https://stripe.com/docs/api#prices">Prices API</a>. It replaces the Plans API and is backwards compatible to simplify your migration.</p><p>Plans define the base price, currency, and billing cycle for recurring purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> 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.</p><p>For example, you might have a single &quot;gold&quot; product that has plans for $10/month, $100/year, €9/month, and €90/year.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a> and more about <a href="https://stripe.com/docs/billing/subscriptions/products-and-prices">products and prices</a>.</p>
* @property \Stripe\Price $price <p>Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> 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.</p><p>For example, you might have a single &quot;gold&quot; product that has prices for $10/month, $100/year, and €9 once.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a>, <a href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>, and more about <a href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.</p>
* @property int $quantity The <a href="https://stripe.com/docs/subscriptions/quantities">quantity</a> of the plan to which the customer should be subscribed.
* @property string $subscription The <code>subscription</code> this <code>subscription_item</code> belongs to.
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this <code>subscription_item</code>. When set, the <code>default_tax_rates</code> on the subscription do not apply to this <code>subscription_item</code>.
Expand Down