Skip to content

Commit

Permalink
F #6311: GOCA - add method to enable market
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Lafievre <[email protected]>
  • Loading branch information
treywelsh committed Sep 8, 2023
1 parent acda7a6 commit 1a25858
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/oca/go/src/goca/marketplace.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,17 @@ func (mc *MarketPlaceController) Delete() error {
return err
}

// Enable enables or disables a marketplace.
// * enable: True for enabling, False for disabling
func (mc *MarketPlaceController) Enable(enable bool) error {
_, err := mc.c.Client.Call("one.market.enable", mc.ID, enable)
return err
}

// Update adds marketplace content.
// * tpl: The new marketplace contents. Syntax can be the usual attribute=value or XML.
// * uType: Update type: Replace: Replace the whole template.
// Merge: Merge new template with the existing one.
// - tpl: The new marketplace contents. Syntax can be the usual attribute=value or XML.
// - uType: Update type: Replace: Replace the whole template.
// Merge: Merge new template with the existing one.
func (mc *MarketPlaceController) Update(tpl string, uType parameters.UpdateType) error {
_, err := mc.c.Client.Call("one.market.update", mc.ID, tpl, uType)
return err
Expand Down

0 comments on commit 1a25858

Please sign in to comment.