From 7fbf6727f16bbafeacc90ceadadfc5599e75e19d Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Wed, 10 Apr 2019 21:19:01 -0700 Subject: [PATCH 1/2] Add constants for `person.*` events --- lib/Event.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Event.php b/lib/Event.php index 319cc9db0..38eb24cf3 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -104,6 +104,9 @@ class Event extends ApiResource const PAYOUT_FAILED = 'payout.failed'; const PAYOUT_PAID = 'payout.paid'; const PAYOUT_UPDATED = 'payout.updated'; + const PERSON_CREATED = 'person.created'; + const PERSON_DELETED = 'person.deleted'; + const PERSON_UPDATED = 'person.updated'; const PING = 'ping'; const PLAN_CREATED = 'plan.created'; const PLAN_DELETED = 'plan.deleted'; From 14d1020b91256aed1b483aa17f3e24616beb85b1 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Thu, 11 Apr 2019 15:56:20 -0700 Subject: [PATCH 2/2] Add useful constants for Person and Account --- lib/Account.php | 31 +++++++++++++++++++++++++++++++ lib/Person.php | 15 +++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/lib/Account.php b/lib/Account.php index c643d8109..e48ec556d 100644 --- a/lib/Account.php +++ b/lib/Account.php @@ -42,6 +42,37 @@ class Account extends ApiResource } use ApiOperations\Update; + /** + * Possible string representations of an account's business type. + * @link https://stripe.com/docs/api/accounts/object#account_object-business_type + */ + const BUSINESS_TYPE_COMPANY = 'company'; + const BUSINESS_TYPE_INDIVIDUAL = 'individual'; + + /** + * Possible string representations of an account's capabilities. + * @link https://stripe.com/docs/api/accounts/object#account_object-capabilities + */ + const CAPABILITY_CARD_PAYMENTS = 'card_payments'; + const CAPABILITY_LEGACY_PAYMENTS = 'legacy_payments'; + const CAPABILITY_PLATFORM_PAYMENTS = 'platform_payments'; + + /** + * Possible string representations of an account's capability status. + * @link https://stripe.com/docs/api/accounts/object#account_object-capabilities + */ + const CAPABILITY_STATUS_ACTIVE = 'active'; + const CAPABILITY_STATUS_INACTIVE = 'inactive'; + const CAPABILITY_STATUS_PENDING = 'pending'; + + /** + * Possible string representations of an account's type. + * @link https://stripe.com/docs/api/accounts/object#account_object-type + */ + const TYPE_CUSTOM = 'custom'; + const TYPE_EXPRESS = 'express'; + const TYPE_STANDARD = 'standard'; + public static function getSavedNestedResources() { static $savedNestedResources = null; diff --git a/lib/Person.php b/lib/Person.php index 500f4915b..56241c4c4 100644 --- a/lib/Person.php +++ b/lib/Person.php @@ -41,6 +41,21 @@ class Person extends ApiResource use ApiOperations\Delete; use ApiOperations\Update; + /** + * Possible string representations of a person's gender. + * @link https://stripe.com/docs/api/persons/object#person_object-gender + */ + const GENDER_MALE = 'male'; + const GENDER_FEMALE = 'female'; + + /** + * Possible string representations of a person's verification status. + * @link https://stripe.com/docs/api/persons/object#person_object-verification-status + */ + const VERIFICATION_STATUS_PENDING = 'pending'; + const VERIFICATION_STATUS_UNVERIFIED = 'unverified'; + const VERIFICATION_STATUS_VERIFIED = 'verified'; + /** * @return string The API URL for this Stripe account reversal. */