Enables scripted content fragments to use PointTransactions
Methods
Create
Create a Point Transaction
Velocity
#set($pointTransactionResponse = $core_v2_pointTransaction.Create($description, $userId, $value, $contentId, $contentTypeId, "%{ CreatedDate = $createdDateArg, TypeId = $typeIdArg }"))
JavaScript
var pointTransactionResponse = core_v2_pointTransaction.Create(description, userId, value, contentId, contentTypeId, { CreatedDate: createdDateArg, TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
description | String | Why the point transaction was created. | Required | ||
userId | Int32 | Id of the user the transaction is for. | Required | ||
value | Int32 | Number of points being awarded (negative number = points being removed). | Required | ||
contentId | Guid | Id of the content related to this point transaction. | Required | ||
contentTypeId | Guid | Type Id of the content related to this point transaction. | Required | ||
CreatedDate | DateTime | Specify when this point transaction should occur. | Optional | ||
TypeId | Guid | Categorization type of the point transaction. | Optional |
Returns
Delete
Delete a Point Transaction
Velocity
#set($additionalInfoResponse = $core_v2_pointTransaction.Delete($pointTransactionId))
JavaScript
var additionalInfoResponse = core_v2_pointTransaction.Delete(pointTransactionId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
pointTransactionId | Int64 | Id of the point transaction. | Required |
Returns
DeleteByType
Point Transaction Delete by TypeId. Schedules a job to delete all existing point transaction that match the TypeId provided.
Velocity
#set($additionalInfoResponse = $core_v2_pointTransaction.DeleteByType($typeId))
JavaScript
var additionalInfoResponse = core_v2_pointTransaction.DeleteByType(typeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
typeId | Guid | Categorization type of the point transactions. | Required |
Returns
Get
Get a Point Transaction
Velocity
#set($pointTransactionResponse = $core_v2_pointTransaction.Get($pointTransactionId))
JavaScript
var pointTransactionResponse = core_v2_pointTransaction.Get(pointTransactionId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
pointTransactionId | Int64 | Id of the point transaction. | Required |
Returns
List
List Point Transactions
Velocity
#set($pagedListResponse = $core_v2_pointTransaction.List("%{ ApplicationId = $applicationIdArg, ContainerId = $containerIdArg, ContentId = $contentIdArg, ContentTypeId = $contentTypeIdArg, EndDate = $endDateArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, StartDate = $startDateArg, TypeId = $typeIdArg, UserId = $userIdArg }"))
JavaScript
var pagedListResponse = core_v2_pointTransaction.List({ ApplicationId: applicationIdArg, ContainerId: containerIdArg, ContentId: contentIdArg, ContentTypeId: contentTypeIdArg, EndDate: endDateArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, SortBy: sortByArg, SortOrder: sortOrderArg, StartDate: startDateArg, TypeId: typeIdArg, UserId: userIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ApplicationId | Guid | Filter point transactions by Application Id. Optional. | Optional | ||
ContainerId | Guid | Filter point transactions by Container Id. Optional. | Optional | ||
ContentId | Guid | Filter point transactions by Content Id. Optional. | Optional | ||
ContentTypeId | Guid | Filter point transactions by Content Type Id. Optional. | Optional | ||
EndDate | DateTime | Only show point transactions before this date. Optional. | Optional | ||
PageIndex | Int32 | Which page of results to retrieve. Optional. | Optional | ||
PageSize | Int32 | Number of results to display per page. Default is 10. Optional. | Optional | ||
SortBy | String | Sort transactions by a certain field. Default is Date. Optional. | Optional | Date, Value | |
SortOrder | String | Order transactions. Default is Descending.Optional. | Optional | Ascending, Descending | |
StartDate | DateTime | Only show point transactions after this date. Optional. | Optional | ||
TypeId | Guid | Filter point transactions by Type Id. Optional. | Optional | ||
UserId | Int32 | Filter point transactions by User Id. Optional. | Optional |
Returns
UpdateByType
Point Transaction Update by TypeId. Schedules a job to update point values of all existing point transactions that match the TypeId provided.
Velocity
#set($additionalInfoResponse = $core_v2_pointTransaction.UpdateByType($typeId, $value))
JavaScript
var additionalInfoResponse = core_v2_pointTransaction.UpdateByType(typeId, value);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
typeId | Guid | Categorization type of the point transactions | Required | ||
value | Int32 | New value of points | Required |