Transaction Action of GS2-Limit

ConsumeAction

Gs2Limit:CountUpByUserId

count-up by the specify user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
limitNamestringName of limit model
counterNamestringCounter Name
userIdstring
Set #{userId} to replace the currently logged in user ID.
countUpValueintAmount to count up
maxValueintMaximum value allowed to count up
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Limit:CountUpByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "limitName": "[string]Name of limit model",
        "counterName": "[string]Counter Name",
        "userId": "[string]User Id",
        "countUpValue": "[int]Amount to count up",
        "maxValue": "[int]Maximum value allowed to count up",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Limit:CountUpByUserId
request:
  namespaceName: "[string]Namespace name"
  limitName: "[string]Name of limit model"
  counterName: "[string]Counter Name"
  userId: "[string]User Id"
  countUpValue: "[int]Amount to count up"
  maxValue: "[int]Maximum value allowed to count up"
  timeOffsetToken: "[string]Time offset token"
transaction.service("limit").consume.count_up_by_user_id({
    namespaceName="[string]Namespace name",
    limitName="[string]Name of limit model",
    counterName="[string]Counter Name",
    userId="[string]User Id",
    countUpValue="[int]Amount to count up",
    maxValue="[int]Maximum value allowed to count up",
    timeOffsetToken="[string]Time offset token",
})

Gs2Limit:VerifyCounterByUserId

Verify counter value by user ID

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
userIdstring
Set #{userId} to replace the currently logged in user ID.
limitNamestringName of limit model
counterNamestringCounter Name
verifyTypeenum [
“less”,
“lessEqual”,
“greater”,
“greaterEqual”,
“equal”,
“notEqual”
]
Type of verification
countintcount value
multiplyValueSpecifyingQuantityboolWhether to multiply the value used for verification when specifying the quantity
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Limit:VerifyCounterByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "limitName": "[string]Name of limit model",
        "counterName": "[string]Counter Name",
        "verifyType": "[string]Type of verification",
        "count": "[int]count value",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Limit:VerifyCounterByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  limitName: "[string]Name of limit model"
  counterName: "[string]Counter Name"
  verifyType: "[string]Type of verification"
  count: "[int]count value"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
transaction.service("limit").consume.verify_counter_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    limitName="[string]Name of limit model",
    counterName="[string]Counter Name",
    verifyType="[string]Type of verification",
    count="[int]count value",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})

AcquireAction

Gs2Limit:CountDownByUserId

count-down by the specify user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
limitNamestringName of limit model
counterNamestringCounter Name
userIdstringSet #{userId} to replace the currently logged in user ID.
countDownValueintAmount to count down
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Limit:CountDownByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "limitName": "[string]Name of limit model",
        "counterName": "[string]Counter Name",
        "userId": "[string]User Id",
        "countDownValue": "[int]Amount to count down",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Limit:CountDownByUserId
request:
  namespaceName: "[string]Namespace name"
  limitName: "[string]Name of limit model"
  counterName: "[string]Counter Name"
  userId: "[string]User Id"
  countDownValue: "[int]Amount to count down"
  timeOffsetToken: "[string]Time offset token"
transaction.service("limit").acquire.count_down_by_user_id({
    namespaceName="[string]Namespace name",
    limitName="[string]Name of limit model",
    counterName="[string]Counter Name",
    userId="[string]User Id",
    countDownValue="[int]Amount to count down",
    timeOffsetToken="[string]Time offset token",
})

Gs2Limit:DeleteCounterByUserId

Delete counter by specifying user ID

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
limitNamestringName of limit model
userIdstringSet #{userId} to replace the currently logged in user ID.
counterNamestringCounter Name
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Limit:DeleteCounterByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "limitName": "[string]Name of limit model",
        "userId": "[string]User Id",
        "counterName": "[string]Counter Name",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Limit:DeleteCounterByUserId
request:
  namespaceName: "[string]Namespace name"
  limitName: "[string]Name of limit model"
  userId: "[string]User Id"
  counterName: "[string]Counter Name"
  timeOffsetToken: "[string]Time offset token"
transaction.service("limit").acquire.delete_counter_by_user_id({
    namespaceName="[string]Namespace name",
    limitName="[string]Name of limit model",
    userId="[string]User Id",
    counterName="[string]Counter Name",
    timeOffsetToken="[string]Time offset token",
})