[PR #439] [MERGED] feat(iap): add consolidated iap prices command #528

Closed
opened 2026-02-26 22:31:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/439
Author: @rudrankriyam
Created: 2/7/2026
Status: Merged
Merged: 2/7/2026
Merged by: @rudrankriyam

Base: mainHead: feat/iap-prices-438


📝 Commits (10+)

  • 2d13b80 feat(iap): add consolidated iap prices command
  • fd98d32 fix(iap): include scheduled changes from encoded price IDs
  • e370c4b fix(iap): return cancellation error on partial summary work
  • 251aae6 fix(iap): resolve manual legacy price points without hardcoding
  • 50cd504 fix(subscriptions): use per-page timeout for price-points pagination
  • 819862d feat(subscriptions): add consolidated asc subscriptions pricing command
  • 5fd362d feat(subscriptions): add --territory filter to price-points list
  • 9cfa1db feat(subscriptions): add --stream flag for NDJSON paginated output
  • b5d8680 Fix error check order in resolveSubscriptionPriceSummaries and remove unused priceFields field
  • 9c51f73 Merge pull request #441 from rudrankriyam/cursor/subscription-pricing-and-queries-ed84

📊 Changes

19 files changed (+3711 additions, -11 deletions)

View changed files

📝 internal/asc/client_iap_subresources.go (+18 -2)
📝 internal/asc/client_iap_subresources_test.go (+152 -0)
📝 internal/asc/iap_queries.go (+123 -1)
📝 internal/asc/subscription_resources_queries.go (+53 -0)
📝 internal/asc/subscriptions_resources_http_test.go (+24 -0)
internal/cli/cmdtest/iap_price_schedules_get_test.go (+110 -0)
internal/cli/cmdtest/iap_prices_test.go (+578 -0)
internal/cli/cmdtest/subscriptions_price_points_test.go (+239 -0)
internal/cli/cmdtest/subscriptions_pricing_test.go (+378 -0)
📝 internal/cli/iap/iap.go (+2 -0)
📝 internal/cli/iap/price_schedules.go (+71 -3)
internal/cli/iap/prices.go (+1063 -0)
internal/cli/iap/prices_test.go (+107 -0)
📝 internal/cli/shared/shared.go (+11 -0)
📝 internal/cli/subscriptions/price_points.go (+59 -4)
internal/cli/subscriptions/pricing.go (+559 -0)
internal/cli/subscriptions/pricing_test.go (+157 -0)
📝 internal/cli/subscriptions/shared_wrappers.go (+4 -0)
📝 internal/cli/subscriptions/subscriptions.go (+3 -1)

📄 Description

Closes #438

Summary

Adds a consolidated asc iap prices command so users can retrieve current and scheduled in-app purchase prices in one command, instead of chaining multiple asc calls and manual parsing.

What Changed

  • Added new command: asc iap prices
  • Added validation and output handling for:
    • --app or --iap-id (mutually exclusive)
    • --territory
    • --output json|table|markdown
    • --pretty (JSON only)
  • Added include/fields/limits query support for IAP price schedules and price points in ASC client
  • Extended asc iap price-schedules get with include/fields/limit flags
  • Added CLI cmdtests and ASC client query tests

Follow-up Fix From Real Flow Validation

Validated the exact manual flow style from the screenshot and fixed one gap:

  • ASC automatic price resources may omit startDate/endDate in attributes and only encode schedule dates in the base64 resource ID (sd/ed).
  • asc iap prices now decodes those ID fields and reports scheduled changes correctly.
  • asc iap prices also forces full schedule subresource fetch when included results hit include limits, preventing truncated schedule analysis.

Zenther Flow Verification

Using Zenther (app id: 6748252780, iap id: 6749273457):

  • Manual flow confirms current base price/proceeds in USA:
    • 59.99 USD / 50.99 USD
  • Manual flow confirms scheduled territory change:
    • MUS moves 10357 -> 10387 on 2026-02-16
  • Consolidated command now matches this:
    • asc iap prices --app 6748252780 --output json

Timing Results (Refreshed)

Measured after the follow-up fix above.

1) Existing multi-command workflow (legacy)

  • Runs: 7.37s, 7.00s, 6.88s
  • Average: 7.083s

2) New single command (asc iap prices)

  • Runs: 3.68s, 4.02s, 3.70s
  • Average: 3.800s

3) Speedup

  • End-to-end runtime improvement: ~1.86x

4) --help discovery timing

  • Legacy discovery path (asc --help + old IAP help chain): 0.074s
  • New discovery path (asc --help, asc iap --help, asc iap prices --help): 0.033s
  • Discovery path improvement: ~2.24x

5) Fresh-context background agent timing (no prior context)

  • Discovery time: 80.486s
  • Command execution time: 3.203s
  • Total: 83.689s

