pricing

package
v1.261001.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppPriceEndedOn

func AppPriceEndedOn(endDate string, now time.Time) (ended bool, known bool)

AppPriceEndedOn reports whether an app price with endDate no longer applies on now's UTC date. App Store Connect end dates are exclusive, so a price stops applying on its end date. An empty endDate never ends. known is false when endDate is not a YYYY-MM-DD date.

func PricingAvailabilityCommand

func PricingAvailabilityCommand() *ffcli.Command

PricingAvailabilityCommand returns the availability command group.

func PricingAvailabilityCreateCommand added in v1.260722.0

func PricingAvailabilityCreateCommand() *ffcli.Command

PricingAvailabilityCreateCommand returns the availability create subcommand.

func PricingAvailabilityGetCommand

func PricingAvailabilityGetCommand() *ffcli.Command

PricingAvailabilityGetCommand returns the availability get subcommand.

func PricingAvailabilityPlatformsCommand added in v1.260825.0

func PricingAvailabilityPlatformsCommand() *ffcli.Command

PricingAvailabilityPlatformsCommand returns the platforms subcommand.

func PricingAvailabilityRemoveFromSaleCommand added in v1.260819.0

func PricingAvailabilityRemoveFromSaleCommand() *ffcli.Command

PricingAvailabilityRemoveFromSaleCommand returns the remove-from-sale subcommand.

func PricingAvailabilitySetCommand

func PricingAvailabilitySetCommand() *ffcli.Command

PricingAvailabilitySetCommand returns the availability edit subcommand.

func PricingAvailabilityTerritoryAvailabilitiesCommand

func PricingAvailabilityTerritoryAvailabilitiesCommand() *ffcli.Command

PricingAvailabilityTerritoryAvailabilitiesCommand returns the availability territory-availabilities subcommand.

func PricingCommand

func PricingCommand() *ffcli.Command

PricingCommand returns the pricing command group.

func PricingCurrentCommand added in v1.260331.0

func PricingCurrentCommand() *ffcli.Command

PricingCurrentCommand returns the current pricing command.

func PricingPricePointsCommand

func PricingPricePointsCommand() *ffcli.Command

PricingPricePointsCommand returns the price points command.

func PricingPricePointsEqualizationsCommand

func PricingPricePointsEqualizationsCommand() *ffcli.Command

PricingPricePointsEqualizationsCommand returns the price point equalizations subcommand.

func PricingPricePointsGetCommand

func PricingPricePointsGetCommand() *ffcli.Command

PricingPricePointsGetCommand returns the price point get subcommand.

func PricingScheduleAutomaticPricesCommand

func PricingScheduleAutomaticPricesCommand() *ffcli.Command

PricingScheduleAutomaticPricesCommand returns the schedule automatic-prices subcommand.

func PricingScheduleCommand

func PricingScheduleCommand() *ffcli.Command

PricingScheduleCommand returns the pricing schedule command group.

func PricingScheduleCreateCommand

func PricingScheduleCreateCommand() *ffcli.Command

PricingScheduleCreateCommand returns the schedule create subcommand.

func PricingScheduleGetCommand

func PricingScheduleGetCommand() *ffcli.Command

PricingScheduleGetCommand returns the schedule get subcommand.

func PricingScheduleManualPricesCommand

func PricingScheduleManualPricesCommand() *ffcli.Command

PricingScheduleManualPricesCommand returns the schedule manual-prices subcommand.

func PricingTerritoriesCommand

func PricingTerritoriesCommand() *ffcli.Command

PricingTerritoriesCommand returns the territories subcommand group.

func PricingTerritoriesListCommand

func PricingTerritoriesListCommand() *ffcli.Command

PricingTerritoriesListCommand returns the territories list subcommand.

func PricingTiersCommand

func PricingTiersCommand() *ffcli.Command

PricingTiersCommand returns the tiers subcommand.

func SetAvailabilityClientFactory added in v1.260722.0

func SetAvailabilityClientFactory(fn func() (*asc.Client, error)) func()

SetAvailabilityClientFactory replaces the ASC client factory for availability tests. It returns a restore function to reset the previous handler.

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) (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.

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