feat(payments): EN-123 connector schedules CLI#162
Conversation
Expose GET /v3/connectors/{connectorID}/schedules,
GET /v3/connectors/{connectorID}/schedules/{scheduleID}, and
GET /v3/connectors/{connectorID}/schedules/{scheduleID}/instances
under fctl payments connectors schedules. V3-only; wired directly to
existing formance-sdk-go/v3 v3.8.1 (no SDK bump).
WalkthroughThis PR adds CLI commands for listing, showing, and managing connector schedules and schedule instances under the payments connectors module. It establishes the command hierarchy, implements list and show operations with API v3 enforcement, includes cursor-based pagination support, and renders schedule and instance data in table format. ChangesConnector schedules and instances CLI commands
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| tableData := fctl.Map(c.store.Cursor.Data, func(s shared.V3Schedule) []string { | ||
| return []string{ | ||
| s.ID, | ||
| s.ConnectorID, |
There was a problem hiding this comment.
The output is incredibly wide making this command not super useful. Since connectorID is already a required param in this command, let's not even include ConnectorID as a column to make the whole thing more legible.
| i.ScheduleID, | ||
| i.ConnectorID, |
There was a problem hiding this comment.
Same deal here with the output being too wide for it to be practical. Let's remove both scheduleID and connector ID columns because they are already specified as command line arguments
Summary
fctl payments connectors schedules {list,get}wired to Payments v3 schedule endpointsfctl payments connectors schedules instances listfor schedule instance paginationTest plan
go build ./...andgo vet ./...passgofmt -l .cleanfctl payments connectors--output json