INNER CODE UNIT · Go
client
franckverrot/terraform-provider-stripe · stripe/resource_stripe_customer_portal.go:379
client := m.(*client.API)
params := &stripe.BillingPortalConfigurationParams{}
if dru, ok := d.GetOk("default_return_url"); ok {
params.DefaultReturnURL = stripe.String(dru.(string))
}
if bp, ok := d.GetOk("business_profile"); ok {
params.BusinessProfile = expandBusinessProfile(bp.([]interface{}))
}
if bp, ok := d.GetOk("features"); ok {
params.Features = expandFeatures(bp.([]interface{}))
}
params.Metadata = expandMetadata(d)
portal, err := client.BillingPortalConfigurations.New(params)
if err == nil {
log.Printf("[INFO] Customer Portal: %s", portal.ID)