PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.4
Booking for Appointments and Events Calendar – Amelia v2.4.4
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / stripe / stripe-php / lib / Treasury / FinancialAccount.php
ameliabooking / vendor / stripe / stripe-php / lib / Treasury Last commit date
CreditReversal.php 6 months ago DebitReversal.php 6 months ago FinancialAccount.php 6 months ago FinancialAccountFeatures.php 6 months ago InboundTransfer.php 6 months ago OutboundPayment.php 6 months ago OutboundTransfer.php 6 months ago ReceivedCredit.php 6 months ago ReceivedDebit.php 6 months ago Transaction.php 6 months ago TransactionEntry.php 6 months ago
FinancialAccount.php
153 lines
1 <?php
2
3 // File generated from our OpenAPI spec
4 namespace AmeliaVendor\Stripe\Treasury;
5
6 /**
7 * Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.
8 * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs.
9 *
10 * @property string $id Unique identifier for the object.
11 * @property string $object String representing the object's type. Objects of the same type share the same value.
12 * @property null|string[] $active_features The array of paths to active Features in the Features hash.
13 * @property (object{cash: \AmeliaVendor\Stripe\StripeObject, inbound_pending: \AmeliaVendor\Stripe\StripeObject, outbound_pending: \AmeliaVendor\Stripe\StripeObject}&\AmeliaVendor\Stripe\StripeObject) $balance Balance information for the FinancialAccount
14 * @property string $country Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a>).
15 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
16 * @property null|FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a <code>status</code> enum and associated <code>status_details</code>. Stripe or the platform can control Features via the requested field.
17 * @property ((object{aba?: (object{account_holder_name: string, account_number?: null|string, account_number_last4: string, bank_name: string, routing_number: string}&\AmeliaVendor\Stripe\StripeObject), supported_networks?: string[], type: string}&\AmeliaVendor\Stripe\StripeObject))[] $financial_addresses The set of credentials that resolve to a FinancialAccount.
18 * @property null|bool $is_default
19 * @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.
20 * @property null|\AmeliaVendor\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.
21 * @property null|string $nickname The nickname for the FinancialAccount.
22 * @property null|string[] $pending_features The array of paths to pending Features in the Features hash.
23 * @property null|(object{inbound_flows: null|string, outbound_flows: null|string}&\AmeliaVendor\Stripe\StripeObject) $platform_restrictions The set of functionalities that the platform can restrict on the FinancialAccount.
24 * @property null|string[] $restricted_features The array of paths to restricted Features in the Features hash.
25 * @property string $status Status of this FinancialAccount.
26 * @property (object{closed: null|(object{reasons: string[]}&\AmeliaVendor\Stripe\StripeObject)}&\AmeliaVendor\Stripe\StripeObject) $status_details
27 * @property string[] $supported_currencies The currencies the FinancialAccount can hold a balance in. Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase.
28 */
29 class FinancialAccount extends \AmeliaVendor\Stripe\ApiResource
30 {
31 const OBJECT_NAME = 'treasury.financial_account';
32 use \AmeliaVendor\Stripe\ApiOperations\Update;
33 const STATUS_CLOSED = 'closed';
34 const STATUS_OPEN = 'open';
35 /**
36 * Creates a new FinancialAccount. Each connected account can have up to three
37 * FinancialAccounts by default.
38 *
39 * @param null|array{expand?: string[], features?: array{card_issuing?: array{requested: bool}, deposit_insurance?: array{requested: bool}, financial_addresses?: array{aba?: array{requested: bool}}, inbound_transfers?: array{ach?: array{requested: bool}}, intra_stripe_flows?: array{requested: bool}, outbound_payments?: array{ach?: array{requested: bool}, us_domestic_wire?: array{requested: bool}}, outbound_transfers?: array{ach?: array{requested: bool}, us_domestic_wire?: array{requested: bool}}}, metadata?: array<string, string>, nickname?: null|string, platform_restrictions?: array{inbound_flows?: string, outbound_flows?: string}, supported_currencies: string[]} $params
40 * @param null|array|string $options
41 *
42 * @return FinancialAccount the created resource
43 *
44 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
45 */
46 public static function create($params = null, $options = null)
47 {
48 self::_validateParams($params);
49 $url = static::classUrl();
50 list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
51 $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts);
52 $obj->setLastResponse($response);
53 return $obj;
54 }
55 /**
56 * Returns a list of FinancialAccounts.
57 *
58 * @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
59 * @param null|array|string $opts
60 *
61 * @return \AmeliaVendor\Stripe\Collection<FinancialAccount> of ApiResources
62 *
63 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
64 */
65 public static function all($params = null, $opts = null)
66 {
67 $url = static::classUrl();
68 return static::_requestPage($url, \AmeliaVendor\Stripe\Collection::class, $params, $opts);
69 }
70 /**
71 * Retrieves the details of a FinancialAccount.
72 *
73 * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
74 * @param null|array|string $opts
75 *
76 * @return FinancialAccount
77 *
78 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
79 */
80 public static function retrieve($id, $opts = null)
81 {
82 $opts = \AmeliaVendor\Stripe\Util\RequestOptions::parse($opts);
83 $instance = new static($id, $opts);
84 $instance->refresh();
85 return $instance;
86 }
87 /**
88 * Updates the details of a FinancialAccount.
89 *
90 * @param string $id the ID of the resource to update
91 * @param null|array{expand?: string[], features?: array{card_issuing?: array{requested: bool}, deposit_insurance?: array{requested: bool}, financial_addresses?: array{aba?: array{requested: bool}}, inbound_transfers?: array{ach?: array{requested: bool}}, intra_stripe_flows?: array{requested: bool}, outbound_payments?: array{ach?: array{requested: bool}, us_domestic_wire?: array{requested: bool}}, outbound_transfers?: array{ach?: array{requested: bool}, us_domestic_wire?: array{requested: bool}}}, forwarding_settings?: array{financial_account?: string, payment_method?: string, type: string}, metadata?: array<string, string>, nickname?: null|string, platform_restrictions?: array{inbound_flows?: string, outbound_flows?: string}} $params
92 * @param null|array|string $opts
93 *
94 * @return FinancialAccount the updated resource
95 *
96 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
97 */
98 public static function update($id, $params = null, $opts = null)
99 {
100 self::_validateParams($params);
101 $url = static::resourceUrl($id);
102 list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
103 $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts);
104 $obj->setLastResponse($response);
105 return $obj;
106 }
107 /**
108 * @param null|array $params
109 * @param null|array|string $opts
110 *
111 * @return FinancialAccount the closed financial account
112 *
113 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
114 */
115 public function close($params = null, $opts = null)
116 {
117 $url = $this->instanceUrl() . '/close';
118 list($response, $opts) = $this->_request('post', $url, $params, $opts);
119 $this->refreshFrom($response, $opts);
120 return $this;
121 }
122 /**
123 * @param null|array $params
124 * @param null|array|string $opts
125 *
126 * @return FinancialAccountFeatures the retrieved financial account features
127 *
128 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
129 */
130 public function retrieveFeatures($params = null, $opts = null)
131 {
132 $url = $this->instanceUrl() . '/features';
133 list($response, $opts) = $this->_request('get', $url, $params, $opts);
134 $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response, $opts);
135 $obj->setLastResponse($response);
136 return $obj;
137 }
138 /**
139 * @param null|array $params
140 * @param null|array|string $opts
141 *
142 * @return FinancialAccountFeatures the updated financial account features
143 *
144 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
145 */
146 public function updateFeatures($params = null, $opts = null)
147 {
148 $url = $this->instanceUrl() . '/features';
149 list($response, $opts) = $this->_request('post', $url, $params, $opts);
150 $this->refreshFrom($response, $opts);
151 return $this;
152 }
153 }