pricing

package
v1.261125.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppPriceActiveOn

func AppPriceActiveOn(startDate, endDate string, now time.Time) (active bool, known bool)

AppPriceActiveOn reports whether an app price with startDate and endDate applies on now's App Store Connect pricing date (the US Pacific date, see shared.PricingDate). Start dates are inclusive and end dates are exclusive, so a price stops applying on its end date. An empty date is unbounded. known is false when a date is not a YYYY-MM-DD date.

func NewPricingCommand

func NewPricingCommand(d *shared.Deps) *ffcli.Command

NewPricingCommand returns the pricing command group.

Types

type AppBasePriceStatus

type AppBasePriceStatus struct {
	// Configured is false when App Store Connect reports that the app's price
	// schedule was never created.
	Configured bool
	// BaseTerritory is the schedule's base territory ID, such as USA.
	BaseTerritory string
	// HasPrice is true when the base territory has a manual price that is
	// active now or scheduled to start later. A free price counts.
	HasPrice bool
}

AppBasePriceStatus reports whether an app price schedule has a price for its base territory, using the same schedule reads as `asc pricing current`.

func FetchAppBasePriceStatus

func FetchAppBasePriceStatus(ctx context.Context, client *asc.Client, scheduleID string, run AppPriceRequestRunner, now func() time.Time) (AppBasePriceStatus, error)

FetchAppBasePriceStatus reads the base territory and manual prices of the price schedule scheduleID, running each request through run. A nil run bounds each request with shared.ContextWithTimeout. A schedule that App Store Connect reports as never configured returns Configured=false without an error; every other request or decoding failure is returned so callers can treat the price as unverified. now decides today's pricing date.

type AppPriceRequestRunner

type AppPriceRequestRunner func(ctx context.Context, request func(context.Context) error) error

AppPriceRequestRunner runs one App Store Connect request. Callers that share a request limit across concurrent reads pass a runner that applies it; the runner must bound request with a timeout derived from ctx.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL