VerificationReport.php
79 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | |
| 5 | namespace AmeliaVendor\Stripe\Identity; |
| 6 | |
| 7 | /** |
| 8 | * A VerificationReport is the result of an attempt to collect and verify data from a user. |
| 9 | * The collection of verification checks performed is determined from the <code>type</code> and <code>options</code> |
| 10 | * parameters used. You can find the result of each verification check performed in the |
| 11 | * appropriate sub-resource: <code>document</code>, <code>id_number</code>, <code>selfie</code>. |
| 12 | * |
| 13 | * Each VerificationReport contains a copy of any data collected by the user as well as |
| 14 | * reference IDs which can be used to access collected images through the <a href="https://stripe.com/docs/api/files">FileUpload</a> |
| 15 | * API. To configure and create VerificationReports, use the |
| 16 | * <a href="https://stripe.com/docs/api/identity/verification_sessions">VerificationSession</a> API. |
| 17 | * |
| 18 | * Related guide: <a href="https://stripe.com/docs/identity/verification-sessions#results">Accessing verification results</a>. |
| 19 | * |
| 20 | * @property string $id Unique identifier for the object. |
| 21 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 22 | * @property null|string $client_reference_id A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. |
| 23 | * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. |
| 24 | * @property null|(object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\AmeliaVendor\Stripe\StripeObject), dob?: null|(object{day: null|int, month: null|int, year: null|int}&\AmeliaVendor\Stripe\StripeObject), error: null|(object{code: null|string, reason: null|string}&\AmeliaVendor\Stripe\StripeObject), expiration_date?: null|(object{day: null|int, month: null|int, year: null|int}&\AmeliaVendor\Stripe\StripeObject), files: null|string[], first_name: null|string, issued_date: null|(object{day: null|int, month: null|int, year: null|int}&\AmeliaVendor\Stripe\StripeObject), issuing_country: null|string, last_name: null|string, number?: null|string, status: string, type: null|string}&\AmeliaVendor\Stripe\StripeObject) $document Result from a document check |
| 25 | * @property null|(object{email: null|string, error: null|(object{code: null|string, reason: null|string}&\AmeliaVendor\Stripe\StripeObject), status: string}&\AmeliaVendor\Stripe\StripeObject) $email Result from a email check |
| 26 | * @property null|(object{dob?: null|(object{day: null|int, month: null|int, year: null|int}&\AmeliaVendor\Stripe\StripeObject), error: null|(object{code: null|string, reason: null|string}&\AmeliaVendor\Stripe\StripeObject), first_name: null|string, id_number?: null|string, id_number_type: null|string, last_name: null|string, status: string}&\AmeliaVendor\Stripe\StripeObject) $id_number Result from an id_number check |
| 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 null|(object{document?: (object{allowed_types?: string[], require_id_number?: bool, require_live_capture?: bool, require_matching_selfie?: bool}&\AmeliaVendor\Stripe\StripeObject), id_number?: (object{}&\AmeliaVendor\Stripe\StripeObject)}&\AmeliaVendor\Stripe\StripeObject) $options |
| 29 | * @property null|(object{error: null|(object{code: null|string, reason: null|string}&\AmeliaVendor\Stripe\StripeObject), phone: null|string, status: string}&\AmeliaVendor\Stripe\StripeObject) $phone Result from a phone check |
| 30 | * @property null|(object{document: null|string, error: null|(object{code: null|string, reason: null|string}&\AmeliaVendor\Stripe\StripeObject), selfie: null|string, status: string}&\AmeliaVendor\Stripe\StripeObject) $selfie Result from a selfie check |
| 31 | * @property string $type Type of report. |
| 32 | * @property null|string $verification_flow The configuration token of a verification flow from the dashboard. |
| 33 | * @property null|string $verification_session ID of the VerificationSession that created this report. |
| 34 | */ |
| 35 | class VerificationReport extends \AmeliaVendor\Stripe\ApiResource |
| 36 | { |
| 37 | const OBJECT_NAME = 'identity.verification_report'; |
| 38 | |
| 39 | const TYPE_DOCUMENT = 'document'; |
| 40 | const TYPE_ID_NUMBER = 'id_number'; |
| 41 | const TYPE_VERIFICATION_FLOW = 'verification_flow'; |
| 42 | |
| 43 | /** |
| 44 | * List all verification reports. |
| 45 | * |
| 46 | * @param null|array{client_reference_id?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, type?: string, verification_session?: string} $params |
| 47 | * @param null|array|string $opts |
| 48 | * |
| 49 | * @return \AmeliaVendor\Stripe\Collection<VerificationReport> of ApiResources |
| 50 | * |
| 51 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 52 | */ |
| 53 | public static function all($params = null, $opts = null) |
| 54 | { |
| 55 | $url = static::classUrl(); |
| 56 | |
| 57 | return static::_requestPage($url, \AmeliaVendor\Stripe\Collection::class, $params, $opts); |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Retrieves an existing VerificationReport. |
| 62 | * |
| 63 | * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key |
| 64 | * @param null|array|string $opts |
| 65 | * |
| 66 | * @return VerificationReport |
| 67 | * |
| 68 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 69 | */ |
| 70 | public static function retrieve($id, $opts = null) |
| 71 | { |
| 72 | $opts = \AmeliaVendor\Stripe\Util\RequestOptions::parse($opts); |
| 73 | $instance = new static($id, $opts); |
| 74 | $instance->refresh(); |
| 75 | |
| 76 | return $instance; |
| 77 | } |
| 78 | } |
| 79 |