diff --git a/commerce/features/api.go b/commerce/features/api.go index c35cbaf..6d4a792 100644 --- a/commerce/features/api.go +++ b/commerce/features/api.go @@ -16,7 +16,7 @@ func CreatePlanFeatures(ctx context.Context, params *clerk.CreateMultiplePlanFea return getClient().CreatePlanFeatures(ctx, params) } -func DeletePlanFeatures(ctx context.Context, params *clerk.DeletePlanFeaturesParams) error { +func DeletePlanFeatures(ctx context.Context, params *clerk.DeletePlanFeaturesParams) (*clerk.DeletedResource, error) { return getClient().DeletePlanFeatures(ctx, params) } diff --git a/commerce/features/client.go b/commerce/features/client.go index e14850c..bf49efe 100644 --- a/commerce/features/client.go +++ b/commerce/features/client.go @@ -47,14 +47,16 @@ func (c *Client) CreatePlanFeatures(ctx context.Context, params *clerk.CreateMul return resource, err } -func (c *Client) DeletePlanFeatures(ctx context.Context, params *clerk.DeletePlanFeaturesParams) error { +func (c *Client) DeletePlanFeatures(ctx context.Context, params *clerk.DeletePlanFeaturesParams) (*clerk.DeletedResource, error) { reqPath, err := clerk.JoinPath(rootPath, "plans", params.PlanID, path) if err != nil { - return err + return nil, err } req := clerk.NewAPIRequest(http.MethodDelete, reqPath) - err = c.Backend.Call(ctx, req, nil) - return err + req.SetParams(params) + resource := &clerk.DeletedResource{} + err = c.Backend.Call(ctx, req, resource) + return resource, err } func (c *Client) List(ctx context.Context, params *clerk.ListFeaturesByInstanceIDParams) (*clerk.CommerceFeatureList, error) {