Commit Graph
4 Commits
Author SHA1 Message Date
bterkuileandClaude Sonnet 5 ae9ab1564e Remove the global 'API' inflector acronym registration
Process-global ActiveSupport::Inflector state, not scoped to this gem —
requiring it inside a real host app (mozo-backend) broke Zeitwerk
autoloading of anything with "Api" in its name (JsonApiRenderer
camelized to JsonAPIRenderer instead, an uninitialized-constant error
with no obvious connection to this gem). Not needed here anyway:
autoload_default only ever goes constant name -> file path via
#underscore, never the reverse, so this module's own naming never
depended on it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0199wudpuAtkhouHKSEGxzpa
2026-09-15 09:57:24 -05:00
bterkuileandClaude Sonnet 5 90ab7c74b1 Add invoice creation, quoting, and webhook signature verification
Finishes the two gaps that mattered most for real use: Invoices#create
(POST invoices) + Invoices#quote (POST invoices/{id}/quote, returning
the new Quote model with the actual payable bolt11 — an invoice alone
has nothing payable until quoted) and Webhook.valid_signature?
(HMAC-SHA256 over the raw body via X-Webhook-Signature, per Strike's own
documented reference implementation, timing-safe compare). Also finishes
Invoices#find (was a stub with a leftover binding.pry) and adds
WebhookEvent to parse the {id, eventType, data: {entityId, changes}}
payload shape — deliberately doesn't expose changed values, since
Strike's webhooks never carry them; a real value only ever comes from
re-fetching the resource.

Client gains #post/#patch (only #get existed before), needed for both
of the above.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0199wudpuAtkhouHKSEGxzpa
2026-09-15 09:34:45 -05:00
bterkuile 9b0351576a Add basic invoices setup 2025-10-18 12:37:08 -05:00
bterkuile 4b5f7906d7 Initial commit 2025-09-15 15:55:58 -05:00