← ClaudeAtlas

php-client-initializationlisted

Construct and configure the PayPal Server SDK PHP SDK client. Load before you call the builder or wire the client into an application. The method list won't tell you the client is immutable and built through `{Client}Builder::init()`, that controllers are accessors whose suffix is per-SDK, or which settings a rebuilt client keeps.
MuHamza30/paypal-api-plugin · ★ 0 · API & Backend · score 70
Install: claude install-skill MuHamza30/paypal-api-plugin
# Initializing an APIMatic-generated PHP SDK client Replace the `{...}` placeholders below with the real names from your SDK's source: - `{Client}` — the client class in `src/`, e.g. `src/AcmeClient.php`. Its builder is `{Client}Builder`. - `{Group}` — an API group; the client exposes one memoized accessor per group, `get{Group}{Postfix}()`. - `{Postfix}` — the accessor/class suffix, which is named per SDK. It is `Controller` unless this one renamed it (`Api`, `Client`, …), and that one name covers the folder, the classes and the client getters together — `ls src/` and read the accessor names off `src/{Client}.php` before writing one. An API split across multiple namespaces generates **one client class per namespace**, so `ls src/*.php` rather than assuming a single client. Substitute these before running anything: `use PaypalServerSdkLib\{Client}Builder;` left as written is a PHP **parse error**, since `\{…}` after a namespace is group-use syntax rather than an identifier. ## The shape: a builder, not a constructor ```php use PaypalServerSdkLib\{Client}Builder; use PaypalServerSdkLib\Environment; $client = {Client}Builder::init() ->environment(Environment::{CONSTANT}) ->timeout(30) // SECONDS, not milliseconds // credentials — see php-authentication ->build(); ``` `{Client}Builder::init()` is a static factory (the constructor is private). Every setter returns `$this`, and `build()` hands the accumulated config array to the cl