Module: Dinie::Internal
- Defined in:
- lib/dinie/runtime/model.rb,
lib/dinie/runtime/http.rb,
lib/dinie/runtime/retry.rb,
lib/dinie/runtime/errors.rb,
lib/dinie/runtime/logger.rb,
lib/dinie/runtime/multipart.rb,
lib/dinie/runtime/rate_limit.rb,
lib/dinie/generated/types/ids.rb,
lib/dinie/runtime/idempotency.rb,
lib/dinie/runtime/token_manager.rb,
lib/dinie/runtime/request_options.rb,
lib/dinie/generated/errors/registry.rb,
sig/dinie/runtime/http.rbs,
sig/dinie/runtime/model.rbs,
sig/dinie/runtime/retry.rbs,
sig/dinie/runtime/errors.rbs,
sig/dinie/runtime/logger.rbs,
sig/dinie/runtime/multipart.rbs,
sig/dinie/runtime/rate_limit.rbs,
sig/dinie/generated/types/ids.rbs,
sig/dinie/runtime/idempotency.rbs,
sig/dinie/runtime/token_manager.rbs,
sig/dinie/runtime/request_options.rbs,
sig/dinie/generated/errors/registry.rbs
Overview
Internal:: holds everything that is NOT part of the frozen public surface: the
transport, the token manager, the error registry, the model base, and the OMIT
sentinel. It is the Ruby equivalent of "not re-exported by the barrel" in sdk-js
(architecture §3.1). The generated layer (V0.4) emits subclasses of Model; the
hand-written runtime references Dinie::Internal::*.
Defined Under Namespace
Modules: Errors, Idempotency, LogRedaction, Middleware, Retry Classes: HttpClient, Model, Multipart, RateLimitTracker, RequestOptions, RuntimeLogger, TokenManager
Constant Summary collapse
- OMIT =
The "argument not provided" sentinel (RB5). Compared by identity; exactly one frozen instance. Optional kwargs default to it and serializers drop any key still equal to it.
Object.new
- ID_PATTERNS =
{ api_client: /\Adinie_ci_(live|test)_[A-Za-z0-9]+\z/, bank_account: /\Aba_[0-9a-f]{32}\z/, credit_offer: /\Aco_[0-9a-f]{32}\z/, customer: /\Acust_[0-9a-f]{32}\z/, event: /\Aevt_[0-9a-f]{32}\z/, loan: /\Aln_[0-9a-f]{32}\z/, simulation: /\Asim_[0-9a-f]{32}\z/, transaction: /\Atx_[0-9a-f]{32}\z/, webhook_delivery: /\Adlv_[0-9a-f]{32}\z/, webhook_endpoint: /\Awe_[0-9a-f]{32}\z/ }.freeze
- ERROR_REGISTRY =
{ by_type: { "https://docs.dinie.com/errors/invalid-request" => Dinie::BadRequestError, "https://docs.dinie.com/errors/authentication-failed" => Dinie::AuthError, "https://docs.dinie.com/errors/forbidden" => Dinie::PermissionDeniedError, "https://docs.dinie.com/errors/not-found" => Dinie::NotFoundError, "https://docs.dinie.com/errors/conflict" => Dinie::ConflictError, "https://docs.dinie.com/errors/validation-failed" => Dinie::ValidationError, "https://docs.dinie.com/errors/rate-limit-exceeded" => Dinie::RateLimitError, "https://docs.dinie.com/errors/internal" => Dinie::ServerError }.freeze, by_status: { 400 => Dinie::BadRequestError, 401 => Dinie::AuthError, 403 => Dinie::PermissionDeniedError, 404 => Dinie::NotFoundError, 409 => Dinie::ConflictError, 422 => Dinie::ValidationError, 429 => Dinie::RateLimitError, 500 => Dinie::ServerError }.freeze, fallback_5xx: Dinie::ServerError }.freeze
Class Method Summary collapse
-
.omitted?(value) ⇒ Boolean
Identity check for the OMIT sentinel.
Class Method Details
.omitted?(value) ⇒ Boolean
Identity check for the OMIT sentinel.
11 |
# File 'sig/dinie/runtime/model.rbs', line 11
def self.omitted?: (untyped value) -> bool
|