/
home
/
desid573
/
public_html
/
angel
/
stripe
/
lib
/
/home/desid573/public_html/angel/stripe/lib
mkdir
upload
Name
Size
Mode
Actions
ApiOperations/
-
0755
rm
Checkout/
-
0755
rm
Error/
-
0755
rm
HttpClient/
-
0755
rm
Issuing/
-
0755
rm
Radar/
-
0755
rm
Reporting/
-
0755
rm
Sigma/
-
0755
rm
Terminal/
-
0755
rm
Util/
-
0755
rm
Account.php
13293
0644
edit
dl
rm
AccountLink.php
301
0644
edit
dl
rm
AlipayAccount.php
2274
0644
edit
dl
rm
ApiRequestor.php
16250
0644
edit
dl
rm
ApiResource.php
3294
0644
edit
dl
rm
ApiResponse.php
609
0644
edit
dl
rm
ApplePayDomain.php
549
0644
edit
dl
rm
ApplicationFee.php
2833
0644
edit
dl
rm
ApplicationFeeRefund.php
1325
0644
edit
dl
rm
Balance.php
504
0644
edit
dl
rm
BalanceTransaction.php
2712
0644
edit
dl
rm
BankAccount.php
3572
0644
edit
dl
rm
BitcoinReceiver.php
1341
0644
edit
dl
rm
BitcoinTransaction.php
180
0644
edit
dl
rm
Capability.php
2314
0644
edit
dl
rm
Card.php
4338
0644
edit
dl
rm
Charge.php
8058
0644
edit
dl
rm
Collection.php
2958
0644
edit
dl
rm
CountrySpec.php
559
0644
edit
dl
rm
Coupon.php
742
0644
edit
dl
rm
CreditNote.php
2097
0644
edit
dl
rm
Customer.php
10145
0644
edit
dl
rm
CustomerBalanceTransaction.php
2898
0644
edit
dl
rm
Discount.php
319
0644
edit
dl
rm
Dispute.php
2697
0644
edit
dl
rm
EphemeralKey.php
893
0644
edit
dl
rm
Event.php
11263
0644
edit
dl
rm
ExchangeRate.php
222
0644
edit
dl
rm
File.php
1705
0644
edit
dl
rm
FileLink.php
522
0644
edit
dl
rm
FileUpload.php
154
0644
edit
dl
rm
Invoice.php
6569
0644
edit
dl
rm
InvoiceItem.php
869
0644
edit
dl
rm
InvoiceLineItem.php
705
0644
edit
dl
rm
IssuerFraudRecord.php
435
0644
edit
dl
rm
LoginLink.php
235
0644
edit
dl
rm
OAuth.php
3200
0644
edit
dl
rm
Order.php
1646
0644
edit
dl
rm
OrderItem.php
354
0644
edit
dl
rm
OrderReturn.php
470
0644
edit
dl
rm
PaymentIntent.php
3263
0644
edit
dl
rm
PaymentMethod.php
1475
0644
edit
dl
rm
Payout.php
3072
0644
edit
dl
rm
Person.php
3128
0644
edit
dl
rm
Plan.php
870
0644
edit
dl
rm
Product.php
1117
0644
edit
dl
rm
Recipient.php
1061
0644
edit
dl
rm
RecipientTransfer.php
918
0644
edit
dl
rm
Refund.php
1813
0644
edit
dl
rm
RequestTelemetry.php
559
0644
edit
dl
rm
Review.php
1644
0644
edit
dl
rm
SetupIntent.php
2171
0644
edit
dl
rm
SingletonApiResource.php
937
0644
edit
dl
rm
SKU.php
691
0644
edit
dl
rm
Source.php
4486
0644
edit
dl
rm
SourceTransaction.php
414
0644
edit
dl
rm
Stripe.php
6751
0644
edit
dl
rm
StripeObject.php
17756
0644
edit
dl
rm
Subscription.php
2802
0644
edit
dl
rm
SubscriptionItem.php
1612
0644
edit
dl
rm
SubscriptionSchedule.php
1857
0644
edit
dl
rm
TaxId.php
2255
0644
edit
dl
rm
TaxRate.php
599
0644
edit
dl
rm
ThreeDSecure.php
333
0644
edit
dl
rm
Token.php
766
0644
edit
dl
rm
Topup.php
1557
0644
edit
dl
rm
Transfer.php
3704
0644
edit
dl
rm
TransferReversal.php
1452
0644
edit
dl
rm
UsageRecord.php
1243
0644
edit
dl
rm
UsageRecordSummary.php
382
0644
edit
dl
rm
Webhook.php
1494
0644
edit
dl
rm
WebhookEndpoint.php
549
0644
edit
dl
rm
WebhookSignature.php
4239
0644
edit
dl
rm
Edit:
/home/desid573/public_html/angel/stripe/lib/Account.php
(13293B)
<?php namespace Stripe; /** * Class Account * * @property string $id * @property string $object * @property mixed $business_profile * @property string $business_type * @property mixed $capabilities * @property bool $charges_enabled * @property mixed $company * @property string $country * @property int $created * @property string $default_currency * @property bool $details_submitted * @property string $email * @property Collection $external_accounts * @property mixed $individual * @property StripeObject $metadata * @property bool $payouts_enabled * @property mixed $requirements * @property mixed $settings * @property mixed $tos_acceptance * @property string $type * * @package Stripe */ class Account extends ApiResource { const OBJECT_NAME = "account"; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Delete; use ApiOperations\NestedResource; use ApiOperations\Retrieve { retrieve as protected _retrieve; } 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; if ($savedNestedResources === null) { $savedNestedResources = new Util\Set([ 'external_account', 'bank_account', ]); } return $savedNestedResources; } const PATH_CAPABILITIES = '/capabilities'; const PATH_EXTERNAL_ACCOUNTS = '/external_accounts'; const PATH_LOGIN_LINKS = '/login_links'; const PATH_PERSONS = '/persons'; public function instanceUrl() { if ($this['id'] === null) { return '/v1/account'; } else { return parent::instanceUrl(); } } /** * @param array|string|null $id The ID of the account to retrieve, or an * options array containing an `id` key. * @param array|string|null $opts * * @return Account */ public static function retrieve($id = null, $opts = null) { if (!$opts && is_string($id) && substr($id, 0, 3) === 'sk_') { $opts = $id; $id = null; } return self::_retrieve($id, $opts); } /** * @param array|null $params * @param array|string|null $opts * * @return Account The rejected account. */ public function reject($params = null, $opts = null) { $url = $this->instanceUrl() . '/reject'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } /** * @param array|null $clientId * @param array|string|null $opts * * @return StripeObject Object containing the response from the API. */ public function deauthorize($clientId = null, $opts = null) { $params = [ 'client_id' => $clientId, 'stripe_user_id' => $this->id, ]; return OAuth::deauthorize($params, $opts); } /* * Capabilities methods * We can not add the capabilities() method today as the Account object already has a * capabilities property which is a hash and not the sub-list of capabilities. */ /** * @param string $id The ID of the account to which the capability belongs. * @param string $capabilityId The ID of the capability to retrieve. * @param array|null $params * @param array|string|null $opts * * @return Capability */ public static function retrieveCapability($id, $capabilityId, $params = null, $opts = null) { return self::_retrieveNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts); } /** * @param string $id The ID of the account to which the capability belongs. * @param string $capabilityId The ID of the capability to update. * @param array|null $params * @param array|string|null $opts * * @return Capability */ public static function updateCapability($id, $capabilityId, $params = null, $opts = null) { return self::_updateNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts); } /** * @param string $id The ID of the account on which to retrieve the capabilities. * @param array|null $params * @param array|string|null $opts * * @return Collection The list of capabilities. */ public static function allCapabilities($id, $params = null, $opts = null) { return self::_allNestedResources($id, static::PATH_CAPABILITIES, $params, $opts); } /** * @param string $id The ID of the account on which to create the external account. * @param array|null $params * @param array|string|null $opts * * @return BankAccount|Card */ public static function createExternalAccount($id, $params = null, $opts = null) { return self::_createNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts); } /** * @param string $id The ID of the account to which the external account belongs. * @param string $externalAccountId The ID of the external account to retrieve. * @param array|null $params * @param array|string|null $opts * * @return BankAccount|Card */ public static function retrieveExternalAccount($id, $externalAccountId, $params = null, $opts = null) { return self::_retrieveNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); } /** * @param string $id The ID of the account to which the external account belongs. * @param string $externalAccountId The ID of the external account to update. * @param array|null $params * @param array|string|null $opts * * @return BankAccount|Card */ public static function updateExternalAccount($id, $externalAccountId, $params = null, $opts = null) { return self::_updateNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); } /** * @param string $id The ID of the account to which the external account belongs. * @param string $externalAccountId The ID of the external account to delete. * @param array|null $params * @param array|string|null $opts * * @return BankAccount|Card */ public static function deleteExternalAccount($id, $externalAccountId, $params = null, $opts = null) { return self::_deleteNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); } /** * @param string $id The ID of the account on which to retrieve the external accounts. * @param array|null $params * @param array|string|null $opts * * @return Collection The list of external accounts (BankAccount or Card). */ public static function allExternalAccounts($id, $params = null, $opts = null) { return self::_allNestedResources($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts); } /** * @param string $id The ID of the account on which to create the login link. * @param array|null $params * @param array|string|null $opts * * @return LoginLink */ public static function createLoginLink($id, $params = null, $opts = null) { return self::_createNestedResource($id, static::PATH_LOGIN_LINKS, $params, $opts); } /** * @param array|null $params * @param array|string|null $options * * @return Collection The list of persons. */ public function persons($params = null, $options = null) { $url = $this->instanceUrl() . '/persons'; list($response, $opts) = $this->_request('get', $url, $params, $options); $obj = Util\Util::convertToStripeObject($response, $opts); $obj->setLastResponse($response); return $obj; } /** * @param string $id The ID of the account on which to create the person. * @param array|null $params * @param array|string|null $opts * * @return Person */ public static function createPerson($id, $params = null, $opts = null) { return self::_createNestedResource($id, static::PATH_PERSONS, $params, $opts); } /** * @param string $id The ID of the account to which the person belongs. * @param string $personId The ID of the person to retrieve. * @param array|null $params * @param array|string|null $opts * * @return Person */ public static function retrievePerson($id, $personId, $params = null, $opts = null) { return self::_retrieveNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); } /** * @param string $id The ID of the account to which the person belongs. * @param string $personId The ID of the person to update. * @param array|null $params * @param array|string|null $opts * * @return Person */ public static function updatePerson($id, $personId, $params = null, $opts = null) { return self::_updateNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); } /** * @param string $id The ID of the account to which the person belongs. * @param string $personId The ID of the person to delete. * @param array|null $params * @param array|string|null $opts * * @return Person */ public static function deletePerson($id, $personId, $params = null, $opts = null) { return self::_deleteNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); } /** * @param string $id The ID of the account on which to retrieve the persons. * @param array|null $params * @param array|string|null $opts * * @return Collection The list of persons. */ public static function allPersons($id, $params = null, $opts = null) { return self::_allNestedResources($id, static::PATH_PERSONS, $params, $opts); } public function serializeParameters($force = false) { $update = parent::serializeParameters($force); if (isset($this->_values['legal_entity'])) { $entity = $this['legal_entity']; if (isset($entity->_values['additional_owners'])) { $owners = $entity['additional_owners']; $entityUpdate = isset($update['legal_entity']) ? $update['legal_entity'] : []; $entityUpdate['additional_owners'] = $this->serializeAdditionalOwners($entity, $owners); $update['legal_entity'] = $entityUpdate; } } if (isset($this->_values['individual'])) { $individual = $this['individual']; if (($individual instanceof Person) && !isset($update['individual'])) { $update['individual'] = $individual->serializeParameters($force); } } return $update; } private function serializeAdditionalOwners($legalEntity, $additionalOwners) { if (isset($legalEntity->_originalValues['additional_owners'])) { $originalValue = $legalEntity->_originalValues['additional_owners']; } else { $originalValue = []; } if (($originalValue) && (count($originalValue) > count($additionalOwners))) { throw new \InvalidArgumentException( "You cannot delete an item from an array, you must instead set a new array" ); } $updateArr = []; foreach ($additionalOwners as $i => $v) { $update = ($v instanceof StripeObject) ? $v->serializeParameters() : $v; if ($update !== []) { if (!$originalValue || !array_key_exists($i, $originalValue) || ($update != $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) { $updateArr[$i] = $update; } } } return $updateArr; } }
Save
cmd:
run