Namespace: Category

Appearition.Part.Category

Use the functions under this module to create, change and remove part Category records on the Appearition platform

Methods

Appearition.Part.Category.AddCategoryToPart (request, requestOptions)Appearition.Part.PartCategoryViewModel static

Will link an existing Category to an existing Part

Name Type Description
request Appearition.Part.Category.AddCategoryToPartViewModel

Contains the identifiers of the Part and Category

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Returns:
Type Description
Appearition.Part.PartCategoryViewModel The saved record with the system allocated Id. This is returned as part of the success callback function in the requestOptions param

Appearition.Part.Category.AddNewCategoryToPart (request, requestOptions)Appearition.Part.PartCategoryViewModel static

Will add a new Category to an existing Part

Name Type Description
request Appearition.Part.Category.AddNewCategoryToPartViewModel

Contains the details of the new Part being added

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Returns:
Type Description
Appearition.Part.PartCategoryViewModel The saved record with the system allocated Id. This is returned as part of the success callback function in the requestOptions param

Appearition.Part.Category.RemoveCategoryFromPart (request, requestOptions) static

Will unlink the Category from the part record.

Name Type Description
request Appearition.Part.PartCategoryViewModel

Contains the details of the part Category

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Appearition.Part.Category.UpdateCategory (request, requestOptions) static

Will update the details of an existing Category record. Nothing will be returned unless an error occurs.

Name Type Description
request Appearition.Part.PartCategoryViewModel

Contains the details of the part Category

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Type Definitions

Appearition.Part.Category.AddCategoryToPartViewModel

This data structure is posted to the server when linking an existing Category to an existing part.

Properties:
Name Type Description
PartId number

Uniquely identifies the part

CategoryId number

Uniquely identifies the Category

Appearition.Part.Category.AddNewCategoryToPartViewModel

This data structure is posted to the server when adding a new Category to an existing part.

Properties:
Name Type Description
PartId number

Uniquely identifies the part

CategoryName string

The name of the new Category