'
Show / Hide Table of Contents

Class SegmentController

The Segment 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/Segment

Methods

Create(SegmentModel)

Creates a new segment using the specified parameters.

Declaration
public JsonResult Create(SegmentModel model)
Parameters
Type Name Description
SegmentModel model

Model of the segment to be created.

Returns
Type Description
System.Web.Mvc.JsonResult

The ID associated with the new segment if successfully created.

Delete(Guid)

Deletes the segment as specified by the segmentID.

Declaration
public JsonResult Delete(Guid id)
Parameters
Type Name Description
System.Guid id

ID of the segment to be deleted.

Returns
Type Description
System.Web.Mvc.JsonResult

true if the deletion was successful

Get(Guid)

Gets segment model by specified segment id.

Declaration
public ActionResult Get(Guid id)
Parameters
Type Name Description
System.Guid id

ID of the segment to be retrieved.

Returns
Type Description
System.Web.Mvc.ActionResult

segment model asociated of given segment id.

ListDigitalBookingLines(Guid)

Lists digital booking lines associated to a segment.

Declaration
public JsonResult ListDigitalBookingLines(Guid segmentId)
Parameters
Type Name Description
System.Guid segmentId

ID of the segment.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded array of elements. If the segment has no digital booking lines, the array will be empty.

ListFacePackSelections(Guid)

Lists face pack selections associated with a segment.

Declaration
public JsonResult ListFacePackSelections(Guid segmentId)
Parameters
Type Name Description
System.Guid segmentId

ID of the segment.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded array of elements. If the segment has no face pack selections, the array will be empty.

ListFaceSelections(Guid)

Lists face selections associated with a segment.

Declaration
public JsonResult ListFaceSelections(Guid segmentId)
Parameters
Type Name Description
System.Guid segmentId

ID of the segment.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded array of elements. If the segment has no face selections, the array will be empty.

Stop(Guid)

Stops all booking lines in the segment.

Declaration
public JsonResult Stop(Guid id)
Parameters
Type Name Description
System.Guid id

ID of the segment to stop.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded boolean. true if the bookings of the segment were successfully stopped.

Update(Nullable<Guid>, Nullable<Guid>, Nullable<Int32>, String, String, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Nullable<DateTime>, Nullable<DateTime>, Nullable<Decimal>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Updates the segment with the specified parameters.

Declaration
public JsonResult Update(Guid? id, Guid? segmentId, int? salesContractItemNumber, string referenceNumber, string segmentDescription, Guid? brandID, Guid? salesMarketID, Guid? mediaTypeID, Guid? mediaTypeGroupID, Guid? networkID, Guid? purchaseTypeID, DateTime? startDate, DateTime? endDate, decimal? billingAmount, bool? forceBookingLineDatesChanges, bool? forceBookingDatesChanges, bool? forceStaticPackDatesChanges, bool? forceDropBookingsOnSalesMarketChange, bool? forceDropBookingsOnMediaTypeGroupChange, bool? forceDropBookingsOnMediaTypeChange, bool? forceAll)
Parameters
Type Name Description
System.Nullable<System.Guid> id

ID of the segment to be updated.

System.Nullable<System.Guid> segmentId

ID of the segment to be updated. Can be used as an alternative to the field, if the class is used.

System.Nullable<System.Int32> salesContractItemNumber
System.String referenceNumber
System.String segmentDescription
System.Nullable<System.Guid> brandID
System.Nullable<System.Guid> salesMarketID

Sales Market ID of the segment to be updated.

System.Nullable<System.Guid> mediaTypeID
System.Nullable<System.Guid> mediaTypeGroupID

Media Type Group ID of the segment to be updated.

System.Nullable<System.Guid> networkID
System.Nullable<System.Guid> purchaseTypeID

Purchase Type ID of the segment to be updated.

System.Nullable<System.DateTime> startDate

Start Date of the segment to be updated.

System.Nullable<System.DateTime> endDate

End Date of the segment to be updated.

System.Nullable<System.Decimal> billingAmount
System.Nullable<System.Boolean> forceBookingLineDatesChanges

Indicates if the dates of booking lines are ajusted automatically (true for yes, false for no). This parameter is optional. If not specified, the method may purposefully fail in order to prevent unexpected changes to the data.

System.Nullable<System.Boolean> forceBookingDatesChanges

Indicates if the dates of bookings are ajusted automatically (true for yes, false for no). This parameter is optional. If not specified, the method may purposefully fail in order to prevent unexpected changes to the data.

System.Nullable<System.Boolean> forceStaticPackDatesChanges

Indicates if the dates of static packs are ajusted automatically (true for yes, false for no). This parameter is optional. If not specified, the method may purposefully fail in order to prevent unexpected changes to the data.

System.Nullable<System.Boolean> forceDropBookingsOnSalesMarketChange

Indicates if bookings are automatically dropped when the sales market is changed. This parameter is optional. If not specified, the method may purposefully fail in order to prevent unexpected changes to the data.

System.Nullable<System.Boolean> forceDropBookingsOnMediaTypeGroupChange

Indicates if bookings are automatically dropped when the media type group is changed. This parameter is optional. If not specified, the method may purposefully fail in order to prevent unexpected changes to the data.

System.Nullable<System.Boolean> forceDropBookingsOnMediaTypeChange

Indicates if bookings are automatically dropped when the media type is changed. This parameter is optional. If not specified, the method may purposefully fail in order to prevent unexpected changes to the data.

System.Nullable<System.Boolean> forceAll

Forces the same answer to all "force" parameters that are not explicitly given a value.

Returns
Type Description
System.Web.Mvc.JsonResult

true if the update was successful, false otherwise.

Void(Guid, Nullable<Boolean>)

Voids the segment as specified by the segmentID.

Declaration
public JsonResult Void(Guid id, bool? force)
Parameters
Type Name Description
System.Guid id

ID of the segment to be voided.

System.Nullable<System.Boolean> force

If true, the segment is automatically stopped if it cannot be voided.

Returns
Type Description
System.Web.Mvc.JsonResult

true if the deletion was successful

Back to top Generated by DocFX