INNER CODE UNIT · Go

set

franckverrot/terraform-provider-stripe · stripe/resource_stripe_customer_portal.go:346

					set := val.(*schema.Set)
					products := set.List()
					for _, i := range products {
						pParams := &stripe.BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams{}
						finalProduct := i.(map[string]interface{})
						if val, ok := finalProduct["id"]; ok {
							pParams.Product = stripe.String(val.(string))
						}

						if val, ok := finalProduct["prices"]; ok {
							pricesI := val.([]interface{})
							prices := []string{}
							for _, price := range pricesI {
								prices = append(prices, price.(string))
							}
							pParams.Prices = stripe.StringSlice(prices)
						}
						productsParams = append(productsParams, pParams)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…