ruby-client-initializationlisted
Install: claude install-skill MuHamza30/paypal-api-plugin
# Initializing an APIMatic-generated Ruby SDK client
Names below are concrete for this SDK; replace the remaining `{...}` placeholders with the real names
from its source:
- `{controller_name}` — a controller reader method on the client.
- `{Name}` — an `Environment` constant.
## The shape: keyword arguments, no builder and no options hash
The SDK exports a single `Client` class under `PaypalServerSdk`. You construct it with **keyword
arguments** — a flat list, not an options object and not a builder. Every argument has a default that was
fixed when the SDK was generated, so passing none is valid:
```ruby
require 'paypal_server_sdk'
client = PaypalServerSdk::Client.new(
environment: PaypalServerSdk::Environment::{Name},
timeout: 30,
# auth credential objects — see ruby-authentication
# retry / proxy / callback arguments — see ruby-configuration-resilience
)
```
`Client#initialize` declares the **same** arguments as `Configuration#initialize` plus a `config:`, and
simply forwards them into a new `Configuration`. Open
`lib/paypal_server_sdk/configuration.rb` for the authoritative list and the real defaults — the set varies
per API. In this build that set includes one credential argument per declared scheme, any server template
parameters the API declares, and a `logging_configuration:`.
The arguments common to every build:
| Argument | Type | Purpose |
| --- | --- | --- |
| `connection` | `Faraday::Connection` | a Faraday connection you built yourself, used for