StripeClient.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. namespace Stripe;
  3. /**
  4. * Client used to send requests to Stripe's API.
  5. *
  6. * @property \Stripe\Service\OAuthService $oauth
  7. * // The beginning of the section generated from our OpenAPI spec
  8. * @property \Stripe\Service\AccountLinkService $accountLinks
  9. * @property \Stripe\Service\AccountService $accounts
  10. * @property \Stripe\Service\AccountSessionService $accountSessions
  11. * @property \Stripe\Service\ApplePayDomainService $applePayDomains
  12. * @property \Stripe\Service\ApplicationFeeService $applicationFees
  13. * @property \Stripe\Service\Apps\AppsServiceFactory $apps
  14. * @property \Stripe\Service\BalanceService $balance
  15. * @property \Stripe\Service\BalanceTransactionService $balanceTransactions
  16. * @property \Stripe\Service\Billing\BillingServiceFactory $billing
  17. * @property \Stripe\Service\BillingPortal\BillingPortalServiceFactory $billingPortal
  18. * @property \Stripe\Service\ChargeService $charges
  19. * @property \Stripe\Service\Checkout\CheckoutServiceFactory $checkout
  20. * @property \Stripe\Service\Climate\ClimateServiceFactory $climate
  21. * @property \Stripe\Service\ConfirmationTokenService $confirmationTokens
  22. * @property \Stripe\Service\CountrySpecService $countrySpecs
  23. * @property \Stripe\Service\CouponService $coupons
  24. * @property \Stripe\Service\CreditNoteService $creditNotes
  25. * @property \Stripe\Service\CustomerService $customers
  26. * @property \Stripe\Service\CustomerSessionService $customerSessions
  27. * @property \Stripe\Service\DisputeService $disputes
  28. * @property \Stripe\Service\Entitlements\EntitlementsServiceFactory $entitlements
  29. * @property \Stripe\Service\EphemeralKeyService $ephemeralKeys
  30. * @property \Stripe\Service\EventService $events
  31. * @property \Stripe\Service\ExchangeRateService $exchangeRates
  32. * @property \Stripe\Service\FileLinkService $fileLinks
  33. * @property \Stripe\Service\FileService $files
  34. * @property \Stripe\Service\FinancialConnections\FinancialConnectionsServiceFactory $financialConnections
  35. * @property \Stripe\Service\Forwarding\ForwardingServiceFactory $forwarding
  36. * @property \Stripe\Service\Identity\IdentityServiceFactory $identity
  37. * @property \Stripe\Service\InvoiceItemService $invoiceItems
  38. * @property \Stripe\Service\InvoiceService $invoices
  39. * @property \Stripe\Service\Issuing\IssuingServiceFactory $issuing
  40. * @property \Stripe\Service\MandateService $mandates
  41. * @property \Stripe\Service\PaymentIntentService $paymentIntents
  42. * @property \Stripe\Service\PaymentLinkService $paymentLinks
  43. * @property \Stripe\Service\PaymentMethodConfigurationService $paymentMethodConfigurations
  44. * @property \Stripe\Service\PaymentMethodDomainService $paymentMethodDomains
  45. * @property \Stripe\Service\PaymentMethodService $paymentMethods
  46. * @property \Stripe\Service\PayoutService $payouts
  47. * @property \Stripe\Service\PlanService $plans
  48. * @property \Stripe\Service\PriceService $prices
  49. * @property \Stripe\Service\ProductService $products
  50. * @property \Stripe\Service\PromotionCodeService $promotionCodes
  51. * @property \Stripe\Service\QuoteService $quotes
  52. * @property \Stripe\Service\Radar\RadarServiceFactory $radar
  53. * @property \Stripe\Service\RefundService $refunds
  54. * @property \Stripe\Service\Reporting\ReportingServiceFactory $reporting
  55. * @property \Stripe\Service\ReviewService $reviews
  56. * @property \Stripe\Service\SetupAttemptService $setupAttempts
  57. * @property \Stripe\Service\SetupIntentService $setupIntents
  58. * @property \Stripe\Service\ShippingRateService $shippingRates
  59. * @property \Stripe\Service\Sigma\SigmaServiceFactory $sigma
  60. * @property \Stripe\Service\SourceService $sources
  61. * @property \Stripe\Service\SubscriptionItemService $subscriptionItems
  62. * @property \Stripe\Service\SubscriptionService $subscriptions
  63. * @property \Stripe\Service\SubscriptionScheduleService $subscriptionSchedules
  64. * @property \Stripe\Service\Tax\TaxServiceFactory $tax
  65. * @property \Stripe\Service\TaxCodeService $taxCodes
  66. * @property \Stripe\Service\TaxIdService $taxIds
  67. * @property \Stripe\Service\TaxRateService $taxRates
  68. * @property \Stripe\Service\Terminal\TerminalServiceFactory $terminal
  69. * @property \Stripe\Service\TestHelpers\TestHelpersServiceFactory $testHelpers
  70. * @property \Stripe\Service\TokenService $tokens
  71. * @property \Stripe\Service\TopupService $topups
  72. * @property \Stripe\Service\TransferService $transfers
  73. * @property \Stripe\Service\Treasury\TreasuryServiceFactory $treasury
  74. * @property \Stripe\Service\WebhookEndpointService $webhookEndpoints
  75. * // The end of the section generated from our OpenAPI spec
  76. */
  77. class StripeClient extends BaseStripeClient
  78. {
  79. /**
  80. * @var \Stripe\Service\CoreServiceFactory
  81. */
  82. private $coreServiceFactory;
  83. public function __get($name)
  84. {
  85. return $this->getService($name);
  86. }
  87. public function getService($name)
  88. {
  89. if (null === $this->coreServiceFactory) {
  90. $this->coreServiceFactory = new \Stripe\Service\CoreServiceFactory($this);
  91. }
  92. return $this->coreServiceFactory->getService($name);
  93. }
  94. }