-
Notifications
You must be signed in to change notification settings - Fork 857
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1126 from stripe/latest-codegen
API Updates
- Loading branch information
Showing
17 changed files
with
590 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Identity; | ||
|
||
/** | ||
* A VerificationReport is the result of an attempt to collect and verify data from | ||
* a user. The collection of verification checks performed is determined from the | ||
* <code>type</code> and <code>options</code> parameters used. You can find the | ||
* result of each verification check performed in the appropriate sub-resource: | ||
* <code>document</code>, <code>id_number</code>, <code>selfie</code>. | ||
* | ||
* Each VerificationReport contains a copy of any data collected by the user as | ||
* well as reference IDs which can be used to access collected images through the | ||
* <a href="https://stripe.com/docs/api/files">FileUpload</a> API. To configure and | ||
* create VerificationReports, use the <a | ||
* href="https://stripe.com/docs/api/identity/verification_sessions">VerificationSession</a> | ||
* API. | ||
* | ||
* Related guides: <a | ||
* href="https://stripe.com/docs/identity/verification-sessions#results">Accessing | ||
* verification results</a>. | ||
* | ||
* @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 int $created Time at which the object was created. Measured in seconds since the Unix epoch. | ||
* @property \Stripe\StripeObject $document Result from a document check | ||
* @property \Stripe\StripeObject $id_number Result from an id_number check | ||
* @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. | ||
* @property \Stripe\StripeObject $options | ||
* @property \Stripe\StripeObject $selfie Result from a selfie check | ||
* @property string $type Type of report. | ||
* @property null|string $verification_session ID of the VerificationSession that created this report. | ||
*/ | ||
class VerificationReport extends \Stripe\ApiResource | ||
{ | ||
const OBJECT_NAME = 'identity.verification_report'; | ||
|
||
use \Stripe\ApiOperations\All; | ||
use \Stripe\ApiOperations\Retrieve; | ||
|
||
const TYPE_DOCUMENT = 'document'; | ||
const TYPE_ID_NUMBER = 'id_number'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Identity; | ||
|
||
/** | ||
* A VerificationSession is the starting-point for a verification flow that will | ||
* collect and verify data on your users. Each VerificationSesssion has a URL which | ||
* provides access to Stripe’s hosted identity verification UI. When you direct | ||
* your users to the link, Stripe will collect personal information and verify it. | ||
* You can retrieve the VerificationSession later to see the status of the checks | ||
* performed and access any data collected from your users. | ||
* | ||
* @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 string $client_secret This string value can be passed to stripe.js to embed a verification flow directly into your app. | ||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. | ||
* @property null|\Stripe\StripeObject $last_error Hash of details on the last error encountered in the verification process. | ||
* @property null|string|\Stripe\Identity\VerificationReport $last_verification_report Link to the most recent completed VerificationReport for this Session. | ||
* @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. | ||
* @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. | ||
* @property \Stripe\StripeObject $options | ||
* @property null|\Stripe\StripeObject $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. | ||
* @property string $status Status of this VerificationSession. Read more about each <a href="https://stripe.com/docs/identity/how-sessions-work">VerificationSession status</a>. | ||
* @property string $type Type of report requested. | ||
* @property null|string $url Link to the Stripe-hosted identity verification portal that you can send a user to for verification. | ||
* @property null|\Stripe\StripeObject $verified_outputs Hash of verified data about this person that results from a successful verification report. | ||
*/ | ||
class VerificationSession extends \Stripe\ApiResource | ||
{ | ||
const OBJECT_NAME = 'identity.verification_session'; | ||
|
||
use \Stripe\ApiOperations\All; | ||
use \Stripe\ApiOperations\Create; | ||
use \Stripe\ApiOperations\Retrieve; | ||
use \Stripe\ApiOperations\Update; | ||
|
||
const STATUS_CANCELED = 'canceled'; | ||
const STATUS_PROCESSING = 'processing'; | ||
const STATUS_REQUIRES_INPUT = 'requires_input'; | ||
const STATUS_VERIFIED = 'verified'; | ||
|
||
const TYPE_DOCUMENT = 'document'; | ||
const TYPE_ID_NUMBER = 'id_number'; | ||
|
||
/** | ||
* @param null|array $params | ||
* @param null|array|string $opts | ||
* | ||
* @throws \Stripe\Exception\ApiErrorException if the request fails | ||
* | ||
* @return VerificationSession the canceled verification session | ||
*/ | ||
public function cancel($params = null, $opts = null) | ||
{ | ||
$url = $this->instanceUrl() . '/cancel'; | ||
list($response, $opts) = $this->_request('post', $url, $params, $opts); | ||
$this->refreshFrom($response, $opts); | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @param null|array $params | ||
* @param null|array|string $opts | ||
* | ||
* @throws \Stripe\Exception\ApiErrorException if the request fails | ||
* | ||
* @return VerificationSession the redacted verification session | ||
*/ | ||
public function redact($params = null, $opts = null) | ||
{ | ||
$url = $this->instanceUrl() . '/redact'; | ||
list($response, $opts) = $this->_request('post', $url, $params, $opts); | ||
$this->refreshFrom($response, $opts); | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Service\Identity; | ||
|
||
/** | ||
* Service factory class for API resources in the Identity namespace. | ||
* | ||
* @property VerificationReportService $verificationReports | ||
* @property VerificationSessionService $verificationSessions | ||
*/ | ||
class IdentityServiceFactory extends \Stripe\Service\AbstractServiceFactory | ||
{ | ||
/** | ||
* @var array<string, string> | ||
*/ | ||
private static $classMap = [ | ||
'verificationReports' => VerificationReportService::class, | ||
'verificationSessions' => VerificationSessionService::class, | ||
]; | ||
|
||
protected function getServiceClass($name) | ||
{ | ||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Service\Identity; | ||
|
||
class VerificationReportService extends \Stripe\Service\AbstractService | ||
{ | ||
/** | ||
* List all verification reports. | ||
* | ||
* @param null|array $params | ||
* @param null|array|\Stripe\Util\RequestOptions $opts | ||
* | ||
* @throws \Stripe\Exception\ApiErrorException if the request fails | ||
* | ||
* @return \Stripe\Collection | ||
*/ | ||
public function all($params = null, $opts = null) | ||
{ | ||
return $this->requestCollection('get', '/v1/identity/verification_reports', $params, $opts); | ||
} | ||
|
||
/** | ||
* Retrieves an existing VerificationReport. | ||
* | ||
* @param string $id | ||
* @param null|array $params | ||
* @param null|array|\Stripe\Util\RequestOptions $opts | ||
* | ||
* @throws \Stripe\Exception\ApiErrorException if the request fails | ||
* | ||
* @return \Stripe\Identity\VerificationReport | ||
*/ | ||
public function retrieve($id, $params = null, $opts = null) | ||
{ | ||
return $this->request('get', $this->buildPath('/v1/identity/verification_reports/%s', $id), $params, $opts); | ||
} | ||
} |
Oops, something went wrong.