simplebilly-crystal

Crystal SDK for the SimpleBilly API (https://simplebilly.com) — generated from the official OpenAPI definition

SimpleBilly Crystal SDK

Release CI CodeQL Scorecard OpenSSF Scorecard License: MIT Docs

openapi_client

The Crystal module for the SimpleBilly API

Simplebilly API - Bookkeeping, CRM, ERP. Multi-tenant API: a tenant is isolated and routed by subdomain (or a configured custom domain) under the base domain.

Rate limiting

All endpoints are rate-limited per client IP: 100 requests per minute on API routes and 5 requests per minute on authentication routes. Exceeding a limit returns 429 Too Many Requests; the window resets after 60 seconds.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.1.0
  • Package version: 1.0.0
  • Generator version: 7.25.0
  • Build package: org.openapitools.codegen.languages.CrystalClientCodegen For more information, please visit https://simplebilly.com/en/legal/imprint

Installation

Install from Git

Add the following to shard.yaml

dependencies:
  openapi_client:
    github: GIT_USER_ID/GIT_REPO_ID
    version: ~> 1.0.0

Request signing / custom auth

Static credentials (apiKey, basic, bearer, oauth) are applied from the OpenAPI spec by Configuration#apply_auth!. A request signature — a hash computed per request over the method, full URL, body and a timestamp (OVH, AWS SigV4, RFC 9421, ...) — cannot be modeled as an OpenAPI security scheme, so it is injected via the sign_request hook on Configuration. It runs on every request, after apply_auth! and just before the HTTP call, with (method, full_url, body, headers, query); mutate headers/query in place:

require "digest/sha1"

config = OpenAPIClient::Configuration.new
app_key, app_secret, consumer_key = "...", "...", "..."
config.sign_request = ->(method : Symbol, url : String, body : String?,
                         headers : HTTP::Headers,
                         _query : Hash(String, String | Array(String))) do
  ts  = Time.utc.to_unix.to_s
  sig = "$1$" + Digest::SHA1.hexdigest(
    {app_secret, consumer_key, method.to_s.upcase, url, body || "", ts}.join("+"))
  headers["X-Ovh-Application"] = app_key
  headers["X-Ovh-Consumer"]    = consumer_key
  headers["X-Ovh-Timestamp"]   = ts
  headers["X-Ovh-Signature"]   = sig
  nil
end

Design notes:

  • url is the base URL + path without the query string — the hook runs before Crest re-encodes query into the final URL. If your signature must cover the query string, rebuild it from the query argument (5th param) inside the hook, matching Crest's params_encoder, or rely on a native Crest hook.
  • body is nil for form/multipart operations (application/x-www-form-urlencoded, file uploads): the form is encoded by Crest after this hook, so a body-hashing signer cannot see it here. Signing is therefore supported for JSON-body and query/path requests; form-body signing would need a hook at the Crest layer.

Development

Install dependencies

shards

Run the tests:

crystal spec

SimpleBilly API SDK

This client was generated automatically from the SimpleBilly OpenAPI specification.

Contributing

See CONTRIBUTING.md — do not edit generated code by hand.

Security

See SECURITY.md for reporting vulnerabilities.

License

MIT — Copyright (c) SimpleBilly GmbH.

SimpleBilly is the first bookkeeping, CRM, online shop and ERP that follows the mantra: "just do it"

Generated by the SimpleBilly SDK pipeline — do not edit manually.

Repository

simplebilly-crystal

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 3
  • about 1 hour ago
  • August 10, 2026
License

MIT License

Links
Synced at

Wed, 02 Sep 2026 07:59:24 GMT

Languages