mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 15:45:48 +03:00
[PR #187] [MERGED] Offer codes CLI support #349
Labels
No labels
bug
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/App-Store-Connect-CLI#349
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/187
Author: @rudrankriyam
Created: 1/26/2026
Status: ✅ Merged
Merged: 1/26/2026
Merged by: @rudrankriyam
Base:
main← Head:cursor/promo-codes-cli-support-65d4📝 Commits (1)
6024f5dAdd promo codes CLI support📊 Changes
14 files changed (+857 additions, -1 deletions)
View changed files
📝
README.md(+17 -1)📝
cmd/commands_test.go(+73 -0)➕
cmd/promocodes.go(+265 -0)📝
cmd/root.go(+1 -0)📝
internal/asc/client_http_test.go(+122 -0)📝
internal/asc/client_options.go(+21 -0)📝
internal/asc/client_pagination.go(+4 -0)📝
internal/asc/client_queries.go(+10 -0)📝
internal/asc/client_test.go(+93 -0)📝
internal/asc/client_types.go(+1 -0)📝
internal/asc/output_core.go(+8 -0)📝
internal/asc/output_test.go(+56 -0)➕
internal/asc/promo_codes.go(+132 -0)➕
internal/asc/promo_codes_output.go(+54 -0)📄 Description
Implement App Store Connect offer code (subscription one-time use code) management to replace unsupported promo codes.
Summary
offer-codes(list/generate/values) backed by subscription offer code endpointsTest plan
ASC_APP_ID= ASC_KEY_ID= ASC_ISSUER_ID= ASC_PRIVATE_KEY_PATH= ASC_VENDOR_NUMBER= ASC_CONFIG_PATH=/tmp/asc-config-empty.json go test ./...ASC_APP_ID= ASC_KEY_ID= ASC_ISSUER_ID= ASC_PRIVATE_KEY_PATH= ASC_VENDOR_NUMBER= ASC_CONFIG_PATH=/tmp/asc-config-empty.json go test ./cmd ./internal/asc ./internal/auth -count=10 -shuffle=onASC_BYPASS_KEYCHAIN=1 ASC_KEY_ID="B5D62ZK8WW" ASC_ISSUER_ID="ff24f170-22a9-45b3-b880-29816376771b" ASC_PRIVATE_KEY_PATH="/Users/rudrank/Downloads/AuthKey_B5D62ZK8WW.p8" go run . offer-codes list --offer-code "000000000000000000000000"(expect not found)ASC_BYPASS_KEYCHAIN=1 ASC_KEY_ID="B5D62ZK8WW" ASC_ISSUER_ID="ff24f170-22a9-45b3-b880-29816376771b" ASC_PRIVATE_KEY_PATH="/Users/rudrank/Downloads/AuthKey_B5D62ZK8WW.p8" go run . offer-codes generate --offer-code "000000000000000000000000" --quantity 1 --expiration-date "2026-02-01"(expect invalid relationship)ASC_BYPASS_KEYCHAIN=1 ASC_KEY_ID="B5D62ZK8WW" ASC_ISSUER_ID="ff24f170-22a9-45b3-b880-29816376771b" ASC_PRIVATE_KEY_PATH="/Users/rudrank/Downloads/AuthKey_B5D62ZK8WW.p8" go run . offer-codes values --id "000000000000000000000000"(expect not found)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.