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 reason and status constants to disputes #453

Merged
merged 1 commit into from
Feb 28, 2018
Merged
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
31 changes: 31 additions & 0 deletions lib/Dispute.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,37 @@ class Dispute extends ApiResource
use ApiOperations\Retrieve;
use ApiOperations\Update;

/**
* Possible string representations of dispute reasons.
* @link https://stripe.com/docs/api#dispute_object
*/
const REASON_BANK_CANNOT_PROCESS = 'bank_cannot_process';
const REASON_CREDIT_NOT_PROCESSED = 'credit_not_processed';
const REASON_CUSTOMER_INITIATED = 'customer_initiated';
const REASON_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
const REASON_DUPLICATE = 'duplicate';
const REASON_FRAUDULENT = 'fraudulent';
const REASON_GENERAL = 'general';
const REASON_INCORRECT_ACCOUNT_DETAILS = 'incorrect_account_details';
const REASON_INSUFFICIENT_FUNDS = 'insufficient_funds';
const REASON_PRODUCT_NOT_RECEIVED = 'product_not_received';
const REASON_PRODUCT_UNACCEPTABLE = 'product_unacceptable';
const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled';
const REASON_UNRECOGNIZED = 'unrecognized';

/**
* Possible string representations of dispute statuses.
* @link https://stripe.com/docs/api#dispute_object
*/
const STATUS_CHARGE_REFUNDED = 'charge_refunded';
const STATUS_LOST = 'lost';
const STATUS_NEEDS_RESPONSE = 'needs_response';
const STATUS_UNDER_REVIEW = 'under_review';
const STATUS_WARNING_CLOSED = 'warning_closed';
const STATUS_WARNING_NEEDS_RESPONSE = 'warning_needs_response';
const STATUS_WARNING_UNDER_REVIEW = 'warning_under_review';
const STATUS_WON = 'won';

/**
* @param array|string|null $options
*
Expand Down