Skip to content

feat(apps): app pricing and app availability - #28

Merged
hanrw merged 2 commits into
mainfrom
feat/app-pricing
Sep 23, 2026
Merged

hanrw merged 2 commits into
mainfrom
feat/app-pricing

Conversation

@hanrw

@hanrw hanrw commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Stacked on #27, since it updates that PR's refusal table. Merge #27 first; GitHub then retargets this PR to main.

Why

A review submission is refused with "App is not eligible for submission until pricing has been set" until the app has a price schedule. The public API supports setting one, but asc could only check whether a price exists (hasPricing, used by check-readiness).

What

Mirrors asc iap price-points list / asc iap prices set:

  • asc apps price-points list --app-id <id> [--territory USA] lists every price point in the territory (all pages, about 800). AppPricePoint.isFree marks the zero point.
  • asc apps prices set --app-id <id> --base-territory USA --price-point-id <id> creates the price schedule, and Apple equalizes the other territories.
  • REST: GET /api/v1/apps/:appId/price-points?territory= and POST /api/v1/apps/:appId/prices/set (body base-territory, price-point-id).
  • App gains a listPricePoints affordance. That updates 5 exact-JSON snapshots of commands that output an app.

Tests

  • Written test-first: Domain, Infrastructure (including pages beyond the first, and the exact POST body), commands and REST.
  • Full swift test passes.

Live check (read-only)

  • 801 US price points over 5 pages, plus JPN, over both CLI and REST.
  • setPrice links resolve to POST /api/v1/apps/:id/prices/set.
  • Setting a price was not run. That's the app owner's decision.

Also recorded

App Privacy data-usage answers have no public API. They're only reachable with a web session, so asc can't fix that refusal. See the refusal table in docs/features/submit-with-products.md.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • List app price points by territory and set an app’s price, including making it free.
    • Set up app availability for selected territories or all territories, and view its status through the CLI and REST API.
    • App and availability results now include related actions and territory availability counts.
  • Bug Fixes

    • Apps without availability setup now return empty data instead of an error, with CLI guidance for setting it up.
  • Documentation

    • Added guidance for app pricing and availability setup, including command options and pricing requirements.

`asc apps price-points list --app-id [--territory USA]` lists the prices an
app can be sold at (all pages; the 0.0 point makes it free) and
`asc apps prices set --app-id --base-territory --price-point-id` creates
the app's price schedule, which Apple equalizes worldwide — the fix for
the "not eligible for submission until pricing has been set" refusal.
REST: GET /api/v1/apps/:appId/price-points, POST /api/v1/apps/:appId/prices/set.
App gains a listPricePoints affordance.

Verified live (read-only): 801 USA price points over 5 pages, JPN, and
the REST route; setting a price was not run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ddfcdf32-93bb-4ccb-ab0a-369542e1fe5c

📥 Commits

Reviewing files that changed from the base of the PR and between c314418 and 09c4a35.

📒 Files selected for processing (37)
  • CHANGELOG.md
  • README.md
  • Sources/ASCCommand/Commands/Apps/AppsCommand.swift
  • Sources/ASCCommand/Commands/Apps/AppsPricePointsCommand.swift
  • Sources/ASCCommand/Commands/Apps/AppsPricePointsList.swift
  • Sources/ASCCommand/Commands/Apps/AppsPricesCommand.swift
  • Sources/ASCCommand/Commands/Apps/AppsPricesSet.swift
  • Sources/ASCCommand/Commands/Apps/Availability/AppAvailabilityCommand.swift
  • Sources/ASCCommand/Commands/Apps/Availability/AppAvailabilityCreate.swift
  • Sources/ASCCommand/Commands/Apps/Availability/AppAvailabilityGet.swift
  • Sources/ASCCommand/Commands/Web/Controllers/AppAvailabilityController.swift
  • Sources/ASCCommand/Commands/Web/Controllers/AppPricingController.swift
  • Sources/ASCCommand/Commands/Web/RESTRoutes.swift
  • Sources/Domain/Apps/App.swift
  • Sources/Domain/Apps/Availability/AppAvailability.swift
  • Sources/Domain/Apps/Availability/AppAvailabilityRepository.swift
  • Sources/Domain/Apps/Pricing/AppPricePoint.swift
  • Sources/Domain/Apps/Pricing/AppPriceSchedule.swift
  • Sources/Domain/Apps/Pricing/AppPricing+RESTRoutes.swift
  • Sources/Domain/Apps/Pricing/PricingRepository.swift
  • Sources/Domain/Shared/RESTPathResolver.swift
  • Sources/Infrastructure/Apps/Availability/SDKAppAvailabilityRepository.swift
  • Sources/Infrastructure/Apps/Pricing/SDKPricingRepository.swift
  • Tests/ASCCommandTests/Commands/Apps/AppPricingCommandsTests.swift
  • Tests/ASCCommandTests/Commands/Apps/AppsListTests.swift
  • Tests/ASCCommandTests/Commands/Apps/AppsUpdateTests.swift
  • Tests/ASCCommandTests/Commands/Apps/Availability/AppAvailabilityCreateTests.swift
  • Tests/ASCCommandTests/Commands/Apps/Availability/AppAvailabilityGetTests.swift
  • Tests/ASCCommandTests/Commands/Web/RESTRoutesTests.swift
  • Tests/ASCCommandTests/OutputFormatterTests.swift
  • Tests/DomainTests/Apps/Availability/AppAvailabilityTests.swift
  • Tests/DomainTests/Apps/Pricing/AppPricingTests.swift
  • Tests/InfrastructureTests/Apps/Availability/SDKAppAvailabilityRepositoryTests.swift
  • Tests/InfrastructureTests/Apps/Pricing/SDKPricingRepositoryTests.swift
  • docs/features/app-pricing.md
  • docs/features/iap-subscription-availability.md
  • docs/features/submit-with-products.md
 _______________________________________________________
