Early fraud warnings
*
* @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 bool $actionable An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.
* @property string|\Stripe\Charge $charge ID of the charge this early fraud warning is for, optionally expanded.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $fraud_type The type of fraud labelled by the issuer. One of card_never_received, fraudulent_card_application, made_with_counterfeit_card, made_with_lost_card, made_with_stolen_card, misc, unauthorized_use_of_card.
* @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|string|\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded.
*/
class EarlyFraudWarning extends \Stripe\ApiResource
{
const OBJECT_NAME = 'radar.early_fraud_warning';
const FRAUD_TYPE_CARD_NEVER_RECEIVED = 'card_never_received';
const FRAUD_TYPE_FRAUDULENT_CARD_APPLICATION = 'fraudulent_card_application';
const FRAUD_TYPE_MADE_WITH_COUNTERFEIT_CARD = 'made_with_counterfeit_card';
const FRAUD_TYPE_MADE_WITH_LOST_CARD = 'made_with_lost_card';
const FRAUD_TYPE_MADE_WITH_STOLEN_CARD = 'made_with_stolen_card';
const FRAUD_TYPE_MISC = 'misc';
const FRAUD_TYPE_UNAUTHORIZED_USE_OF_CARD = 'unauthorized_use_of_card';
/**
* Returns a list of early fraud warnings.
*
* @param null|array{charge?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, payment_intent?: string, starting_after?: string} $params
* @param null|array|string $opts
*
* @return \Stripe\Collection of ApiResources
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}
/**
* Retrieves the details of an early fraud warning that has previously been
* created.
*
* Please refer to the early fraud
* warning object reference for more details.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @return EarlyFraudWarning
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
}