Skip to content

feat: admin subcommands, coupon redemption#156

Merged
seanmcgary merged 7 commits into
release/v1.0.0from
sm-coupons
May 20, 2026
Merged

feat: admin subcommands, coupon redemption#156
seanmcgary merged 7 commits into
release/v1.0.0from
sm-coupons

Conversation

@seanmcgary
Copy link
Copy Markdown
Member

New CLI Commands

User-facing:

  • ecloud billing redeem-coupon [--code CODE] — redeem a coupon code for credits (prompts interactively if no --code flag)

Admin (requires admin privileges):

  • ecloud admin coupons create --amount <dollars> — create a new coupon
  • ecloud admin coupons list [--active] [--redeemed] [--limit N] [--offset N] — list coupons with optional filters
  • ecloud admin coupons get <id> — get coupon details
  • ecloud admin coupons deactivate <id> — deactivate a coupon
  • ecloud admin coupons redeem <id> --address <wallet> — redeem a coupon on behalf of a user
  • ecloud admin admins add <address> — grant admin privileges
  • ecloud admin admins remove <address> — revoke admin privileges
  • ecloud admin admins list — list all admins

SDK Changes

  • BillingApiClient — added methods for all admin and coupon REST endpoints
  • AdminModule — new module wrapping admin API surface (createAdminModule)
  • BillingModule — added redeemCoupon(code) method
  • New types: AdminCoupon, AdminUser, CreateCouponResponse, ListCouponsResponse, GetCouponResponse, AddAdminResponse, ListAdminsResponse, RedeemCouponResponse

@seanmcgary seanmcgary merged commit 7451666 into release/v1.0.0 May 20, 2026
@seanmcgary seanmcgary deleted the sm-coupons branch May 20, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant