[PR #741] [MERGED] Add price filtering flags to price point list commands #753

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

📋 Pull Request Information

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

Base: mainHead: feedback/price-point-filter


📝 Commits (2)

  • 3344100 feat(pricing): add --price, --min-price, --max-price flags for price point filtering
  • 1b412a6 fix(pricing): reject non-finite price filter values

📊 Changes

5 files changed (+394 additions, -0 deletions)

View changed files

internal/cli/cmdtest/price_points_filter_test.go (+126 -0)
📝 internal/cli/iap/price_points.go (+38 -0)
internal/cli/shared/price_filter.go (+118 -0)
internal/cli/shared/price_filter_test.go (+68 -0)
📝 internal/cli/subscriptions/price_points.go (+44 -0)

📄 Description

Summary

  • Adds --price, --min-price, --max-price flags to asc subscriptions price-points list and asc iap price-points list
  • Client-side filtering of customerPrice field after API fetch
  • --price for exact match, --min-price/--max-price for range queries (combinable)
  • --price is mutually exclusive with --min-price/--max-price
  • Incompatible with --stream mode (returns clear error)

Motivation

Finding a price point ID for "$4.99 in USA" currently requires listing hundreds of results and manually searching. These flags enable direct lookup:

asc subscriptions price-points list --subscription SUB_ID --territory USA --price 4.99

Files changed

  • internal/cli/shared/price_filter.go — shared PriceFilter with HasFilter(), Validate(), MatchesPrice() (float comparison with 0.005 epsilon)
  • internal/cli/shared/price_filter_test.go — 24 test cases
  • internal/cli/subscriptions/price_points.go — flags + filterSubscriptionPricePoints()
  • internal/cli/iap/price_points.go — flags + filterIAPPricePoints()
  • internal/cli/cmdtest/price_points_filter_test.go — 8 CLI-level validation tests

Test plan

  • TestPriceFilter_Validate — 11 cases: mutual exclusivity, number format, min<=max
  • TestPriceFilter_MatchesPrice — 13 cases: exact, range, edge cases
  • TestSubscriptionPricePointsFilterValidation — 6 CLI-level cases
  • TestIAPPricePointsFilterValidation — 2 CLI-level cases
  • ASC_BYPASS_KEYCHAIN=1 make test — all tests pass

🔄 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/741 **Author:** [@omar16100](https://github.com/omar16100) **Created:** 2/23/2026 **Status:** ✅ Merged **Merged:** 2/23/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feedback/price-point-filter` --- ### 📝 Commits (2) - [`3344100`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/33441006845c728fc00d9a875be47abad6d5d6c3) feat(pricing): add --price, --min-price, --max-price flags for price point filtering - [`1b412a6`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/1b412a6d38c8fc772cd77a35734cbac624623bad) fix(pricing): reject non-finite price filter values ### 📊 Changes **5 files changed** (+394 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `internal/cli/cmdtest/price_points_filter_test.go` (+126 -0) 📝 `internal/cli/iap/price_points.go` (+38 -0) ➕ `internal/cli/shared/price_filter.go` (+118 -0) ➕ `internal/cli/shared/price_filter_test.go` (+68 -0) 📝 `internal/cli/subscriptions/price_points.go` (+44 -0) </details> ### 📄 Description ## Summary - Adds `--price`, `--min-price`, `--max-price` flags to `asc subscriptions price-points list` and `asc iap price-points list` - Client-side filtering of `customerPrice` field after API fetch - `--price` for exact match, `--min-price`/`--max-price` for range queries (combinable) - `--price` is mutually exclusive with `--min-price`/`--max-price` - Incompatible with `--stream` mode (returns clear error) ## Motivation Finding a price point ID for "$4.99 in USA" currently requires listing hundreds of results and manually searching. These flags enable direct lookup: ```bash asc subscriptions price-points list --subscription SUB_ID --territory USA --price 4.99 ``` ## Files changed - `internal/cli/shared/price_filter.go` — shared `PriceFilter` with `HasFilter()`, `Validate()`, `MatchesPrice()` (float comparison with 0.005 epsilon) - `internal/cli/shared/price_filter_test.go` — 24 test cases - `internal/cli/subscriptions/price_points.go` — flags + `filterSubscriptionPricePoints()` - `internal/cli/iap/price_points.go` — flags + `filterIAPPricePoints()` - `internal/cli/cmdtest/price_points_filter_test.go` — 8 CLI-level validation tests ## Test plan - [x] `TestPriceFilter_Validate` — 11 cases: mutual exclusivity, number format, min<=max - [x] `TestPriceFilter_MatchesPrice` — 13 cases: exact, range, edge cases - [x] `TestSubscriptionPricePointsFilterValidation` — 6 CLI-level cases - [x] `TestIAPPricePointsFilterValidation` — 2 CLI-level cases - [x] `ASC_BYPASS_KEYCHAIN=1 make test` — all tests pass --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:32:24 +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#753
No description provided.