Repository navigation
feat(payments): operator scope filters, priority_tip and the rotated-secret grace window - #55
Merged
Merged
Conversation
…secret grace window
Aligns the SDK with the gateway surface merged on 2026-10-09 (rail0-gateway #383,
#389, #391, #397); types.rb came from the 2026-10-08 spec.
- `payments.list` gains `scope:` ("mine"/"all"), `account_id:`, `has_error:` and
`expiring_within:` — the operator's cross-account list on the standard
GET /payments. Nothing is sent unless given.
- `accounts.update` takes `priority_tip:` (false is sent as false and switches
the account's own transactions to the chain's minimum tip); `get` documents it.
- `rotate_secret` / `WebhookSignature` docs: the WEBHOOK_SECRET_GRACE window and
X-Rail0-Signature-Previous; `redrive` doc: payee or an operator (audited).
- `lib/rail0/types.rb` regenerated from the gateway main spec (operator structs,
Account#priority_tip).
- README: scope: "all" examples, priority_tip, verifying under the previous
header; specs for the scope query (false included) and priority_tip: false.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns the gem with the gateway surface merged to
mainon 2026-10-09 (commercelayer/rail0-gateway#383 priority_tip, #389 webhook secret grace, #391 operator redrive, #397GET /payments?scope=all).types.rbhad been generated from the 2026-10-08 spec.payments.list(scope: "all", account_id:, has_error:, expiring_within:)— the operator's cross-account list on the same call, admin session required (403 otherwise).has_error: falsegoes out asfalse(a filter, not an absence);expiring_withinis seconds. Nothing is sent unless given, so a merchant's call is unchanged on the wire.accounts.update(account_id, priority_tip: false)— the fee setting of the account's own transactions;getdocuments the new field. TheArgumentErrorfor an empty update now names all three fields.rotate_secretandRail0::WebhookSignaturedocs:WEBHOOK_SECRET_GRACEandX-Rail0-Signature-Previous, so an endpoint still on the old secret verifies that header with the sameverify.redrivedoc: payee-gated, or an operator session (audited astransaction.redrive).lib/rail0/types.rbregenerated from the gatewaymainspec (operator structsAdminAction,AdministratorFull,CatalogDiff,PolicyReport,PolicySetting;Account#priority_tip). The/admin/*routes stay out of the SDK, as before.scope: "all"examples,priority_tip, verifying under the previous signature header.payments.listscope query (false included),accounts.updatewithpriority_tip: false.No breaking change; no version bump (cut at release). Twin branches: commercelayer/rail0-go#61, commercelayer/rail0-cli#171, commercelayer/rail0-ts#62.
Test plan
rspec(293 examples, 0 failures) andrubocop lib spec(no offenses) — run outside bundler locally (rbsecp256k1 6.0.1 does not build on this machine); CI runs the bundled versions🤖 Generated with Claude Code