← ClaudeAtlas

ruby-calling-endpointslisted

Call operations on the PayPal Server SDK Ruby SDK. Load before the first call, and when building a request body or reading a response. The method won't tell you the controller folder is named per SDK, whether parameters come positionally or as a hash, or what an operation returns on an error status.
MuHamza30/paypal-api-plugin · ★ 0 · API & Backend · score 70
Install: claude install-skill MuHamza30/paypal-api-plugin
# Calling endpoints on an APIMatic Ruby SDK Operations are methods on a **controller you reach through a reader on the client**. There is no controller class to instantiate: ```ruby require 'paypal_server_sdk' client = PaypalServerSdk::Client.new result = client.{controller_name}.{operation} ``` Each reader (`client.{controller_name}`) builds its controller once and memoizes it, so calling it repeatedly is free. Controllers live in a folder under `lib/paypal_server_sdk/` — one file per API group. The folder name (`controllers/`, `apis/`, …) and the base class they extend (`BaseController`, `BaseApi`, …) are both named per SDK — the latter after the controller postfix — so read the `# Controllers` require block at the bottom of `lib/paypal_server_sdk.rb` for the real folder instead of assuming one. **Read the reader names off `lib/paypal_server_sdk/client.rb`** (or the controller/API table in `doc/client.md`); operation method names are snake_cased from the spec and follow no fixed verb/resource pattern, so take the real name from the source too. ## Method signature convention **Which of three parameter forms an operation uses is decided when the SDK is generated, so read its `def` line before writing the call.** The unset form is positional required parameters with keyword optionals: ```ruby def {operation}({required_param}, {optional_param}: nil, _query_parameters: nil) ``` - **Required parameters are positional here**, in the order th