INNER CODE UNIT · Go
updateFeaturePrices
theopenlane/core · cmd/catalog/main.go:350
func updateFeaturePrices(ctx context.Context, sc stripeClient, prod *stripe.Product, name string, feat catalog.Feature) (catalog.Feature, []takeoverInfo, int) {
missingPrices := 0
var takeovers []takeoverInfo
for i, p := range feat.Billing.Prices {
md := map[string]string{catalog.ManagedByKey: catalog.ManagedByValue}
maps.Copy(md, p.Metadata)
var price *stripe.Price
var err error
if p.PriceID != "" {
price, err = sc.GetPrice(ctx, p.PriceID)
if err != nil || price == nil {
missingPrices++
continue