Class BrandController
The Brand Controller is a controller that allows data to be retrieved and updated within the Ayuda Platform.
Namespace: Ayuda.BMS.Splash.Areas.Pi.Controllers
Remarks
This web service can be accessed using an address similar to the following: https://[AYUDA DEPLOYMENT URL]/Juice/Pi/Brand
Methods
Create(BrandModel)
Creates a new brand using the specified parameters.
Declaration
public JsonResult Create(BrandModel model)
Parameters
Type | Name | Description |
---|---|---|
BrandModel | model | Model of the brand to be created. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | The ID associated with the new brand if successfully created. |
Delete(Guid)
Deletes the brand as specified by the id.
Declaration
public JsonResult Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the brand to be deleted. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult |
|
GetByName(String)
Gets the Brand by Name.
Declaration
public JsonResult GetByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the Brand |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | The Brand if found. |
OnActionExecuting(ActionExecutingContext)
Declaration
protected override void OnActionExecuting(ActionExecutingContext filterContext)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.ActionExecutingContext | filterContext |
Overrides
Update(Guid, Nullable<Guid>, String, Nullable<Guid>, Nullable<Boolean>)
Updates the brand with the specified parameters.
Declaration
public JsonResult Update(Guid id, Guid? advertiserID, string name, Guid? advertiserCategoryID, bool? isLive)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the brand to be updated. |
System.Nullable<System.Guid> | advertiserID | ID of the advertiser associated with to be updated. |
System.String | name | Name of the brand to be updated. |
System.Nullable<System.Guid> | advertiserCategoryID | Advertiser category ID associated with the brand to be updated. |
System.Nullable<System.Boolean> | isLive |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult |