← ClaudeAtlas

csharp-client-initializationlisted

Construct and configure the PayPal Server SDK C# 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 `sealed` with a nested `Builder` and no public constructor, that controllers are get-only properties rather than types you construct, or that one client is built once and reused.
MuHamza30/paypal-api-plugin · ★ 0 · API & Backend · score 70
Install: claude install-skill MuHamza30/paypal-api-plugin
# Initializing an APIMatic-generated C# SDK client Names carrying a token are concrete for this SDK; replace the `{...}` placeholders with the real names from its source: - `{Controller}` — a controller class in `PaypalServerSdk.Standard.Controllers`, and the client property for it. - `{MEMBER}` — a member of the `Environment` enum; `{SERVER}` — a member of the `Server` enum. - one credential model and setter per auth scheme — **the exact names are in the SDK map at the top of csharp-getting-started**; do not derive them, the suffix is dropped for some schemes. - `{ConfigVar}` — a builder setter generated from a configuration variable declared in the API spec. ## The shape: a nested Builder, no public constructor `PaypalServerSdkClient` is a `public sealed class` and its constructor is **private**. Every instance comes out of the nested `Builder` — directly, from the static `FromConfiguration(IConfigurationSection)`, or from `ToBuilder()` on a built client. ```csharp using System; using PaypalServerSdk.Standard; using Environment = PaypalServerSdk.Standard.Environment; // else CS0104: ambiguous with System.Environment PaypalServerSdkClient client = new PaypalServerSdkClient.Builder() .Environment(Environment.{MEMBER}) .HttpClientConfig(config => config .Timeout(TimeSpan.FromSeconds(30))) // TimeSpan — there is no seconds-as-int overload // credentials — see csharp-authentication .Build(); ``` The client implements the SDK's own **rea