Recurly
This repository houses the official ruby client for Recurly's V3 API.
Note: If you were looking for the V2 client, see the v2 branch.
Reference Documentation
Getting Started Guide and reference documentation can be found on Github Pages.
Custom HTTP Adapter
The client ships with a default Net::HTTP-backed transport, but you can inject
your own HTTP layer (for observability, proxy/TLS control, or transport mocking)
by passing an adapter that responds to #call:
client = Recurly::Client.new(api_key: API_KEY, http_adapter: MyAdapter.new)An adapter must implement:
# @return [Recurly::HTTP::AdapterResponse]
# @raise [Recurly::Errors::TransportError] on transport-level failure only
def call(method, url, headers, body, open_timeout: nil, read_timeout: nil)
end-
methodis aRecurly::HTTP::HttpMethodstring ("GET","POST", ...). -
urlis an absolute URL (scheme + host + path + query). -
headersis a plainHashof app-level headers (the SDK ownsAuthorization,Idempotency-Key,Content-Type, etc.). -
bodyis a serializedStringornil. - HTTP
4xx/5xxresponses must be returned as anAdapterResponse, never raised. Only genuine transport failures raiseRecurly::Errors::TransportError.
Contributing
Please see our Contributing Guide.