← ClaudeAtlas

java-client-initializationlisted

Construct and configure the PayPal Server SDK Java SDK client. Load before you call the builder or wire the client into an application. The method list won't tell you `httpClientConfig` takes a lambda rather than an object, that controllers are accessors on the client, or that a cloned client keeps some settings and drops others.
MuHamza30/paypal-api-plugin · ★ 0 · DevOps & Infrastructure · score 70
Install: claude install-skill MuHamza30/paypal-api-plugin
# Initializing an APIMatic-generated Java SDK client Replace the `{...}` placeholders below with the real names from the SDK source: - `{Api}Client` — the single client class in the SDK's root package. - `{Controller}` — a controller class; its package and class suffix are both named per SDK, so take both from the `import` block of `{Api}Client.java`. ## The shape: a nested Builder, no public constructor The client is `public final class {Api}Client` and its constructor is **private**. The only way to build one is through the nested `Builder`: ```java import {rootPackage}.{Api}Client; import {rootPackage}.Environment; {Api}Client client = new {Api}Client.Builder() .environment(Environment.{MEMBER}) .httpClientConfig(configBuilder -> configBuilder .timeout(30)) // this API declares a scheme, so a credential model belongs here — see java-authentication .build(); ``` This SDK ships no generated interfaces, so the class is declared `implements Configuration` and no client interface is generated — the concrete class is the only type you can inject. `Configuration` is a **read-only interface** the client implements — `getEnvironment()`, `getHttpClientConfig()`, `getBaseUri()`, `getBaseUri(Server)`. It is *not* something you construct and pass in. Everything configurable is a `Builder` method; open `{Api}Client.java` and read the `Builder` class for the exact set, which in this build includes a `loggingConfig` setter. The `Bu