< Once upon a dream, I found all the bugs in your code. >
 -------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

`asc app-availability create --app-id (--territory X ... | --all-territories)
[--available-in-new-territories]` sets up an app's availability in one
POST /v2/appAvailabilities with each territory inlined, then reads it back.
`app-availability get` on an app that was never set up now returns
`data: []` plus a stderr hint instead of a raw 404. AppAvailability moves
to structured affordances and Presentable; REST GET/POST
/api/v1/apps/:appId/availability.

Verified live: Unveil (never set up) -> 175/175 territories, available in
new territories; REST GET returns them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@hanrw hanrw changed the title feat(apps): list app price points and set the app's price feat(apps): app pricing and app availability Sep 23, 2026
@hanrw

hanrw commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

Added app availability to this PR (commit 09c4a35):

  • asc app-availability create --app-id (--territory X … | --all-territories) [--available-in-new-territories] sets up availability with one POST /v2/appAvailabilities. REST: POST /api/v1/apps/:appId/availability.
  • app-availability get on an app that was never set up now returns data: [] plus a hint, instead of a raw 404.
  • Written test-first. There was one slip: the Presentable test was written together with its conformance. I then confirmed it fails when the conformance is removed.
  • Live: Unveil went from "Set Up Availability" to 175/175 territories, including new territories.

@hanrw
hanrw changed the base branch from feat/product-version-submissions to main September 23, 2026 10:23
@hanrw hanrw closed this Sep 23, 2026
@hanrw hanrw reopened this Sep 23, 2026
@hanrw
hanrw merged commit e3ecc90 into main Sep 23, 2026
1 of 2 checks passed
@hanrw
hanrw deleted the feat/app-pricing branch September 23, 2026 10:29
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.06509% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.86%. Comparing base (d3aebc1) to head (09c4a35).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
Sources/Domain/Apps/Pricing/AppPricePoint.swift 70.96% 9 Missing ⚠️
...ommands/Apps/Availability/AppAvailabilityGet.swift 30.00% 7 Missing ⚠️
...ands/Apps/Availability/AppAvailabilityCreate.swift 75.00% 5 Missing ⚠️
...ASCCommand/Commands/Apps/AppsPricePointsList.swift 66.66% 3 Missing ⚠️
...urces/ASCCommand/Commands/Apps/AppsPricesSet.swift 57.14% 3 Missing ⚠️
Sources/Domain/Apps/Pricing/AppPriceSchedule.swift 77.77% 2 Missing ⚠️
Sources/Domain/Shared/RESTPathResolver.swift 0.00% 2 Missing ⚠️
...ps/Availability/SDKAppAvailabilityRepository.swift 96.77% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
- Coverage   82.03%   81.86%   -0.17%     
==========================================
  Files         486      492       +6     
  Lines       14208    14362     +154     
==========================================
+ Hits        11655    11758     +103     
- Misses       2553     2604      +51     
Files with missing lines Coverage Δ
Sources/Domain/Apps/App.swift 100.00% <100.00%> (ø)
...ces/Domain/Apps/Availability/AppAvailability.swift 100.00% <100.00%> (ø)
...es/Domain/Apps/Pricing/AppPricing+RESTRoutes.swift 100.00% <100.00%> (ø)
...astructure/Apps/Pricing/SDKPricingRepository.swift 100.00% <100.00%> (ø)
...ps/Availability/SDKAppAvailabilityRepository.swift 98.38% <96.77%> (-1.62%) ⬇️
Sources/Domain/Apps/Pricing/AppPriceSchedule.swift 77.77% <77.77%> (ø)
Sources/Domain/Shared/RESTPathResolver.swift 73.11% <0.00%> (-26.89%) ⬇️
...ASCCommand/Commands/Apps/AppsPricePointsList.swift 66.66% <66.66%> (ø)
...urces/ASCCommand/Commands/Apps/AppsPricesSet.swift 57.14% <57.14%> (ø)
...ands/Apps/Availability/AppAvailabilityCreate.swift 75.00% <75.00%> (ø)
... and 2 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant