Bump stripe-php from 16.4.0 to 17.2.1

This commit is contained in:
johnnyq
2025-05-22 12:37:35 -04:00
parent 5361391b3b
commit 6a368840fa
332 changed files with 4978 additions and 4624 deletions

View File

@@ -61,7 +61,7 @@ abstract class AbstractService
if (null === $params) {
return null;
}
\array_walk_recursive($params, function (&$value, $key) {
\array_walk_recursive($params, static function (&$value, $key) {
if (null === $value) {
$value = '';
}
@@ -77,22 +77,16 @@ abstract class AbstractService
protected function requestStream($method, $path, $readBodyChunkCallable, $params, $opts)
{
// TODO (MAJOR): Add this method to StripeClientInterface
// @phpstan-ignore-next-line
return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, self::formatParams($params), $opts);
}
protected function requestCollection($method, $path, $params, $opts)
{
// TODO (MAJOR): Add this method to StripeClientInterface
// @phpstan-ignore-next-line
return $this->getClient()->requestCollection($method, $path, self::formatParams($params), $opts);
}
protected function requestSearchResult($method, $path, $params, $opts)
{
// TODO (MAJOR): Add this method to StripeClientInterface
// @phpstan-ignore-next-line
return $this->getClient()->requestSearchResult($method, $path, self::formatParams($params), $opts);
}

View File

@@ -6,21 +6,22 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class AccountLinkService extends \Stripe\Service\AbstractService
class AccountLinkService extends AbstractService
{
/**
* Creates an AccountLink object that includes a single-use Stripe URL that the
* platform can redirect their user to in order to take them through the Connect
* Onboarding flow.
*
* @param null|array $params
* @param null|array{account: string, collect?: string, collection_options?: array{fields?: string, future_requirements?: string}, expand?: string[], refresh_url?: string, return_url?: string, type: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\AccountLink
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{

File diff suppressed because one or more lines are too long

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class AccountSessionService extends \Stripe\Service\AbstractService
class AccountSessionService extends AbstractService
{
/**
* Creates a AccountSession object that includes a single-use token that the
* platform can use on their front-end to grant client-side API access.
*
* @param null|array $params
* @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\AccountSession
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ApplePayDomainService extends \Stripe\Service\AbstractService
class ApplePayDomainService extends AbstractService
{
/**
* List apple pay domains.
*
* @param null|array $params
* @param null|array{domain_name?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\ApplePayDomain>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class ApplePayDomainService extends \Stripe\Service\AbstractService
/**
* Create an apple pay domain.
*
* @param null|array $params
* @param null|array{domain_name: string, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ApplePayDomain
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -47,9 +48,9 @@ class ApplePayDomainService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ApplePayDomain
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -60,12 +61,12 @@ class ApplePayDomainService extends \Stripe\Service\AbstractService
* Retrieve an apple pay domain.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ApplePayDomain
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ApplicationFeeService extends \Stripe\Service\AbstractService
class ApplicationFeeService extends AbstractService
{
/**
* Returns a list of application fees youve previously collected. The application
* fees are returned in sorted order, with the most recent fees appearing first.
*
* @param null|array $params
* @param null|array{charge?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\ApplicationFee>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -34,12 +35,12 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
* page through additional refunds.
*
* @param string $parentId
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\ApplicationFeeRefund>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allRefunds($parentId, $params = null, $opts = null)
{
@@ -59,12 +60,12 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
* trying to refund more money than is left on an application fee.
*
* @param string $parentId
* @param null|array $params
* @param null|array{amount?: int, expand?: string[], metadata?: array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ApplicationFeeRefund
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function createRefund($parentId, $params = null, $opts = null)
{
@@ -76,12 +77,12 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
* same information is returned when refunding the application fee.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ApplicationFee
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -95,12 +96,12 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ApplicationFeeRefund
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieveRefund($parentId, $id, $params = null, $opts = null)
{
@@ -115,12 +116,12 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ApplicationFeeRefund
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function updateRefund($parentId, $id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Apps;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SecretService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class SecretService extends \Stripe\Service\AbstractService
/**
* List all secrets stored on the given scope.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, scope: array{type: string, user?: string}, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Apps\Secret>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class SecretService extends \Stripe\Service\AbstractService
/**
* Create or replace a secret in the secret store.
*
* @param null|array $params
* @param null|array{expand?: string[], expires_at?: int, name: string, payload: string, scope: array{type: string, user?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Apps\Secret
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -43,12 +44,12 @@ class SecretService extends \Stripe\Service\AbstractService
/**
* Deletes a secret from the secret store by name and scope.
*
* @param null|array $params
* @param null|array{expand?: string[], name: string, scope: array{type: string, user?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Apps\Secret
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deleteWhere($params = null, $opts = null)
{
@@ -58,12 +59,12 @@ class SecretService extends \Stripe\Service\AbstractService
/**
* Finds a secret in the secret store by name and scope.
*
* @param null|array $params
* @param null|array{expand?: string[], name: string, scope: array{type: string, user?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Apps\Secret
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function find($params = null, $opts = null)
{

View File

@@ -6,9 +6,10 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class BalanceService extends \Stripe\Service\AbstractService
class BalanceService extends AbstractService
{
/**
* Retrieves the current account balance, based on the authentication that was used
@@ -16,12 +17,12 @@ class BalanceService extends \Stripe\Service\AbstractService
* href="/docs/connect/account-balances#accounting-for-negative-balances">Accounting
* for negative balances</a>.
*
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Balance
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($params = null, $opts = null)
{

View File

@@ -6,9 +6,10 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class BalanceTransactionService extends \Stripe\Service\AbstractService
class BalanceTransactionService extends AbstractService
{
/**
* Returns a list of transactions that have contributed to the Stripe account
@@ -18,12 +19,12 @@ class BalanceTransactionService extends \Stripe\Service\AbstractService
* Note that this endpoint was previously called “Balance history” and used the
* path <code>/v1/balance/history</code>.
*
* @param null|array $params
* @param null|array{created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, payout?: string, source?: string, starting_after?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\BalanceTransaction>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -37,12 +38,12 @@ class BalanceTransactionService extends \Stripe\Service\AbstractService
* <code>/v1/balance/history/:id</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\BalanceTransaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class AlertService extends \Stripe\Service\AbstractService
@@ -14,12 +15,12 @@ class AlertService extends \Stripe\Service\AbstractService
* Reactivates this alert, allowing it to trigger again.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Alert
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function activate($id, $params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class AlertService extends \Stripe\Service\AbstractService
/**
* Lists billing active and inactive alerts.
*
* @param null|array $params
* @param null|array{alert_type?: string, ending_before?: string, expand?: string[], limit?: int, meter?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Billing\Alert>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -46,12 +47,12 @@ class AlertService extends \Stripe\Service\AbstractService
* non-reversible.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Alert
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function archive($id, $params = null, $opts = null)
{
@@ -61,12 +62,12 @@ class AlertService extends \Stripe\Service\AbstractService
/**
* Creates a billing alert.
*
* @param null|array $params
* @param null|array{alert_type: string, expand?: string[], title: string, usage_threshold?: array{filters?: array{customer?: string, type: string}[], gte: int, meter?: string, recurrence: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Alert
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -77,12 +78,12 @@ class AlertService extends \Stripe\Service\AbstractService
* Deactivates this alert, preventing it from triggering.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Alert
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deactivate($id, $params = null, $opts = null)
{
@@ -93,12 +94,12 @@ class AlertService extends \Stripe\Service\AbstractService
* Retrieves a billing alert given an ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Alert
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CreditBalanceSummaryService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class CreditBalanceSummaryService extends \Stripe\Service\AbstractService
/**
* Retrieves the credit balance summary for a customer.
*
* @param null|array $params
* @param null|array{customer: string, expand?: string[], filter: array{applicability_scope?: array{price_type?: string, prices?: array{id: string}[]}, credit_grant?: string, type: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\CreditBalanceSummary
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CreditBalanceTransactionService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class CreditBalanceTransactionService extends \Stripe\Service\AbstractService
/**
* Retrieve a list of credit balance transactions.
*
* @param null|array $params
* @param null|array{credit_grant?: string, customer: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Billing\CreditBalanceTransaction>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class CreditBalanceTransactionService extends \Stripe\Service\AbstractService
* Retrieves a credit balance transaction.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\CreditBalanceTransaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CreditGrantService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class CreditGrantService extends \Stripe\Service\AbstractService
/**
* Retrieve a list of credit grants.
*
* @param null|array $params
* @param null|array{customer?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Billing\CreditGrant>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class CreditGrantService extends \Stripe\Service\AbstractService
/**
* Creates a credit grant.
*
* @param null|array $params
* @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: array<string, string>, name?: string, priority?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\CreditGrant
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class CreditGrantService extends \Stripe\Service\AbstractService
* Expires a credit grant.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\CreditGrant
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function expire($id, $params = null, $opts = null)
{
@@ -60,12 +61,12 @@ class CreditGrantService extends \Stripe\Service\AbstractService
* Retrieves a credit grant.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\CreditGrant
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -76,12 +77,12 @@ class CreditGrantService extends \Stripe\Service\AbstractService
* Updates a credit grant.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], expires_at?: null|int, metadata?: array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\CreditGrant
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{
@@ -92,12 +93,12 @@ class CreditGrantService extends \Stripe\Service\AbstractService
* Voids a credit grant.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\CreditGrant
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function voidGrant($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class MeterEventAdjustmentService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class MeterEventAdjustmentService extends \Stripe\Service\AbstractService
/**
* Creates a billing meter event adjustment.
*
* @param null|array $params
* @param null|array{cancel?: array{identifier?: string}, event_name: string, expand?: string[], type: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\MeterEventAdjustment
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class MeterEventService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class MeterEventService extends \Stripe\Service\AbstractService
/**
* Creates a billing meter event.
*
* @param null|array $params
* @param null|array{event_name: string, expand?: string[], identifier?: string, payload: array<string, string>, timestamp?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\MeterEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class MeterService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class MeterService extends \Stripe\Service\AbstractService
/**
* Retrieve a list of billing meters.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Billing\Meter>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class MeterService extends \Stripe\Service\AbstractService
* Retrieve a list of billing meter event summaries.
*
* @param string $parentId
* @param null|array $params
* @param null|array{customer: string, end_time: int, ending_before?: string, expand?: string[], limit?: int, start_time: int, starting_after?: string, value_grouping_window?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Billing\MeterEventSummary>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allEventSummaries($parentId, $params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class MeterService extends \Stripe\Service\AbstractService
/**
* Creates a billing meter.
*
* @param null|array $params
* @param null|array{customer_mapping?: array{event_payload_key: string, type: string}, default_aggregation: array{formula: string}, display_name: string, event_name: string, event_time_window?: string, expand?: string[], value_settings?: array{event_payload_key: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Meter
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -61,12 +62,12 @@ class MeterService extends \Stripe\Service\AbstractService
* meter. You cant attach a deactivated meter to a price.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Meter
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deactivate($id, $params = null, $opts = null)
{
@@ -78,12 +79,12 @@ class MeterService extends \Stripe\Service\AbstractService
* attach the meter to a price.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Meter
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function reactivate($id, $params = null, $opts = null)
{
@@ -94,12 +95,12 @@ class MeterService extends \Stripe\Service\AbstractService
* Retrieves a billing meter given an ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Meter
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -110,12 +111,12 @@ class MeterService extends \Stripe\Service\AbstractService
* Updates a billing meter.
*
* @param string $id
* @param null|array $params
* @param null|array{display_name?: string, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Meter
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\BillingPortal;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ConfigurationService extends \Stripe\Service\AbstractService
@@ -14,12 +15,12 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* Returns a list of configurations that describe the functionality of the customer
* portal.
*
* @param null|array $params
* @param null|array{active?: bool, ending_before?: string, expand?: string[], is_default?: bool, limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\BillingPortal\Configuration>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* Creates a configuration that describes the functionality and behavior of a
* PortalSession.
*
* @param null|array $params
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}}}, login_page?: array{enabled: bool}, metadata?: array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\BillingPortal\Configuration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -47,12 +48,12 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* portal.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\BillingPortal\Configuration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -63,12 +64,12 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* Updates a configuration that describes the functionality of the customer portal.
*
* @param string $id
* @param null|array $params
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\BillingPortal\Configuration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\BillingPortal;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SessionService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class SessionService extends \Stripe\Service\AbstractService
/**
* Creates a session of the customer portal.
*
* @param null|array $params
* @param null|array{configuration?: string, customer: string, expand?: string[], flow_data?: array{after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{return_url: string}, type: string}, subscription_cancel?: array{retention?: array{coupon_offer: array{coupon: string}, type: string}, subscription: string}, subscription_update?: array{subscription: string}, subscription_update_confirm?: array{discounts?: array{coupon?: string, promotion_code?: string}[], items: array{id: string, price?: string, quantity?: int}[], subscription: string}, type: string}, locale?: string, on_behalf_of?: string, return_url?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\BillingPortal\Session
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ChargeService extends \Stripe\Service\AbstractService
class ChargeService extends AbstractService
{
/**
* Returns a list of charges youve previously created. The charges are returned in
* sorted order, with the most recent charges appearing first.
*
* @param null|array $params
* @param null|array{created?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, payment_intent?: string, starting_after?: string, transfer_group?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Charge>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -38,12 +39,12 @@ class ChargeService extends \Stripe\Service\AbstractService
* href="/docs/api/payment_intents/capture">Capture a PaymentIntent</a>.
*
* @param string $id
* @param null|array $params
* @param null|array{amount?: int, application_fee?: int, application_fee_amount?: int, expand?: string[], receipt_email?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int}, transfer_group?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Charge
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function capture($id, $params = null, $opts = null)
{
@@ -56,12 +57,12 @@ class ChargeService extends \Stripe\Service\AbstractService
* payment instead. Confirmation of the PaymentIntent creates the
* <code>Charge</code> object used to request payment.
*
* @param null|array $params
* @param null|array{amount?: int, application_fee?: int, application_fee_amount?: int, capture?: bool, currency?: string, customer?: string, description?: string, destination?: array{account: string, amount?: int}, expand?: string[], metadata?: null|array<string, string>, on_behalf_of?: string, radar_options?: array{session?: string}, receipt_email?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, source?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Charge
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -75,12 +76,12 @@ class ChargeService extends \Stripe\Service\AbstractService
* when creating or refunding the charge.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Charge
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -95,12 +96,12 @@ class ChargeService extends \Stripe\Service\AbstractService
* Occasionally, propagation of new or updated data can be up to an hour behind
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
* @param null|array{expand?: string[], limit?: int, page?: string, query: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SearchResult<\Stripe\Charge>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function search($params = null, $opts = null)
{
@@ -112,12 +113,12 @@ class ChargeService extends \Stripe\Service\AbstractService
* parameters not provided will be left unchanged.
*
* @param string $id
* @param null|array $params
* @param null|array{customer?: string, description?: string, expand?: string[], fraud_details?: array{user_report: null|string}, metadata?: null|array<string, string>, receipt_email?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, transfer_group?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Charge
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

File diff suppressed because one or more lines are too long

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Climate;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class OrderService extends \Stripe\Service\AbstractService
@@ -14,12 +15,12 @@ class OrderService extends \Stripe\Service\AbstractService
* Lists all Climate order objects. The orders are returned sorted by creation
* date, with the most recently created orders appearing first.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Climate\Order>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -35,12 +36,12 @@ class OrderService extends \Stripe\Service\AbstractService
* <code>amount_total</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Climate\Order
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function cancel($id, $params = null, $opts = null)
{
@@ -52,12 +53,12 @@ class OrderService extends \Stripe\Service\AbstractService
* processed immediately after creation and payment will be deducted your Stripe
* balance.
*
* @param null|array $params
* @param null|array{amount?: int, beneficiary?: array{public_name: string}, currency?: string, expand?: string[], metadata?: array<string, string>, metric_tons?: string, product: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Climate\Order
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -68,12 +69,12 @@ class OrderService extends \Stripe\Service\AbstractService
* Retrieves the details of a Climate order object with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Climate\Order
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -84,12 +85,12 @@ class OrderService extends \Stripe\Service\AbstractService
* Updates the specified order by setting the values of the parameters passed.
*
* @param string $id
* @param null|array $params
* @param null|array{beneficiary?: null|array{public_name: null|string}, expand?: string[], metadata?: array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Climate\Order
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Climate;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ProductService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class ProductService extends \Stripe\Service\AbstractService
/**
* Lists all available Climate product objects.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Climate\Product>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class ProductService extends \Stripe\Service\AbstractService
* Retrieves the details of a Climate product with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Climate\Product
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Climate;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SupplierService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class SupplierService extends \Stripe\Service\AbstractService
/**
* Lists all available Climate supplier objects.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Climate\Supplier>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class SupplierService extends \Stripe\Service\AbstractService
* Retrieves a Climate supplier object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Climate\Supplier
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ConfirmationTokenService extends \Stripe\Service\AbstractService
class ConfirmationTokenService extends AbstractService
{
/**
* Retrieves an existing ConfirmationToken object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ConfirmationToken
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -37,6 +37,7 @@ namespace Stripe\Service;
* @property Forwarding\ForwardingServiceFactory $forwarding
* @property Identity\IdentityServiceFactory $identity
* @property InvoiceItemService $invoiceItems
* @property InvoicePaymentService $invoicePayments
* @property InvoiceRenderingTemplateService $invoiceRenderingTemplates
* @property InvoiceService $invoices
* @property Issuing\IssuingServiceFactory $issuing
@@ -78,7 +79,7 @@ namespace Stripe\Service;
* @property WebhookEndpointService $webhookEndpoints
* // Doc: The end of the section generated from our OpenAPI spec
*/
class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
class CoreServiceFactory extends AbstractServiceFactory
{
/**
* @var array<string, string>
@@ -116,6 +117,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'forwarding' => Forwarding\ForwardingServiceFactory::class,
'identity' => Identity\IdentityServiceFactory::class,
'invoiceItems' => InvoiceItemService::class,
'invoicePayments' => InvoicePaymentService::class,
'invoiceRenderingTemplates' => InvoiceRenderingTemplateService::class,
'invoices' => InvoiceService::class,
'issuing' => Issuing\IssuingServiceFactory::class,

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CountrySpecService extends \Stripe\Service\AbstractService
class CountrySpecService extends AbstractService
{
/**
* Lists all Country Spec objects available in the API.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\CountrySpec>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class CountrySpecService extends \Stripe\Service\AbstractService
* Returns a Country Spec for a given Country code.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CountrySpec
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CouponService extends \Stripe\Service\AbstractService
class CouponService extends AbstractService
{
/**
* Returns a list of your coupons.
*
* @param null|array $params
* @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Coupon>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -41,12 +42,12 @@ class CouponService extends \Stripe\Service\AbstractService
* a coupon with an <code>amount_off</code> of <amount>200</amount> is applied to
* it.
*
* @param null|array $params
* @param null|array{amount_off?: int, applies_to?: array{products?: string[]}, currency?: string, currency_options?: array<string, array{amount_off: int}>, duration?: string, duration_in_months?: int, expand?: string[], id?: string, max_redemptions?: int, metadata?: null|array<string, string>, name?: string, percent_off?: float, redeem_by?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Coupon
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -64,9 +65,9 @@ class CouponService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Coupon
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -77,12 +78,12 @@ class CouponService extends \Stripe\Service\AbstractService
* Retrieves the coupon with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Coupon
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -94,12 +95,12 @@ class CouponService extends \Stripe\Service\AbstractService
* amount_off) are, by design, not editable.
*
* @param string $id
* @param null|array $params
* @param null|array{currency_options?: array<string, array{amount_off: int}>, expand?: string[], metadata?: null|array<string, string>, name?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Coupon
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CreditNoteService extends \Stripe\Service\AbstractService
class CreditNoteService extends AbstractService
{
/**
* Returns a list of credit notes.
*
* @param null|array $params
* @param null|array{created?: array|int, customer?: string, ending_before?: string, expand?: string[], invoice?: string, limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\CreditNote>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* retrieve the full (paginated) list of line items.
*
* @param string $parentId
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\CreditNoteLineItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allLines($parentId, $params = null, $opts = null)
{
@@ -48,7 +49,7 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* <code>status=open</code> invoice, a credit note reduces its
* <code>amount_due</code>. For a <code>status=paid</code> invoice, a credit note
* does not affect its <code>amount_due</code>. Instead, it can result in any
* combination of the following:.
* combination of the following:
*
* <ul> <li>Refund: create a new refund (using <code>refund_amount</code>) or link
* an existing refund (using <code>refund</code>).</li> <li>Customer balance
@@ -65,12 +66,12 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* <code>post_payment_credit_notes_amount</code> depending on its
* <code>status</code> at the time of credit note creation.
*
* @param null|array $params
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, refund?: string}[], shipping_cost?: array{shipping_rate?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CreditNote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -80,12 +81,12 @@ class CreditNoteService extends \Stripe\Service\AbstractService
/**
* Get a preview of a credit note without creating it.
*
* @param null|array $params
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, refund?: string}[], shipping_cost?: array{shipping_rate?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CreditNote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function preview($params = null, $opts = null)
{
@@ -97,12 +98,12 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* property containing the first handful of those items. This URL you can retrieve
* the full (paginated) list of line items.
*
* @param null|array $params
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, ending_before?: string, expand?: string[], invoice: string, limit?: int, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, refund?: string}[], shipping_cost?: array{shipping_rate?: string}, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\CreditNoteLineItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function previewLines($params = null, $opts = null)
{
@@ -113,12 +114,12 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* Retrieves the credit note object with the given identifier.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CreditNote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -129,12 +130,12 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* Updates an existing credit note.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], memo?: string, metadata?: array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CreditNote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{
@@ -146,12 +147,12 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* href="/docs/billing/invoices/credit-notes#voiding">voiding credit notes</a>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CreditNote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function voidCreditNote($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CustomerService extends \Stripe\Service\AbstractService
class CustomerService extends AbstractService
{
/**
* Returns a list of your customers. The customers are returned sorted by creation
* date, with the most recent customers appearing first.
*
* @param null|array $params
* @param null|array{created?: array|int, email?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, test_clock?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Customer>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* href="/docs/billing/customer/balance">balances</a>.
*
* @param string $parentId
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\CustomerBalanceTransaction>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allBalanceTransactions($parentId, $params = null, $opts = null)
{
@@ -48,12 +49,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* href="/docs/payments/customer-balance">cash balance</a>.
*
* @param string $parentId
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\CustomerCashBalanceTransaction>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allCashBalanceTransactions($parentId, $params = null, $opts = null)
{
@@ -64,12 +65,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* Returns a list of PaymentMethods for a given Customer.
*
* @param string $id
* @param null|array $params
* @param null|array{allow_redisplay?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\PaymentMethod>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allPaymentMethods($id, $params = null, $opts = null)
{
@@ -80,12 +81,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* List sources for a specified customer.
*
* @param string $parentId
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, object?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allSources($parentId, $params = null, $opts = null)
{
@@ -96,12 +97,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* Returns a list of tax IDs for a customer.
*
* @param string $parentId
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\TaxId>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allTaxIds($parentId, $params = null, $opts = null)
{
@@ -111,12 +112,12 @@ class CustomerService extends \Stripe\Service\AbstractService
/**
* Creates a new customer object.
*
* @param null|array $params
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, description?: string, email?: string, expand?: string[], invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, payment_method?: string, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, tax_id_data?: array{type: string, value: string}[], test_clock?: string, validate?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Customer
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -128,12 +129,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* href="/docs/billing/customer/balance">balance</a>.
*
* @param string $parentId
* @param null|array $params
* @param null|array{amount: int, currency: string, description?: string, expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CustomerBalanceTransaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function createBalanceTransaction($parentId, $params = null, $opts = null)
{
@@ -148,12 +149,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* the same funding instructions each time.
*
* @param string $id
* @param null|array $params
* @param null|array{bank_transfer: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, currency: string, expand?: string[], funding_type: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FundingInstructions
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function createFundingInstructions($id, $params = null, $opts = null)
{
@@ -170,12 +171,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* customer</a> to have a new <code>default_source</code>.
*
* @param string $parentId
* @param null|array $params
* @param null|array{expand?: string[], metadata?: array<string, string>, source: string, validate?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function createSource($parentId, $params = null, $opts = null)
{
@@ -186,12 +187,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* Creates a new <code>tax_id</code> object for a customer.
*
* @param string $parentId
* @param null|array $params
* @param null|array{expand?: string[], type: string, value: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxId
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function createTaxId($parentId, $params = null, $opts = null)
{
@@ -206,9 +207,9 @@ class CustomerService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Customer
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -222,9 +223,9 @@ class CustomerService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Discount
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deleteDiscount($id, $params = null, $opts = null)
{
@@ -236,12 +237,12 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deleteSource($parentId, $id, $params = null, $opts = null)
{
@@ -256,9 +257,9 @@ class CustomerService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxId
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deleteTaxId($parentId, $id, $params = null, $opts = null)
{
@@ -269,12 +270,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* Retrieves a Customer object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Customer
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -287,12 +288,12 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CustomerBalanceTransaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieveBalanceTransaction($parentId, $id, $params = null, $opts = null)
{
@@ -303,12 +304,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* Retrieves a customers cash balance.
*
* @param string $parentId
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CashBalance
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieveCashBalance($parentId, $params = null, $opts = null)
{
@@ -321,12 +322,12 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CustomerCashBalanceTransaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieveCashBalanceTransaction($parentId, $id, $params = null, $opts = null)
{
@@ -338,12 +339,12 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethod
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrievePaymentMethod($parentId, $id, $params = null, $opts = null)
{
@@ -355,12 +356,12 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieveSource($parentId, $id, $params = null, $opts = null)
{
@@ -372,12 +373,12 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxId
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieveTaxId($parentId, $id, $params = null, $opts = null)
{
@@ -392,12 +393,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* Occasionally, propagation of new or updated data can be up to an hour behind
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
* @param null|array{expand?: string[], limit?: int, page?: string, query: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SearchResult<\Stripe\Customer>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function search($params = null, $opts = null)
{
@@ -420,12 +421,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* This request accepts mostly the same arguments as the customer creation call.
*
* @param string $id
* @param null|array $params
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, default_source?: string, description?: string, email?: string, expand?: string[], invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, validate?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Customer
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{
@@ -438,12 +439,12 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{description?: string, expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CustomerBalanceTransaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function updateBalanceTransaction($parentId, $id, $params = null, $opts = null)
{
@@ -454,12 +455,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* Changes the settings on a customers cash balance.
*
* @param string $parentId
* @param null|array $params
* @param null|array{expand?: string[], settings?: array{reconciliation_mode?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CashBalance
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function updateCashBalance($parentId, $params = null, $opts = null)
{
@@ -471,12 +472,12 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{account_holder_name?: string, account_holder_type?: string, address_city?: string, address_country?: string, address_line1?: string, address_line2?: string, address_state?: string, address_zip?: string, exp_month?: string, exp_year?: string, expand?: string[], metadata?: null|array<string, string>, name?: string, owner?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function updateSource($parentId, $id, $params = null, $opts = null)
{
@@ -488,12 +489,12 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{amounts?: int[], expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function verifySource($parentId, $id, $params = null, $opts = null)
{

View File

@@ -6,21 +6,22 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CustomerSessionService extends \Stripe\Service\AbstractService
class CustomerSessionService extends AbstractService
{
/**
* Creates a Customer Session object that includes a single-use client secret that
* you can use on your front-end to grant client-side API access for certain
* customer resources.
*
* @param null|array $params
* @param null|array{components: array{buy_button?: array{enabled: bool}, payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_redisplay_limit?: int, payment_method_remove?: string, payment_method_save?: string, payment_method_save_usage?: string}}, pricing_table?: array{enabled: bool}}, customer: string, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CustomerSession
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class DisputeService extends \Stripe\Service\AbstractService
class DisputeService extends AbstractService
{
/**
* Returns a list of your disputes.
*
* @param null|array $params
* @param null|array{charge?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, payment_intent?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Dispute>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -33,12 +34,12 @@ class DisputeService extends \Stripe\Service\AbstractService
* <code>lost</code>. <em>Closing a dispute is irreversible</em>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Dispute
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function close($id, $params = null, $opts = null)
{
@@ -49,12 +50,12 @@ class DisputeService extends \Stripe\Service\AbstractService
* Retrieves the dispute with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Dispute
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -73,12 +74,12 @@ class DisputeService extends \Stripe\Service\AbstractService
* see our <a href="/docs/disputes/categories">guide to dispute types</a>.
*
* @param string $id
* @param null|array $params
* @param null|array{evidence?: array{access_activity_log?: string, billing_address?: string, cancellation_policy?: string, cancellation_policy_disclosure?: string, cancellation_rebuttal?: string, customer_communication?: string, customer_email_address?: string, customer_name?: string, customer_purchase_ip?: string, customer_signature?: string, duplicate_charge_documentation?: string, duplicate_charge_explanation?: string, duplicate_charge_id?: string, enhanced_evidence?: null|array{visa_compelling_evidence_3?: array{disputed_transaction?: array{customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, merchandise_or_services?: string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}}, prior_undisputed_transactions?: (array{charge: string, customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}})[]}, visa_compliance?: array{fee_acknowledged?: bool}}, product_description?: string, receipt?: string, refund_policy?: string, refund_policy_disclosure?: string, refund_refusal_explanation?: string, service_date?: string, service_documentation?: string, shipping_address?: string, shipping_carrier?: string, shipping_date?: string, shipping_documentation?: string, shipping_tracking_number?: string, uncategorized_file?: string, uncategorized_text?: string}, expand?: string[], metadata?: null|array<string, string>, submit?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Dispute
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Entitlements;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ActiveEntitlementService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class ActiveEntitlementService extends \Stripe\Service\AbstractService
/**
* Retrieve a list of active entitlements for a customer.
*
* @param null|array $params
* @param null|array{customer: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Entitlements\ActiveEntitlement>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class ActiveEntitlementService extends \Stripe\Service\AbstractService
* Retrieve an active entitlement.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Entitlements\ActiveEntitlement
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Entitlements;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class FeatureService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class FeatureService extends \Stripe\Service\AbstractService
/**
* Retrieve a list of features.
*
* @param null|array $params
* @param null|array{archived?: bool, ending_before?: string, expand?: string[], limit?: int, lookup_key?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Entitlements\Feature>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class FeatureService extends \Stripe\Service\AbstractService
/**
* Creates a feature.
*
* @param null|array $params
* @param null|array{expand?: string[], lookup_key: string, metadata?: array<string, string>, name: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Entitlements\Feature
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class FeatureService extends \Stripe\Service\AbstractService
* Retrieves a feature.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Entitlements\Feature
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -60,12 +61,12 @@ class FeatureService extends \Stripe\Service\AbstractService
* Update a features metadata or permanently deactivate it.
*
* @param string $id
* @param null|array $params
* @param null|array{active?: bool, expand?: string[], metadata?: null|array<string, string>, name?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Entitlements\Feature
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class EphemeralKeyService extends \Stripe\Service\AbstractService
class EphemeralKeyService extends AbstractService
{
/**
* Invalidates a short-lived API key for a given resource.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\EphemeralKey
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -32,9 +33,9 @@ class EphemeralKeyService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\EphemeralKey
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{

View File

@@ -6,9 +6,10 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class EventService extends \Stripe\Service\AbstractService
class EventService extends AbstractService
{
/**
* List events, going back up to 30 days. Each event data is rendered according to
@@ -17,12 +18,12 @@ class EventService extends \Stripe\Service\AbstractService
* <code>api_version</code> attribute (not according to your current Stripe API
* version or <code>Stripe-Version</code> header).
*
* @param null|array $params
* @param null|array{created?: array|int, delivery_success?: bool, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, type?: string, types?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Event>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -34,12 +35,12 @@ class EventService extends \Stripe\Service\AbstractService
* the unique identifier of the event, which you might have received in a webhook.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Event
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ExchangeRateService extends \Stripe\Service\AbstractService
class ExchangeRateService extends AbstractService
{
/**
* Returns a list of objects that contain the rates at which foreign currencies are
* converted to one another. Only shows the currencies for which Stripe supports.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\ExchangeRate>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class ExchangeRateService extends \Stripe\Service\AbstractService
* currency.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ExchangeRate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class FileLinkService extends \Stripe\Service\AbstractService
class FileLinkService extends AbstractService
{
/**
* Returns a list of file links.
*
* @param null|array $params
* @param null|array{created?: array|int, ending_before?: string, expand?: string[], expired?: bool, file?: string, limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\FileLink>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class FileLinkService extends \Stripe\Service\AbstractService
/**
* Creates a new file link object.
*
* @param null|array $params
* @param null|array{expand?: string[], expires_at?: int, file: string, metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FileLink
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class FileLinkService extends \Stripe\Service\AbstractService
* Retrieves the file link with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FileLink
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -60,12 +61,12 @@ class FileLinkService extends \Stripe\Service\AbstractService
* Updates an existing file link object. Expired links can no longer be updated.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], expires_at?: null|array|int|string, metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FileLink
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,21 +6,22 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class FileService extends \Stripe\Service\AbstractService
class FileService extends AbstractService
{
/**
* Returns a list of the files that your account has access to. Stripe sorts and
* returns the files by their creation dates, placing the most recently created
* files at the top.
*
* @param null|array $params
* @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, purpose?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\File>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -33,12 +34,12 @@ class FileService extends \Stripe\Service\AbstractService
* href="/docs/file-upload#download-file-contents">access file contents</a>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\File
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\FinancialConnections;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class AccountService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class AccountService extends \Stripe\Service\AbstractService
/**
* Returns a list of Financial Connections <code>Account</code> objects.
*
* @param null|array $params
* @param null|array{account_holder?: array{account?: string, customer?: string}, ending_before?: string, expand?: string[], limit?: int, session?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\FinancialConnections\Account>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class AccountService extends \Stripe\Service\AbstractService
* Lists all owners for a given <code>Account</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, ownership: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\FinancialConnections\AccountOwner>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allOwners($id, $params = null, $opts = null)
{
@@ -47,12 +48,12 @@ class AccountService extends \Stripe\Service\AbstractService
* transactions).
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FinancialConnections\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function disconnect($id, $params = null, $opts = null)
{
@@ -63,12 +64,12 @@ class AccountService extends \Stripe\Service\AbstractService
* Refreshes the data associated with a Financial Connections <code>Account</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], features: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FinancialConnections\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function refresh($id, $params = null, $opts = null)
{
@@ -79,12 +80,12 @@ class AccountService extends \Stripe\Service\AbstractService
* Retrieves the details of an Financial Connections <code>Account</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FinancialConnections\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -96,12 +97,12 @@ class AccountService extends \Stripe\Service\AbstractService
* <code>Account</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], features: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FinancialConnections\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function subscribe($id, $params = null, $opts = null)
{
@@ -113,12 +114,12 @@ class AccountService extends \Stripe\Service\AbstractService
* Connections <code>Account</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], features: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FinancialConnections\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function unsubscribe($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\FinancialConnections;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SessionService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class SessionService extends \Stripe\Service\AbstractService
* <code>Session</code>. The sessions <code>client_secret</code> can be used to
* launch the flow using Stripe.js.
*
* @param null|array $params
* @param null|array{account_holder: array{account?: string, customer?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[]}, permissions: string[], prefetch?: string[], return_url?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FinancialConnections\Session
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class SessionService extends \Stripe\Service\AbstractService
* Retrieves the details of a Financial Connections <code>Session</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FinancialConnections\Session
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\FinancialConnections;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class TransactionService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class TransactionService extends \Stripe\Service\AbstractService
/**
* Returns a list of Financial Connections <code>Transaction</code> objects.
*
* @param null|array $params
* @param null|array{account: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, transacted_at?: array|int, transaction_refresh?: array{after: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\FinancialConnections\Transaction>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class TransactionService extends \Stripe\Service\AbstractService
* Retrieves the details of a Financial Connections <code>Transaction</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FinancialConnections\Transaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Forwarding;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class RequestService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class RequestService extends \Stripe\Service\AbstractService
/**
* Lists all ForwardingRequest objects.
*
* @param null|array $params
* @param null|array{created?: array{gt?: int, gte?: int, lt?: int, lte?: int}, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Forwarding\Request>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class RequestService extends \Stripe\Service\AbstractService
/**
* Creates a ForwardingRequest object.
*
* @param null|array $params
* @param null|array{expand?: string[], metadata?: array<string, string>, payment_method: string, replacements: string[], request: array{body?: string, headers?: array{name: string, value: string}[]}, url: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Forwarding\Request
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class RequestService extends \Stripe\Service\AbstractService
* Retrieves a ForwardingRequest object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Forwarding\Request
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Identity;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class VerificationReportService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class VerificationReportService extends \Stripe\Service\AbstractService
/**
* List all verification reports.
*
* @param null|array $params
* @param null|array{client_reference_id?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, type?: string, verification_session?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Identity\VerificationReport>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class VerificationReportService extends \Stripe\Service\AbstractService
* Retrieves an existing VerificationReport.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Identity\VerificationReport
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Identity;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class VerificationSessionService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class VerificationSessionService extends \Stripe\Service\AbstractService
/**
* Returns a list of VerificationSessions.
*
* @param null|array $params
* @param null|array{client_reference_id?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, related_customer?: string, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Identity\VerificationSession>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -34,12 +35,12 @@ class VerificationSessionService extends \Stripe\Service\AbstractService
* <a href="/docs/identity/verification-sessions#cancel">Learn more</a>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Identity\VerificationSession
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function cancel($id, $params = null, $opts = null)
{
@@ -59,12 +60,12 @@ class VerificationSessionService extends \Stripe\Service\AbstractService
* Related guide: <a href="/docs/identity/verify-identity-documents">Verify your
* users identity documents</a>
*
* @param null|array $params
* @param null|array{client_reference_id?: string, expand?: string[], metadata?: array<string, string>, options?: array{document?: null|array{allowed_types?: string[], require_id_number?: bool, require_live_capture?: bool, require_matching_selfie?: bool}}, provided_details?: array{email?: string, phone?: string}, related_customer?: string, return_url?: string, type?: string, verification_flow?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Identity\VerificationSession
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -97,12 +98,12 @@ class VerificationSessionService extends \Stripe\Service\AbstractService
* <a href="/docs/identity/verification-sessions#redact">Learn more</a>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Identity\VerificationSession
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function redact($id, $params = null, $opts = null)
{
@@ -117,12 +118,12 @@ class VerificationSessionService extends \Stripe\Service\AbstractService
* re-submission.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Identity\VerificationSession
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -136,12 +137,12 @@ class VerificationSessionService extends \Stripe\Service\AbstractService
* to update the verification check and options.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], metadata?: array<string, string>, options?: array{document?: null|array{allowed_types?: string[], require_id_number?: bool, require_live_capture?: bool, require_matching_selfie?: bool}}, provided_details?: array{email?: string, phone?: string}, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Identity\VerificationSession
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class InvoiceItemService extends \Stripe\Service\AbstractService
class InvoiceItemService extends AbstractService
{
/**
* Returns a list of your invoice items. Invoice items are returned sorted by
* creation date, with the most recently created invoice items appearing first.
*
* @param null|array $params
* @param null|array{created?: array|int, customer?: string, ending_before?: string, expand?: string[], invoice?: string, limit?: int, pending?: bool, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\InvoiceItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class InvoiceItemService extends \Stripe\Service\AbstractService
* no invoice is specified, the item will be on the next invoice created for the
* customer specified.
*
* @param null|array $params
* @param null|array{amount?: int, currency?: string, customer: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, subscription?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: string[], unit_amount_decimal?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -52,9 +53,9 @@ class InvoiceItemService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -65,12 +66,12 @@ class InvoiceItemService extends \Stripe\Service\AbstractService
* Retrieves the invoice item with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -83,12 +84,12 @@ class InvoiceItemService extends \Stripe\Service\AbstractService
* closed.
*
* @param string $id
* @param null|array $params
* @param null|array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount_decimal?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -0,0 +1,46 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class InvoicePaymentService extends AbstractService
{
/**
* When retrieving an invoice, there is an includable payments property containing
* the first handful of those items. There is also a URL where you can retrieve the
* full (paginated) list of payments.
*
* @param null|array{ending_before?: string, expand?: string[], invoice?: string, limit?: int, payment?: array{payment_intent?: string, type: string}, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\Collection<\Stripe\InvoicePayment>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/invoice_payments', $params, $opts);
}
/**
* Retrieves the invoice payment with the given ID.
*
* @param string $id
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\InvoicePayment
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/invoice_payments/%s', $id), $params, $opts);
}
}

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class InvoiceRenderingTemplateService extends \Stripe\Service\AbstractService
class InvoiceRenderingTemplateService extends AbstractService
{
/**
* List all templates, ordered by creation date, with the most recently created
* template appearing first.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\InvoiceRenderingTemplate>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -33,12 +34,12 @@ class InvoiceRenderingTemplateService extends \Stripe\Service\AbstractService
* object, it will continue to be applied on invoices generated by it.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function archive($id, $params = null, $opts = null)
{
@@ -51,12 +52,12 @@ class InvoiceRenderingTemplateService extends \Stripe\Service\AbstractService
* previous versions.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], version?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -68,12 +69,12 @@ class InvoiceRenderingTemplateService extends \Stripe\Service\AbstractService
* again.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function unarchive($id, $params = null, $opts = null)
{

View File

@@ -6,21 +6,22 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class InvoiceService extends \Stripe\Service\AbstractService
class InvoiceService extends AbstractService
{
/**
* Adds multiple line items to an invoice. This is only possible when an invoice is
* still a draft.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], invoice_metadata?: null|array<string, string>, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoice_item?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]})[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function addLines($id, $params = null, $opts = null)
{
@@ -32,12 +33,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* invoices are returned sorted by creation date, with the most recently created
* invoices appearing first.
*
* @param null|array $params
* @param null|array{collection_method?: string, created?: array|int, customer?: string, due_date?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string, subscription?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Invoice>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -51,12 +52,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* items.
*
* @param string $parentId
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\InvoiceLineItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allLines($parentId, $params = null, $opts = null)
{
@@ -69,12 +70,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* allows you to <a href="#pay_invoice">pay</a> or <a href="#send_invoice">send</a>
* the invoice to your customers.
*
* @param null|array $params
* @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, currency?: string, custom_fields?: null|array{name: string, value: string}[], customer?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: int, expand?: string[], footer?: string, from_invoice?: array{action: string, invoice: string}, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, number?: string, on_behalf_of?: string, payment_settings?: array{default_mandate?: null|string, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[]}, pending_invoice_items_behavior?: string, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array<string, array{amount: int, tax_behavior?: string}>}, metadata?: array<string, string>, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, subscription?: string, transfer_data?: array{amount?: int, destination: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -82,10 +83,10 @@ class InvoiceService extends \Stripe\Service\AbstractService
}
/**
* At any time, you can preview the upcoming invoice for a customer. This will show
* you all the charges that are pending, including subscription renewal charges,
* invoice item charges, etc. It will also show you any discounts that are
* applicable to the invoice.
* At any time, you can preview the upcoming invoice for a subscription or
* subscription schedule. This will show you all the charges that are pending,
* including subscription renewal charges, invoice item charges, etc. It will also
* show you any discounts that are applicable to the invoice.
*
* Note that when you are viewing an upcoming invoice, you are simply viewing a
* preview the invoice has not yet been created. As such, the upcoming invoice
@@ -108,12 +109,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* invoice creation. <a href="https://docs.stripe.com/currencies/conversions">Learn
* more</a>
*
* @param null|array $params
* @param null|array{automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, currency?: string, customer?: string, customer_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, tax?: array{ip_address?: null|string}, tax_exempt?: null|string, tax_ids?: array{type: string, value: string}[]}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_items?: (array{amount?: int, currency?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoiceitem?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount?: int, unit_amount_decimal?: string})[], issuer?: array{account?: string, type: string}, on_behalf_of?: null|string, preview_mode?: string, schedule?: string, schedule_details?: array{end_behavior?: string, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], iterations?: int, metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string}, subscription?: string, subscription_details?: array{billing_cycle_anchor?: array|int|string, cancel_at?: null|int, cancel_at_period_end?: bool, cancel_now?: bool, default_tax_rates?: null|string[], items?: (array{clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], proration_behavior?: string, proration_date?: int, resume_at?: string, start_date?: int, trial_end?: array|int|string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function createPreview($params = null, $opts = null)
{
@@ -130,9 +131,9 @@ class InvoiceService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -145,12 +146,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* do so using this method.
*
* @param string $id
* @param null|array $params
* @param null|array{auto_advance?: bool, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function finalizeInvoice($id, $params = null, $opts = null)
{
@@ -162,12 +163,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* that can be written off for accounting purposes.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function markUncollectible($id, $params = null, $opts = null)
{
@@ -182,12 +183,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* normal collection schedule or for some other reason, you can do so.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], forgive?: bool, mandate?: null|string, off_session?: bool, paid_out_of_band?: bool, payment_method?: string, source?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function pay($id, $params = null, $opts = null)
{
@@ -199,12 +200,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* invoice is still a draft.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], invoice_metadata?: null|array<string, string>, lines: array{behavior: string, id: string}[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function removeLines($id, $params = null, $opts = null)
{
@@ -215,12 +216,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* Retrieves the invoice with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -235,12 +236,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* Occasionally, propagation of new or updated data can be up to an hour behind
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
* @param null|array{expand?: string[], limit?: int, page?: string, query: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SearchResult<\Stripe\Invoice>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function search($params = null, $opts = null)
{
@@ -258,75 +259,18 @@ class InvoiceService extends \Stripe\Service\AbstractService
* <code>invoice.sent</code> event.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function sendInvoice($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoices/%s/send', $id), $params, $opts);
}
/**
* At any time, you can preview the upcoming invoice for a customer. This will show
* you all the charges that are pending, including subscription renewal charges,
* invoice item charges, etc. It will also show you any discounts that are
* applicable to the invoice.
*
* Note that when you are viewing an upcoming invoice, you are simply viewing a
* preview the invoice has not yet been created. As such, the upcoming invoice
* will not show up in invoice listing calls, and you cannot use the API to pay or
* edit the invoice. If you want to change the amount that your customer will be
* billed, you can add, remove, or update pending invoice items, or update the
* customers discount.
*
* You can preview the effects of updating a subscription, including a preview of
* what proration will take place. To ensure that the actual proration is
* calculated exactly the same as the previewed proration, you should pass the
* <code>subscription_details.proration_date</code> parameter when doing the actual
* subscription update. The recommended way to get only the prorations being
* previewed is to consider only proration line items where
* <code>period[start]</code> is equal to the
* <code>subscription_details.proration_date</code> value passed in the request.
*
* Note: Currency conversion calculations use the latest exchange rates. Exchange
* rates may vary between the time of the preview and the time of the actual
* invoice creation. <a href="https://docs.stripe.com/currencies/conversions">Learn
* more</a>
*
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*/
public function upcoming($params = null, $opts = null)
{
return $this->request('get', '/v1/invoices/upcoming', $params, $opts);
}
/**
* When retrieving an upcoming invoice, youll get a <strong>lines</strong>
* property containing the total count of line items and the first handful of those
* items. There is also a URL where you can retrieve the full (paginated) list of
* line items.
*
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\InvoiceLineItem>
*/
public function upcomingLines($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/invoices/upcoming/lines', $params, $opts);
}
/**
* Draft invoices are fully editable. Once an invoice is <a
* href="/docs/billing/invoices/workflow#finalized">finalized</a>, monetary values,
@@ -338,12 +282,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* invoices, pass <code>auto_advance=false</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: null|int, expand?: string[], footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, number?: null|string, on_behalf_of?: null|string, payment_settings?: array{default_mandate?: null|string, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[]}, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: null|array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array<string, array{amount: int, tax_behavior?: string}>}, metadata?: array<string, string>, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, transfer_data?: null|array{amount?: int, destination: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{
@@ -360,12 +304,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceLineItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function updateLine($parentId, $id, $params = null, $opts = null)
{
@@ -377,12 +321,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* is still a draft.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], invoice_metadata?: null|array<string, string>, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]})[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function updateLines($id, $params = null, $opts = null)
{
@@ -402,12 +346,12 @@ class InvoiceService extends \Stripe\Service\AbstractService
* consult with your legal counsel for advice specific to your business.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function voidInvoice($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class AuthorizationService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* sorted in descending order by creation date, with the most recently created
* object appearing first.
*
* @param null|array $params
* @param null|array{card?: string, cardholder?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\Authorization>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -38,12 +39,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* @deprecated this method is deprecated, please refer to the description for details
*
* @param string $id
* @param null|array $params
* @param null|array{amount?: int, expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function approve($id, $params = null, $opts = null)
{
@@ -61,12 +62,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* @deprecated this method is deprecated, please refer to the description for details
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function decline($id, $params = null, $opts = null)
{
@@ -77,12 +78,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* Retrieves an Issuing <code>Authorization</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -95,12 +96,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* unchanged.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CardService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class CardService extends \Stripe\Service\AbstractService
* descending order by creation date, with the most recently created object
* appearing first.
*
* @param null|array $params
* @param null|array{cardholder?: string, created?: array|int, ending_before?: string, exp_month?: int, exp_year?: int, expand?: string[], last4?: string, limit?: int, personalization_design?: string, starting_after?: string, status?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\Card>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class CardService extends \Stripe\Service\AbstractService
/**
* Creates an Issuing <code>Card</code> object.
*
* @param null|array $params
* @param null|array{cardholder?: string, currency: string, expand?: string[], financial_account?: string, metadata?: array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, replacement_for?: string, replacement_reason?: string, second_line?: null|string, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string, type: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -46,12 +47,12 @@ class CardService extends \Stripe\Service\AbstractService
* Retrieves an Issuing <code>Card</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -63,12 +64,12 @@ class CardService extends \Stripe\Service\AbstractService
* the parameters passed. Any parameters not provided will be left unchanged.
*
* @param string $id
* @param null|array $params
* @param null|array{cancellation_reason?: string, expand?: string[], metadata?: null|array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CardholderService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class CardholderService extends \Stripe\Service\AbstractService
* sorted in descending order by creation date, with the most recently created
* object appearing first.
*
* @param null|array $params
* @param null|array{created?: array|int, email?: string, ending_before?: string, expand?: string[], limit?: int, phone_number?: string, starting_after?: string, status?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\Cardholder>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class CardholderService extends \Stripe\Service\AbstractService
/**
* Creates a new Issuing <code>Cardholder</code> object that can be issued cards.
*
* @param null|array $params
* @param null|array{billing: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array<string, string>, name: string, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Cardholder
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -46,12 +47,12 @@ class CardholderService extends \Stripe\Service\AbstractService
* Retrieves an Issuing <code>Cardholder</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Cardholder
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -64,12 +65,12 @@ class CardholderService extends \Stripe\Service\AbstractService
* unchanged.
*
* @param string $id
* @param null|array $params
* @param null|array{billing?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array<string, string>, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Cardholder
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class DisputeService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class DisputeService extends \Stripe\Service\AbstractService
* in descending order by creation date, with the most recently created object
* appearing first.
*
* @param null|array $params
* @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string, transaction?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\Dispute>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -34,12 +35,12 @@ class DisputeService extends \Stripe\Service\AbstractService
* href="/docs/issuing/purchases/disputes#dispute-reasons-and-evidence">Dispute
* reasons and evidence</a> for more details about evidence requirements.
*
* @param null|array $params
* @param null|array{amount?: int, evidence?: array{canceled?: null|array{additional_documentation?: null|string, canceled_at?: null|int, cancellation_policy_provided?: null|bool, cancellation_reason?: null|string, expected_at?: null|int, explanation?: null|string, product_description?: null|string, product_type?: null|string, return_status?: null|string, returned_at?: null|int}, duplicate?: null|array{additional_documentation?: null|string, card_statement?: null|string, cash_receipt?: null|string, check_image?: null|string, explanation?: null|string, original_transaction?: string}, fraudulent?: null|array{additional_documentation?: null|string, explanation?: null|string}, merchandise_not_as_described?: null|array{additional_documentation?: null|string, explanation?: null|string, received_at?: null|int, return_description?: null|string, return_status?: null|string, returned_at?: null|int}, no_valid_authorization?: null|array{additional_documentation?: null|string, explanation?: null|string}, not_received?: null|array{additional_documentation?: null|string, expected_at?: null|int, explanation?: null|string, product_description?: null|string, product_type?: null|string}, other?: null|array{additional_documentation?: null|string, explanation?: null|string, product_description?: null|string, product_type?: null|string}, reason?: string, service_not_as_described?: null|array{additional_documentation?: null|string, canceled_at?: null|int, cancellation_reason?: null|string, explanation?: null|string, received_at?: null|int}}, expand?: string[], metadata?: array<string, string>, transaction?: string, treasury?: array{received_debit: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Dispute
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -50,12 +51,12 @@ class DisputeService extends \Stripe\Service\AbstractService
* Retrieves an Issuing <code>Dispute</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Dispute
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -70,12 +71,12 @@ class DisputeService extends \Stripe\Service\AbstractService
* reasons and evidence</a>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Dispute
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function submit($id, $params = null, $opts = null)
{
@@ -89,12 +90,12 @@ class DisputeService extends \Stripe\Service\AbstractService
* empty string.
*
* @param string $id
* @param null|array $params
* @param null|array{amount?: int, evidence?: array{canceled?: null|array{additional_documentation?: null|string, canceled_at?: null|int, cancellation_policy_provided?: null|bool, cancellation_reason?: null|string, expected_at?: null|int, explanation?: null|string, product_description?: null|string, product_type?: null|string, return_status?: null|string, returned_at?: null|int}, duplicate?: null|array{additional_documentation?: null|string, card_statement?: null|string, cash_receipt?: null|string, check_image?: null|string, explanation?: null|string, original_transaction?: string}, fraudulent?: null|array{additional_documentation?: null|string, explanation?: null|string}, merchandise_not_as_described?: null|array{additional_documentation?: null|string, explanation?: null|string, received_at?: null|int, return_description?: null|string, return_status?: null|string, returned_at?: null|int}, no_valid_authorization?: null|array{additional_documentation?: null|string, explanation?: null|string}, not_received?: null|array{additional_documentation?: null|string, expected_at?: null|int, explanation?: null|string, product_description?: null|string, product_type?: null|string}, other?: null|array{additional_documentation?: null|string, explanation?: null|string, product_description?: null|string, product_type?: null|string}, reason?: string, service_not_as_described?: null|array{additional_documentation?: null|string, canceled_at?: null|int, cancellation_reason?: null|string, explanation?: null|string, received_at?: null|int}}, expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Dispute
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PersonalizationDesignService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class PersonalizationDesignService extends \Stripe\Service\AbstractService
* descending order by creation date, with the most recently created object
* appearing first.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, lookup_keys?: string[], preferences?: array{is_default?: bool, is_platform_default?: bool}, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\PersonalizationDesign>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class PersonalizationDesignService extends \Stripe\Service\AbstractService
/**
* Creates a personalization design object.
*
* @param null|array $params
* @param null|array{card_logo?: string, carrier_text?: array{footer_body?: null|string, footer_title?: null|string, header_body?: null|string, header_title?: null|string}, expand?: string[], lookup_key?: string, metadata?: array<string, string>, name?: string, physical_bundle: string, preferences?: array{is_default: bool}, transfer_lookup_key?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -46,12 +47,12 @@ class PersonalizationDesignService extends \Stripe\Service\AbstractService
* Retrieves a personalization design object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -62,12 +63,12 @@ class PersonalizationDesignService extends \Stripe\Service\AbstractService
* Updates a card personalization object.
*
* @param string $id
* @param null|array $params
* @param null|array{card_logo?: null|string, carrier_text?: null|array{footer_body?: null|string, footer_title?: null|string, header_body?: null|string, header_title?: null|string}, expand?: string[], lookup_key?: null|string, metadata?: array<string, string>, name?: null|string, physical_bundle?: string, preferences?: array{is_default: bool}, transfer_lookup_key?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PhysicalBundleService extends \Stripe\Service\AbstractService
@@ -14,12 +15,12 @@ class PhysicalBundleService extends \Stripe\Service\AbstractService
* Returns a list of physical bundle objects. The objects are sorted in descending
* order by creation date, with the most recently created object appearing first.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\PhysicalBundle>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class PhysicalBundleService extends \Stripe\Service\AbstractService
* Retrieves a physical bundle object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PhysicalBundle
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class TokenService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class TokenService extends \Stripe\Service\AbstractService
/**
* Lists all Issuing <code>Token</code> objects for a given card.
*
* @param null|array $params
* @param null|array{card: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\Token>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class TokenService extends \Stripe\Service\AbstractService
* Retrieves an Issuing <code>Token</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Token
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -46,12 +47,12 @@ class TokenService extends \Stripe\Service\AbstractService
* specified.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], status: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Token
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class TransactionService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class TransactionService extends \Stripe\Service\AbstractService
* sorted in descending order by creation date, with the most recently created
* object appearing first.
*
* @param null|array $params
* @param null|array{card?: string, cardholder?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\Transaction>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class TransactionService extends \Stripe\Service\AbstractService
* Retrieves an Issuing <code>Transaction</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Transaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -49,12 +50,12 @@ class TransactionService extends \Stripe\Service\AbstractService
* unchanged.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Transaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class MandateService extends \Stripe\Service\AbstractService
class MandateService extends AbstractService
{
/**
* Retrieves a Mandate object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Mandate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -2,7 +2,7 @@
namespace Stripe\Service;
class OAuthService extends \Stripe\Service\AbstractService
class OAuthService extends AbstractService
{
/**
* Sends a request to Stripe's Connect API.
@@ -53,9 +53,9 @@ class OAuthService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|array $opts
*
* @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
*
* @return \Stripe\StripeObject object containing the response from the API
*
* @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
*/
public function token($params = null, $opts = null)
{
@@ -71,9 +71,9 @@ class OAuthService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|array $opts
*
* @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
*
* @return \Stripe\StripeObject object containing the response from the API
*
* @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
*/
public function deauthorize($params = null, $opts = null)
{
@@ -118,9 +118,9 @@ class OAuthService extends \Stripe\Service\AbstractService
/**
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
*
* @throws \Stripe\Exception\InvalidArgumentException
*
* @return \Stripe\Util\RequestOptions
*
* @throws \Stripe\Exception\InvalidArgumentException
*/
private function _parseOpts($opts)
{
@@ -143,8 +143,8 @@ class OAuthService extends \Stripe\Service\AbstractService
*/
private function _getBase($opts)
{
return isset($opts->apiBase) ?
$opts->apiBase :
$this->client->getConnectBase();
return isset($opts->apiBase)
? $opts->apiBase
: $this->client->getConnectBase();
}
}

File diff suppressed because one or more lines are too long

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PaymentLinkService extends \Stripe\Service\AbstractService
class PaymentLinkService extends AbstractService
{
/**
* Returns a list of your payment links.
*
* @param null|array $params
* @param null|array{active?: bool, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\PaymentLink>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -32,12 +33,12 @@ class PaymentLinkService extends \Stripe\Service\AbstractService
* line items.
*
* @param string $id
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\LineItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allLineItems($id, $params = null, $opts = null)
{
@@ -47,12 +48,12 @@ class PaymentLinkService extends \Stripe\Service\AbstractService
/**
* Creates a payment link.
*
* @param null|array $params
* @param null|array{after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, application_fee_amount?: int, application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string}}}, line_items: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], metadata?: array<string, string>, on_behalf_of?: string, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{capture_method?: string, description?: string, metadata?: array<string, string>, setup_future_usage?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_group?: string}, payment_method_collection?: string, payment_method_types?: string[], phone_number_collection?: array{enabled: bool}, restrictions?: array{completed_sessions: array{limit: int}}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string}[], submit_type?: string, subscription_data?: array{description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: array<string, string>, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}, transfer_data?: array{amount?: int, destination: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentLink
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -63,12 +64,12 @@ class PaymentLinkService extends \Stripe\Service\AbstractService
* Retrieve a payment link.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentLink
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -79,12 +80,12 @@ class PaymentLinkService extends \Stripe\Service\AbstractService
* Updates a payment link.
*
* @param string $id
* @param null|array $params
* @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: array<string, string>, payment_intent_data?: array{description?: null|string, metadata?: null|array<string, string>, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|array<string, string>, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentLink
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PaymentMethodConfigurationService extends \Stripe\Service\AbstractService
class PaymentMethodConfigurationService extends AbstractService
{
/**
* List payment method configurations.
*
* @param null|array $params
* @param null|array{application?: null|string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\PaymentMethodConfiguration>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class PaymentMethodConfigurationService extends \Stripe\Service\AbstractService
/**
* Creates a payment method configuration.
*
* @param null|array $params
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodConfiguration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class PaymentMethodConfigurationService extends \Stripe\Service\AbstractService
* Retrieve payment method configuration.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodConfiguration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -60,12 +61,12 @@ class PaymentMethodConfigurationService extends \Stripe\Service\AbstractService
* Update payment method configuration.
*
* @param string $id
* @param null|array $params
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodConfiguration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PaymentMethodDomainService extends \Stripe\Service\AbstractService
class PaymentMethodDomainService extends AbstractService
{
/**
* Lists the details of existing payment method domains.
*
* @param null|array $params
* @param null|array{domain_name?: string, enabled?: bool, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\PaymentMethodDomain>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class PaymentMethodDomainService extends \Stripe\Service\AbstractService
/**
* Creates a payment method domain.
*
* @param null|array $params
* @param null|array{domain_name: string, enabled?: bool, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodDomain
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class PaymentMethodDomainService extends \Stripe\Service\AbstractService
* Retrieves the details of an existing payment method domain.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodDomain
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -60,12 +61,12 @@ class PaymentMethodDomainService extends \Stripe\Service\AbstractService
* Updates an existing payment method domain.
*
* @param string $id
* @param null|array $params
* @param null|array{enabled?: bool, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodDomain
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{
@@ -73,26 +74,26 @@ class PaymentMethodDomainService extends \Stripe\Service\AbstractService
}
/**
* Some payment methods such as Apple Pay require additional steps to verify a
* domain. If the requirements werent satisfied when the domain was created, the
* payment method will be inactive on the domain. The payment method doesnt appear
* in Elements for this domain until it is active.
* Some payment methods might require additional steps to register a domain. If the
* requirements werent satisfied when the domain was created, the payment method
* will be inactive on the domain. The payment method doesnt appear in Elements or
* Embedded Checkout for this domain until it is active.
*
* To activate a payment method on an existing payment method domain, complete the
* required validation steps specific to the payment method, and then validate the
* payment method domain with this endpoint.
* required registration steps specific to the payment method, and then validate
* the payment method domain with this endpoint.
*
* Related guides: <a
* href="/docs/payments/payment-methods/pmd-registration">Payment method
* domains</a>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodDomain
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function validate($id, $params = null, $opts = null)
{

View File

@@ -6,9 +6,10 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PaymentMethodService extends \Stripe\Service\AbstractService
class PaymentMethodService extends AbstractService
{
/**
* Returns a list of PaymentMethods for Treasury flows. If you want to list the
@@ -16,12 +17,12 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
* href="/docs/api/payment_methods/customer_list">List a Customers
* PaymentMethods</a> API instead.
*
* @param null|array $params
* @param null|array{customer?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\PaymentMethod>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -49,12 +50,12 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
* on the Customer to the PaymentMethods ID.
*
* @param string $id
* @param null|array $params
* @param null|array{customer: string, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethod
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function attach($id, $params = null, $opts = null)
{
@@ -72,12 +73,12 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
* href="/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
* method details ahead of a future payment.
*
* @param null|array $params
* @param null|array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, card?: array{cvc?: string, exp_month?: int, exp_year?: int, networks?: array{preferred?: string}, number?: string, token?: string}, cashapp?: array{}, customer?: string, customer_balance?: array{}, eps?: array{bank?: string}, expand?: string[], fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, payment_method?: string, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type?: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethod
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -89,12 +90,12 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
* detached, it can no longer be used for a payment or re-attached to a Customer.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethod
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function detach($id, $params = null, $opts = null)
{
@@ -108,12 +109,12 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
* PaymentMethods</a>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethod
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -125,12 +126,12 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
* be updated.
*
* @param string $id
* @param null|array $params
* @param null|array{allow_redisplay?: string, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, card?: array{exp_month?: int, exp_year?: int, networks?: array{preferred?: null|string}}, expand?: string[], link?: array{}, metadata?: null|array<string, string>, pay_by_bank?: array{}, us_bank_account?: array{account_holder_type?: string, account_type?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethod
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,21 +6,22 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PayoutService extends \Stripe\Service\AbstractService
class PayoutService extends AbstractService
{
/**
* Returns a list of existing payouts sent to third-party bank accounts or payouts
* that Stripe sent to you. The payouts return in sorted order, with the most
* recently created payouts appearing first.
*
* @param null|array $params
* @param null|array{arrival_date?: array|int, created?: array|int, destination?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Payout>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -33,12 +34,12 @@ class PayoutService extends \Stripe\Service\AbstractService
* cant cancel automatic Stripe payouts.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Payout
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function cancel($id, $params = null, $opts = null)
{
@@ -58,12 +59,12 @@ class PayoutService extends \Stripe\Service\AbstractService
* from. The <a href="#balance_object">balance object</a> details available and
* pending amounts by source type.
*
* @param null|array $params
* @param null|array{amount: int, currency: string, description?: string, destination?: string, expand?: string[], metadata?: array<string, string>, method?: string, source_type?: string, statement_descriptor?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Payout
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -76,12 +77,12 @@ class PayoutService extends \Stripe\Service\AbstractService
* corresponding payout information.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Payout
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -99,12 +100,12 @@ class PayoutService extends \Stripe\Service\AbstractService
* the debit on the bank account and that no other authorization is required.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], metadata?: array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Payout
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function reverse($id, $params = null, $opts = null)
{
@@ -117,12 +118,12 @@ class PayoutService extends \Stripe\Service\AbstractService
* metadata as arguments.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Payout
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PlanService extends \Stripe\Service\AbstractService
class PlanService extends AbstractService
{
/**
* Returns a list of your plans.
*
* @param null|array $params
* @param null|array{active?: bool, created?: array|int, ending_before?: string, expand?: string[], limit?: int, product?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Plan>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class PlanService extends \Stripe\Service\AbstractService
* API</a>. It replaces the Plans API and is backwards compatible to simplify your
* migration.
*
* @param null|array $params
* @param null|array{active?: bool, amount?: int, amount_decimal?: string, billing_scheme?: string, currency: string, expand?: string[], id?: string, interval: string, interval_count?: int, metadata?: null|array<string, string>, meter?: string, nickname?: string, product?: array|string, tiers?: (array{flat_amount?: int, flat_amount_decimal?: string, unit_amount?: int, unit_amount_decimal?: string, up_to: array|int|string})[], tiers_mode?: string, transform_usage?: array{divide_by: int, round: string}, trial_period_days?: int, usage_type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Plan
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -50,9 +51,9 @@ class PlanService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Plan
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -63,12 +64,12 @@ class PlanService extends \Stripe\Service\AbstractService
* Retrieves the plan with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Plan
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -81,12 +82,12 @@ class PlanService extends \Stripe\Service\AbstractService
* plans ID, amount, currency, or billing cycle.
*
* @param string $id
* @param null|array $params
* @param null|array{active?: bool, expand?: string[], metadata?: null|array<string, string>, nickname?: string, product?: string, trial_period_days?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Plan
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,21 +6,22 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PriceService extends \Stripe\Service\AbstractService
class PriceService extends AbstractService
{
/**
* Returns a list of your active prices, excluding <a
* href="/docs/products-prices/pricing-models#inline-pricing">inline prices</a>.
* For the list of inactive prices, set <code>active</code> to false.
*
* @param null|array $params
* @param null|array{active?: bool, created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, lookup_keys?: string[], product?: string, recurring?: array{interval?: string, meter?: string, usage_type?: string}, starting_after?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Price>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,15 +29,16 @@ class PriceService extends \Stripe\Service\AbstractService
}
/**
* Creates a new price for an existing product. The price can be recurring or
* one-time.
* Creates a new <a href="https://docs.stripe.com/api/prices">Price</a> for an
* existing <a href="https://docs.stripe.com/api/products">Product</a>. The Price
* can be recurring or one-time.
*
* @param null|array $params
* @param null|array{active?: bool, billing_scheme?: string, currency: string, currency_options?: array<string, array{custom_unit_amount?: array{enabled: bool, maximum?: int, minimum?: int, preset?: int}, tax_behavior?: string, tiers?: (array{flat_amount?: int, flat_amount_decimal?: string, unit_amount?: int, unit_amount_decimal?: string, up_to: array|int|string})[], unit_amount?: int, unit_amount_decimal?: string}>, custom_unit_amount?: array{enabled: bool, maximum?: int, minimum?: int, preset?: int}, expand?: string[], lookup_key?: string, metadata?: array<string, string>, nickname?: string, product?: string, product_data?: array{active?: bool, id?: string, metadata?: array<string, string>, name: string, statement_descriptor?: string, tax_code?: string, unit_label?: string}, recurring?: array{interval: string, interval_count?: int, meter?: string, trial_period_days?: int, usage_type?: string}, tax_behavior?: string, tiers?: (array{flat_amount?: int, flat_amount_decimal?: string, unit_amount?: int, unit_amount_decimal?: string, up_to: array|int|string})[], tiers_mode?: string, transfer_lookup_key?: bool, transform_quantity?: array{divide_by: int, round: string}, unit_amount?: int, unit_amount_decimal?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Price
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -47,12 +49,12 @@ class PriceService extends \Stripe\Service\AbstractService
* Retrieves the price with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Price
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -67,12 +69,12 @@ class PriceService extends \Stripe\Service\AbstractService
* Occasionally, propagation of new or updated data can be up to an hour behind
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
* @param null|array{expand?: string[], limit?: int, page?: string, query: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SearchResult<\Stripe\Price>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function search($params = null, $opts = null)
{
@@ -84,12 +86,12 @@ class PriceService extends \Stripe\Service\AbstractService
* parameters not provided are left unchanged.
*
* @param string $id
* @param null|array $params
* @param null|array{active?: bool, currency_options?: null|array<string, array{custom_unit_amount?: array{enabled: bool, maximum?: int, minimum?: int, preset?: int}, tax_behavior?: string, tiers?: (array{flat_amount?: int, flat_amount_decimal?: string, unit_amount?: int, unit_amount_decimal?: string, up_to: array|int|string})[], unit_amount?: int, unit_amount_decimal?: string}>, expand?: string[], lookup_key?: string, metadata?: null|array<string, string>, nickname?: string, tax_behavior?: string, transfer_lookup_key?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Price
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ProductService extends \Stripe\Service\AbstractService
class ProductService extends AbstractService
{
/**
* Returns a list of your products. The products are returned sorted by creation
* date, with the most recently created products appearing first.
*
* @param null|array $params
* @param null|array{active?: bool, created?: array|int, ending_before?: string, expand?: string[], ids?: string[], limit?: int, shippable?: bool, starting_after?: string, type?: string, url?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Product>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class ProductService extends \Stripe\Service\AbstractService
* Retrieve a list of features for a product.
*
* @param string $parentId
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\ProductFeature>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allFeatures($parentId, $params = null, $opts = null)
{
@@ -45,12 +46,12 @@ class ProductService extends \Stripe\Service\AbstractService
/**
* Creates a new product object.
*
* @param null|array $params
* @param null|array{active?: bool, default_price_data?: array{currency: string, currency_options?: array<string, array{custom_unit_amount?: array{enabled: bool, maximum?: int, minimum?: int, preset?: int}, tax_behavior?: string, tiers?: (array{flat_amount?: int, flat_amount_decimal?: string, unit_amount?: int, unit_amount_decimal?: string, up_to: array|int|string})[], unit_amount?: int, unit_amount_decimal?: string}>, custom_unit_amount?: array{enabled: bool, maximum?: int, minimum?: int, preset?: int}, metadata?: array<string, string>, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, description?: string, expand?: string[], id?: string, images?: string[], marketing_features?: array{name: string}[], metadata?: array<string, string>, name: string, package_dimensions?: array{height: float, length: float, weight: float, width: float}, shippable?: bool, statement_descriptor?: string, tax_code?: string, type?: string, unit_label?: string, url?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Product
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -61,12 +62,12 @@ class ProductService extends \Stripe\Service\AbstractService
* Creates a product_feature, which represents a feature attachment to a product.
*
* @param string $parentId
* @param null|array $params
* @param null|array{entitlement_feature: string, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ProductFeature
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function createFeature($parentId, $params = null, $opts = null)
{
@@ -82,9 +83,9 @@ class ProductService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Product
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -99,9 +100,9 @@ class ProductService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ProductFeature
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deleteFeature($parentId, $id, $params = null, $opts = null)
{
@@ -114,12 +115,12 @@ class ProductService extends \Stripe\Service\AbstractService
* the corresponding product information.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Product
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -131,12 +132,12 @@ class ProductService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ProductFeature
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieveFeature($parentId, $id, $params = null, $opts = null)
{
@@ -151,12 +152,12 @@ class ProductService extends \Stripe\Service\AbstractService
* Occasionally, propagation of new or updated data can be up to an hour behind
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
* @param null|array{expand?: string[], limit?: int, page?: string, query: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SearchResult<\Stripe\Product>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function search($params = null, $opts = null)
{
@@ -168,12 +169,12 @@ class ProductService extends \Stripe\Service\AbstractService
* parameters not provided will be left unchanged.
*
* @param string $id
* @param null|array $params
* @param null|array{active?: bool, default_price?: string, description?: null|string, expand?: string[], images?: null|string[], marketing_features?: null|array{name: string}[], metadata?: null|array<string, string>, name?: string, package_dimensions?: null|array{height: float, length: float, weight: float, width: float}, shippable?: bool, statement_descriptor?: string, tax_code?: null|string, unit_label?: null|string, url?: null|string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Product
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PromotionCodeService extends \Stripe\Service\AbstractService
class PromotionCodeService extends AbstractService
{
/**
* Returns a list of your promotion codes.
*
* @param null|array $params
* @param null|array{active?: bool, code?: string, coupon?: string, created?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\PromotionCode>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class PromotionCodeService extends \Stripe\Service\AbstractService
* A promotion code points to a coupon. You can optionally restrict the code to a
* specific customer, redemption limit, and expiration date.
*
* @param null|array $params
* @param null|array{active?: bool, code?: string, coupon: string, customer?: string, expand?: string[], expires_at?: int, max_redemptions?: int, metadata?: array<string, string>, restrictions?: array{currency_options?: array<string, array{minimum_amount?: int}>, first_time_transaction?: bool, minimum_amount?: int, minimum_amount_currency?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PromotionCode
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -48,12 +49,12 @@ class PromotionCodeService extends \Stripe\Service\AbstractService
* <code>code</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PromotionCode
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -65,12 +66,12 @@ class PromotionCodeService extends \Stripe\Service\AbstractService
* passed. Most fields are, by design, not editable.
*
* @param string $id
* @param null|array $params
* @param null|array{active?: bool, expand?: string[], metadata?: null|array<string, string>, restrictions?: array{currency_options?: array<string, array{minimum_amount?: int}>}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PromotionCode
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class QuoteService extends \Stripe\Service\AbstractService
class QuoteService extends AbstractService
{
/**
* Accepts the specified quote.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Quote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function accept($id, $params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class QuoteService extends \Stripe\Service\AbstractService
/**
* Returns a list of your quotes.
*
* @param null|array $params
* @param null|array{customer?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string, test_clock?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Quote>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -48,12 +49,12 @@ class QuoteService extends \Stripe\Service\AbstractService
* you can retrieve the full (paginated) list of upfront line items.
*
* @param string $id
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\LineItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allComputedUpfrontLineItems($id, $params = null, $opts = null)
{
@@ -66,12 +67,12 @@ class QuoteService extends \Stripe\Service\AbstractService
* you can retrieve the full (paginated) list of line items.
*
* @param string $id
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\LineItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allLineItems($id, $params = null, $opts = null)
{
@@ -82,12 +83,12 @@ class QuoteService extends \Stripe\Service\AbstractService
* Cancels the quote.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Quote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function cancel($id, $params = null, $opts = null)
{
@@ -100,12 +101,12 @@ class QuoteService extends \Stripe\Service\AbstractService
* <code>expires_at</code> can be set in the dashboard via the <a
* href="https://dashboard.stripe.com/settings/billing/quote">quote template</a>.
*
* @param null|array $params
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, from_quote?: array{is_revision?: bool, quote: string}, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{description?: string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, test_clock?: string, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Quote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -116,12 +117,12 @@ class QuoteService extends \Stripe\Service\AbstractService
* Finalizes the quote.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], expires_at?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Quote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function finalizeQuote($id, $params = null, $opts = null)
{
@@ -134,12 +135,12 @@ class QuoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param callable $readBodyChunkCallable
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return mixed
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null)
{
@@ -155,12 +156,12 @@ class QuoteService extends \Stripe\Service\AbstractService
* Retrieves the quote with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Quote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -171,12 +172,12 @@ class QuoteService extends \Stripe\Service\AbstractService
* A quote models prices and services for a customer.
*
* @param string $id
* @param null|array $params
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{description?: null|string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Quote
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Radar;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class EarlyFraudWarningService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class EarlyFraudWarningService extends \Stripe\Service\AbstractService
/**
* Returns a list of early fraud warnings.
*
* @param null|array $params
* @param null|array{charge?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, payment_intent?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Radar\EarlyFraudWarning>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -33,12 +34,12 @@ class EarlyFraudWarningService extends \Stripe\Service\AbstractService
* warning</a> object reference for more details.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Radar\EarlyFraudWarning
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Radar;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ValueListItemService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class ValueListItemService extends \Stripe\Service\AbstractService
* descending order by creation date, with the most recently created object
* appearing first.
*
* @param null|array $params
* @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, value?: string, value_list: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Radar\ValueListItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class ValueListItemService extends \Stripe\Service\AbstractService
* Creates a new <code>ValueListItem</code> object, which is added to the specified
* parent value list.
*
* @param null|array $params
* @param null|array{expand?: string[], value: string, value_list: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Radar\ValueListItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -51,9 +52,9 @@ class ValueListItemService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Radar\ValueListItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -64,12 +65,12 @@ class ValueListItemService extends \Stripe\Service\AbstractService
* Retrieves a <code>ValueListItem</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Radar\ValueListItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Radar;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ValueListService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class ValueListService extends \Stripe\Service\AbstractService
* descending order by creation date, with the most recently created object
* appearing first.
*
* @param null|array $params
* @param null|array{alias?: string, contains?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Radar\ValueList>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class ValueListService extends \Stripe\Service\AbstractService
* Creates a new <code>ValueList</code> object, which can then be referenced in
* rules.
*
* @param null|array $params
* @param null|array{alias: string, expand?: string[], item_type?: string, metadata?: array<string, string>, name: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Radar\ValueList
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -52,9 +53,9 @@ class ValueListService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Radar\ValueList
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -65,12 +66,12 @@ class ValueListService extends \Stripe\Service\AbstractService
* Retrieves a <code>ValueList</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Radar\ValueList
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -83,12 +84,12 @@ class ValueListService extends \Stripe\Service\AbstractService
* <code>item_type</code> is immutable.
*
* @param string $id
* @param null|array $params
* @param null|array{alias?: string, expand?: string[], metadata?: array<string, string>, name?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Radar\ValueList
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,21 +6,22 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class RefundService extends \Stripe\Service\AbstractService
class RefundService extends AbstractService
{
/**
* Returns a list of all refunds you created. We return the refunds in sorted
* order, with the most recent refunds appearing first. The 10 most recent refunds
* are always available by default on the Charge object.
*
* @param null|array $params
* @param null|array{charge?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, payment_intent?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Refund>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -34,12 +35,12 @@ class RefundService extends \Stripe\Service\AbstractService
* require customer action can enter the <code>requires_action</code> state.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Refund
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function cancel($id, $params = null, $opts = null)
{
@@ -61,12 +62,12 @@ class RefundService extends \Stripe\Service\AbstractService
* an error when called on an already-refunded charge, or when trying to refund
* more money than is left on a charge.
*
* @param null|array $params
* @param null|array{amount?: int, charge?: string, currency?: string, customer?: string, expand?: string[], instructions_email?: string, metadata?: null|array<string, string>, origin?: string, payment_intent?: string, reason?: string, refund_application_fee?: bool, reverse_transfer?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Refund
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -77,12 +78,12 @@ class RefundService extends \Stripe\Service\AbstractService
* Retrieves the details of an existing refund.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Refund
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -96,12 +97,12 @@ class RefundService extends \Stripe\Service\AbstractService
* This request only accepts <code>metadata</code> as an argument.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Refund
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Reporting;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ReportRunService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class ReportRunService extends \Stripe\Service\AbstractService
/**
* Returns a list of Report Runs, with the most recent appearing first.
*
* @param null|array $params
* @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Reporting\ReportRun>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class ReportRunService extends \Stripe\Service\AbstractService
* Creates a new object and begin running the report. (Certain report types require
* a <a href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.).
*
* @param null|array $params
* @param null|array{expand?: string[], parameters?: array{columns?: string[], connected_account?: string, currency?: string, interval_end?: int, interval_start?: int, payout?: string, reporting_category?: string, timezone?: string}, report_type: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Reporting\ReportRun
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -45,12 +46,12 @@ class ReportRunService extends \Stripe\Service\AbstractService
* Retrieves the details of an existing Report Run.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Reporting\ReportRun
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Reporting;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ReportTypeService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class ReportTypeService extends \Stripe\Service\AbstractService
/**
* Returns a full list of Report Types.
*
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Reporting\ReportType>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class ReportTypeService extends \Stripe\Service\AbstractService
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.).
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Reporting\ReportType
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,21 +6,22 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ReviewService extends \Stripe\Service\AbstractService
class ReviewService extends AbstractService
{
/**
* Returns a list of <code>Review</code> objects that have <code>open</code> set to
* <code>true</code>. The objects are sorted in descending order by creation date,
* with the most recently created object appearing first.
*
* @param null|array $params
* @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Review>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -32,12 +33,12 @@ class ReviewService extends \Stripe\Service\AbstractService
* of reviews.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Review
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function approve($id, $params = null, $opts = null)
{
@@ -48,12 +49,12 @@ class ReviewService extends \Stripe\Service\AbstractService
* Retrieves a <code>Review</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Review
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SetupAttemptService extends \Stripe\Service\AbstractService
class SetupAttemptService extends AbstractService
{
/**
* Returns a list of SetupAttempts that associate with a provided SetupIntent.
*
* @param null|array $params
* @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, setup_intent: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\SetupAttempt>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SetupIntentService extends \Stripe\Service\AbstractService
class SetupIntentService extends AbstractService
{
/**
* Returns a list of SetupIntents.
*
* @param null|array $params
* @param null|array{attach_to_self?: bool, created?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, payment_method?: string, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\SetupIntent>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -36,12 +37,12 @@ class SetupIntentService extends \Stripe\Service\AbstractService
* instead.
*
* @param string $id
* @param null|array $params
* @param null|array{cancellation_reason?: string, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SetupIntent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function cancel($id, $params = null, $opts = null)
{
@@ -62,12 +63,12 @@ class SetupIntentService extends \Stripe\Service\AbstractService
* or the <code>canceled</code> status if the confirmation limit is reached.
*
* @param string $id
* @param null|array $params
* @param null|array{confirmation_token?: string, expand?: string[], mandate_data?: null|array{customer_acceptance?: array{accepted_at?: int, offline?: array{}, online?: array{ip_address?: string, user_agent?: string}, type: string}}, payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, return_url?: string, use_stripe_sdk?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SetupIntent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function confirm($id, $params = null, $opts = null)
{
@@ -81,12 +82,12 @@ class SetupIntentService extends \Stripe\Service\AbstractService
* href="/docs/api/setup_intents/confirm">confirm</a> it to collect any required
* permissions to charge the payment method later.
*
* @param null|array $params
* @param null|array{attach_to_self?: bool, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, confirm?: bool, confirmation_token?: string, customer?: string, description?: string, expand?: string[], flow_directions?: string[], mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: array<string, string>, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[], return_url?: string, single_use?: array{amount: int, currency: string}, usage?: string, use_stripe_sdk?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SetupIntent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -104,12 +105,12 @@ class SetupIntentService extends \Stripe\Service\AbstractService
* object reference for more details.
*
* @param string $id
* @param null|array $params
* @param null|array{client_secret?: string, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SetupIntent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -120,12 +121,12 @@ class SetupIntentService extends \Stripe\Service\AbstractService
* Updates a SetupIntent object.
*
* @param string $id
* @param null|array $params
* @param null|array{attach_to_self?: bool, customer?: string, description?: string, expand?: string[], flow_directions?: string[], metadata?: null|array<string, string>, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SetupIntent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{
@@ -136,12 +137,12 @@ class SetupIntentService extends \Stripe\Service\AbstractService
* Verifies microdeposits on a SetupIntent object.
*
* @param string $id
* @param null|array $params
* @param null|array{amounts?: int[], descriptor_code?: string, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SetupIntent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function verifyMicrodeposits($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ShippingRateService extends \Stripe\Service\AbstractService
class ShippingRateService extends AbstractService
{
/**
* Returns a list of your shipping rates.
*
* @param null|array $params
* @param null|array{active?: bool, created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\ShippingRate>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class ShippingRateService extends \Stripe\Service\AbstractService
/**
* Creates a new shipping rate object.
*
* @param null|array $params
* @param null|array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, expand?: string[], fixed_amount?: array{amount: int, currency: string, currency_options?: array<string, array{amount: int, tax_behavior?: string}>}, metadata?: array<string, string>, tax_behavior?: string, tax_code?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ShippingRate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class ShippingRateService extends \Stripe\Service\AbstractService
* Returns the shipping rate object with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ShippingRate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -60,12 +61,12 @@ class ShippingRateService extends \Stripe\Service\AbstractService
* Updates an existing shipping rate object.
*
* @param string $id
* @param null|array $params
* @param null|array{active?: bool, expand?: string[], fixed_amount?: array{currency_options?: array<string, array{amount?: int, tax_behavior?: string}>}, metadata?: null|array<string, string>, tax_behavior?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ShippingRate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Sigma;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ScheduledQueryRunService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class ScheduledQueryRunService extends \Stripe\Service\AbstractService
/**
* Returns a list of scheduled query runs.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Sigma\ScheduledQueryRun>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class ScheduledQueryRunService extends \Stripe\Service\AbstractService
* Retrieves the details of an scheduled query run.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Sigma\ScheduledQueryRun
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SourceService extends \Stripe\Service\AbstractService
class SourceService extends AbstractService
{
/**
* List source transactions for a given source.
*
* @param string $id
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\SourceTransaction>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allSourceTransactions($id, $params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class SourceService extends \Stripe\Service\AbstractService
/**
* Creates a new source object.
*
* @param null|array $params
* @param null|array{amount?: int, currency?: string, customer?: string, expand?: string[], flow?: string, mandate?: array{acceptance?: array{date?: int, ip?: string, offline?: array{contact_email: string}, online?: array{date?: int, ip?: string, user_agent?: string}, status: string, type?: string, user_agent?: string}, amount?: null|int, currency?: string, interval?: string, notification_method?: string}, metadata?: array<string, string>, original_source?: string, owner?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: string}, receiver?: array{refund_attributes_method?: string}, redirect?: array{return_url: string}, source_order?: array{items?: array{amount?: int, currency?: string, description?: string, parent?: string, quantity?: int, type?: string}[], shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name?: string, phone?: string, tracking_number?: string}}, statement_descriptor?: string, token?: string, type?: string, usage?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -46,12 +47,12 @@ class SourceService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function detach($parentId, $id, $params = null, $opts = null)
{
@@ -64,12 +65,12 @@ class SourceService extends \Stripe\Service\AbstractService
* object information.
*
* @param string $id
* @param null|array $params
* @param null|array{client_secret?: string, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -86,12 +87,12 @@ class SourceService extends \Stripe\Service\AbstractService
* guides</a> for more detail.
*
* @param string $id
* @param null|array $params
* @param null|array{amount?: int, expand?: string[], mandate?: array{acceptance?: array{date?: int, ip?: string, offline?: array{contact_email: string}, online?: array{date?: int, ip?: string, user_agent?: string}, status: string, type?: string, user_agent?: string}, amount?: null|int, currency?: string, interval?: string, notification_method?: string}, metadata?: null|array<string, string>, owner?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: string}, source_order?: array{items?: array{amount?: int, currency?: string, description?: string, parent?: string, quantity?: int, type?: string}[], shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name?: string, phone?: string, tracking_number?: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{
@@ -102,12 +103,12 @@ class SourceService extends \Stripe\Service\AbstractService
* Verify a given source.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], values: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Source
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function verify($id, $params = null, $opts = null)
{

View File

@@ -6,115 +6,53 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SubscriptionItemService extends \Stripe\Service\AbstractService
class SubscriptionItemService extends AbstractService
{
/**
* Returns a list of your subscription items for a given subscription.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, subscription: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\SubscriptionItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/subscription_items', $params, $opts);
}
/**
* For the specified subscription item, returns a list of summary objects. Each
* object in the list provides usage information thats been summarized from
* multiple usage records and over a subscription billing period (e.g., 15 usage
* records in the month of September).
*
* The list is sorted in reverse-chronological order (newest first). The first list
* item represents the most current usage period that hasnt ended yet. Since new
* usage records can still be added, the returned summary information for the
* subscription items ID should be seen as unstable until the subscription billing
* period ends.
*
* @param string $parentId
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\UsageRecordSummary>
*/
public function allUsageRecordSummaries($parentId, $params = null, $opts = null)
{
return $this->requestCollection('get', $this->buildPath('/v1/subscription_items/%s/usage_record_summaries', $parentId), $params, $opts);
}
/**
* Adds a new item to an existing subscription. No existing items will be changed
* or replaced.
*
* @param null|array $params
* @param null|array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: array<string, string>, payment_behavior?: string, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, proration_behavior?: string, proration_date?: int, quantity?: int, subscription: string, tax_rates?: null|string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SubscriptionItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v1/subscription_items', $params, $opts);
}
/**
* Creates a usage record for a specified subscription item and date, and fills it
* with a quantity.
*
* Usage records provide <code>quantity</code> information that Stripe uses to
* track how much a customer is using your service. With usage information and the
* pricing model set up by the <a
* href="https://stripe.com/docs/billing/subscriptions/metered-billing">metered
* billing</a> plan, Stripe helps you send accurate invoices to your customers.
*
* The default calculation for usage is to add up all the <code>quantity</code>
* values of the usage records within a billing period. You can change this default
* behavior with the billing plans <code>aggregate_usage</code> <a
* href="/docs/api/plans/create#create_plan-aggregate_usage">parameter</a>. When
* there is more than one usage record with the same timestamp, Stripe adds the
* <code>quantity</code> values together. In most cases, this is the desired
* resolution, however, you can change this behavior with the <code>action</code>
* parameter.
*
* The default pricing model for metered billing is <a
* href="/docs/api/plans/object#plan_object-billing_scheme">per-unit pricing</a>.
* For finer granularity, you can configure metered billing to have a <a
* href="https://stripe.com/docs/billing/subscriptions/tiers">tiered pricing</a>
* model.
*
* @param string $parentId
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\UsageRecord
*/
public function createUsageRecord($parentId, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/subscription_items/%s/usage_records', $parentId), $params, $opts);
}
/**
* Deletes an item from the subscription. Removing a subscription item from a
* subscription will not cancel the subscription.
*
* @param string $id
* @param null|array $params
* @param null|array{clear_usage?: bool, proration_behavior?: string, proration_date?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SubscriptionItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -125,12 +63,12 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
* Retrieves the subscription item with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SubscriptionItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -141,12 +79,12 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
* Updates the plan or quantity of an item on a current subscription.
*
* @param string $id
* @param null|array $params
* @param null|array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|array<string, string>, off_session?: bool, payment_behavior?: string, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, proration_behavior?: string, proration_date?: int, quantity?: int, tax_rates?: null|string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SubscriptionItem
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SubscriptionScheduleService extends \Stripe\Service\AbstractService
class SubscriptionScheduleService extends AbstractService
{
/**
* Retrieves the list of your subscription schedules.
*
* @param null|array $params
* @param null|array{canceled_at?: array|int, completed_at?: array|int, created?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, released_at?: array|int, scheduled?: bool, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\SubscriptionSchedule>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -32,12 +33,12 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
* <code>active</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], invoice_now?: bool, prorate?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SubscriptionSchedule
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function cancel($id, $params = null, $opts = null)
{
@@ -48,12 +49,12 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
* Creates a new subscription schedule object. Each customer can have up to 500
* active or scheduled subscriptions.
*
* @param null|array $params
* @param null|array{customer?: string, default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], from_subscription?: string, metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], end_date?: int, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], iterations?: int, metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: int})[], start_date?: array|int|string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SubscriptionSchedule
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -69,12 +70,12 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
* ID to the <code>released_subscription</code> property.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], preserve_cancel_date?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SubscriptionSchedule
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function release($id, $params = null, $opts = null)
{
@@ -87,12 +88,12 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
* subscription schedule creation.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SubscriptionSchedule
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -103,12 +104,12 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
* Updates an existing subscription schedule.
*
* @param string $id
* @param null|array $params
* @param null|array{default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], iterations?: int, metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SubscriptionSchedule
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SubscriptionService extends \Stripe\Service\AbstractService
class SubscriptionService extends AbstractService
{
/**
* By default, returns a list of subscriptions that have not been canceled. In
* order to list canceled subscriptions, specify <code>status=canceled</code>.
*
* @param null|array $params
* @param null|array{automatic_tax?: array{enabled: bool}, collection_method?: string, created?: array|int, current_period_end?: array|int, current_period_start?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, plan?: string, price?: string, starting_after?: string, status?: string, test_clock?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Subscription>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -35,7 +36,8 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* the period, unless manually <a href="#delete_invoiceitem">deleted</a>. If youve
* set the subscription to cancel at the end of the period, any pending prorations
* are also left in place and collected at the end of the period. But if the
* subscription is set to cancel immediately, pending prorations are removed.
* subscription is set to cancel immediately, pending prorations are removed if
* <code>invoice_now</code> and <code>prorate</code> are both set to true.
*
* By default, upon subscription cancellation, Stripe stops automatic collection of
* all finalized invoices for the customer. This is intended to prevent unexpected
@@ -45,12 +47,12 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* allowing the customer to cancel the subscription at all.
*
* @param string $id
* @param null|array $params
* @param null|array{cancellation_details?: array{comment?: null|string, feedback?: null|string}, expand?: string[], invoice_now?: bool, prorate?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function cancel($id, $params = null, $opts = null)
{
@@ -72,12 +74,12 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* schedules</a> instead. Schedules provide the flexibility to model more complex
* billing configurations that change over time.
*
* @param null|array $params
* @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, backdate_start_date?: int, billing_cycle_anchor?: int, billing_cycle_anchor_config?: array{day_of_month: int, hour?: int, minute?: int, month?: int, second?: int}, cancel_at?: int, cancel_at_period_end?: bool, collection_method?: string, currency?: string, customer: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], issuer?: array{account?: string, type: string}}, items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: string, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -91,9 +93,9 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Discount
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deleteDiscount($id, $params = null, $opts = null)
{
@@ -109,12 +111,12 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* invoice will void automatically if not paid by the expiration date.
*
* @param string $id
* @param null|array $params
* @param null|array{billing_cycle_anchor?: string, expand?: string[], proration_behavior?: string, proration_date?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function resume($id, $params = null, $opts = null)
{
@@ -125,12 +127,12 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* Retrieves the subscription with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -145,12 +147,12 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* Occasionally, propagation of new or updated data can be up to an hour behind
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
* @param null|array{expand?: string[], limit?: int, page?: string, query: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SearchResult<\Stripe\Subscription>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function search($params = null, $opts = null)
{
@@ -209,12 +211,12 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* href="/docs/billing/subscriptions/usage-based">usage-based billing</a> instead.
*
* @param string $id
* @param null|array $params
* @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, cancel_at?: null|int, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], issuer?: array{account?: string, type: string}}, items?: (array{clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: string, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Tax;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CalculationService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class CalculationService extends \Stripe\Service\AbstractService
* calculation hasnt expired.
*
* @param string $id
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Tax\CalculationLineItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allLineItems($id, $params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class CalculationService extends \Stripe\Service\AbstractService
* Calculates tax based on the input and returns a Tax <code>Calculation</code>
* object.
*
* @param null|array $params
* @param null|array{currency: string, customer?: string, customer_details?: array{address?: array{city?: null|string, country: string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}, address_source?: string, ip_address?: string, tax_ids?: array{type: string, value: string}[], taxability_override?: string}, expand?: string[], line_items: array{amount: int, product?: string, quantity?: int, reference?: string, tax_behavior?: string, tax_code?: string}[], ship_from_details?: array{address: array{city?: null|string, country: string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}}, shipping_cost?: array{amount?: int, shipping_rate?: string, tax_behavior?: string, tax_code?: string}, tax_date?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Calculation
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -48,12 +49,12 @@ class CalculationService extends \Stripe\Service\AbstractService
* expired.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Calculation
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Tax;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class RegistrationService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class RegistrationService extends \Stripe\Service\AbstractService
/**
* Returns a list of Tax <code>Registration</code> objects.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Tax\Registration>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class RegistrationService extends \Stripe\Service\AbstractService
/**
* Creates a new Tax <code>Registration</code> object.
*
* @param null|array $params
* @param null|array{active_from: array|int|string, country: string, country_options: array{ae?: array{type: string}, al?: array{type: string}, am?: array{type: string}, ao?: array{type: string}, at?: array{standard?: array{place_of_supply_scheme: string}, type: string}, au?: array{type: string}, aw?: array{type: string}, az?: array{type: string}, ba?: array{type: string}, bb?: array{type: string}, bd?: array{type: string}, be?: array{standard?: array{place_of_supply_scheme: string}, type: string}, bf?: array{type: string}, bg?: array{standard?: array{place_of_supply_scheme: string}, type: string}, bh?: array{type: string}, bj?: array{type: string}, bs?: array{type: string}, by?: array{type: string}, ca?: array{province_standard?: array{province: string}, type: string}, cd?: array{type: string}, ch?: array{type: string}, cl?: array{type: string}, cm?: array{type: string}, co?: array{type: string}, cr?: array{type: string}, cv?: array{type: string}, cy?: array{standard?: array{place_of_supply_scheme: string}, type: string}, cz?: array{standard?: array{place_of_supply_scheme: string}, type: string}, de?: array{standard?: array{place_of_supply_scheme: string}, type: string}, dk?: array{standard?: array{place_of_supply_scheme: string}, type: string}, ec?: array{type: string}, ee?: array{standard?: array{place_of_supply_scheme: string}, type: string}, eg?: array{type: string}, es?: array{standard?: array{place_of_supply_scheme: string}, type: string}, et?: array{type: string}, fi?: array{standard?: array{place_of_supply_scheme: string}, type: string}, fr?: array{standard?: array{place_of_supply_scheme: string}, type: string}, gb?: array{type: string}, ge?: array{type: string}, gn?: array{type: string}, gr?: array{standard?: array{place_of_supply_scheme: string}, type: string}, hr?: array{standard?: array{place_of_supply_scheme: string}, type: string}, hu?: array{standard?: array{place_of_supply_scheme: string}, type: string}, id?: array{type: string}, ie?: array{standard?: array{place_of_supply_scheme: string}, type: string}, in?: array{type: string}, is?: array{type: string}, it?: array{standard?: array{place_of_supply_scheme: string}, type: string}, jp?: array{type: string}, ke?: array{type: string}, kg?: array{type: string}, kh?: array{type: string}, kr?: array{type: string}, kz?: array{type: string}, la?: array{type: string}, lt?: array{standard?: array{place_of_supply_scheme: string}, type: string}, lu?: array{standard?: array{place_of_supply_scheme: string}, type: string}, lv?: array{standard?: array{place_of_supply_scheme: string}, type: string}, ma?: array{type: string}, md?: array{type: string}, me?: array{type: string}, mk?: array{type: string}, mr?: array{type: string}, mt?: array{standard?: array{place_of_supply_scheme: string}, type: string}, mx?: array{type: string}, my?: array{type: string}, ng?: array{type: string}, nl?: array{standard?: array{place_of_supply_scheme: string}, type: string}, no?: array{type: string}, np?: array{type: string}, nz?: array{type: string}, om?: array{type: string}, pe?: array{type: string}, ph?: array{type: string}, pl?: array{standard?: array{place_of_supply_scheme: string}, type: string}, pt?: array{standard?: array{place_of_supply_scheme: string}, type: string}, ro?: array{standard?: array{place_of_supply_scheme: string}, type: string}, rs?: array{type: string}, ru?: array{type: string}, sa?: array{type: string}, se?: array{standard?: array{place_of_supply_scheme: string}, type: string}, sg?: array{type: string}, si?: array{standard?: array{place_of_supply_scheme: string}, type: string}, sk?: array{standard?: array{place_of_supply_scheme: string}, type: string}, sn?: array{type: string}, sr?: array{type: string}, th?: array{type: string}, tj?: array{type: string}, tr?: array{type: string}, tz?: array{type: string}, ug?: array{type: string}, us?: array{local_amusement_tax?: array{jurisdiction: string}, local_lease_tax?: array{jurisdiction: string}, state: string, state_sales_tax?: array{elections: array{jurisdiction?: string, type: string}[]}, type: string}, uy?: array{type: string}, uz?: array{type: string}, vn?: array{type: string}, za?: array{type: string}, zm?: array{type: string}, zw?: array{type: string}}, expand?: string[], expires_at?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Registration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class RegistrationService extends \Stripe\Service\AbstractService
* Returns a Tax <code>Registration</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Registration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -63,12 +64,12 @@ class RegistrationService extends \Stripe\Service\AbstractService
* registration you may do so by setting <code>expires_at</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{active_from?: array|int|string, expand?: string[], expires_at?: null|array|int|string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Registration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Tax;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class SettingsService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class SettingsService extends \Stripe\Service\AbstractService
/**
* Retrieves Tax <code>Settings</code> for a merchant.
*
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Settings
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class SettingsService extends \Stripe\Service\AbstractService
* Updates Tax <code>Settings</code> parameters used in tax calculations. All
* parameters are editable but none can be removed once set.
*
* @param null|array $params
* @param null|array{defaults?: array{tax_behavior?: string, tax_code?: string}, expand?: string[], head_office?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Settings
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Tax;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class TransactionService extends \Stripe\Service\AbstractService
@@ -14,12 +15,12 @@ class TransactionService extends \Stripe\Service\AbstractService
* Retrieves the line items of a committed standalone transaction as a collection.
*
* @param string $id
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Tax\TransactionLineItem>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function allLineItems($id, $params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class TransactionService extends \Stripe\Service\AbstractService
* Creates a Tax Transaction from a calculation, if that calculation hasnt
* expired. Calculations expire after 90 days.
*
* @param null|array $params
* @param null|array{calculation: string, expand?: string[], metadata?: array<string, string>, posted_at?: int, reference: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Transaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function createFromCalculation($params = null, $opts = null)
{
@@ -45,12 +46,12 @@ class TransactionService extends \Stripe\Service\AbstractService
/**
* Partially or fully reverses a previously created <code>Transaction</code>.
*
* @param null|array $params
* @param null|array{expand?: string[], flat_amount?: int, line_items?: array{amount: int, amount_tax: int, metadata?: array<string, string>, original_line_item: string, quantity?: int, reference: string}[], metadata?: array<string, string>, mode: string, original_transaction: string, reference: string, shipping_cost?: array{amount: int, amount_tax: int}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Transaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function createReversal($params = null, $opts = null)
{
@@ -61,12 +62,12 @@ class TransactionService extends \Stripe\Service\AbstractService
* Retrieves a Tax <code>Transaction</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Transaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class TaxCodeService extends \Stripe\Service\AbstractService
class TaxCodeService extends AbstractService
{
/**
* A list of <a href="https://stripe.com/docs/tax/tax-categories">all tax codes
* available</a> to add to Products in order to allow specific tax calculations.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\TaxCode>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -31,12 +32,12 @@ class TaxCodeService extends \Stripe\Service\AbstractService
* Stripe will return the corresponding tax code information.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxCode
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,19 +6,20 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class TaxIdService extends \Stripe\Service\AbstractService
class TaxIdService extends AbstractService
{
/**
* Returns a list of tax IDs.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, owner?: array{account?: string, customer?: string, type: string}, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\TaxId>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class TaxIdService extends \Stripe\Service\AbstractService
/**
* Creates a new account or customer <code>tax_id</code> object.
*
* @param null|array $params
* @param null|array{expand?: string[], owner?: array{account?: string, customer?: string, type: string}, type: string, value: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxId
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -47,9 +48,9 @@ class TaxIdService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxId
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -60,12 +61,12 @@ class TaxIdService extends \Stripe\Service\AbstractService
* Retrieves an account or customer <code>tax_id</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxId
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{

View File

@@ -6,20 +6,21 @@ namespace Stripe\Service;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class TaxRateService extends \Stripe\Service\AbstractService
class TaxRateService extends AbstractService
{
/**
* Returns a list of your tax rates. Tax rates are returned sorted by creation
* date, with the most recently created tax rates appearing first.
*
* @param null|array $params
* @param null|array{active?: bool, created?: array|int, ending_before?: string, expand?: string[], inclusive?: bool, limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\TaxRate>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class TaxRateService extends \Stripe\Service\AbstractService
/**
* Creates a new tax rate.
*
* @param null|array $params
* @param null|array{active?: bool, country?: string, description?: string, display_name: string, expand?: string[], inclusive: bool, jurisdiction?: string, metadata?: array<string, string>, percentage: float, state?: string, tax_type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxRate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -45,12 +46,12 @@ class TaxRateService extends \Stripe\Service\AbstractService
* Retrieves a tax rate with the given ID.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxRate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -61,12 +62,12 @@ class TaxRateService extends \Stripe\Service\AbstractService
* Updates an existing tax rate.
*
* @param string $id
* @param null|array $params
* @param null|array{active?: bool, country?: string, description?: string, display_name?: string, expand?: string[], jurisdiction?: string, metadata?: null|array<string, string>, state?: string, tax_type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\TaxRate
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Terminal;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ConfigurationService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class ConfigurationService extends \Stripe\Service\AbstractService
/**
* Returns a list of <code>Configuration</code> objects.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], is_account_default?: bool, limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Terminal\Configuration>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -28,12 +29,12 @@ class ConfigurationService extends \Stripe\Service\AbstractService
/**
* Creates a new <code>Configuration</code> object.
*
* @param null|array $params
* @param null|array{bbpos_wisepos_e?: array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: array{end_hour: int, start_hour: int}, stripe_s700?: array{splashscreen?: null|string}, tipping?: null|array{aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Configuration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -47,9 +48,9 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Configuration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -60,12 +61,12 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* Retrieves a <code>Configuration</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Configuration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -76,12 +77,12 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* Updates a new <code>Configuration</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{bbpos_wisepos_e?: null|array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: null|array{end_hour: int, start_hour: int}, stripe_s700?: null|array{splashscreen?: null|string}, tipping?: null|array{aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: null|array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Configuration
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Terminal;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ConnectionTokenService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class ConnectionTokenService extends \Stripe\Service\AbstractService
* connection token from Stripe, proxied through your server. On your backend, add
* an endpoint that creates and returns a connection token.
*
* @param null|array $params
* @param null|array{expand?: string[], location?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\ConnectionToken
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Terminal;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class LocationService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class LocationService extends \Stripe\Service\AbstractService
/**
* Returns a list of <code>Location</code> objects.
*
* @param null|array $params
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Terminal\Location>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -30,12 +31,12 @@ class LocationService extends \Stripe\Service\AbstractService
* address fields are required in each country, see the <a
* href="/docs/terminal/fleet/locations">Manage locations</a> guide.
*
* @param null|array $params
* @param null|array{address: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string}, configuration_overrides?: string, display_name: string, expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Location
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -49,9 +50,9 @@ class LocationService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Location
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -62,12 +63,12 @@ class LocationService extends \Stripe\Service\AbstractService
* Retrieves a <code>Location</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Location
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -79,12 +80,12 @@ class LocationService extends \Stripe\Service\AbstractService
* passed. Any parameters not provided will be left unchanged.
*
* @param string $id
* @param null|array $params
* @param null|array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, configuration_overrides?: null|string, display_name?: string, expand?: string[], metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Location
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\Terminal;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ReaderService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class ReaderService extends \Stripe\Service\AbstractService
/**
* Returns a list of <code>Reader</code> objects.
*
* @param null|array $params
* @param null|array{device_type?: string, ending_before?: string, expand?: string[], limit?: int, location?: string, serial_number?: string, starting_after?: string, status?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Terminal\Reader>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class ReaderService extends \Stripe\Service\AbstractService
* Cancels the current reader action.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Reader
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function cancelAction($id, $params = null, $opts = null)
{
@@ -44,12 +45,12 @@ class ReaderService extends \Stripe\Service\AbstractService
/**
* Creates a new <code>Reader</code> object.
*
* @param null|array $params
* @param null|array{expand?: string[], label?: string, location?: string, metadata?: null|array<string, string>, registration_code: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Reader
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -63,9 +64,9 @@ class ReaderService extends \Stripe\Service\AbstractService
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Reader
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
@@ -76,12 +77,12 @@ class ReaderService extends \Stripe\Service\AbstractService
* Initiates a payment flow on a Reader.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], payment_intent: string, process_config?: array{allow_redisplay?: string, enable_customer_cancellation?: bool, skip_tipping?: bool, tipping?: array{amount_eligible?: int}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Reader
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function processPaymentIntent($id, $params = null, $opts = null)
{
@@ -92,12 +93,12 @@ class ReaderService extends \Stripe\Service\AbstractService
* Initiates a setup intent flow on a Reader.
*
* @param string $id
* @param null|array $params
* @param null|array{allow_redisplay: string, expand?: string[], process_config?: array{enable_customer_cancellation?: bool}, setup_intent: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Reader
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function processSetupIntent($id, $params = null, $opts = null)
{
@@ -108,12 +109,12 @@ class ReaderService extends \Stripe\Service\AbstractService
* Initiates a refund on a Reader.
*
* @param string $id
* @param null|array $params
* @param null|array{amount?: int, charge?: string, expand?: string[], metadata?: array<string, string>, payment_intent?: string, refund_application_fee?: bool, refund_payment_config?: array{enable_customer_cancellation?: bool}, reverse_transfer?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Reader
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function refundPayment($id, $params = null, $opts = null)
{
@@ -124,12 +125,12 @@ class ReaderService extends \Stripe\Service\AbstractService
* Retrieves a <code>Reader</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Reader
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
@@ -140,12 +141,12 @@ class ReaderService extends \Stripe\Service\AbstractService
* Sets reader display to show cart details.
*
* @param string $id
* @param null|array $params
* @param null|array{cart?: array{currency: string, line_items: array{amount: int, description: string, quantity: int}[], tax?: int, total: int}, expand?: string[], type: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Reader
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function setReaderDisplay($id, $params = null, $opts = null)
{
@@ -157,12 +158,12 @@ class ReaderService extends \Stripe\Service\AbstractService
* passed. Any parameters not provided will be left unchanged.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], label?: null|string, metadata?: null|array<string, string>} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\Reader
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\TestHelpers;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ConfirmationTokenService extends \Stripe\Service\AbstractService
@@ -13,12 +14,12 @@ class ConfirmationTokenService extends \Stripe\Service\AbstractService
/**
* Creates a test mode Confirmation Token server side for your integration tests.
*
* @param null|array $params
* @param null|array{expand?: string[], payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{card?: array{installments?: array{plan: array{count?: int, interval?: string, type: string}}}}, return_url?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\ConfirmationToken
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\TestHelpers;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CustomerService extends \Stripe\Service\AbstractService
@@ -14,12 +15,12 @@ class CustomerService extends \Stripe\Service\AbstractService
* Create an incoming testmode bank transfer.
*
* @param string $id
* @param null|array $params
* @param null|array{amount: int, currency: string, expand?: string[], reference?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CustomerCashBalanceTransaction
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fundCashBalance($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\TestHelpers\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class AuthorizationService extends \Stripe\Service\AbstractService
@@ -14,12 +15,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* Capture a test-mode authorization.
*
* @param string $id
* @param null|array $params
* @param null|array{capture_amount?: int, close_authorization?: bool, expand?: string[], purchase_details?: array{fleet?: array{cardholder_prompt_data?: array{driver_id?: string, odometer?: int, unspecified_id?: string, user_id?: string, vehicle_number?: string}, purchase_type?: string, reported_breakdown?: array{fuel?: array{gross_amount_decimal?: string}, non_fuel?: array{gross_amount_decimal?: string}, tax?: array{local_amount_decimal?: string, national_amount_decimal?: string}}, service_type?: string}, flight?: array{departure_at?: int, passenger_name?: string, refundable?: bool, segments?: array{arrival_airport_code?: string, carrier?: string, departure_airport_code?: string, flight_number?: string, service_class?: string, stopover_allowed?: bool}[], travel_agency?: string}, fuel?: array{industry_product_code?: string, quantity_decimal?: string, type?: string, unit?: string, unit_cost_decimal?: string}, lodging?: array{check_in_at?: int, nights?: int}, receipt?: array{description?: string, quantity?: string, total?: int, unit_cost?: int}[], reference?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function capture($id, $params = null, $opts = null)
{
@@ -29,12 +30,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
/**
* Create a test-mode authorization.
*
* @param null|array $params
* @param null|array{amount?: int, amount_details?: array{atm_fee?: int, cashback_amount?: int}, authorization_method?: string, card: string, currency?: string, expand?: string[], fleet?: array{cardholder_prompt_data?: array{driver_id?: string, odometer?: int, unspecified_id?: string, user_id?: string, vehicle_number?: string}, purchase_type?: string, reported_breakdown?: array{fuel?: array{gross_amount_decimal?: string}, non_fuel?: array{gross_amount_decimal?: string}, tax?: array{local_amount_decimal?: string, national_amount_decimal?: string}}, service_type?: string}, fuel?: array{industry_product_code?: string, quantity_decimal?: string, type?: string, unit?: string, unit_cost_decimal?: string}, is_amount_controllable?: bool, merchant_amount?: int, merchant_currency?: string, merchant_data?: array{category?: string, city?: string, country?: string, name?: string, network_id?: string, postal_code?: string, state?: string, terminal_id?: string, url?: string}, network_data?: array{acquiring_institution_id?: string}, verification_data?: array{address_line1_check?: string, address_postal_code_check?: string, authentication_exemption?: array{claimed_by: string, type: string}, cvc_check?: string, expiry_check?: string, three_d_secure?: array{result: string}}, wallet?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
@@ -45,12 +46,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* Expire a test-mode Authorization.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function expire($id, $params = null, $opts = null)
{
@@ -62,12 +63,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* authorization was for an estimated amount.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], final_amount: int, fleet?: array{cardholder_prompt_data?: array{driver_id?: string, odometer?: int, unspecified_id?: string, user_id?: string, vehicle_number?: string}, purchase_type?: string, reported_breakdown?: array{fuel?: array{gross_amount_decimal?: string}, non_fuel?: array{gross_amount_decimal?: string}, tax?: array{local_amount_decimal?: string, national_amount_decimal?: string}}, service_type?: string}, fuel?: array{industry_product_code?: string, quantity_decimal?: string, type?: string, unit?: string, unit_cost_decimal?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function finalizeAmount($id, $params = null, $opts = null)
{
@@ -78,12 +79,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* Increment a test-mode Authorization.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], increment_amount: int, is_amount_controllable?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function increment($id, $params = null, $opts = null)
{
@@ -95,12 +96,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* either a confirmation of fraud or a correction of legitimacy.
*
* @param string $id
* @param null|array $params
* @param null|array{confirmed: bool, expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function respond($id, $params = null, $opts = null)
{
@@ -111,12 +112,12 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* Reverse a test-mode Authorization.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], reverse_amount?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function reverse($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\TestHelpers\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class CardService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class CardService extends \Stripe\Service\AbstractService
* <code>delivered</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deliverCard($id, $params = null, $opts = null)
{
@@ -32,12 +33,12 @@ class CardService extends \Stripe\Service\AbstractService
* <code>failure</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function failCard($id, $params = null, $opts = null)
{
@@ -49,12 +50,12 @@ class CardService extends \Stripe\Service\AbstractService
* <code>returned</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function returnCard($id, $params = null, $opts = null)
{
@@ -66,12 +67,12 @@ class CardService extends \Stripe\Service\AbstractService
* <code>shipped</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function shipCard($id, $params = null, $opts = null)
{
@@ -84,12 +85,12 @@ class CardService extends \Stripe\Service\AbstractService
* or later.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function submitCard($id, $params = null, $opts = null)
{

View File

@@ -6,6 +6,7 @@ namespace Stripe\Service\TestHelpers\Issuing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PersonalizationDesignService extends \Stripe\Service\AbstractService
@@ -15,12 +16,12 @@ class PersonalizationDesignService extends \Stripe\Service\AbstractService
* object to <code>active</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function activate($id, $params = null, $opts = null)
{
@@ -32,12 +33,12 @@ class PersonalizationDesignService extends \Stripe\Service\AbstractService
* object to <code>inactive</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function deactivate($id, $params = null, $opts = null)
{
@@ -49,12 +50,12 @@ class PersonalizationDesignService extends \Stripe\Service\AbstractService
* object to <code>rejected</code>.
*
* @param string $id
* @param null|array $params
* @param null|array{expand?: string[], rejection_reasons: array{card_logo?: string[], carrier_text?: string[]}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function reject($id, $params = null, $opts = null)
{

Some files were not shown because too many files have changed in this diff Show More