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 new constants for purpose on File #974

Merged
merged 1 commit into from
Jul 16, 2020
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
11 changes: 10 additions & 1 deletion lib/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $filename A filename for the file, suitable for saving to a filesystem.
* @property null|\Stripe\Collection $links A list of <a href="https://stripe.com/docs/api#file_links">file links</a> that point at this file.
* @property string $purpose The purpose of the file. Possible values are <code>additional_verification</code>, <code>business_icon</code>, <code>business_logo</code>, <code>customer_signature</code>, <code>dispute_evidence</code>, <code>document_provider_identity_document</code>, <code>finance_report_run</code>, <code>identity_document</code>, <code>pci_document</code>, <code>sigma_scheduled_query</code>, or <code>tax_document_user_upload</code>.
* @property string $purpose The <a href="https://stripe.com/docs/file-upload#uploading-a-file">purpose</a> of the uploaded file.
* @property int $size The size in bytes of the file object.
* @property null|string $title A user friendly title for the document.
* @property null|string $type The type of the file returned (e.g., <code>csv</code>, <code>pdf</code>, <code>jpg</code>, or <code>png</code>).
Expand All @@ -31,6 +31,15 @@ class File extends ApiResource
use ApiOperations\All;
use ApiOperations\Retrieve;

const PURPOSE_ADDITIONAL_VERIFICATION = 'additional_verification';
const PURPOSE_BUSINESS_ICON = 'business_icon';
const PURPOSE_BUSINESS_LOGO = 'business_logo';
const PURPOSE_CUSTOMER_SIGNATURE = 'customer_signature';
const PURPOSE_DISPUTE_EVIDENCE = 'dispute_evidence';
const PURPOSE_IDENTITY_DOCUMENT = 'identity_document';
const PURPOSE_PCI_DOCUMENT = 'pci_document';
const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload';

// This resource can have two different object names. In latter API
// versions, only `file` is used, but since stripe-php may be used with
// any API version, we need to support deserializing the older
Expand Down