Types
The Ruby SDK exposes the public classes, value objects, and resource namespaces below. They live under the PoliPage module:
require "poli_page"PoliPage::Client
Section titled “PoliPage::Client”Main entry point — orchestrates retries, fires hooks, and delegates HTTP
execution to PoliPage::Internal::Transport. The render and documents
resource namespaces hold a reference to this client and delegate request
execution back through it.
PoliPage::Resources::Render
Section titled “PoliPage::Resources::Render”client.render namespace. Each method captures a back-reference to the
parent PoliPage::Client and delegates HTTP execution through it.
PoliPage::Resources::Documents
Section titled “PoliPage::Resources::Documents”client.documents namespace (port of
sdk-node/src/documents.ts).
PoliPage::RenderInput
Section titled “PoliPage::RenderInput”Convenience value-object form of the render input, the only input of
client.render.document, #pdf and #pdf_stream: a published project
addressed by slug. Methods accept bare kwargs directly; this wrapper is
for callers who want Data.define’s equality, frozen-by-default
semantics, and a single marshallable type to thread through their own
code.
PoliPage::ThumbnailOptions
Section titled “PoliPage::ThumbnailOptions”Convenience value-object form of the client.documents.thumbnails
options hash. Methods accept bare kwargs directly; this wrapper is for
callers who want Data.define’s equality + frozen-by-default semantics.
PoliPage::DocumentDescriptor
Section titled “PoliPage::DocumentDescriptor”The stored-document descriptor returned by client.render.document and
the client.documents.* methods. Carries every wire field plus an
SDK-attached _client back-reference used by #download_pdf.
PoliPage::DocumentPreviewResult
Section titled “PoliPage::DocumentPreviewResult”Return value of client.documents.preview: the stored HTML of an
already rendered document, with page_count read from the
X-Document-Page-Count response header on a text/html body
(mirrors Node documents.ts:75-77).
PoliPage::Thumbnail
Section titled “PoliPage::Thumbnail”A single page thumbnail returned by client.documents.thumbnails.
data is base64-encoded image bytes; decode with Base64.decode64(data)
(stdlib).
PoliPage::PageFormat
Section titled “PoliPage::PageFormat”Valid format: strings for the rendering endpoints (sdk-specification.md
§4.1). Ruby has no native enum; a frozen Set of strings is the most
idiomatic representation and matches the wire format directly. The SDK
does not check format: against it before a request (the API answers an
unknown value with 400 VALIDATION_ERROR); valid? is there for callers
who want to check their own input.
PoliPage::Orientation
Section titled “PoliPage::Orientation”Valid orientation: strings for the rendering endpoints
(sdk-specification.md §4.1).
PoliPage::RetryEvent
Section titled “PoliPage::RetryEvent”Event payload for the on_retry constructor hook.
For value-object internals (Data.define’d objects like PoliPage::DocumentDescriptor), see the source on GitHub.