Skip to content

Commit

Permalink
fix for deleting PlanFeatures
Browse files Browse the repository at this point in the history
  • Loading branch information
aeliox committed Dec 12, 2024
1 parent 33b88ab commit 5e93c23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion commerce/features/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions commerce/features/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5e93c23

Please sign in to comment.