diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a98b1d0aa..d2d999515 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v540 \ No newline at end of file +v563 \ No newline at end of file diff --git a/init.php b/init.php index 423534c64..54b48b48a 100644 --- a/init.php +++ b/init.php @@ -81,7 +81,6 @@ require __DIR__ . '/lib/StripeClient.php'; // The beginning of the section generated from our OpenAPI spec - require __DIR__ . '/lib/Account.php'; require __DIR__ . '/lib/AccountLink.php'; require __DIR__ . '/lib/AccountSession.php'; diff --git a/lib/Invoice.php b/lib/Invoice.php index 9f87f479c..2765e922a 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -98,7 +98,8 @@ * @property int $pre_payment_credit_notes_amount Total amount of all pre-payment credit notes issued for this invoice. * @property null|string|\Stripe\Quote $quote The quote this invoice was generated from. * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this invoice. - * @property null|\Stripe\StripeObject $rendering_options Options for invoice PDF rendering. + * @property null|\Stripe\StripeObject $rendering The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + * @property null|\Stripe\StripeObject $rendering_options This is a legacy field that will be removed soon. For details about rendering_options, refer to rendering instead. Options for invoice PDF rendering. * @property null|\Stripe\StripeObject $shipping_cost The details of the cost of shipping, including the ShippingRate applied on the invoice. * @property null|\Stripe\StripeObject $shipping_details Shipping details for the invoice. The Invoice PDF will use the shipping_details value if it is set, otherwise the PDF will render the shipping address from the customer. * @property int $starting_balance Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. diff --git a/lib/Mandate.php b/lib/Mandate.php index 9883aeaaf..838aa47e9 100644 --- a/lib/Mandate.php +++ b/lib/Mandate.php @@ -5,18 +5,18 @@ namespace Stripe; /** - * A Mandate is a record of the permission a customer has given you to debit their payment method. + * A Mandate is a record of the permission that your customer gives you to debit their payment method. * * @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\StripeObject $customer_acceptance * @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. * @property null|\Stripe\StripeObject $multi_use - * @property null|string $on_behalf_of The account (if any) for which the mandate is intended. + * @property null|string $on_behalf_of The account (if any) that the mandate is intended for. * @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate. * @property \Stripe\StripeObject $payment_method_details * @property null|\Stripe\StripeObject $single_use - * @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment. + * @property string $status The mandate status indicates whether or not you can use it to initiate a payment. * @property string $type The type of the mandate. */ class Mandate extends ApiResource diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index 661d34902..de0a24921 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -22,7 +22,7 @@ * @property int $amount Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). * @property int $amount_capturable Amount that can be captured from this PaymentIntent. * @property null|\Stripe\StripeObject $amount_details - * @property int $amount_received Amount that was collected by this PaymentIntent. + * @property int $amount_received Amount that this PaymentIntent collects. * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the PaymentIntent. * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts. * @property null|\Stripe\StripeObject $automatic_payment_methods Settings to configure compatible payment methods from the Stripe Dashboard @@ -37,9 +37,9 @@ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|string|\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists. * @property null|\Stripe\StripeObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. - * @property null|string|\Stripe\Charge $latest_charge The latest charge created by this payment intent. + * @property null|string|\Stripe\Charge $latest_charge The latest charge created by this PaymentIntent. * @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. - * @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. For more information, see the documentation. + * @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. Learn more about storing information in metadata. * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents use case for connected accounts for details. * @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent. @@ -55,8 +55,8 @@ * @property null|string $statement_descriptor For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. * @property null|string $statement_descriptor_suffix Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. * @property string $status Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status. - * @property null|\Stripe\StripeObject $transfer_data The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents use case for connected accounts for details. - * @property null|string $transfer_group A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts for details. + * @property null|\Stripe\StripeObject $transfer_data The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for connected accounts. + * @property null|string $transfer_group A string that identifies the resulting payment as part of a group. Learn more about the use case for connected accounts. */ class PaymentIntent extends ApiResource { diff --git a/lib/Payout.php b/lib/Payout.php index 4211f9367..d04369b2c 100644 --- a/lib/Payout.php +++ b/lib/Payout.php @@ -8,7 +8,7 @@ * A Payout object is created when you receive funds from Stripe, or when you * initiate a payout to either a bank account or debit card of a connected * Stripe account. You can retrieve individual payouts, - * as well as list all payouts. Payouts are made on varying + * and list all payouts. Payouts are made on varying * schedules, depending on your country and * industry. * @@ -16,26 +16,26 @@ * * @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 int $amount Amount (in cents (or local equivalent)) to be transferred to your bank account or debit card. - * @property int $arrival_date Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. - * @property bool $automatic Returns true if the payout was created by an automated payout schedule, and false if it was requested manually. + * @property int $amount The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + * @property int $arrival_date Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + * @property bool $automatic Returns true if the payout is created by an automated payout schedule and false if it's requested manually. * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. - * @property null|string|\Stripe\BankAccount|\Stripe\Card $destination ID of the bank account or card the payout was sent to. - * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. - * @property null|string $failure_code Error code explaining reason for payout failure if available. See Types of payout failures for a list of failure codes. - * @property null|string $failure_message Message to user further explaining reason for payout failure if available. + * @property null|string|\Stripe\BankAccount|\Stripe\Card $destination ID of the bank account or card the payout is sent to. + * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. + * @property null|string $failure_code Error code that provides a reason for a payout failure, if available. View our list of failure codes. + * @property null|string $failure_message Message that provides the reason for a payout failure, if available. * @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. * @property null|\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 string $method The method used to send this payout, which can be standard or instant. instant is supported for payouts to debit cards and bank accounts in certain countries. (See Bank support for Instant Payouts for more information.) + * @property string $method The method used to send this payout, which can be standard or instant. instant is supported for payouts to debit cards and bank accounts in certain countries. Learn more about bank support for Instant Payouts. * @property null|string|\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout. - * @property string $reconciliation_status If completed, the Balance Transactions API may be used to list all Balance Transactions that were paid out in this payout. - * @property null|string|\Stripe\Payout $reversed_by If the payout was reversed, this is the ID of the payout that reverses this payout. - * @property string $source_type The source balance this payout came from. One of card, fpx, or bank_account. - * @property null|string $statement_descriptor Extra information about a payout to be displayed on the user's bank statement. - * @property string $status Current status of the payout: paid, pending, in_transit, canceled or failed. A payout is pending until it is submitted to the bank, when it becomes in_transit. The status then changes to paid if the transaction goes through, or to failed or canceled (within 5 business days). Some failed payouts may initially show as paid but then change to failed. + * @property string $reconciliation_status If completed, you can use the Balance Transactions API to list all balance transactions that are paid out in this payout. + * @property null|string|\Stripe\Payout $reversed_by If the payout reverses, this is the ID of the payout that reverses this payout. + * @property string $source_type The source balance this payout came from, which can be one of the following: card, fpx, or bank_account. + * @property null|string $statement_descriptor Extra information about a payout that displays on the user's bank statement. + * @property string $status Current status of the payout: paid, pending, in_transit, canceled or failed. A payout is pending until it's submitted to the bank, when it becomes in_transit. The status changes to paid if the transaction succeeds, or to failed or canceled (within 5 business days). Some payouts that fail might initially show as paid, then change to failed. * @property string $type Can be bank_account or card. */ class Payout extends ApiResource diff --git a/lib/Refund.php b/lib/Refund.php index caf29175b..abe603f4e 100644 --- a/lib/Refund.php +++ b/lib/Refund.php @@ -5,9 +5,9 @@ namespace Stripe; /** - * Refund objects allow you to refund a charge that has previously been created - * but not yet refunded. Funds will be refunded to the credit or debit card that - * was originally charged. + * Refund objects allow you to refund a previously created charge that isn't + * refunded yet. Funds are refunded to the credit or debit card that's + * initially charged. * * Related guide: Refunds * @@ -15,21 +15,21 @@ * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $amount Amount, in cents (or local equivalent). * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. - * @property null|string|\Stripe\Charge $charge ID of the charge that was refunded. + * @property null|string|\Stripe\Charge $charge ID of the charge that's refunded. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. - * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) - * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. - * @property null|string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are lost_or_stolen_card, expired_or_canceled_card, charge_for_pending_refund_disputed, insufficient_funds, declined, merchant_request or unknown. - * @property null|string $instructions_email For payment methods without native refund support (e.g., Konbini, PromptPay), email for the customer to receive refund instructions. + * @property null|string $description An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + * @property null|string $failure_reason Provides the reason for the refund failure. Possible values are: lost_or_stolen_card, expired_or_canceled_card, charge_for_pending_refund_disputed, insufficient_funds, declined, merchant_request, or unknown. + * @property null|string $instructions_email For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. * @property null|\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 $next_action - * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was refunded. - * @property null|string $reason Reason for the refund, either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Stripe internally (expired_uncaptured_charge). + * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that's refunded. + * @property null|string $reason Reason for the refund, which is either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Stripe internally (expired_uncaptured_charge). * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund. - * @property null|string|\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. - * @property null|string $status Status of the refund. For credit card refunds, this can be pending, succeeded, or failed. For other types of refunds, it can be pending, requires_action, succeeded, failed, or canceled. Refer to our refunds documentation for more details. - * @property null|string|\Stripe\TransferReversal $transfer_reversal If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. + * @property null|string|\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. + * @property null|string $status Status of the refund. For credit card refunds, this can be pending, succeeded, or failed. For other types of refunds, it can be pending, requires_action, succeeded, failed, or canceled. Learn more about failed refunds. + * @property null|string|\Stripe\TransferReversal $transfer_reversal This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. */ class Refund extends ApiResource { diff --git a/lib/Service/PaymentIntentService.php b/lib/Service/PaymentIntentService.php index f7cc083b2..468b72db0 100644 --- a/lib/Service/PaymentIntentService.php +++ b/lib/Service/PaymentIntentService.php @@ -22,7 +22,8 @@ public function all($params = null, $opts = null) } /** - * Manually reconcile the remaining amount for a customer_balance PaymentIntent. + * Manually reconcile the remaining amount for a customer_balance + * PaymentIntent. * * @param string $id * @param null|array $params @@ -38,17 +39,17 @@ public function applyCustomerBalance($id, $params = null, $opts = null) } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: + * You can cancel a PaymentIntent object when it’s in one of these statuses: * requires_payment_method, requires_capture, * requires_confirmation, requires_action or, in rare cases, processing. * - * Once canceled, no additional charges will be made by the PaymentIntent and any - * operations on the PaymentIntent will fail with an error. For PaymentIntents with - * a status of requires_capture, the remaining - * amount_capturable will automatically be refunded. + * After it’s canceled, no additional charges are made by the PaymentIntent and any + * operations on the PaymentIntent fail with an error. For PaymentIntents with a + * status of requires_capture, the remaining + * amount_capturable is automatically refunded. * - * You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. * @@ -69,8 +70,8 @@ public function cancel($id, $params = null, $opts = null) * Capture the funds of an existing uncaptured PaymentIntent when its status is * requires_capture. * - * Uncaptured PaymentIntents will be canceled a set number of days after they are - * created (7 by default). + * Uncaptured PaymentIntents are cancelled a set number of days (7 by default) + * after their creation. * * Learn more about separate authorization * and capture. @@ -132,13 +133,13 @@ public function confirm($id, $params = null, $opts = null) * * After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment - * Intents API here. + * Learn more about the available payment + * flows with the Payment Intents API. * - * When confirm=true is used during creation, it is equivalent to - * creating and confirming the PaymentIntent in the same call. You may use any + * When you use confirm=true during creation, it’s equivalent to + * creating and confirming the PaymentIntent in the same call. You can use any * parameters available in the confirm - * API when confirm=true is supplied. + * API when you supply confirm=true. * * @param null|array $params * @param null|array|\Stripe\Util\RequestOptions $opts @@ -160,21 +161,22 @@ public function create($params = null, $opts = null) * must be true. * * Incremental authorizations attempt to increase the authorized amount on your - * customer’s card to the new, higher amount provided. As with the - * initial authorization, incremental authorizations may be declined. A single + * customer’s card to the new, higher amount provided. Similar to the + * initial authorization, incremental authorizations can be declined. A single * PaymentIntent can call this endpoint multiple times to further increase the * authorized amount. * - * If the incremental authorization succeeds, the PaymentIntent object is returned - * with the updated amount. * If the incremental authorization fails, a card_declined error is returned, and - * no fields on the PaymentIntent or Charge are updated. The PaymentIntent object + * href="/docs/error-codes#card-declined">card_declined error returns, and no + * other fields on the PaymentIntent or Charge update. The PaymentIntent object * remains capturable for the previously authorized amount. * * Each PaymentIntent can have a maximum of 10 incremental authorization attempts, - * including declines. Once captured, a PaymentIntent can no longer be incremented. + * including declines. After it’s captured, a PaymentIntent can no longer be + * incremented. * * Learn more about incremental diff --git a/lib/Service/PayoutService.php b/lib/Service/PayoutService.php index 4ca3561c8..302773b60 100644 --- a/lib/Service/PayoutService.php +++ b/lib/Service/PayoutService.php @@ -7,8 +7,8 @@ class PayoutService extends \Stripe\Service\AbstractService { /** - * Returns a list of existing payouts sent to third-party bank accounts or that - * Stripe has sent you. The payouts are returned in sorted order, with the most + * Returns a list of existing payouts sent to third-party bank accounts or payouts + * that Stripe sent to you. The payouts return in sorted order, with the most * recently created payouts appearing first. * * @param null|array $params @@ -24,8 +24,8 @@ public function all($params = null, $opts = null) } /** - * A previously created payout can be canceled if it has not yet been paid out. - * Funds will be refunded to your available balance. You may not cancel automatic + * You can cancel a previously created payout if it hasn’t been paid out yet. + * Stripe refunds the funds to your available balance. You can’t cancel automatic * Stripe payouts. * * @param string $id @@ -42,17 +42,17 @@ public function cancel($id, $params = null, $opts = null) } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or - * you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t, + * you receive an “Insufficient Funds” error. * - * If your API key is in test mode, money won’t actually be sent, though everything - * else will occur as if in live mode. + * If your API key is in test mode, money won’t actually be sent, though every + * other action occurs as if you’re in live mode. * - * If you are creating a manual payout on a Stripe account that uses multiple - * payment source types, you’ll need to specify the source type balance that the - * payout should draw from. The balance object - * details available and pending amounts by source type. + * If you create a manual payout on a Stripe account that uses multiple payment + * source types, you need to specify the source type balance that the payout draws + * from. The balance object details available and + * pending amounts by source type. * * @param null|array $params * @param null|array|\Stripe\Util\RequestOptions $opts @@ -68,7 +68,7 @@ public function create($params = null, $opts = null) /** * Retrieves the details of an existing payout. Supply the unique payout ID from - * either a payout creation request or the payout list, and Stripe will return the + * either a payout creation request or the payout list. Stripe returns the * corresponding payout information. * * @param string $id @@ -85,14 +85,14 @@ public function retrieve($id, $params = null, $opts = null) } /** - * Reverses a payout by debiting the destination bank account. Only payouts for - * connected accounts to US bank accounts may be reversed at this time. If the - * payout is in the pending status, - * /v1/payouts/:id/cancel should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you + * can only reverse payouts for connected accounts to US bank accounts. If the + * payout is in the pending status, use + * /v1/payouts/:id/cancel instead. * - * By requesting a reversal via /v1/payouts/:id/reverse, you confirm - * that the authorized signatory of the selected bank account has authorized the - * debit on the bank account and that no other authorization is required. + * By requesting a reversal through /v1/payouts/:id/reverse, you + * confirm that the authorized signatory of the selected bank account authorizes + * the debit on the bank account and that no other authorization is required. * * @param string $id * @param null|array $params @@ -108,8 +108,8 @@ public function reverse($id, $params = null, $opts = null) } /** - * Updates the specified payout by setting the values of the parameters passed. Any - * parameters not provided will be left unchanged. This request accepts only the + * Updates the specified payout by setting the values of the parameters you pass. + * We don’t change parameters that you don’t provide. This request only accepts the * metadata as arguments. * * @param string $id diff --git a/lib/Service/RefundService.php b/lib/Service/RefundService.php index 772c0f6e3..cc7130adc 100644 --- a/lib/Service/RefundService.php +++ b/lib/Service/RefundService.php @@ -7,10 +7,9 @@ class RefundService extends \Stripe\Service\AbstractService { /** - * Returns a list of all refunds you’ve previously created. The refunds are - * returned in sorted order, with the most recent refunds appearing first. For - * convenience, the 10 most recent refunds are always available by default on the - * charge object. + * Returns a list of all refunds you created. We return the refunds in sorted + * order, with the most recent refunds appearing first The 10 most recent refunds + * are always available by default on the Charge object. * * @param null|array $params * @param null|array|\Stripe\Util\RequestOptions $opts @@ -27,8 +26,8 @@ public function all($params = null, $opts = null) /** * Cancels a refund with a status of requires_action. * - * Refunds in other states cannot be canceled, and only refunds for payment methods - * that require customer action will enter the requires_action state. + * You can’t cancel refunds in other states. Only refunds for payment methods that + * require customer action can enter the requires_action state. * * @param string $id * @param null|array $params @@ -44,7 +43,19 @@ public function cancel($id, $params = null, $opts = null) } /** - * Create a refund. + * When you create a new refund, you must specify a Charge or a PaymentIntent + * object on which to create it. + * + * Creating a new refund will refund a charge that has previously been created but + * not yet refunded. Funds will be refunded to the credit or debit card that was + * originally charged. + * + * You can optionally refund only part of a charge. You can do so multiple times, + * until the entire charge has been refunded. + * + * Once entirely refunded, a charge can’t be refunded again. This method will raise + * an error when called on an already-refunded charge, or when trying to refund + * more money than is left on a charge. * * @param null|array $params * @param null|array|\Stripe\Util\RequestOptions $opts @@ -75,8 +86,8 @@ public function retrieve($id, $params = null, $opts = null) } /** - * Updates the specified refund by setting the values of the parameters passed. Any - * parameters not provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed + * parameters. Any parameters that you don’t provide remain unchanged. * * This request only accepts metadata as an argument. * diff --git a/lib/Service/SetupAttemptService.php b/lib/Service/SetupAttemptService.php index 8657441ec..32c563760 100644 --- a/lib/Service/SetupAttemptService.php +++ b/lib/Service/SetupAttemptService.php @@ -7,7 +7,7 @@ class SetupAttemptService extends \Stripe\Service\AbstractService { /** - * Returns a list of SetupAttempts associated with a provided SetupIntent. + * Returns a list of SetupAttempts that associate with a provided SetupIntent. * * @param null|array $params * @param null|array|\Stripe\Util\RequestOptions $opts diff --git a/lib/SetupAttempt.php b/lib/SetupAttempt.php index 72642b4d1..5c20047be 100644 --- a/lib/SetupAttempt.php +++ b/lib/SetupAttempt.php @@ -6,7 +6,7 @@ /** * A SetupAttempt describes one attempted confirmation of a SetupIntent, - * whether that confirmation was successful or unsuccessful. You can use + * whether that confirmation is successful or unsuccessful. You can use * SetupAttempts to inspect details of a specific attempt at setting up a * payment method using a SetupIntent. * diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index a693ad1c1..ad4d20bce 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -4568,4 +4568,11 @@ public function testRefundTransaction() ); static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result); } + + public function testDeleteDiscountSubscription() + { + $this->expectsRequest('delete', '/v1/subscriptions/sub_xyz/discount'); + $result = $this->client->subscriptions->deleteDiscount('sub_xyz', []); + static::assertInstanceOf(\Stripe\Discount::class, $result); + } }