[GH-ISSUE #404] Parity: IAP offer code prices, base territory, and one-time code lookup #117

Closed
opened 2026-02-26 21:33:31 +03:00 by kerem · 3 comments
Owner

Originally created by @rudrankriyam on GitHub (Feb 2, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/404

Overview

Fill remaining commerce gaps around IAP offer code pricing, IAP price schedule base territory, and subscription one-time use code lookup.

Scope (OpenAPI resources)

  • /v1/inAppPurchaseOfferCodes/{id}/prices
  • /v1/inAppPurchasePriceSchedules/{id}/baseTerritory
  • /v1/subscriptionOfferCodeOneTimeUseCodes/{id}

Proposed CLI

  • asc iap offer-codes prices --offer-code-id \"OFFER_CODE_ID\"
  • asc iap price-schedules base-territory --schedule-id \"SCHEDULE_ID\"
  • asc subscriptions offer-codes one-time-codes get --id \"ONE_TIME_USE_CODE_ID\"

Examples:

  • asc iap offer-codes prices --offer-code-id \"OFFER_CODE_ID\"
  • asc iap price-schedules base-territory --schedule-id \"SCHEDULE_ID\"
  • asc subscriptions offer-codes one-time-codes get --id \"ONE_TIME_USE_CODE_ID\"

Flag patterns

Common: --id, --offer-code-id, --schedule-id, --output, --pretty, --limit, --next, --paginate

Output

  • JSON minified by default
  • --pretty for JSON
  • --output table/markdown for list commands

Detailed TODO

  • Add client methods in internal/asc for IAP offer code prices + IAP base territory + subscription one-time-use code get-by-id
  • Add iap offer-codes prices subcommand
  • Add iap price-schedules base-territory subcommand
  • Add subscriptions offer-codes one-time-codes get subcommand
  • Add HTTP client tests (mocked)
  • Add CLI cmdtests for flag validation + output

Acceptance criteria

  • IAP offer code prices list is accessible
  • IAP price schedule base territory is accessible
  • Subscription one-time use code batch can be fetched by ID

Tests

  • Flag validation tests
  • HTTP client tests for each endpoint

Implementation notes

  • Align naming with existing iap offer-codes and subscriptions offer-codes groups

References

  • docs/openapi/paths.txt
  • docs/openapi/latest.json

@cursor

Originally created by @rudrankriyam on GitHub (Feb 2, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/404 # Overview Fill remaining commerce gaps around IAP offer code pricing, IAP price schedule base territory, and subscription one-time use code lookup. # Scope (OpenAPI resources) - `/v1/inAppPurchaseOfferCodes/{id}/prices` - `/v1/inAppPurchasePriceSchedules/{id}/baseTerritory` - `/v1/subscriptionOfferCodeOneTimeUseCodes/{id}` # Proposed CLI - `asc iap offer-codes prices --offer-code-id \"OFFER_CODE_ID\"` - `asc iap price-schedules base-territory --schedule-id \"SCHEDULE_ID\"` - `asc subscriptions offer-codes one-time-codes get --id \"ONE_TIME_USE_CODE_ID\"` Examples: - `asc iap offer-codes prices --offer-code-id \"OFFER_CODE_ID\"` - `asc iap price-schedules base-territory --schedule-id \"SCHEDULE_ID\"` - `asc subscriptions offer-codes one-time-codes get --id \"ONE_TIME_USE_CODE_ID\"` # Flag patterns Common: `--id`, `--offer-code-id`, `--schedule-id`, `--output`, `--pretty`, `--limit`, `--next`, `--paginate` # Output - JSON minified by default - `--pretty` for JSON - `--output table/markdown` for list commands # Detailed TODO - [ ] Add client methods in `internal/asc` for IAP offer code prices + IAP base territory + subscription one-time-use code get-by-id - [ ] Add `iap offer-codes prices` subcommand - [ ] Add `iap price-schedules base-territory` subcommand - [ ] Add `subscriptions offer-codes one-time-codes get` subcommand - [ ] Add HTTP client tests (mocked) - [ ] Add CLI cmdtests for flag validation + output # Acceptance criteria - [ ] IAP offer code prices list is accessible - [ ] IAP price schedule base territory is accessible - [ ] Subscription one-time use code batch can be fetched by ID # Tests - Flag validation tests - HTTP client tests for each endpoint # Implementation notes - Align naming with existing `iap offer-codes` and `subscriptions offer-codes` groups # References - `docs/openapi/paths.txt` - `docs/openapi/latest.json` @cursor
kerem closed this issue 2026-02-26 21:33:32 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Feb 2, 2026):

@cursor implement this

<!-- gh-comment-id:3836616280 --> @rudrankriyam commented on GitHub (Feb 2, 2026): @cursor implement this
Author
Owner

@cursor[bot] commented on GitHub (Feb 2, 2026):

Summary:

  • Added CLI support for iap offer-codes prices, iap price-schedules base-territory, and subscriptions offer-codes one-time-codes get, plus pagination support and table/markdown output for IAP offer-code prices and single-territory responses.
  • Converted subscriptions offer-codes one-time-codes into a list/get subcommand group (listing is now ... one-time-codes list).
  • Added HTTP client tests, pagination wiring, and output tests for the new endpoints.

Testing:

  • make test

Artifacts:

  • Video walkthrough showing the new help outputs: iap_offer_codes_and_subscription_help/recording_demo.mp4

View PR
Open in Cursor Open in Web

<!-- gh-comment-id:3836616723 --> @cursor[bot] commented on GitHub (Feb 2, 2026): Summary: - Added CLI support for `iap offer-codes prices`, `iap price-schedules base-territory`, and `subscriptions offer-codes one-time-codes get`, plus pagination support and table/markdown output for IAP offer-code prices and single-territory responses. - Converted `subscriptions offer-codes one-time-codes` into a list/get subcommand group (listing is now `... one-time-codes list`). - Added HTTP client tests, pagination wiring, and output tests for the new endpoints. Testing: - `make test` Artifacts: - Video walkthrough showing the new help outputs: `iap_offer_codes_and_subscription_help/recording_demo.mp4` <a href="https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/411"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-pr-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-pr-light.png"><img alt="View PR" width="86" height="28" src="https://cursor.com/assets/images/view-pr-light.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-071ccab3-4c95-4a00-bcf6-62d4701056ad"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-071ccab3-4c95-4a00-bcf6-62d4701056ad"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>
Author
Owner

@rudrankriyam commented on GitHub (Feb 2, 2026):

Completed in PR #411 (merged).

Added:

  • asc iap offer-codes prices --offer-code-id "OFFER_CODE_ID"
  • asc iap price-schedules base-territory --schedule-id "SCHEDULE_ID"
  • asc subscriptions offer-codes one-time-codes get --id "ONE_TIME_USE_CODE_ID"
  • asc subscriptions offer-codes one-time-codes list --offer-code-id "OFFER_CODE_ID" (refactored to command group)
<!-- gh-comment-id:3837449209 --> @rudrankriyam commented on GitHub (Feb 2, 2026): Completed in PR #411 (merged). Added: - `asc iap offer-codes prices --offer-code-id "OFFER_CODE_ID"` - `asc iap price-schedules base-territory --schedule-id "SCHEDULE_ID"` - `asc subscriptions offer-codes one-time-codes get --id "ONE_TIME_USE_CODE_ID"` - `asc subscriptions offer-codes one-time-codes list --offer-code-id "OFFER_CODE_ID"` (refactored to command group)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#117
No description provided.