ApiOperations
2 years ago
BillingPortal
2 years ago
Checkout
2 years ago
Exception
4 years ago
FinancialConnections
2 years ago
HttpClient
2 years ago
Identity
2 years ago
Issuing
2 years ago
Radar
2 years ago
Reporting
4 years ago
Service
2 years ago
Sigma
4 years ago
Terminal
2 years ago
TestHelpers
2 years ago
Util
2 years ago
Account.php
2 years ago
AccountLink.php
4 years ago
AlipayAccount.php
4 years ago
ApiRequestor.php
2 years ago
ApiResource.php
2 years ago
ApiResponse.php
4 years ago
ApplePayDomain.php
4 years ago
ApplicationFee.php
2 years ago
ApplicationFeeRefund.php
4 years ago
Balance.php
4 years ago
BalanceTransaction.php
4 years ago
BankAccount.php
4 years ago
BaseStripeClient.php
2 years ago
BaseStripeClientInterface.php
4 years ago
BitcoinReceiver.php
2 years ago
BitcoinTransaction.php
4 years ago
Capability.php
4 years ago
Card.php
2 years ago
CashBalance.php
2 years ago
Charge.php
2 years ago
Collection.php
2 years ago
CountrySpec.php
4 years ago
Coupon.php
2 years ago
CreditNote.php
2 years ago
CreditNoteLineItem.php
4 years ago
Customer.php
2 years ago
CustomerBalanceTransaction.php
4 years ago
Discount.php
2 years ago
Dispute.php
4 years ago
EphemeralKey.php
4 years ago
ErrorObject.php
4 years ago
Event.php
2 years ago
ExchangeRate.php
4 years ago
File.php
2 years ago
FileLink.php
4 years ago
FundingInstructions.php
2 years ago
Invoice.php
2 years ago
InvoiceItem.php
2 years ago
InvoiceLineItem.php
2 years ago
LineItem.php
4 years ago
LoginLink.php
4 years ago
Mandate.php
4 years ago
OAuth.php
4 years ago
OAuthErrorObject.php
4 years ago
Order.php
2 years ago
OrderItem.php
4 years ago
OrderReturn.php
4 years ago
PaymentIntent.php
2 years ago
PaymentLink.php
2 years ago
PaymentMethod.php
2 years ago
Payout.php
4 years ago
Person.php
2 years ago
Plan.php
2 years ago
Price.php
2 years ago
Product.php
2 years ago
PromotionCode.php
2 years ago
Quote.php
2 years ago
Recipient.php
2 years ago
RecipientTransfer.php
4 years ago
Refund.php
2 years ago
RequestTelemetry.php
4 years ago
Review.php
4 years ago
SKU.php
2 years ago
SearchResult.php
2 years ago
SetupAttempt.php
4 years ago
SetupIntent.php
2 years ago
ShippingRate.php
2 years ago
SingletonApiResource.php
2 years ago
Source.php
4 years ago
SourceTransaction.php
4 years ago
Stripe.php
2 years ago
StripeClient.php
2 years ago
StripeClientInterface.php
4 years ago
StripeObject.php
2 years ago
StripeStreamingClientInterface.php
4 years ago
Subscription.php
2 years ago
SubscriptionItem.php
2 years ago
SubscriptionSchedule.php
2 years ago
TaxCode.php
2 years ago
TaxId.php
2 years ago
TaxRate.php
4 years ago
ThreeDSecure.php
4 years ago
Token.php
4 years ago
Topup.php
4 years ago
Transfer.php
2 years ago
TransferReversal.php
4 years ago
UsageRecord.php
4 years ago
UsageRecordSummary.php
4 years ago
Webhook.php
4 years ago
WebhookEndpoint.php
4 years ago
WebhookSignature.php
4 years ago
Dispute.php
83 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | |
| 5 | namespace Stripe; |
| 6 | |
| 7 | /** |
| 8 | * A dispute occurs when a customer questions your charge with their card issuer. |
| 9 | * When this happens, you're given the opportunity to respond to the dispute with |
| 10 | * evidence that shows that the charge is legitimate. You can find more information |
| 11 | * about the dispute process in our <a href="/docs/disputes">Disputes and Fraud</a> |
| 12 | * documentation. |
| 13 | * |
| 14 | * Related guide: <a href="https://stripe.com/docs/disputes">Disputes and |
| 15 | * Fraud</a>. |
| 16 | * |
| 17 | * @property string $id Unique identifier for the object. |
| 18 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 19 | * @property int $amount Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). |
| 20 | * @property \Stripe\BalanceTransaction[] $balance_transactions List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. |
| 21 | * @property string|\Stripe\Charge $charge ID of the charge that was disputed. |
| 22 | * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. |
| 23 | * @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>. |
| 24 | * @property \Stripe\StripeObject $evidence |
| 25 | * @property \Stripe\StripeObject $evidence_details |
| 26 | * @property bool $is_charge_refundable If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute. |
| 27 | * @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. |
| 28 | * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
| 29 | * @property null|string $network_reason_code Network-dependent reason code for the dispute. |
| 30 | * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was disputed. |
| 31 | * @property string $reason Reason given by cardholder for dispute. Possible values are <code>bank_cannot_process</code>, <code>check_returned</code>, <code>credit_not_processed</code>, <code>customer_initiated</code>, <code>debit_not_authorized</code>, <code>duplicate</code>, <code>fraudulent</code>, <code>general</code>, <code>incorrect_account_details</code>, <code>insufficient_funds</code>, <code>product_not_received</code>, <code>product_unacceptable</code>, <code>subscription_canceled</code>, or <code>unrecognized</code>. Read more about <a href="https://stripe.com/docs/disputes/categories">dispute reasons</a>. |
| 32 | * @property string $status Current status of dispute. Possible values are <code>warning_needs_response</code>, <code>warning_under_review</code>, <code>warning_closed</code>, <code>needs_response</code>, <code>under_review</code>, <code>charge_refunded</code>, <code>won</code>, or <code>lost</code>. |
| 33 | */ |
| 34 | class Dispute extends ApiResource |
| 35 | { |
| 36 | const OBJECT_NAME = 'dispute'; |
| 37 | |
| 38 | use ApiOperations\All; |
| 39 | use ApiOperations\Retrieve; |
| 40 | use ApiOperations\Update; |
| 41 | |
| 42 | const REASON_BANK_CANNOT_PROCESS = 'bank_cannot_process'; |
| 43 | const REASON_CHECK_RETURNED = 'check_returned'; |
| 44 | const REASON_CREDIT_NOT_PROCESSED = 'credit_not_processed'; |
| 45 | const REASON_CUSTOMER_INITIATED = 'customer_initiated'; |
| 46 | const REASON_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; |
| 47 | const REASON_DUPLICATE = 'duplicate'; |
| 48 | const REASON_FRAUDULENT = 'fraudulent'; |
| 49 | const REASON_GENERAL = 'general'; |
| 50 | const REASON_INCORRECT_ACCOUNT_DETAILS = 'incorrect_account_details'; |
| 51 | const REASON_INSUFFICIENT_FUNDS = 'insufficient_funds'; |
| 52 | const REASON_PRODUCT_NOT_RECEIVED = 'product_not_received'; |
| 53 | const REASON_PRODUCT_UNACCEPTABLE = 'product_unacceptable'; |
| 54 | const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled'; |
| 55 | const REASON_UNRECOGNIZED = 'unrecognized'; |
| 56 | |
| 57 | const STATUS_CHARGE_REFUNDED = 'charge_refunded'; |
| 58 | const STATUS_LOST = 'lost'; |
| 59 | const STATUS_NEEDS_RESPONSE = 'needs_response'; |
| 60 | const STATUS_UNDER_REVIEW = 'under_review'; |
| 61 | const STATUS_WARNING_CLOSED = 'warning_closed'; |
| 62 | const STATUS_WARNING_NEEDS_RESPONSE = 'warning_needs_response'; |
| 63 | const STATUS_WARNING_UNDER_REVIEW = 'warning_under_review'; |
| 64 | const STATUS_WON = 'won'; |
| 65 | |
| 66 | /** |
| 67 | * @param null|array|string $opts |
| 68 | * |
| 69 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 70 | * |
| 71 | * @return \Stripe\Dispute the closed dispute |
| 72 | */ |
| 73 | // TODO: add $params to standardize signature |
| 74 | public function close($opts = null) |
| 75 | { |
| 76 | $url = $this->instanceUrl() . '/close'; |
| 77 | list($response, $opts) = $this->_request('post', $url, null, $opts); |
| 78 | $this->refreshFrom($response, $opts); |
| 79 | |
| 80 | return $this; |
| 81 | } |
| 82 | } |
| 83 |