PATH:
home
/
thebhoeo
/
.trash
/
otter-blocks
/
vendor
/
stripe
/
stripe-php
/
lib
/
Service
<?php namespace Stripe\Service; /** * Abstract base class for all services. */ abstract class AbstractService { /** * @var \Stripe\StripeClientInterface */ protected $client; /** * @var \Stripe\StripeStreamingClientInterface */ protected $streamingClient; /** * Initializes a new instance of the {@link AbstractService} class. * * @param \Stripe\StripeClientInterface $client */ public function __construct($client) { $this->client = $client; $this->streamingClient = $client; } /** * Gets the client used by this service to send requests. * * @return \Stripe\StripeClientInterface */ public function getClient() { 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 * corresponds to sending an empty string for the field to the * API. * * @param null|array $params */ private static function formatParams($params) { if (null === $params) { return null; } \array_walk_recursive($params, function (&$value, $key) { if (null === $value) { $value = ''; } }); return $params; } protected function request($method, $path, $params, $opts) { return $this->getClient()->request($method, $path, self::formatParams($params), $opts); } protected function requestStream($method, $path, $readBodyChunkCallable, $params, $opts) { // TODO (MAJOR): Add this method to StripeClientInterface // @phpstan-ignore-next-line return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, self::formatParams($params), $opts); } protected function requestCollection($method, $path, $params, $opts) { // TODO (MAJOR): Add this method to StripeClientInterface // @phpstan-ignore-next-line return $this->getClient()->requestCollection($method, $path, self::formatParams($params), $opts); } protected function requestSearchResult($method, $path, $params, $opts) { // TODO (MAJOR): Add this method to StripeClientInterface // @phpstan-ignore-next-line return $this->getClient()->requestSearchResult($method, $path, self::formatParams($params), $opts); } protected function buildPath($basePath, ...$ids) { foreach ($ids as $id) { if (null === $id || '' === \trim($id)) { $msg = 'The resource ID cannot be null or whitespace.'; throw new \Stripe\Exception\InvalidArgumentException($msg); } } return \sprintf($basePath, ...\array_map('\urlencode', $ids)); } }
[-] CoreServiceFactory.php
[edit]
[+]
Billing
[-] PaymentMethodDomainService.php
[edit]
[-] InvoiceRenderingTemplateService.php
[edit]
[-] RefundService.php
[edit]
[-] SubscriptionService.php
[edit]
[+]
Checkout
[+]
BillingPortal
[-] TransferService.php
[edit]
[-] AbstractServiceFactory.php
[edit]
[-] SubscriptionItemService.php
[edit]
[-] PromotionCodeService.php
[edit]
[-] CustomerSessionService.php
[edit]
[-] OAuthService.php
[edit]
[-] CreditNoteService.php
[edit]
[-] FileLinkService.php
[edit]
[-] CouponService.php
[edit]
[-] ApplePayDomainService.php
[edit]
[+]
Entitlements
[+]
Terminal
[-] BalanceTransactionService.php
[edit]
[-] FileService.php
[edit]
[-] ApplicationFeeService.php
[edit]
[+]
Tax
[-] PayoutService.php
[edit]
[-] AbstractService.php
[edit]
[+]
TestHelpers
[+]
Radar
[+]
Identity
[-] InvoiceService.php
[edit]
[-] SetupAttemptService.php
[edit]
[-] TopupService.php
[edit]
[-] PriceService.php
[edit]
[-] PlanService.php
[edit]
[+]
Treasury
[+]
Forwarding
[-] ShippingRateService.php
[edit]
[-] PaymentIntentService.php
[edit]
[-] SourceService.php
[edit]
[-] TokenService.php
[edit]
[-] ReviewService.php
[edit]
[-] SetupIntentService.php
[edit]
[-] AccountSessionService.php
[edit]
[-] AccountLinkService.php
[edit]
[-] EphemeralKeyService.php
[edit]
[-] TaxRateService.php
[edit]
[+]
..
[-] DisputeService.php
[edit]
[+]
Apps
[-] PaymentLinkService.php
[edit]
[-] BalanceService.php
[edit]
[+]
Reporting
[-] CustomerService.php
[edit]
[+]
Climate
[-] QuoteService.php
[edit]
[-] TaxIdService.php
[edit]
[-] CountrySpecService.php
[edit]
[-] SubscriptionScheduleService.php
[edit]
[-] PaymentMethodConfigurationService.php
[edit]
[-] MandateService.php
[edit]
[-] ConfirmationTokenService.php
[edit]
[+]
FinancialConnections
[-] TaxCodeService.php
[edit]
[-] PaymentMethodService.php
[edit]
[-] InvoiceItemService.php
[edit]
[-] ProductService.php
[edit]
[-] AccountService.php
[edit]
[-] EventService.php
[edit]
[+]
Sigma
[-] WebhookEndpointService.php
[edit]
[-] ExchangeRateService.php
[edit]
[-] ChargeService.php
[edit]
[+]
Issuing