diff --git a/commerce/features/api.go b/commerce/features/api.go index 6d4a792..93b38ac 100644 --- a/commerce/features/api.go +++ b/commerce/features/api.go @@ -8,7 +8,7 @@ import ( "github.com/clerk/clerk-sdk-go/v2" ) -func Create(ctx context.Context, params *clerk.CreateMultipleFeaturesParams) (*clerk.CommerceFeatureList, error) { +func Create(ctx context.Context, params *clerk.CreateFeatureParams) (*clerk.CommerceFeature, error) { return getClient().Create(ctx, params) } diff --git a/commerce/features/client.go b/commerce/features/client.go index bf49efe..58e88a9 100644 --- a/commerce/features/client.go +++ b/commerce/features/client.go @@ -23,14 +23,14 @@ func NewClient(config *clerk.ClientConfig) *Client { } } -func (c *Client) Create(ctx context.Context, params *clerk.CreateMultipleFeaturesParams) (*clerk.CommerceFeatureList, error) { +func (c *Client) Create(ctx context.Context, params *clerk.CreateFeatureParams) (*clerk.CommerceFeature, error) { reqPath, err := clerk.JoinPath(rootPath, path) if err != nil { return nil, err } req := clerk.NewAPIRequest(http.MethodPost, reqPath) req.SetParams(params) - resource := &clerk.CommerceFeatureList{} + resource := &clerk.CommerceFeature{} err = c.Backend.Call(ctx, req, resource) return resource, err }