[GH-ISSUE #367] Parity: Commerce relationships (IAP, subscriptions, pricing, offer codes) #106

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

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

Overview

Add missing in-app purchase, subscription, pricing, and offer code relationships for parity.

Scope (OpenAPI resources)

  • /v1/apps/{id}/inAppPurchases
  • /v1/apps/{id}/subscriptionGracePeriod
  • /v1/appPriceSchedules/{id}
  • /v1/inAppPurchaseAvailabilities/{id}
  • /v1/inAppPurchaseContents/{id}
  • /v1/inAppPurchaseOfferCodeCustomCodes
  • /v1/inAppPurchaseOfferCodeOneTimeUseCodes
  • /v1/inAppPurchaseOfferCodeOneTimeUseCodes/{id}/values
  • /v1/inAppPurchasePriceSchedules/{id}
  • /v1/inAppPurchases/{id}
  • /v2/inAppPurchases/{id}/promotedPurchase
  • /v1/subscriptionAvailabilities/{id}
  • /v1/subscriptionAvailabilities/{id}/availableTerritories
  • /v1/subscriptionGracePeriods/{id}
  • /v1/subscriptions/{id}/appStoreReviewScreenshot
  • /v1/subscriptions/{id}/promotedPurchase
  • /v1/subscriptions/{id}/subscriptionAvailability
  • /v2/appAvailabilities/{id}

Proposed CLI

  • asc iap ...
  • asc subscriptions ...
  • asc apps ...

Examples:

  • asc iap get --id "IAP_ID"
  • asc iap availabilities get --id "AVAILABILITY_ID"
  • asc iap offer-codes custom-codes list --id "OFFER_CODE_ID"
  • asc subscriptions availability get --id "AVAILABILITY_ID"
  • asc subscriptions app-store-review-screenshot get --id "SUBSCRIPTION_ID"

Flag patterns

Common: --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 for IAP/subscription relationships
  • Add client methods for offer code custom/one-time use lists
  • Implement CLI subcommands and relationship helpers
  • Add cmdtests + HTTP client tests (mocked)

Acceptance criteria

  • IAP relationships accessible via CLI
  • Subscription relationships accessible via CLI
  • Offer code endpoints accessible

Tests

  • Flag validation tests
  • HTTP client tests for each endpoint
  • Output tests for list commands

Implementation notes

  • Add client methods in internal/asc/client_iap.go, client_subscriptions.go, client_apps.go
  • Add CLI in internal/cli/iap and internal/cli/subscriptions

References

  • docs/openapi/latest.json
  • docs/openapi/paths.txt
Originally created by @rudrankriyam on GitHub (Jan 31, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/367 # Overview Add missing in-app purchase, subscription, pricing, and offer code relationships for parity. # Scope (OpenAPI resources) - `/v1/apps/{id}/inAppPurchases` - `/v1/apps/{id}/subscriptionGracePeriod` - `/v1/appPriceSchedules/{id}` - `/v1/inAppPurchaseAvailabilities/{id}` - `/v1/inAppPurchaseContents/{id}` - `/v1/inAppPurchaseOfferCodeCustomCodes` - `/v1/inAppPurchaseOfferCodeOneTimeUseCodes` - `/v1/inAppPurchaseOfferCodeOneTimeUseCodes/{id}/values` - `/v1/inAppPurchasePriceSchedules/{id}` - `/v1/inAppPurchases/{id}` - `/v2/inAppPurchases/{id}/promotedPurchase` - `/v1/subscriptionAvailabilities/{id}` - `/v1/subscriptionAvailabilities/{id}/availableTerritories` - `/v1/subscriptionGracePeriods/{id}` - `/v1/subscriptions/{id}/appStoreReviewScreenshot` - `/v1/subscriptions/{id}/promotedPurchase` - `/v1/subscriptions/{id}/subscriptionAvailability` - `/v2/appAvailabilities/{id}` # Proposed CLI - `asc iap ...` - `asc subscriptions ...` - `asc apps ...` Examples: - `asc iap get --id "IAP_ID"` - `asc iap availabilities get --id "AVAILABILITY_ID"` - `asc iap offer-codes custom-codes list --id "OFFER_CODE_ID"` - `asc subscriptions availability get --id "AVAILABILITY_ID"` - `asc subscriptions app-store-review-screenshot get --id "SUBSCRIPTION_ID"` # Flag patterns Common: `--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 for IAP/subscription relationships - [ ] Add client methods for offer code custom/one-time use lists - [ ] Implement CLI subcommands and relationship helpers - [ ] Add cmdtests + HTTP client tests (mocked) # Acceptance criteria - [ ] IAP relationships accessible via CLI - [ ] Subscription relationships accessible via CLI - [ ] Offer code endpoints accessible # Tests - Flag validation tests - HTTP client tests for each endpoint - Output tests for list commands # Implementation notes - Add client methods in `internal/asc/client_iap.go`, `client_subscriptions.go`, `client_apps.go` - Add CLI in `internal/cli/iap` and `internal/cli/subscriptions` # References - `docs/openapi/latest.json` - `docs/openapi/paths.txt`
kerem closed this issue 2026-02-26 21:33:27 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Jan 31, 2026):

@cursor please implement

<!-- gh-comment-id:3828610958 --> @rudrankriyam commented on GitHub (Jan 31, 2026): @cursor please implement
Author
Owner

@cursor[bot] commented on GitHub (Jan 31, 2026):

Summary of changes:

  • I added ASC client support for the missing IAP/subscription relationships (including subscription grace periods, legacy IAP endpoints, availability/price schedule/promoted purchase helpers) and wired new output formatting for the new response types.
  • I added CLI command groups for iap availabilities, iap promoted-purchase, IAP offer-code custom/one-time codes, subscriptions app-store-review-screenshot, subscriptions promoted-purchase, subscriptions grace-periods, and apps subscription-grace-period, with the expected flag validation and output handling.

Tests run:

  • go test ./internal/asc/... && go test ./internal/cli/...

Walkthrough artifact:

  • Screen recording of the test run: /opt/cursor/artifacts/go_test_asc_cli/recording_demo.mp4

View PR
Open in Cursor Open in Web

<!-- gh-comment-id:3828611107 --> @cursor[bot] commented on GitHub (Jan 31, 2026): Summary of changes: - I added ASC client support for the missing IAP/subscription relationships (including subscription grace periods, legacy IAP endpoints, availability/price schedule/promoted purchase helpers) and wired new output formatting for the new response types. - I added CLI command groups for `iap availabilities`, `iap promoted-purchase`, IAP offer-code custom/one-time codes, `subscriptions app-store-review-screenshot`, `subscriptions promoted-purchase`, `subscriptions grace-periods`, and `apps subscription-grace-period`, with the expected flag validation and output handling. Tests run: - `go test ./internal/asc/... && go test ./internal/cli/...` Walkthrough artifact: - Screen recording of the test run: `/opt/cursor/artifacts/go_test_asc_cli/recording_demo.mp4` <a href="https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/378"><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-6c33c5ad-f6df-4e0e-be03-dd0aef8ad01e"><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-6c33c5ad-f6df-4e0e-be03-dd0aef8ad01e"><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 (Jan 31, 2026):

Closed by #378 (IAP/subscription relationships) and follow-up pricing fixes in #379.

<!-- gh-comment-id:3829221393 --> @rudrankriyam commented on GitHub (Jan 31, 2026): Closed by #378 (IAP/subscription relationships) and follow-up pricing fixes in #379.
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#106
No description provided.