First public release. A Ruby port of the official SMS.ru PHP library covering the
same API, reworked to be idiomatic Ruby. How it differs from the original:
- Idiomatic, namespaced API instead of flat
get_*/add_*methods: account
reads underclient.my(#balance,#limit,#free_limit,#senders),
credential check viaclient.auth.ok?, plusclient.stoplist,
client.callbacks, andclient.callchecksub-resources. Keyword arguments for
every optional send parameter, plus a per-clientfromdefault. - Typed, immutable
Dataresults that separate operation outcome from
delivery state:#ok?plus#error_code/#error_texton rejected
Sms/CostItementries;#delivered?/#pending?/#failed?/#found?and
namedSmsRu::Statusesconstants for the deliverystatus_codeonStatus
and webhook events;#ok?/#ok/#failedcollection helpers onSendResult
andCost; plus#confirmed?and#available_today. No raw decoded JSON or
magic numbers. - Typed error hierarchy under
SmsRu::Error(AuthError,
InsufficientFundsError,ResponseError,ConnectionError) — errors are
raised, not returned as status codes you have to inspect. - First-class inbound webhooks:
SmsRu::Webhook.parsedecodes the callback
POST into typed events (SmsRu::Events::SmsStatus,CallcheckStatus,Test,
Unknown), andSmsRu::Webhook.valid?verifies the signature. - Zero runtime dependencies (Ruby stdlib only, no curl), TLS verified by
default, with configurabletimeout,retries, globaltestmode, and an
optionallogger. - Ships RBS type signatures (
sig/) checked at 100% coverage under Steep's
strict profile and verified against the test suite at runtime (rbs test);
SMS.ru's loosely-typed JSON is normalized to the declared types at the parse
boundary, so result objects never surface raw wire values.