Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 606 Bytes

File metadata and controls

33 lines (28 loc) · 606 Bytes
package main

import (
	"context"
	flexprice "github.com/flexprice/go-sdk/v2"
	"github.com/flexprice/go-sdk/v2/models/types"
	"log"
)

func main() {
	ctx := context.Background()

	s := flexprice.New(
		flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
	)

	res, err := s.Addons.CreateAddon(ctx, types.CreateAddonRequest{
		LookupKey: "<value>",
		Name:      "<value>",
		Type:      types.AddonTypeMultipleInstance,
	})
	if err != nil {
		log.Fatal(err)
	}
	if res.CreateAddonResponse != nil {
		// handle response
	}
}