VerificationReport.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Identity;
  4. /**
  5. * A VerificationReport is the result of an attempt to collect and verify data from a user.
  6. * The collection of verification checks performed is determined from the <code>type</code> and <code>options</code>
  7. * parameters used. You can find the result of each verification check performed in the
  8. * appropriate sub-resource: <code>document</code>, <code>id_number</code>, <code>selfie</code>.
  9. *
  10. * Each VerificationReport contains a copy of any data collected by the user as well as
  11. * reference IDs which can be used to access collected images through the <a href="https://stripe.com/docs/api/files">FileUpload</a>
  12. * API. To configure and create VerificationReports, use the
  13. * <a href="https://stripe.com/docs/api/identity/verification_sessions">VerificationSession</a> API.
  14. *
  15. * Related guides: <a href="https://stripe.com/docs/identity/verification-sessions#results">Accessing verification results</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 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.
  20. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
  21. * @property null|\Stripe\StripeObject $document Result from a document check
  22. * @property null|\Stripe\StripeObject $email Result from a email check
  23. * @property null|\Stripe\StripeObject $id_number Result from an id_number check
  24. * @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.
  25. * @property null|\Stripe\StripeObject $options
  26. * @property null|\Stripe\StripeObject $phone Result from a phone check
  27. * @property null|\Stripe\StripeObject $selfie Result from a selfie check
  28. * @property string $type Type of report.
  29. * @property null|string $verification_flow The configuration token of a Verification Flow from the dashboard.
  30. * @property null|string $verification_session ID of the VerificationSession that created this report.
  31. */
  32. class VerificationReport extends \Stripe\ApiResource
  33. {
  34. const OBJECT_NAME = 'identity.verification_report';
  35. const TYPE_DOCUMENT = 'document';
  36. const TYPE_ID_NUMBER = 'id_number';
  37. const TYPE_VERIFICATION_FLOW = 'verification_flow';
  38. /**
  39. * List all verification reports.
  40. *
  41. * @param null|array $params
  42. * @param null|array|string $opts
  43. *
  44. * @throws \Stripe\Exception\ApiErrorException if the request fails
  45. *
  46. * @return \Stripe\Collection<\Stripe\Identity\VerificationReport> of ApiResources
  47. */
  48. public static function all($params = null, $opts = null)
  49. {
  50. $url = static::classUrl();
  51. return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
  52. }
  53. /**
  54. * Retrieves an existing VerificationReport.
  55. *
  56. * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
  57. * @param null|array|string $opts
  58. *
  59. * @throws \Stripe\Exception\ApiErrorException if the request fails
  60. *
  61. * @return \Stripe\Identity\VerificationReport
  62. */
  63. public static function retrieve($id, $opts = null)
  64. {
  65. $opts = \Stripe\Util\RequestOptions::parse($opts);
  66. $instance = new static($id, $opts);
  67. $instance->refresh();
  68. return $instance;
  69. }
  70. }