Validation

  • go test ./internal/asc -run 'InAppPurchasePriceSchedule|InAppPurchasePricePoints'
  • go test ./internal/cli/iap
  • go test ./internal/cli/cmdtest -run 'IAPPrices|IAPPriceSchedulesGet'
  • make test
  • make lint

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/439 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 2/7/2026 **Status:** ✅ Merged **Merged:** 2/7/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feat/iap-prices-438` --- ### 📝 Commits (10+) - [`2d13b80`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/2d13b80098c2ccf8fd126ec979c71a4e29eaf0f6) feat(iap): add consolidated iap prices command - [`fd98d32`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/fd98d327a86c0e2a44ffc4428ee60921f2887a28) fix(iap): include scheduled changes from encoded price IDs - [`e370c4b`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/e370c4b449b0c4009a2b59d89ecc57af7d536d1f) fix(iap): return cancellation error on partial summary work - [`251aae6`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/251aae6684572c3010912b756a39e0401b30a07c) fix(iap): resolve manual legacy price points without hardcoding - [`50cd504`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/50cd5048baadda8cc6eb8faf737a4699bb4058c7) fix(subscriptions): use per-page timeout for price-points pagination - [`819862d`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/819862d315662dea79f2ae4ba57ba8412bef20ca) feat(subscriptions): add consolidated `asc subscriptions pricing` command - [`5fd362d`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/5fd362d36c467bcae5082ddc1edfd4f6b21e82c9) feat(subscriptions): add --territory filter to price-points list - [`9cfa1db`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/9cfa1db8918dab9e3afda5f18bf90ba809347aad) feat(subscriptions): add --stream flag for NDJSON paginated output - [`b5d8680`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/b5d8680a815f590603e32ce72ba3739c5412e48e) Fix error check order in resolveSubscriptionPriceSummaries and remove unused priceFields field - [`9c51f73`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/9c51f73c2f7cd09ecd4e9a1fa6a3b719f4f09e91) Merge pull request #441 from rudrankriyam/cursor/subscription-pricing-and-queries-ed84 ### 📊 Changes **19 files changed** (+3711 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `internal/asc/client_iap_subresources.go` (+18 -2) 📝 `internal/asc/client_iap_subresources_test.go` (+152 -0) 📝 `internal/asc/iap_queries.go` (+123 -1) 📝 `internal/asc/subscription_resources_queries.go` (+53 -0) 📝 `internal/asc/subscriptions_resources_http_test.go` (+24 -0) ➕ `internal/cli/cmdtest/iap_price_schedules_get_test.go` (+110 -0) ➕ `internal/cli/cmdtest/iap_prices_test.go` (+578 -0) ➕ `internal/cli/cmdtest/subscriptions_price_points_test.go` (+239 -0) ➕ `internal/cli/cmdtest/subscriptions_pricing_test.go` (+378 -0) 📝 `internal/cli/iap/iap.go` (+2 -0) 📝 `internal/cli/iap/price_schedules.go` (+71 -3) ➕ `internal/cli/iap/prices.go` (+1063 -0) ➕ `internal/cli/iap/prices_test.go` (+107 -0) 📝 `internal/cli/shared/shared.go` (+11 -0) 📝 `internal/cli/subscriptions/price_points.go` (+59 -4) ➕ `internal/cli/subscriptions/pricing.go` (+559 -0) ➕ `internal/cli/subscriptions/pricing_test.go` (+157 -0) 📝 `internal/cli/subscriptions/shared_wrappers.go` (+4 -0) 📝 `internal/cli/subscriptions/subscriptions.go` (+3 -1) </details> ### 📄 Description Closes #438 ## Summary Adds a consolidated `asc iap prices` command so users can retrieve current and scheduled in-app purchase prices in one command, instead of chaining multiple `asc` calls and manual parsing. ## What Changed - Added new command: `asc iap prices` - Added validation and output handling for: - `--app` or `--iap-id` (mutually exclusive) - `--territory` - `--output json|table|markdown` - `--pretty` (JSON only) - Added include/fields/limits query support for IAP price schedules and price points in ASC client - Extended `asc iap price-schedules get` with include/fields/limit flags - Added CLI cmdtests and ASC client query tests ## Follow-up Fix From Real Flow Validation Validated the exact manual flow style from the screenshot and fixed one gap: - ASC automatic price resources may omit `startDate/endDate` in attributes and only encode schedule dates in the base64 resource ID (`sd`/`ed`). - `asc iap prices` now decodes those ID fields and reports scheduled changes correctly. - `asc iap prices` also forces full schedule subresource fetch when included results hit include limits, preventing truncated schedule analysis. ## Zenther Flow Verification Using Zenther (`app id: 6748252780`, `iap id: 6749273457`): - Manual flow confirms current base price/proceeds in USA: - `59.99 USD` / `50.99 USD` - Manual flow confirms scheduled territory change: - `MUS` moves `10357 -> 10387` on `2026-02-16` - Consolidated command now matches this: - `asc iap prices --app 6748252780 --output json` ## Timing Results (Refreshed) Measured after the follow-up fix above. ### 1) Existing multi-command workflow (legacy) - Runs: `7.37s`, `7.00s`, `6.88s` - Average: `7.083s` ### 2) New single command (`asc iap prices`) - Runs: `3.68s`, `4.02s`, `3.70s` - Average: `3.800s` ### 3) Speedup - End-to-end runtime improvement: `~1.86x` ### 4) `--help` discovery timing - Legacy discovery path (`asc --help` + old IAP help chain): `0.074s` - New discovery path (`asc --help`, `asc iap --help`, `asc iap prices --help`): `0.033s` - Discovery path improvement: `~2.24x` ### 5) Fresh-context background agent timing (no prior context) - Discovery time: `80.486s` - Command execution time: `3.203s` - Total: `83.689s` ## Validation - `go test ./internal/asc -run 'InAppPurchasePriceSchedule|InAppPurchasePricePoints'` - `go test ./internal/cli/iap` - `go test ./internal/cli/cmdtest -run 'IAPPrices|IAPPriceSchedulesGet'` - `make test` - `make lint` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:31:22 +03:00
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#528
No description provided.