From 02647836d21f3bad73371314d0011b5dbb7f4616 Mon Sep 17 00:00:00 2001 From: Ben Howdle Date: Mon, 16 Dec 2024 16:40:33 +0000 Subject: [PATCH] fix(commerce): single feature create --- commerce/features/api.go | 2 +- commerce/features/client.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 }