PluginProbe ʕ •ᴥ•ʔ
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress / 4.17.1
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress v4.17.1
4.17.1 4.17.0 4.16.19 4.16.18 4.16.17 4.16.16 trunk 1.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5a 1.1.6 1.1.7 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4 1.4.1 1.4.2 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.7 1.7.1 1.7.2 1.8 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.1.9 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.2 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.10.0 4.10.1 4.10.2 4.10.3 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.13.3 4.13.4 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.15.0 4.15.1 4.15.10 4.15.11 4.15.12 4.15.13 4.15.14 4.15.15 4.15.16 4.15.17 4.15.18 4.15.19 4.15.2 4.15.20 4.15.20.1 4.15.21 4.15.22 4.15.23 4.15.24 4.15.25 4.15.3 4.15.4 4.15.5 4.15.6 4.15.7 4.15.8 4.15.9 4.16.0 4.16.1 4.16.10 4.16.11 4.16.12 4.16.13 4.16.14 4.16.15 4.16.2 4.16.3 4.16.4 4.16.5 4.16.6 4.16.7 4.16.8 4.16.9 4.2.0 4.3.0 4.3.1 4.3.2 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.7.0 4.8.0 4.9.0
wp-user-avatar / third-party / vendor / stripe / stripe-php / lib / Service / AbstractService.php
wp-user-avatar / third-party / vendor / stripe / stripe-php / lib / Service Last commit date
Apps 2 months ago Billing 2 months ago BillingPortal 2 months ago Checkout 2 months ago Climate 2 months ago Entitlements 2 months ago FinancialConnections 2 months ago Forwarding 2 months ago Identity 2 months ago Issuing 2 months ago Radar 2 months ago Reporting 2 months ago Sigma 2 months ago Tax 2 months ago Terminal 2 months ago TestHelpers 2 months ago Treasury 2 months ago V2 2 months ago AbstractService.php 2 months ago AbstractServiceFactory.php 2 months ago AccountLinkService.php 2 months ago AccountService.php 2 months ago AccountSessionService.php 2 months ago ApplePayDomainService.php 2 months ago ApplicationFeeService.php 2 months ago BalanceService.php 2 months ago BalanceTransactionService.php 2 months ago ChargeService.php 2 months ago ConfirmationTokenService.php 2 months ago CoreServiceFactory.php 2 months ago CountrySpecService.php 2 months ago CouponService.php 2 months ago CreditNoteService.php 2 months ago CustomerService.php 2 months ago CustomerSessionService.php 2 months ago DisputeService.php 2 months ago EphemeralKeyService.php 2 months ago EventService.php 2 months ago ExchangeRateService.php 2 months ago FileLinkService.php 2 months ago FileService.php 2 months ago InvoiceItemService.php 2 months ago InvoiceRenderingTemplateService.php 2 months ago InvoiceService.php 2 months ago MandateService.php 2 months ago OAuthService.php 2 months ago PaymentIntentService.php 2 months ago PaymentLinkService.php 2 months ago PaymentMethodConfigurationService.php 2 months ago PaymentMethodDomainService.php 2 months ago PaymentMethodService.php 2 months ago PayoutService.php 2 months ago PlanService.php 2 months ago PriceService.php 2 months ago ProductService.php 2 months ago PromotionCodeService.php 2 months ago QuoteService.php 2 months ago RefundService.php 2 months ago ReviewService.php 2 months ago ServiceNavigatorTrait.php 2 months ago SetupAttemptService.php 2 months ago SetupIntentService.php 2 months ago ShippingRateService.php 2 months ago SourceService.php 2 months ago SubscriptionItemService.php 2 months ago SubscriptionScheduleService.php 2 months ago SubscriptionService.php 2 months ago TaxCodeService.php 2 months ago TaxIdService.php 2 months ago TaxRateService.php 2 months ago TokenService.php 2 months ago TopupService.php 2 months ago TransferService.php 2 months ago WebhookEndpointService.php 2 months ago
AbstractService.php
99 lines
1 <?php
2
3 namespace ProfilePressVendor\Stripe\Service;
4
5 /**
6 * Abstract base class for all services.
7 */
8 abstract class AbstractService
9 {
10 /**
11 * @var \Stripe\StripeClientInterface
12 */
13 protected $client;
14 /**
15 * @var \Stripe\StripeStreamingClientInterface
16 */
17 protected $streamingClient;
18 /**
19 * Initializes a new instance of the {@link AbstractService} class.
20 *
21 * @param \Stripe\StripeClientInterface $client
22 */
23 public function __construct($client)
24 {
25 $this->client = $client;
26 $this->streamingClient = $client;
27 }
28 /**
29 * Gets the client used by this service to send requests.
30 *
31 * @return \Stripe\StripeClientInterface
32 */
33 public function getClient()
34 {
35 return $this->client;
36 }
37 /**
38 * Gets the client used by this service to send requests.
39 *
40 * @return \Stripe\StripeStreamingClientInterface
41 */
42 public function getStreamingClient()
43 {
44 return $this->streamingClient;
45 }
46 /**
47 * Translate null values to empty strings. For service methods,
48 * we interpret null as a request to unset the field, which
49 * corresponds to sending an empty string for the field to the
50 * API.
51 *
52 * @param null|array $params
53 */
54 private static function formatParams($params)
55 {
56 if (null === $params) {
57 return null;
58 }
59 \array_walk_recursive($params, function (&$value, $key) {
60 if (null === $value) {
61 $value = '';
62 }
63 });
64 return $params;
65 }
66 protected function request($method, $path, $params, $opts)
67 {
68 return $this->getClient()->request($method, $path, self::formatParams($params), $opts);
69 }
70 protected function requestStream($method, $path, $readBodyChunkCallable, $params, $opts)
71 {
72 // TODO (MAJOR): Add this method to StripeClientInterface
73 // @phpstan-ignore-next-line
74 return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, self::formatParams($params), $opts);
75 }
76 protected function requestCollection($method, $path, $params, $opts)
77 {
78 // TODO (MAJOR): Add this method to StripeClientInterface
79 // @phpstan-ignore-next-line
80 return $this->getClient()->requestCollection($method, $path, self::formatParams($params), $opts);
81 }
82 protected function requestSearchResult($method, $path, $params, $opts)
83 {
84 // TODO (MAJOR): Add this method to StripeClientInterface
85 // @phpstan-ignore-next-line
86 return $this->getClient()->requestSearchResult($method, $path, self::formatParams($params), $opts);
87 }
88 protected function buildPath($basePath, ...$ids)
89 {
90 foreach ($ids as $id) {
91 if (null === $id || '' === \trim($id)) {
92 $msg = 'The resource ID cannot be null or whitespace.';
93 throw new \ProfilePressVendor\Stripe\Exception\InvalidArgumentException($msg);
94 }
95 }
96 return \sprintf($basePath, ...\array_map('\urlencode', $ids));
97 }
98 }
99