/
home
/
techb158
/
immovalet.ca
/
Client
/
stripe-php
/
lib
/
/home/techb158/immovalet.ca/Client/stripe-php/lib
mkdir
upload
Name
Size
Mode
Actions
ApiOperations/
-
0777
rm
Checkout/
-
0777
rm
Error/
-
0777
rm
HttpClient/
-
0777
rm
Issuing/
-
0777
rm
Radar/
-
0777
rm
Reporting/
-
0777
rm
Sigma/
-
0777
rm
Terminal/
-
0777
rm
Util/
-
0777
rm
Account.php
10820
0666
edit
dl
rm
AccountLink.php
323
0666
edit
dl
rm
AlipayAccount.php
2347
0666
edit
dl
rm
ApiRequestor.php
16774
0666
edit
dl
rm
ApiResource.php
3406
0666
edit
dl
rm
ApiResponse.php
581
0666
edit
dl
rm
ApplePayDomain.php
578
0666
edit
dl
rm
ApplicationFee.php
2932
0666
edit
dl
rm
ApplicationFeeRefund.php
1386
0666
edit
dl
rm
Balance.php
535
0666
edit
dl
rm
BalanceTransaction.php
932
0666
edit
dl
rm
BankAccount.php
3202
0666
edit
dl
rm
BitcoinReceiver.php
1391
0666
edit
dl
rm
BitcoinTransaction.php
195
0666
edit
dl
rm
Card.php
4469
0666
edit
dl
rm
Charge.php
8028
0666
edit
dl
rm
Collection.php
3067
0666
edit
dl
rm
CountrySpec.php
586
0666
edit
dl
rm
Coupon.php
777
0666
edit
dl
rm
Customer.php
6118
0666
edit
dl
rm
Discount.php
341
0666
edit
dl
rm
Dispute.php
2776
0666
edit
dl
rm
EphemeralKey.php
935
0666
edit
dl
rm
Event.php
9932
0666
edit
dl
rm
ExchangeRate.php
240
0666
edit
dl
rm
File.php
1423
0666
edit
dl
rm
FileLink.php
552
0666
edit
dl
rm
FileUpload.php
160
0666
edit
dl
rm
Invoice.php
5767
0666
edit
dl
rm
InvoiceItem.php
879
0666
edit
dl
rm
InvoiceLineItem.php
673
0666
edit
dl
rm
IssuerFraudRecord.php
461
0666
edit
dl
rm
LoginLink.php
254
0666
edit
dl
rm
OAuth.php
3293
0666
edit
dl
rm
Order.php
1711
0666
edit
dl
rm
OrderItem.php
377
0666
edit
dl
rm
OrderReturn.php
498
0666
edit
dl
rm
PaymentIntent.php
2737
0666
edit
dl
rm
PaymentMethod.php
1536
0666
edit
dl
rm
Payout.php
3166
0666
edit
dl
rm
Person.php
2650
0666
edit
dl
rm
Plan.php
911
0666
edit
dl
rm
Product.php
1165
0666
edit
dl
rm
Recipient.php
1110
0666
edit
dl
rm
RecipientTransfer.php
958
0666
edit
dl
rm
Refund.php
1875
0666
edit
dl
rm
RequestTelemetry.php
586
0666
edit
dl
rm
Review.php
1701
0666
edit
dl
rm
SingletonApiResource.php
975
0666
edit
dl
rm
SKU.php
727
0666
edit
dl
rm
Source.php
4610
0666
edit
dl
rm
SourceTransaction.php
438
0666
edit
dl
rm
Stripe.php
7018
0666
edit
dl
rm
StripeObject.php
18280
0666
edit
dl
rm
Subscription.php
2706
0666
edit
dl
rm
SubscriptionItem.php
1130
0666
edit
dl
rm
SubscriptionSchedule.php
3422
0666
edit
dl
rm
SubscriptionScheduleRevision.php
2277
0666
edit
dl
rm
ThreeDSecure.php
354
0666
edit
dl
rm
Token.php
803
0666
edit
dl
rm
Topup.php
1618
0666
edit
dl
rm
Transfer.php
3826
0666
edit
dl
rm
TransferReversal.php
1515
0666
edit
dl
rm
UsageRecord.php
1288
0666
edit
dl
rm
UsageRecordSummary.php
405
0666
edit
dl
rm
Webhook.php
1534
0666
edit
dl
rm
WebhookEndpoint.php
579
0666
edit
dl
rm
WebhookSignature.php
4369
0666
edit
dl
rm
Edit:
/home/techb158/immovalet.ca/Client/stripe-php/lib/Account.php
(10820B)
<?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; public static function getSavedNestedResources() { static $savedNestedResources = null; if ($savedNestedResources === null) { $savedNestedResources = new Util\Set([ 'external_account', 'bank_account', ]); } return $savedNestedResources; } 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 $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 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); } /** * @param string|null $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|null $id The ID of the account to which the external account belongs. * @param array|null $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|null $id The ID of the account to which the external account belongs. * @param array|null $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|null $id The ID of the account to which the external account belongs. * @param array|null $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|null $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|null $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 string|null $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|null $id The ID of the account to which the person belongs. * @param array|null $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|null $id The ID of the account to which the person belongs. * @param array|null $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|null $id The ID of the account to which the person belongs. * @param array|null $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|null $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