mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 18:18:18 +01:00
Update Stripe lib to 10.7.0
This commit is contained in:
@@ -12,6 +12,11 @@ abstract class AbstractService
|
||||
*/
|
||||
protected $client;
|
||||
|
||||
/**
|
||||
* @var \Stripe\StripeStreamingClientInterface
|
||||
*/
|
||||
protected $streamingClient;
|
||||
|
||||
/**
|
||||
* Initializes a new instance of the {@link AbstractService} class.
|
||||
*
|
||||
@@ -20,6 +25,7 @@ abstract class AbstractService
|
||||
public function __construct($client)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->streamingClient = $client;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,6 +38,16 @@ abstract class AbstractService
|
||||
return $this->client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client used by this service to send requests.
|
||||
*
|
||||
* @return \Stripe\StripeStreamingClientInterface
|
||||
*/
|
||||
public function getStreamingClient()
|
||||
{
|
||||
return $this->streamingClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate null values to empty strings. For service methods,
|
||||
* we interpret null as a request to unset the field, which
|
||||
@@ -59,11 +75,21 @@ abstract class AbstractService
|
||||
return $this->getClient()->request($method, $path, static::formatParams($params), $opts);
|
||||
}
|
||||
|
||||
protected function requestStream($method, $path, $readBodyChunkCallable, $params, $opts)
|
||||
{
|
||||
return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, static::formatParams($params), $opts);
|
||||
}
|
||||
|
||||
protected function requestCollection($method, $path, $params, $opts)
|
||||
{
|
||||
return $this->getClient()->requestCollection($method, $path, static::formatParams($params), $opts);
|
||||
}
|
||||
|
||||
protected function requestSearchResult($method, $path, $params, $opts)
|
||||
{
|
||||
return $this->getClient()->requestSearchResult($method, $path, static::formatParams($params), $opts);
|
||||
}
|
||||
|
||||
protected function buildPath($basePath, ...$ids)
|
||||
{
|
||||
foreach ($ids as $id) {
|
||||
|
||||
@@ -42,6 +42,16 @@ abstract class AbstractServiceFactory
|
||||
* @return null|AbstractService|AbstractServiceFactory
|
||||
*/
|
||||
public function __get($name)
|
||||
{
|
||||
return $this->getService($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return null|AbstractService|AbstractServiceFactory
|
||||
*/
|
||||
public function getService($name)
|
||||
{
|
||||
$serviceClass = $this->getServiceClass($name);
|
||||
if (null !== $serviceClass) {
|
||||
|
||||
@@ -15,7 +15,7 @@ class AccountService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Account>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -33,7 +33,7 @@ class AccountService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Capability>
|
||||
*/
|
||||
public function allCapabilities($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ class AccountService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card>
|
||||
*/
|
||||
public function allExternalAccounts($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ class AccountService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Person>
|
||||
*/
|
||||
public function allPersons($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -80,6 +80,12 @@ class AccountService extends \Stripe\Service\AbstractService
|
||||
* href="https://dashboard.stripe.com/account/applications/settings">register your
|
||||
* platform</a>.
|
||||
*
|
||||
* If you’ve already collected information for your connected accounts, you <a
|
||||
* href="/docs/connect/best-practices#onboarding">can pre-fill that information</a>
|
||||
* when creating the account. Connect Onboarding won’t ask for the pre-filled
|
||||
* information during account onboarding. You can pre-fill any information on the
|
||||
* account.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
@@ -146,11 +152,12 @@ class AccountService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* With <a href="/docs/connect">Connect</a>, you can delete Custom or Express
|
||||
* accounts you manage.
|
||||
* With <a href="/docs/connect">Connect</a>, you can delete accounts you manage.
|
||||
*
|
||||
* Accounts created using test-mode keys can be deleted at any time. Accounts
|
||||
* created using live-mode keys can only be deleted once all balances are zero.
|
||||
* Accounts created using test-mode keys can be deleted at any time. Standard
|
||||
* accounts created using live-mode keys cannot be deleted. Custom or Express
|
||||
* accounts created using live-mode keys can only be deleted once all balances are
|
||||
* zero.
|
||||
*
|
||||
* If you want to delete your own account, use the <a
|
||||
* href="https://dashboard.stripe.com/account">account information tab in your
|
||||
@@ -278,11 +285,15 @@ class AccountService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a connected <a href="/docs/connect/accounts">Express or Custom
|
||||
* account</a> by setting the values of the parameters passed. Any parameters not
|
||||
* provided are left unchanged. Most parameters can be changed only for Custom
|
||||
* accounts. (These are marked <strong>Custom Only</strong> below.) Parameters
|
||||
* marked <strong>Custom and Express</strong> are supported by both account types.
|
||||
* Updates a <a href="/docs/connect/accounts">connected account</a> by setting the
|
||||
* values of the parameters passed. Any parameters not provided are left unchanged.
|
||||
*
|
||||
* For Custom accounts, you can update any information on the account. For other
|
||||
* accounts, you can update all information until that account has started to go
|
||||
* through Connect Onboarding. Once you create an <a
|
||||
* href="/docs/api/account_links">Account Link</a> for a Standard or Express
|
||||
* account, some parameters can no longer be changed. These are marked as
|
||||
* <strong>Custom Only</strong> or <strong>Custom and Express</strong> below.
|
||||
*
|
||||
* To update your own account, use the <a
|
||||
* href="https://dashboard.stripe.com/account">Dashboard</a>. Refer to our <a
|
||||
@@ -320,10 +331,10 @@ class AccountService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the metadata, account holder name, and account holder type of a bank
|
||||
* account belonging to a <a href="/docs/connect/custom-accounts">Custom
|
||||
* account</a>, and optionally sets it as the default for its currency. Other bank
|
||||
* account details are not editable by design.
|
||||
* Updates the metadata, account holder name, account holder type of a bank account
|
||||
* belonging to a <a href="/docs/connect/custom-accounts">Custom account</a>, and
|
||||
* optionally sets it as the default for its currency. Other bank account details
|
||||
* are not editable by design.
|
||||
*
|
||||
* You can re-enable a disabled bank account by performing an update call without
|
||||
* providing any arguments or changes.
|
||||
|
||||
@@ -14,7 +14,7 @@ class ApplePayDomainService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\ApplePayDomain>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\ApplicationFee>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -35,7 +35,7 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\ApplicationFeeRefund>
|
||||
*/
|
||||
public function allRefunds($parentId, $params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Apps;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the Apps namespace.
|
||||
*
|
||||
* @property SecretService $secrets
|
||||
*/
|
||||
class AppsServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'secrets' => SecretService::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Apps;
|
||||
|
||||
class SecretService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* List all secrets stored on the given scope.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Apps\Secret>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/apps/secrets', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create or replace a secret in the secret store.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Apps\Secret
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/apps/secrets', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a secret from the secret store by name and scope.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Apps\Secret
|
||||
*/
|
||||
public function deleteWhere($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/apps/secrets/delete', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a secret in the secret store by name and scope.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Apps\Secret
|
||||
*/
|
||||
public function find($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', '/v1/apps/secrets/find', $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ class BalanceTransactionService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\BalanceTransaction>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Stripe\Service\BillingPortal;
|
||||
/**
|
||||
* Service factory class for API resources in the BillingPortal namespace.
|
||||
*
|
||||
* @property ConfigurationService $configurations
|
||||
* @property SessionService $sessions
|
||||
*/
|
||||
class BillingPortalServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
@@ -15,6 +16,7 @@ class BillingPortalServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'configurations' => ConfigurationService::class,
|
||||
'sessions' => SessionService::class,
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\BillingPortal;
|
||||
|
||||
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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\BillingPortal\Configuration>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/billing_portal/configurations', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a configuration that describes the functionality and behavior of a
|
||||
* PortalSession.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\BillingPortal\Configuration
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/billing_portal/configurations', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a configuration that describes the functionality of the customer
|
||||
* portal.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\BillingPortal\Configuration
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/billing_portal/configurations/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a configuration that describes the functionality of the customer portal.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\BillingPortal\Configuration
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/billing_portal/configurations/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ class ChargeService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Charge>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -27,9 +27,10 @@ class ChargeService extends \Stripe\Service\AbstractService
|
||||
* of the two-step payment flow, where first you <a href="#create_charge">created a
|
||||
* charge</a> with the capture option set to false.
|
||||
*
|
||||
* Uncaptured payments expire exactly seven days after they are created. If they
|
||||
* are not captured by that point in time, they will be marked as refunded and will
|
||||
* no longer be capturable.
|
||||
* Uncaptured payments expire a set number of days after they are created (<a
|
||||
* href="/docs/charges/placing-a-hold">7 by default</a>). If they are not captured
|
||||
* by that point in time, they will be marked as refunded and will no longer be
|
||||
* capturable.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
@@ -82,6 +83,26 @@ class ChargeService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/charges/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for charges you’ve previously created using Stripe’s <a
|
||||
* href="/docs/search#search-query-language">Search Query Language</a>. Don’t use
|
||||
* search in read-after-write flows where strict consistency is necessary. Under
|
||||
* normal operating conditions, data is searchable in less than a minute.
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SearchResult<\Stripe\Charge>
|
||||
*/
|
||||
public function search($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestSearchResult('get', '/v1/charges/search', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the specified charge by setting the values of the parameters passed. Any
|
||||
* parameters not provided will be left unchanged.
|
||||
|
||||
@@ -14,7 +14,7 @@ class SessionService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Checkout\Session>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -27,17 +27,17 @@ class SessionService extends \Stripe\Service\AbstractService
|
||||
* items. There is also a URL where you can retrieve the full (paginated) list of
|
||||
* line items.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\LineItem>
|
||||
*/
|
||||
public function allLineItems($parentId, $params = null, $opts = null)
|
||||
public function allLineItems($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/checkout/sessions/%s/line_items', $parentId), $params, $opts);
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/checkout/sessions/%s/line_items', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,6 +55,25 @@ class SessionService extends \Stripe\Service\AbstractService
|
||||
return $this->request('post', '/v1/checkout/sessions', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* A Session can be expired when it is in one of these statuses: <code>open</code>.
|
||||
*
|
||||
* After it expires, a customer can’t complete a Session and customers loading the
|
||||
* Session see a message saying the Session is expired.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Checkout\Session
|
||||
*/
|
||||
public function expire($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/checkout/sessions/%s/expire', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a Session object.
|
||||
*
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Stripe\Service;
|
||||
* @property AccountService $accounts
|
||||
* @property ApplePayDomainService $applePayDomains
|
||||
* @property ApplicationFeeService $applicationFees
|
||||
* @property Apps\AppsServiceFactory $apps
|
||||
* @property BalanceService $balance
|
||||
* @property BalanceTransactionService $balanceTransactions
|
||||
* @property BillingPortal\BillingPortalServiceFactory $billingPortal
|
||||
@@ -26,37 +27,42 @@ namespace Stripe\Service;
|
||||
* @property ExchangeRateService $exchangeRates
|
||||
* @property FileLinkService $fileLinks
|
||||
* @property FileService $files
|
||||
* @property FinancialConnections\FinancialConnectionsServiceFactory $financialConnections
|
||||
* @property Identity\IdentityServiceFactory $identity
|
||||
* @property InvoiceItemService $invoiceItems
|
||||
* @property InvoiceService $invoices
|
||||
* @property Issuing\IssuingServiceFactory $issuing
|
||||
* @property MandateService $mandates
|
||||
* @property OAuthService $oauth
|
||||
* @property OrderReturnService $orderReturns
|
||||
* @property OrderService $orders
|
||||
* @property PaymentIntentService $paymentIntents
|
||||
* @property PaymentLinkService $paymentLinks
|
||||
* @property PaymentMethodService $paymentMethods
|
||||
* @property PayoutService $payouts
|
||||
* @property PlanService $plans
|
||||
* @property PriceService $prices
|
||||
* @property ProductService $products
|
||||
* @property PromotionCodeService $promotionCodes
|
||||
* @property QuoteService $quotes
|
||||
* @property Radar\RadarServiceFactory $radar
|
||||
* @property RefundService $refunds
|
||||
* @property Reporting\ReportingServiceFactory $reporting
|
||||
* @property ReviewService $reviews
|
||||
* @property SetupAttemptService $setupAttempts
|
||||
* @property SetupIntentService $setupIntents
|
||||
* @property ShippingRateService $shippingRates
|
||||
* @property Sigma\SigmaServiceFactory $sigma
|
||||
* @property SkuService $skus
|
||||
* @property SourceService $sources
|
||||
* @property SubscriptionItemService $subscriptionItems
|
||||
* @property SubscriptionService $subscriptions
|
||||
* @property SubscriptionScheduleService $subscriptionSchedules
|
||||
* @property TaxCodeService $taxCodes
|
||||
* @property TaxRateService $taxRates
|
||||
* @property Terminal\TerminalServiceFactory $terminal
|
||||
* @property TestHelpers\TestHelpersServiceFactory $testHelpers
|
||||
* @property TokenService $tokens
|
||||
* @property TopupService $topups
|
||||
* @property TransferService $transfers
|
||||
* @property Treasury\TreasuryServiceFactory $treasury
|
||||
* @property WebhookEndpointService $webhookEndpoints
|
||||
*/
|
||||
class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
@@ -69,6 +75,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
'accounts' => AccountService::class,
|
||||
'applePayDomains' => ApplePayDomainService::class,
|
||||
'applicationFees' => ApplicationFeeService::class,
|
||||
'apps' => Apps\AppsServiceFactory::class,
|
||||
'balance' => BalanceService::class,
|
||||
'balanceTransactions' => BalanceTransactionService::class,
|
||||
'billingPortal' => BillingPortal\BillingPortalServiceFactory::class,
|
||||
@@ -84,37 +91,42 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
'exchangeRates' => ExchangeRateService::class,
|
||||
'fileLinks' => FileLinkService::class,
|
||||
'files' => FileService::class,
|
||||
'financialConnections' => FinancialConnections\FinancialConnectionsServiceFactory::class,
|
||||
'identity' => Identity\IdentityServiceFactory::class,
|
||||
'invoiceItems' => InvoiceItemService::class,
|
||||
'invoices' => InvoiceService::class,
|
||||
'issuing' => Issuing\IssuingServiceFactory::class,
|
||||
'mandates' => MandateService::class,
|
||||
'oauth' => OAuthService::class,
|
||||
'orderReturns' => OrderReturnService::class,
|
||||
'orders' => OrderService::class,
|
||||
'paymentIntents' => PaymentIntentService::class,
|
||||
'paymentLinks' => PaymentLinkService::class,
|
||||
'paymentMethods' => PaymentMethodService::class,
|
||||
'payouts' => PayoutService::class,
|
||||
'plans' => PlanService::class,
|
||||
'prices' => PriceService::class,
|
||||
'products' => ProductService::class,
|
||||
'promotionCodes' => PromotionCodeService::class,
|
||||
'quotes' => QuoteService::class,
|
||||
'radar' => Radar\RadarServiceFactory::class,
|
||||
'refunds' => RefundService::class,
|
||||
'reporting' => Reporting\ReportingServiceFactory::class,
|
||||
'reviews' => ReviewService::class,
|
||||
'setupAttempts' => SetupAttemptService::class,
|
||||
'setupIntents' => SetupIntentService::class,
|
||||
'shippingRates' => ShippingRateService::class,
|
||||
'sigma' => Sigma\SigmaServiceFactory::class,
|
||||
'skus' => SkuService::class,
|
||||
'sources' => SourceService::class,
|
||||
'subscriptionItems' => SubscriptionItemService::class,
|
||||
'subscriptions' => SubscriptionService::class,
|
||||
'subscriptionSchedules' => SubscriptionScheduleService::class,
|
||||
'taxCodes' => TaxCodeService::class,
|
||||
'taxRates' => TaxRateService::class,
|
||||
'terminal' => Terminal\TerminalServiceFactory::class,
|
||||
'testHelpers' => TestHelpers\TestHelpersServiceFactory::class,
|
||||
'tokens' => TokenService::class,
|
||||
'topups' => TopupService::class,
|
||||
'transfers' => TransferService::class,
|
||||
'treasury' => Treasury\TreasuryServiceFactory::class,
|
||||
'webhookEndpoints' => WebhookEndpointService::class,
|
||||
];
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class CountrySpecService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\CountrySpec>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class CouponService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Coupon>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class CreditNoteService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\CreditNote>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class CreditNoteService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\CreditNoteLineItem>
|
||||
*/
|
||||
public function allLines($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -98,11 +98,11 @@ class CreditNoteService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\CreditNote
|
||||
* @return \Stripe\Collection<\Stripe\CreditNoteLineItem>
|
||||
*/
|
||||
public function previewLines($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', '/v1/credit_notes/preview/lines', $params, $opts);
|
||||
return $this->requestCollection('get', '/v1/credit_notes/preview/lines', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Customer>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -32,13 +32,46 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\CustomerBalanceTransaction>
|
||||
*/
|
||||
public function allBalanceTransactions($parentId, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of transactions that modified the customer’s <a
|
||||
* href="/docs/payments/customer-balance">cash balance</a>.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\CustomerCashBalanceTransaction>
|
||||
*/
|
||||
public function allCashBalanceTransactions($parentId, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/cash_balance_transactions', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of PaymentMethods for a given Customer.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\PaymentMethod>
|
||||
*/
|
||||
public function allPaymentMethods($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/payment_methods', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* List sources for a specified customer.
|
||||
*
|
||||
@@ -48,7 +81,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card|\Stripe\Source>
|
||||
*/
|
||||
public function allSources($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -64,7 +97,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\TaxId>
|
||||
*/
|
||||
public function allTaxIds($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -103,6 +136,26 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve funding instructions for a customer cash balance. If funding
|
||||
* instructions do not yet exist for the customer, new funding instructions will be
|
||||
* created. If funding instructions have already been created for a given customer,
|
||||
* the same funding instructions will be retrieved. In other words, we will return
|
||||
* the same funding instructions each time.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Customer
|
||||
*/
|
||||
public function createFundingInstructions($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/customers/%s/funding_instructions', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* When you create a new credit card, you must specify a customer or recipient on
|
||||
* which to create it.
|
||||
@@ -118,7 +171,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function createSource($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -182,7 +235,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function deleteSource($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
@@ -207,8 +260,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing customer. You need only supply the unique
|
||||
* customer identifier that was returned upon customer creation.
|
||||
* Retrieves a Customer object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
@@ -241,6 +293,57 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a customer’s cash balance.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\CashBalance
|
||||
*/
|
||||
public function retrieveCashBalance($parentId, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a specific cash balance transaction, which updated the customer’s <a
|
||||
* href="/docs/payments/customer-balance">cash balance</a>.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\CustomerCashBalanceTransaction
|
||||
*/
|
||||
public function retrieveCashBalanceTransaction($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/cash_balance_transactions/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a PaymentMethod object for a given Customer.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Customer
|
||||
*/
|
||||
public function retrievePaymentMethod($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/payment_methods/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a specified source for a given customer.
|
||||
*
|
||||
@@ -251,7 +354,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function retrieveSource($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
@@ -275,6 +378,26 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for customers you’ve previously created using Stripe’s <a
|
||||
* href="/docs/search#search-query-language">Search Query Language</a>. Don’t use
|
||||
* search in read-after-write flows where strict consistency is necessary. Under
|
||||
* normal operating conditions, data is searchable in less than a minute.
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SearchResult<\Stripe\Customer>
|
||||
*/
|
||||
public function search($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestSearchResult('get', '/v1/customers/search', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the specified customer by setting the values of the parameters passed.
|
||||
* Any parameters not provided will be left unchanged. For example, if you pass the
|
||||
@@ -321,6 +444,22 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the settings on a customer’s cash balance.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\CashBalance
|
||||
*/
|
||||
public function updateCashBalance($parentId, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $parentId
|
||||
* @param string $id
|
||||
@@ -329,7 +468,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function updateSource($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
@@ -344,7 +483,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function verifySource($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class DisputeService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Dispute>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ class EventService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Event>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class ExchangeRateService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\ExchangeRate>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class FileLinkService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\FileLink>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class FileService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\File>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\FinancialConnections;
|
||||
|
||||
class AccountService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of Financial Connections <code>Account</code> objects.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\FinancialConnections\Account>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/financial_connections/accounts', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all owners for a given <code>Account</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\FinancialConnections\AccountOwner>
|
||||
*/
|
||||
public function allOwners($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/financial_connections/accounts/%s/owners', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables your access to a Financial Connections <code>Account</code>. You will
|
||||
* no longer be able to access data associated with the account (e.g. balances,
|
||||
* transactions).
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\FinancialConnections\Account
|
||||
*/
|
||||
public function disconnect($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/disconnect', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Refreshes the data associated with a Financial Connections <code>Account</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\FinancialConnections\Account
|
||||
*/
|
||||
public function refresh($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/refresh', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an Financial Connections <code>Account</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\FinancialConnections\Account
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/financial_connections/accounts/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\FinancialConnections;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the FinancialConnections namespace.
|
||||
*
|
||||
* @property AccountService $accounts
|
||||
* @property SessionService $sessions
|
||||
*/
|
||||
class FinancialConnectionsServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'accounts' => AccountService::class,
|
||||
'sessions' => SessionService::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\FinancialConnections;
|
||||
|
||||
class SessionService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* To launch the Financial Connections authorization flow, create a
|
||||
* <code>Session</code>. The session’s <code>client_secret</code> can be used to
|
||||
* launch the flow using Stripe.js.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\FinancialConnections\Session
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/financial_connections/sessions', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of a Financial Connections <code>Session</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\FinancialConnections\Session
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/financial_connections/sessions/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Identity;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the Identity namespace.
|
||||
*
|
||||
* @property VerificationReportService $verificationReports
|
||||
* @property VerificationSessionService $verificationSessions
|
||||
*/
|
||||
class IdentityServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'verificationReports' => VerificationReportService::class,
|
||||
'verificationSessions' => VerificationSessionService::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Identity;
|
||||
|
||||
class VerificationReportService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* List all verification reports.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Identity\VerificationReport>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/identity/verification_reports', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves an existing VerificationReport.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Identity\VerificationReport
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/identity/verification_reports/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Identity;
|
||||
|
||||
class VerificationSessionService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of VerificationSessions.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Identity\VerificationSession>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/identity/verification_sessions', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* A VerificationSession object can be canceled when it is in
|
||||
* <code>requires_input</code> <a
|
||||
* href="/docs/identity/how-sessions-work">status</a>.
|
||||
*
|
||||
* Once canceled, future submission attempts are disabled. This cannot be undone.
|
||||
* <a href="/docs/identity/verification-sessions#cancel">Learn more</a>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Identity\VerificationSession
|
||||
*/
|
||||
public function cancel($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/identity/verification_sessions/%s/cancel', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a VerificationSession object.
|
||||
*
|
||||
* After the VerificationSession is created, display a verification modal using the
|
||||
* session <code>client_secret</code> or send your users to the session’s
|
||||
* <code>url</code>.
|
||||
*
|
||||
* If your API key is in test mode, verification checks won’t actually process,
|
||||
* though everything else will occur as if in live mode.
|
||||
*
|
||||
* Related guide: <a href="/docs/identity/verify-identity-documents">Verify your
|
||||
* users’ identity documents</a>.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Identity\VerificationSession
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/identity/verification_sessions', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Redact a VerificationSession to remove all collected information from Stripe.
|
||||
* This will redact the VerificationSession and all objects related to it,
|
||||
* including VerificationReports, Events, request logs, etc.
|
||||
*
|
||||
* A VerificationSession object can be redacted when it is in
|
||||
* <code>requires_input</code> or <code>verified</code> <a
|
||||
* href="/docs/identity/how-sessions-work">status</a>. Redacting a
|
||||
* VerificationSession in <code>requires_action</code> state will automatically
|
||||
* cancel it.
|
||||
*
|
||||
* The redaction process may take up to four days. When the redaction process is in
|
||||
* progress, the VerificationSession’s <code>redaction.status</code> field will be
|
||||
* set to <code>processing</code>; when the process is finished, it will change to
|
||||
* <code>redacted</code> and an <code>identity.verification_session.redacted</code>
|
||||
* event will be emitted.
|
||||
*
|
||||
* Redaction is irreversible. Redacted objects are still accessible in the Stripe
|
||||
* API, but all the fields that contain personal data will be replaced by the
|
||||
* string <code>[redacted]</code> or a similar placeholder. The
|
||||
* <code>metadata</code> field will also be erased. Redacted objects cannot be
|
||||
* updated or used for any purpose.
|
||||
*
|
||||
* <a href="/docs/identity/verification-sessions#redact">Learn more</a>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Identity\VerificationSession
|
||||
*/
|
||||
public function redact($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/identity/verification_sessions/%s/redact', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of a VerificationSession that was previously created.
|
||||
*
|
||||
* When the session status is <code>requires_input</code>, you can use this method
|
||||
* to retrieve a valid <code>client_secret</code> or <code>url</code> to allow
|
||||
* re-submission.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Identity\VerificationSession
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/identity/verification_sessions/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a VerificationSession object.
|
||||
*
|
||||
* When the session status is <code>requires_input</code>, you can use this method
|
||||
* to update the verification check and options.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Identity\VerificationSession
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/identity/verification_sessions/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ class InvoiceItemService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\InvoiceItem>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Invoice>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -35,7 +35,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\InvoiceLineItem>
|
||||
*/
|
||||
public function allLines($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -43,12 +43,10 @@ class InvoiceService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint creates a draft invoice for a given customer. The draft invoice
|
||||
* created pulls in all pending invoice items on that customer, including
|
||||
* prorations. The invoice remains a draft until you <a
|
||||
* href="#finalize_invoice">finalize</a> the invoice, which allows you to <a
|
||||
* href="#pay_invoice">pay</a> or <a href="#send_invoice">send</a> the invoice to
|
||||
* your customers.
|
||||
* This endpoint creates a draft invoice for a given customer. The invoice remains
|
||||
* a draft until you <a href="#finalize_invoice">finalize</a> the invoice, which
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
@@ -152,6 +150,26 @@ class InvoiceService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/invoices/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for invoices you’ve previously created using Stripe’s <a
|
||||
* href="/docs/search#search-query-language">Search Query Language</a>. Don’t use
|
||||
* search in read-after-write flows where strict consistency is necessary. Under
|
||||
* normal operating conditions, data is searchable in less than a minute.
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SearchResult<\Stripe\Invoice>
|
||||
*/
|
||||
public function search($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestSearchResult('get', '/v1/invoices/search', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stripe will automatically send invoices to customers according to your <a
|
||||
* href="https://dashboard.stripe.com/account/billing/automatic">subscriptions
|
||||
@@ -221,11 +239,11 @@ class InvoiceService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Invoice
|
||||
* @return \Stripe\Collection<\Stripe\InvoiceLineItem>
|
||||
*/
|
||||
public function upcomingLines($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', '/v1/invoices/upcoming/lines', $params, $opts);
|
||||
return $this->requestCollection('get', '/v1/invoices/upcoming/lines', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@ class AuthorizationService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Issuing\Authorization>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -27,7 +27,9 @@ class AuthorizationService extends \Stripe\Service\AbstractService
|
||||
* Approves a pending Issuing <code>Authorization</code> object. This request
|
||||
* should be made within the timeout window of the <a
|
||||
* href="/docs/issuing/controls/real-time-authorizations">real-time
|
||||
* authorization</a> flow.
|
||||
* authorization</a> flow. You can also respond directly to the webhook request to
|
||||
* approve an authorization (preferred). More details can be found <a
|
||||
* href="https://site-admin.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">here</a>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
@@ -46,7 +48,9 @@ class AuthorizationService extends \Stripe\Service\AbstractService
|
||||
* Declines a pending Issuing <code>Authorization</code> object. This request
|
||||
* should be made within the timeout window of the <a
|
||||
* href="/docs/issuing/controls/real-time-authorizations">real time
|
||||
* authorization</a> flow.
|
||||
* authorization</a> flow. You can also respond directly to the webhook request to
|
||||
* decline an authorization (preferred). More details can be found <a
|
||||
* href="https://site-admin.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">here</a>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
|
||||
@@ -16,7 +16,7 @@ class CardService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Issuing\Card>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class CardholderService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Issuing\Cardholder>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class DisputeService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Issuing\Dispute>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class TransactionService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Issuing\Transaction>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service;
|
||||
|
||||
class OrderReturnService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of your order returns. The returns are returned sorted by
|
||||
* creation date, with the most recently created return appearing first.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/order_returns', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing order return. Supply the unique order ID
|
||||
* from either an order return creation request or the order return list, and
|
||||
* Stripe will return the corresponding order information.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\OrderReturn
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/order_returns/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service;
|
||||
|
||||
class OrderService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of your orders. The orders are returned sorted by creation date,
|
||||
* with the most recently created orders appearing first.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/orders', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new order object.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Order
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/orders', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pay an order by providing a <code>source</code> to create a payment.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Order
|
||||
*/
|
||||
public function pay($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/orders/%s/pay', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing order. Supply the unique order ID from
|
||||
* either an order creation request or the order list, and Stripe will return the
|
||||
* corresponding order information.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Order
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/orders/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all or part of an order. The order must have a status of
|
||||
* <code>paid</code> or <code>fulfilled</code> before it can be returned. Once all
|
||||
* items have been returned, the order will become <code>canceled</code> or
|
||||
* <code>returned</code> depending on which status the order started in.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Order
|
||||
*/
|
||||
public function returnOrder($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/orders/%s/returns', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the specific order by setting the values of the parameters passed. Any
|
||||
* parameters not provided will be left unchanged.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Order
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/orders/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -14,23 +14,44 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\PaymentIntent>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/payment_intents', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually reconcile the remaining amount for a customer_balance PaymentIntent.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\PaymentIntent
|
||||
*/
|
||||
public function applyCustomerBalance($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/payment_intents/%s/apply_customer_balance', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* A PaymentIntent object can be canceled when it is in one of these statuses:
|
||||
* <code>requires_payment_method</code>, <code>requires_capture</code>,
|
||||
* <code>requires_confirmation</code>, or <code>requires_action</code>.
|
||||
* <code>requires_confirmation</code>, <code>requires_action</code> or, <a
|
||||
* href="/docs/payments/intents">in rare cases</a>, <code>processing</code>.
|
||||
*
|
||||
* Once canceled, no additional charges will be made by the PaymentIntent and any
|
||||
* operations on the PaymentIntent will fail with an error. For PaymentIntents with
|
||||
* <code>status=’requires_capture’</code>, the remaining
|
||||
* <code>amount_capturable</code> will automatically be refunded.
|
||||
*
|
||||
* You cannot cancel the PaymentIntent for a Checkout Session. <a
|
||||
* href="/docs/api/checkout/sessions/expire">Expire the Checkout Session</a>
|
||||
* instead.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
@@ -48,8 +69,8 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
|
||||
* Capture the funds of an existing uncaptured PaymentIntent when its status is
|
||||
* <code>requires_capture</code>.
|
||||
*
|
||||
* Uncaptured PaymentIntents will be canceled exactly seven days after they are
|
||||
* created.
|
||||
* Uncaptured PaymentIntents will be canceled a set number of days after they are
|
||||
* created (7 by default).
|
||||
*
|
||||
* Learn more about <a href="/docs/payments/capture-later">separate authorization
|
||||
* and capture</a>.
|
||||
@@ -70,29 +91,25 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
|
||||
/**
|
||||
* Confirm that your customer intends to pay with current or provided payment
|
||||
* method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.
|
||||
*
|
||||
* If the selected payment method requires additional authentication steps, the
|
||||
* PaymentIntent will transition to the <code>requires_action</code> status and
|
||||
* suggest additional actions via <code>next_action</code>. If payment fails, the
|
||||
* PaymentIntent will transition to the <code>requires_payment_method</code>
|
||||
* status. If payment succeeds, the PaymentIntent will transition to the
|
||||
* <code>succeeded</code> status (or <code>requires_capture</code>, if
|
||||
* <code>capture_method</code> is set to <code>manual</code>).
|
||||
*
|
||||
* If the <code>confirmation_method</code> is <code>automatic</code>, payment may
|
||||
* be attempted using our <a
|
||||
* <code>capture_method</code> is set to <code>manual</code>). If the
|
||||
* <code>confirmation_method</code> is <code>automatic</code>, payment may be
|
||||
* attempted using our <a
|
||||
* href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and
|
||||
* the PaymentIntent’s <a
|
||||
* href="#payment_intent_object-client_secret">client_secret</a>. After
|
||||
* <code>next_action</code>s are handled by the client, no additional confirmation
|
||||
* is required to complete the payment.
|
||||
*
|
||||
* If the <code>confirmation_method</code> is <code>manual</code>, all payment
|
||||
* attempts must be initiated using a secret key. If any actions are required for
|
||||
* the payment, the PaymentIntent will return to the
|
||||
* <code>requires_confirmation</code> state after those actions are completed. Your
|
||||
* server needs to then explicitly re-confirm the PaymentIntent to initiate the
|
||||
* next payment attempt. Read the <a
|
||||
* is required to complete the payment. If the <code>confirmation_method</code> is
|
||||
* <code>manual</code>, all payment attempts must be initiated using a secret key.
|
||||
* If any actions are required for the payment, the PaymentIntent will return to
|
||||
* the <code>requires_confirmation</code> state after those actions are completed.
|
||||
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate
|
||||
* the next payment attempt. Read the <a
|
||||
* href="/docs/payments/payment-intents/web-manual">expanded documentation</a> to
|
||||
* learn more about manual confirmation.
|
||||
*
|
||||
@@ -134,6 +151,47 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
|
||||
return $this->request('post', '/v1/payment_intents', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform an incremental authorization on an eligible <a
|
||||
* href="/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible, the
|
||||
* PaymentIntent’s status must be <code>requires_capture</code> and <a
|
||||
* href="/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
|
||||
* must be <code>true</code>.
|
||||
*
|
||||
* Incremental authorizations attempt to increase the authorized amount on your
|
||||
* customer’s card to the new, higher <code>amount</code> provided. As with the
|
||||
* initial authorization, incremental authorizations may be declined. A single
|
||||
* PaymentIntent can call this endpoint multiple times to further increase the
|
||||
* authorized amount.
|
||||
*
|
||||
* If the incremental authorization succeeds, the PaymentIntent object is returned
|
||||
* with the updated <a
|
||||
* href="/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
|
||||
* If the incremental authorization fails, a <a
|
||||
* href="/docs/error-codes#card-declined">card_declined</a> error is returned, and
|
||||
* no fields on the PaymentIntent or Charge are updated. The PaymentIntent object
|
||||
* remains capturable for the previously authorized amount.
|
||||
*
|
||||
* Each PaymentIntent can have a maximum of 10 incremental authorization attempts,
|
||||
* including declines. Once captured, a PaymentIntent can no longer be incremented.
|
||||
*
|
||||
* Learn more about <a
|
||||
* href="/docs/terminal/features/incremental-authorizations">incremental
|
||||
* authorizations</a>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\PaymentIntent
|
||||
*/
|
||||
public function incrementAuthorization($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/payment_intents/%s/increment_authorization', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of a PaymentIntent that has previously been created.
|
||||
*
|
||||
@@ -157,6 +215,26 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for PaymentIntents you’ve previously created using Stripe’s <a
|
||||
* href="/docs/search#search-query-language">Search Query Language</a>. Don’t use
|
||||
* search in read-after-write flows where strict consistency is necessary. Under
|
||||
* normal operating conditions, data is searchable in less than a minute.
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SearchResult<\Stripe\PaymentIntent>
|
||||
*/
|
||||
public function search($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestSearchResult('get', '/v1/payment_intents/search', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates properties on a PaymentIntent object without confirming.
|
||||
*
|
||||
@@ -178,4 +256,20 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies microdeposits on a PaymentIntent object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\PaymentIntent
|
||||
*/
|
||||
public function verifyMicrodeposits($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/payment_intents/%s/verify_microdeposits', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service;
|
||||
|
||||
class PaymentLinkService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of your payment links.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\PaymentLink>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/payment_links', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* When retrieving a payment link, there is an includable
|
||||
* <strong>line_items</strong> property containing the first handful of those
|
||||
* items. There is also a URL where you can retrieve the full (paginated) list of
|
||||
* line items.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\LineItem>
|
||||
*/
|
||||
public function allLineItems($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/payment_links/%s/line_items', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a payment link.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\PaymentLink
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/payment_links', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a payment link.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\PaymentLink
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/payment_links/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a payment link.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\PaymentLink
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/payment_links/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -7,14 +7,17 @@ namespace Stripe\Service;
|
||||
class PaymentMethodService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of PaymentMethods for a given Customer.
|
||||
* Returns a list of PaymentMethods for Treasury flows. If you want to list the
|
||||
* PaymentMethods attached to a Customer for payments, you should use the <a
|
||||
* href="/docs/api/payment_methods/customer_list">List a Customer’s
|
||||
* PaymentMethods</a> API instead.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\PaymentMethod>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -28,10 +31,11 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
|
||||
* you use a <a href="/docs/api/setup_intents">SetupIntent</a> or a PaymentIntent
|
||||
* with <a
|
||||
* href="/docs/api/payment_intents/create#create_payment_intent-setup_future_usage">setup_future_usage</a>.
|
||||
* These approaches will perform any necessary steps to ensure that the
|
||||
* PaymentMethod can be used in a future payment. Using the
|
||||
* <code>/v1/payment_methods/:id/attach</code> endpoint does not ensure that future
|
||||
* payments can be made with the attached PaymentMethod. See <a
|
||||
* These approaches will perform any necessary steps to set up the PaymentMethod
|
||||
* for future payments. Using the <code>/v1/payment_methods/:id/attach</code>
|
||||
* endpoint without first using a SetupIntent or PaymentIntent with
|
||||
* <code>setup_future_usage</code> does not optimize the PaymentMethod for future
|
||||
* use, which makes later declines and payment friction more likely. See <a
|
||||
* href="/docs/payments/payment-intents#future-usage">Optimizing cards for future
|
||||
* payments</a> for more information about setting up future payments.
|
||||
*
|
||||
@@ -58,6 +62,12 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
|
||||
* href="/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
|
||||
* reference</a> to learn how to create PaymentMethods via Stripe.js.
|
||||
*
|
||||
* Instead of creating a PaymentMethod directly, we recommend using the <a
|
||||
* href="/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
|
||||
* payment immediately or the <a
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
@@ -71,7 +81,8 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches a PaymentMethod object from a Customer.
|
||||
* Detaches a PaymentMethod object from a Customer. After a PaymentMethod is
|
||||
* detached, it can no longer be used for a payment or re-attached to a Customer.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
@@ -87,7 +98,10 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a PaymentMethod object.
|
||||
* Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a
|
||||
* payment method attached to a Customer, you should use <a
|
||||
* href="/docs/api/payment_methods/customer">Retrieve a Customer’s
|
||||
* PaymentMethods</a>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
|
||||
@@ -16,7 +16,7 @@ class PayoutService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Payout>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class PlanService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Plan>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class PriceService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Price>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -53,6 +53,26 @@ class PriceService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/prices/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for prices you’ve previously created using Stripe’s <a
|
||||
* href="/docs/search#search-query-language">Search Query Language</a>. Don’t use
|
||||
* search in read-after-write flows where strict consistency is necessary. Under
|
||||
* normal operating conditions, data is searchable in less than a minute.
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SearchResult<\Stripe\Price>
|
||||
*/
|
||||
public function search($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestSearchResult('get', '/v1/prices/search', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the specified price by setting the values of the parameters passed. Any
|
||||
* parameters not provided are left unchanged.
|
||||
|
||||
@@ -15,7 +15,7 @@ class ProductService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Product>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -73,6 +73,26 @@ class ProductService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/products/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for products you’ve previously created using Stripe’s <a
|
||||
* href="/docs/search#search-query-language">Search Query Language</a>. Don’t use
|
||||
* search in read-after-write flows where strict consistency is necessary. Under
|
||||
* normal operating conditions, data is searchable in less than a minute.
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SearchResult<\Stripe\Product>
|
||||
*/
|
||||
public function search($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestSearchResult('get', '/v1/products/search', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the specific product by setting the values of the parameters passed. Any
|
||||
* parameters not provided will be left unchanged.
|
||||
|
||||
@@ -14,7 +14,7 @@ class PromotionCodeService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\PromotionCode>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -38,7 +38,10 @@ class PromotionCodeService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the promotion code with the given ID.
|
||||
* Retrieves the promotion code with the given ID. In order to retrieve a promotion
|
||||
* code by the customer-facing <code>code</code> use <a
|
||||
* href="/docs/api/promotion_codes/list">list</a> with the desired
|
||||
* <code>code</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
|
||||
177
htdocs/includes/stripe/stripe-php/lib/Service/QuoteService.php
Normal file
177
htdocs/includes/stripe/stripe-php/lib/Service/QuoteService.php
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service;
|
||||
|
||||
class QuoteService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Accepts the specified quote.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Quote
|
||||
*/
|
||||
public function accept($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/quotes/%s/accept', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of your quotes.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Quote>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/quotes', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* When retrieving a quote, there is an includable <a
|
||||
* href="https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items"><strong>computed.upfront.line_items</strong></a>
|
||||
* property containing the first handful of those items. There is also a URL where
|
||||
* you can retrieve the full (paginated) list of upfront line items.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\LineItem>
|
||||
*/
|
||||
public function allComputedUpfrontLineItems($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/computed_upfront_line_items', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* When retrieving a quote, there is an includable <strong>line_items</strong>
|
||||
* property containing the first handful of those items. There is also a URL where
|
||||
* you can retrieve the full (paginated) list of line items.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\LineItem>
|
||||
*/
|
||||
public function allLineItems($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/line_items', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the quote.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Quote
|
||||
*/
|
||||
public function cancel($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/quotes/%s/cancel', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* A quote models prices and services for a customer. Default options for
|
||||
* <code>header</code>, <code>description</code>, <code>footer</code>, and
|
||||
* <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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Quote
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/quotes', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finalizes the quote.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Quote
|
||||
*/
|
||||
public function finalizeQuote($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/quotes/%s/finalize', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the quote with the given ID.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Quote
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/quotes/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* A quote models prices and services for a customer.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Quote
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/quotes/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Download the PDF for a finalized quote.
|
||||
*
|
||||
* @param string $id
|
||||
* @param callable $readBodyChunkCallable
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null)
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
if (!isset($opts->apiBase)) {
|
||||
$opts->apiBase = $this->getClient()->getFilesBase();
|
||||
}
|
||||
$this->requestStream('get', $this->buildPath('/v1/quotes/%s/pdf', $id), $readBodyChunkCallable, $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class EarlyFraudWarningService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Radar\EarlyFraudWarning>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class ValueListItemService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Radar\ValueListItem>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class ValueListService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Radar\ValueList>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -17,13 +17,32 @@ class RefundService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Refund>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/refunds', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels a refund with a status of <code>requires_action</code>.
|
||||
*
|
||||
* Refunds in other states cannot be canceled, and only refunds for payment methods
|
||||
* that require customer action will enter the <code>requires_action</code> state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Refund
|
||||
*/
|
||||
public function cancel($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/refunds/%s/cancel', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a refund.
|
||||
*
|
||||
|
||||
@@ -7,15 +7,14 @@ namespace Stripe\Service\Reporting;
|
||||
class ReportRunService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of Report Runs, with the most recent appearing first. (Requires a
|
||||
* <a href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.).
|
||||
* Returns a list of Report Runs, with the most recent appearing first.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Reporting\ReportRun>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -23,8 +22,8 @@ class ReportRunService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new object and begin running the report. (Requires a <a
|
||||
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.).
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
@@ -39,8 +38,7 @@ class ReportRunService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing Report Run. (Requires a <a
|
||||
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.).
|
||||
* Retrieves the details of an existing Report Run.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
|
||||
@@ -7,15 +7,14 @@ namespace Stripe\Service\Reporting;
|
||||
class ReportTypeService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a full list of Report Types. (Requires a <a
|
||||
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.).
|
||||
* Returns a full list of Report Types.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Reporting\ReportType>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -23,7 +22,7 @@ class ReportTypeService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of a Report Type. (Requires a <a
|
||||
* Retrieves the details of a Report Type. (Certain report types require a <a
|
||||
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.).
|
||||
*
|
||||
* @param string $id
|
||||
|
||||
@@ -16,7 +16,7 @@ class ReviewService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Review>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class SetupAttemptService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\SetupAttempt>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class SetupIntentService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\SetupIntent>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -124,4 +124,20 @@ class SetupIntentService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/setup_intents/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies microdeposits on a SetupIntent object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SetupIntent
|
||||
*/
|
||||
public function verifyMicrodeposits($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/setup_intents/%s/verify_microdeposits', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service;
|
||||
|
||||
class ShippingRateService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of your shipping rates.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\ShippingRate>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/shipping_rates', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new shipping rate object.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\ShippingRate
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/shipping_rates', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shipping rate object with the given ID.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\ShippingRate
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/shipping_rates/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an existing shipping rate object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\ShippingRate
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/shipping_rates/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class ScheduledQueryRunService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Sigma\ScheduledQueryRun>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -7,17 +7,19 @@ namespace Stripe\Service;
|
||||
class SourceService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* List source transactions for a given source.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Source
|
||||
* @return \Stripe\Collection<\Stripe\SourceTransaction>
|
||||
*/
|
||||
public function allTransactions($id, $params = null, $opts = null)
|
||||
public function allSourceTransactions($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/sources/%s/source_transactions', $id), $params, $opts);
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/sources/%s/source_transactions', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,7 +14,7 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\SubscriptionItem>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -39,7 +39,7 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\UsageRecordSummary>
|
||||
*/
|
||||
public function allUsageRecordSummaries($parentId, $params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\SubscriptionSchedule>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class SubscriptionService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Subscription>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -58,6 +58,17 @@ class SubscriptionService extends \Stripe\Service\AbstractService
|
||||
* Creates a new subscription on an existing customer. Each customer can have up to
|
||||
* 500 active or scheduled subscriptions.
|
||||
*
|
||||
* When you create a subscription with
|
||||
* <code>collection_method=charge_automatically</code>, the first invoice is
|
||||
* finalized as part of the request. The <code>payment_behavior</code> parameter
|
||||
* determines the exact behavior of the initial payment.
|
||||
*
|
||||
* To start subscriptions where the first invoice always begins in a
|
||||
* <code>draft</code> status, use <a
|
||||
* href="/docs/billing/subscriptions/subscription-schedules#managing">subscription
|
||||
* schedules</a> instead. Schedules provide the flexibility to model more complex
|
||||
* billing configurations that change over time.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
@@ -86,6 +97,27 @@ class SubscriptionService extends \Stripe\Service\AbstractService
|
||||
return $this->request('delete', $this->buildPath('/v1/subscriptions/%s/discount', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates resumption of a paused subscription, optionally resetting the billing
|
||||
* cycle anchor and creating prorations. If a resumption invoice is generated, it
|
||||
* must be paid or marked uncollectible before the subscription will be unpaused.
|
||||
* If payment succeeds the subscription will become <code>active</code>, and if
|
||||
* payment fails the subscription will be <code>past_due</code>. The resumption
|
||||
* invoice will void automatically if not paid by the expiration date.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Subscription
|
||||
*/
|
||||
public function resume($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/subscriptions/%s/resume', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the subscription with the given ID.
|
||||
*
|
||||
@@ -102,6 +134,26 @@ class SubscriptionService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for subscriptions you’ve previously created using Stripe’s <a
|
||||
* href="/docs/search#search-query-language">Search Query Language</a>. Don’t use
|
||||
* search in read-after-write flows where strict consistency is necessary. Under
|
||||
* normal operating conditions, data is searchable in less than a minute.
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SearchResult<\Stripe\Subscription>
|
||||
*/
|
||||
public function search($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestSearchResult('get', '/v1/subscriptions/search', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an existing subscription on a customer to match the specified
|
||||
* parameters. When changing plans or quantities, we will optionally prorate the
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service;
|
||||
|
||||
class TaxCodeService extends \Stripe\Service\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|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\TaxCode>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/tax_codes', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing tax code. Supply the unique tax code ID and
|
||||
* Stripe will return the corresponding tax code information.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\TaxCode
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/tax_codes/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ class TaxRateService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\TaxRate>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -2,44 +2,42 @@
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service;
|
||||
namespace Stripe\Service\Terminal;
|
||||
|
||||
class SkuService extends \Stripe\Service\AbstractService
|
||||
class ConfigurationService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of your SKUs. The SKUs are returned sorted by creation date, with
|
||||
* the most recently created SKUs appearing first.
|
||||
* Returns a list of <code>Configuration</code> objects.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Terminal\Configuration>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/skus', $params, $opts);
|
||||
return $this->requestCollection('get', '/v1/terminal/configurations', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new SKU associated with a product.
|
||||
* Creates a new <code>Configuration</code> object.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SKU
|
||||
* @return \Stripe\Terminal\Configuration
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/skus', $params, $opts);
|
||||
return $this->request('post', '/v1/terminal/configurations', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a SKU. Deleting a SKU is only possible until it has been used in an
|
||||
* order.
|
||||
* Deletes a <code>Configuration</code> object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
@@ -47,17 +45,15 @@ class SkuService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SKU
|
||||
* @return \Stripe\Terminal\Configuration
|
||||
*/
|
||||
public function delete($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('delete', $this->buildPath('/v1/skus/%s', $id), $params, $opts);
|
||||
return $this->request('delete', $this->buildPath('/v1/terminal/configurations/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing SKU. Supply the unique SKU identifier from
|
||||
* either a SKU creation request or from the product, and Stripe will return the
|
||||
* corresponding SKU information.
|
||||
* Retrieves a <code>Configuration</code> object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
@@ -65,20 +61,15 @@ class SkuService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SKU
|
||||
* @return \Stripe\Terminal\Configuration
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/skus/%s', $id), $params, $opts);
|
||||
return $this->request('get', $this->buildPath('/v1/terminal/configurations/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the specific SKU by setting the values of the parameters passed. Any
|
||||
* parameters not provided will be left unchanged.
|
||||
*
|
||||
* Note that a SKU’s <code>attributes</code> are not editable. Instead, you would
|
||||
* need to deactivate the existing SKU and create a new one with the new attribute
|
||||
* values.
|
||||
* Updates a new <code>Configuration</code> object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
@@ -86,10 +77,10 @@ class SkuService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SKU
|
||||
* @return \Stripe\Terminal\Configuration
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/skus/%s', $id), $params, $opts);
|
||||
return $this->request('post', $this->buildPath('/v1/terminal/configurations/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class LocationService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Terminal\Location>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -22,7 +22,9 @@ class LocationService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>Location</code> object.
|
||||
* Creates a new <code>Location</code> object. For further details, including which
|
||||
* 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|\Stripe\Util\RequestOptions $opts
|
||||
|
||||
@@ -14,13 +14,29 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Terminal\Reader>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/terminal/readers', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the current reader action.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Terminal\Reader
|
||||
*/
|
||||
public function cancelAction($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/cancel_action', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>Reader</code> object.
|
||||
*
|
||||
@@ -52,6 +68,54 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||
return $this->request('delete', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates a payment flow on a Reader.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Terminal\Reader
|
||||
*/
|
||||
public function processPaymentIntent($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/process_payment_intent', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates a setup intent flow on a Reader.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Terminal\Reader
|
||||
*/
|
||||
public function processSetupIntent($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/process_setup_intent', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates a refund on a Reader.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Terminal\Reader
|
||||
*/
|
||||
public function refundPayment($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/refund_payment', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a <code>Reader</code> object.
|
||||
*
|
||||
@@ -68,6 +132,22 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets reader display to show cart details.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Terminal\Reader
|
||||
*/
|
||||
public function setReaderDisplay($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/set_reader_display', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a <code>Reader</code> object by setting the values of the parameters
|
||||
* passed. Any parameters not provided will be left unchanged.
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Stripe\Service\Terminal;
|
||||
/**
|
||||
* Service factory class for API resources in the Terminal namespace.
|
||||
*
|
||||
* @property ConfigurationService $configurations
|
||||
* @property ConnectionTokenService $connectionTokens
|
||||
* @property LocationService $locations
|
||||
* @property ReaderService $readers
|
||||
@@ -17,6 +18,7 @@ class TerminalServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'configurations' => ConfigurationService::class,
|
||||
'connectionTokens' => ConnectionTokenService::class,
|
||||
'locations' => LocationService::class,
|
||||
'readers' => ReaderService::class,
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers;
|
||||
|
||||
class CustomerService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Create an incoming testmode bank transfer.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Customer
|
||||
*/
|
||||
public function fundCashBalance($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/customers/%s/fund_cash_balance', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Issuing;
|
||||
|
||||
class CardService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Updates the shipping status of the specified Issuing <code>Card</code> object to
|
||||
* <code>delivered</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Issuing\Card
|
||||
*/
|
||||
public function deliverCard($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/deliver', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the shipping status of the specified Issuing <code>Card</code> object to
|
||||
* <code>failure</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Issuing\Card
|
||||
*/
|
||||
public function failCard($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/fail', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the shipping status of the specified Issuing <code>Card</code> object to
|
||||
* <code>returned</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Issuing\Card
|
||||
*/
|
||||
public function returnCard($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/return', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the shipping status of the specified Issuing <code>Card</code> object to
|
||||
* <code>shipped</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Issuing\Card
|
||||
*/
|
||||
public function shipCard($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/ship', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Issuing;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the Issuing namespace.
|
||||
*
|
||||
* @property CardService $cards
|
||||
*/
|
||||
class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'cards' => CardService::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers;
|
||||
|
||||
class RefundService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Expire a refund with a status of <code>requires_action</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Refund
|
||||
*/
|
||||
public function expire($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/refunds/%s/expire', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Terminal;
|
||||
|
||||
class ReaderService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Presents a payment method on a simulated reader. Can be used to simulate
|
||||
* accepting a payment, saving a card or refunding a transaction.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Terminal\Reader
|
||||
*/
|
||||
public function presentPaymentMethod($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/terminal/readers/%s/present_payment_method', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Terminal;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the Terminal namespace.
|
||||
*
|
||||
* @property ReaderService $readers
|
||||
*/
|
||||
class TerminalServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'readers' => ReaderService::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers;
|
||||
|
||||
class TestClockService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Starts advancing a test clock to a specified time in the future. Advancement is
|
||||
* done when status changes to <code>Ready</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\TestHelpers\TestClock
|
||||
*/
|
||||
public function advance($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/test_clocks/%s/advance', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of your test clocks.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\TestHelpers\TestClock>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/test_helpers/test_clocks', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new test clock that can be attached to new customers and quotes.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\TestHelpers\TestClock
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/test_helpers/test_clocks', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a test clock.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\TestHelpers\TestClock
|
||||
*/
|
||||
public function delete($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('delete', $this->buildPath('/v1/test_helpers/test_clocks/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a test clock.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\TestHelpers\TestClock
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/test_helpers/test_clocks/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the TestHelpers namespace.
|
||||
*
|
||||
* @property CustomerService $customers
|
||||
* @property Issuing\IssuingServiceFactory $issuing
|
||||
* @property RefundService $refunds
|
||||
* @property Terminal\TerminalServiceFactory $terminal
|
||||
* @property TestClockService $testClocks
|
||||
* @property Treasury\TreasuryServiceFactory $treasury
|
||||
*/
|
||||
class TestHelpersServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'customers' => CustomerService::class,
|
||||
'issuing' => Issuing\IssuingServiceFactory::class,
|
||||
'refunds' => RefundService::class,
|
||||
'terminal' => Terminal\TerminalServiceFactory::class,
|
||||
'testClocks' => TestClockService::class,
|
||||
'treasury' => Treasury\TreasuryServiceFactory::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Treasury;
|
||||
|
||||
class InboundTransferService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Transitions a test mode created InboundTransfer to the <code>failed</code>
|
||||
* status. The InboundTransfer must already be in the <code>processing</code>
|
||||
* state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\InboundTransfer
|
||||
*/
|
||||
public function fail($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/inbound_transfers/%s/fail', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the test mode InboundTransfer object as returned and links the
|
||||
* InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the
|
||||
* <code>succeeded</code> state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\InboundTransfer
|
||||
*/
|
||||
public function returnInboundTransfer($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/inbound_transfers/%s/return', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transitions a test mode created InboundTransfer to the <code>succeeded</code>
|
||||
* status. The InboundTransfer must already be in the <code>processing</code>
|
||||
* state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\InboundTransfer
|
||||
*/
|
||||
public function succeed($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/inbound_transfers/%s/succeed', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Treasury;
|
||||
|
||||
class OutboundPaymentService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Transitions a test mode created OutboundPayment to the <code>failed</code>
|
||||
* status. The OutboundPayment must already be in the <code>processing</code>
|
||||
* state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundPayment
|
||||
*/
|
||||
public function fail($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/outbound_payments/%s/fail', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transitions a test mode created OutboundPayment to the <code>posted</code>
|
||||
* status. The OutboundPayment must already be in the <code>processing</code>
|
||||
* state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundPayment
|
||||
*/
|
||||
public function post($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/outbound_payments/%s/post', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transitions a test mode created OutboundPayment to the <code>returned</code>
|
||||
* status. The OutboundPayment must already be in the <code>processing</code>
|
||||
* state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundPayment
|
||||
*/
|
||||
public function returnOutboundPayment($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/outbound_payments/%s/return', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Treasury;
|
||||
|
||||
class OutboundTransferService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Transitions a test mode created OutboundTransfer to the <code>failed</code>
|
||||
* status. The OutboundTransfer must already be in the <code>processing</code>
|
||||
* state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundTransfer
|
||||
*/
|
||||
public function fail($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/outbound_transfers/%s/fail', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transitions a test mode created OutboundTransfer to the <code>posted</code>
|
||||
* status. The OutboundTransfer must already be in the <code>processing</code>
|
||||
* state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundTransfer
|
||||
*/
|
||||
public function post($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/outbound_transfers/%s/post', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transitions a test mode created OutboundTransfer to the <code>returned</code>
|
||||
* status. The OutboundTransfer must already be in the <code>processing</code>
|
||||
* state.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundTransfer
|
||||
*/
|
||||
public function returnOutboundTransfer($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/outbound_transfers/%s/return', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Treasury;
|
||||
|
||||
class ReceivedCreditService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Use this endpoint to simulate a test mode ReceivedCredit initiated by a third
|
||||
* party. In live mode, you can’t directly create ReceivedCredits initiated by
|
||||
* third parties.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\ReceivedCredit
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/test_helpers/treasury/received_credits', $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Treasury;
|
||||
|
||||
class ReceivedDebitService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Use this endpoint to simulate a test mode ReceivedDebit initiated by a third
|
||||
* party. In live mode, you can’t directly create ReceivedDebits initiated by third
|
||||
* parties.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\ReceivedDebit
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/test_helpers/treasury/received_debits', $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\TestHelpers\Treasury;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the Treasury namespace.
|
||||
*
|
||||
* @property InboundTransferService $inboundTransfers
|
||||
* @property OutboundPaymentService $outboundPayments
|
||||
* @property OutboundTransferService $outboundTransfers
|
||||
* @property ReceivedCreditService $receivedCredits
|
||||
* @property ReceivedDebitService $receivedDebits
|
||||
*/
|
||||
class TreasuryServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'inboundTransfers' => InboundTransferService::class,
|
||||
'outboundPayments' => OutboundPaymentService::class,
|
||||
'outboundTransfers' => OutboundTransferService::class,
|
||||
'receivedCredits' => ReceivedCreditService::class,
|
||||
'receivedDebits' => ReceivedDebitService::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class TopupService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Topup>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class TransferService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Transfer>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -36,27 +36,13 @@ class TransferService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\TransferReversal>
|
||||
*/
|
||||
public function allReversals($parentId, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/transfers/%s/reversals', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Transfer
|
||||
*/
|
||||
public function cancel($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/transfers/%s/cancel', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* To send funds from your Stripe account to a connected account, you create a new
|
||||
* transfer object. Your <a href="#balance">Stripe balance</a> must be able to
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class CreditReversalService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of CreditReversals.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\CreditReversal>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/credit_reversals', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverses a ReceivedCredit and creates a CreditReversal object.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\CreditReversal
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/treasury/credit_reversals', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing CreditReversal by passing the unique
|
||||
* CreditReversal ID from either the CreditReversal creation request or
|
||||
* CreditReversal list.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\CreditReversal
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/credit_reversals/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class DebitReversalService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of DebitReversals.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\DebitReversal>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/debit_reversals', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverses a ReceivedDebit and creates a DebitReversal object.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\DebitReversal
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/treasury/debit_reversals', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DebitReversal object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\DebitReversal
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/debit_reversals/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class FinancialAccountService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of FinancialAccounts.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\FinancialAccount>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/financial_accounts', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new FinancialAccount. For now, each connected account can only have
|
||||
* one FinancialAccount.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\FinancialAccount
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/treasury/financial_accounts', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of a FinancialAccount.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\FinancialAccount
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/financial_accounts/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves Features information associated with the FinancialAccount.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\FinancialAccount
|
||||
*/
|
||||
public function retrieveFeatures($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/financial_accounts/%s/features', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the details of a FinancialAccount.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\FinancialAccount
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/treasury/financial_accounts/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the Features associated with a FinancialAccount.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\FinancialAccount
|
||||
*/
|
||||
public function updateFeatures($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/treasury/financial_accounts/%s/features', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class InboundTransferService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of InboundTransfers sent from the specified FinancialAccount.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\InboundTransfer>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/inbound_transfers', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels an InboundTransfer.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\InboundTransfer
|
||||
*/
|
||||
public function cancel($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/treasury/inbound_transfers/%s/cancel', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an InboundTransfer.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\InboundTransfer
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/treasury/inbound_transfers', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing InboundTransfer.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\InboundTransfer
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/inbound_transfers/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class OutboundPaymentService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of OutboundPayments sent from the specified FinancialAccount.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\OutboundPayment>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/outbound_payments', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel an OutboundPayment.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundPayment
|
||||
*/
|
||||
public function cancel($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/treasury/outbound_payments/%s/cancel', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an OutboundPayment.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundPayment
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/treasury/outbound_payments', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing OutboundPayment by passing the unique
|
||||
* OutboundPayment ID from either the OutboundPayment creation request or
|
||||
* OutboundPayment list.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundPayment
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/outbound_payments/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class OutboundTransferService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of OutboundTransfers sent from the specified FinancialAccount.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\OutboundTransfer>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/outbound_transfers', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* An OutboundTransfer can be canceled if the funds have not yet been paid out.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundTransfer
|
||||
*/
|
||||
public function cancel($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/treasury/outbound_transfers/%s/cancel', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an OutboundTransfer.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundTransfer
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/treasury/outbound_transfers', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing OutboundTransfer by passing the unique
|
||||
* OutboundTransfer ID from either the OutboundTransfer creation request or
|
||||
* OutboundTransfer list.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\OutboundTransfer
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/outbound_transfers/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class ReceivedCreditService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of ReceivedCredits.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\ReceivedCredit>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/received_credits', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing ReceivedCredit by passing the unique
|
||||
* ReceivedCredit ID from the ReceivedCredit list.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\ReceivedCredit
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/received_credits/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class ReceivedDebitService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Returns a list of ReceivedDebits.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\ReceivedDebit>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/received_debits', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing ReceivedDebit by passing the unique
|
||||
* ReceivedDebit ID from the ReceivedDebit list.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\ReceivedDebit
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/received_debits/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class TransactionEntryService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Retrieves a list of TransactionEntry objects.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\TransactionEntry>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/transaction_entries', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a TransactionEntry object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\TransactionEntry
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/transaction_entries/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
class TransactionService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Retrieves a list of Transaction objects.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Treasury\Transaction>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/treasury/transactions', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing Transaction.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Treasury\Transaction
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/treasury/transactions/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Treasury;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the Treasury namespace.
|
||||
*
|
||||
* @property CreditReversalService $creditReversals
|
||||
* @property DebitReversalService $debitReversals
|
||||
* @property FinancialAccountService $financialAccounts
|
||||
* @property InboundTransferService $inboundTransfers
|
||||
* @property OutboundPaymentService $outboundPayments
|
||||
* @property OutboundTransferService $outboundTransfers
|
||||
* @property ReceivedCreditService $receivedCredits
|
||||
* @property ReceivedDebitService $receivedDebits
|
||||
* @property TransactionEntryService $transactionEntries
|
||||
* @property TransactionService $transactions
|
||||
*/
|
||||
class TreasuryServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'creditReversals' => CreditReversalService::class,
|
||||
'debitReversals' => DebitReversalService::class,
|
||||
'financialAccounts' => FinancialAccountService::class,
|
||||
'inboundTransfers' => InboundTransferService::class,
|
||||
'outboundPayments' => OutboundPaymentService::class,
|
||||
'outboundTransfers' => OutboundTransferService::class,
|
||||
'receivedCredits' => ReceivedCreditService::class,
|
||||
'receivedDebits' => ReceivedDebitService::class,
|
||||
'transactionEntries' => TransactionEntryService::class,
|
||||
'transactions' => TransactionService::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class WebhookEndpointService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\WebhookEndpoint>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user