← ClaudeAtlas

ruby-configuration-resiliencelisted

Tune the PayPal Server SDK Ruby SDK client — retries, timeouts, transport, logging and the base URL. Load before changing any transport setting. The argument list won't tell you the retry default is fixed when the SDK is generated, that `timeout` covers each attempt rather than the call, or what a stdlib `Logger` does to the SDK's log parameters.
MuHamza30/paypal-api-plugin · ★ 0 · DevOps & Infrastructure · score 70
Install: claude install-skill MuHamza30/paypal-api-plugin
# Configuration & resilience for an APIMatic Ruby SDK Every setting is a **keyword argument passed at construction** (see **ruby-client-initialization**). There is no options object and nothing you can change on a live client — derive a new configuration with `config.clone_with(...)` and build a new client instead. ```ruby client = PaypalServerSdk::Client.new( environment: PaypalServerSdk::Environment::{Name}, timeout: 30, max_retries: 3, retry_interval: 1, backoff_factor: 2, retry_statuses: [408, 429, 500, 502, 503, 504], retry_methods: %i[get put], proxy_settings: PaypalServerSdk::ProxySettings.new(address: 'http://localhost', port: 8888) ) ``` ## Retries The five retry arguments above are the complete set. **Their defaults are fixed when the SDK is generated, not by the runtime** — `max_retries`, `retry_statuses` and `retry_methods` in particular differ from SDK to SDK. > Do not assume a default. Read the keyword-argument defaults on `Configuration#initialize` in > **`lib/paypal_server_sdk/configuration.rb`** — that is the generated, authoritative value for this SDK, > and `doc/client.md` restates each one in a **Default:** column. Retries may well be off > (`max_retries: 0`). Notes: - `retry_methods` holds **symbols**, written with the `%i[...]` literal (`%i[get put]`), not strings. - Only the methods in that list are retried. If `post`/`patch`/`delete` are absent — the common case — those failures surface with no retry. Add one only if the operat