Transaction Action of GS2-Limit
VerifyAction
Gs2Limit:VerifyCounterByUserId
Verify counter value by user ID
Actions for which quantity can be specified: NO
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
userId | string | Set #{userId} to replace the currently logged in user ID. |
limitName | string | Name of limit model |
counterName | string | Counter Name |
verifyType | enum [ “less”, “lessEqual”, “greater”, “greaterEqual”, “equal”, “notEqual” ] | 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 |
Enumeration type definition to specify as verifyType
Enumerator String Definition | Description |
---|---|
less | Possession quantity is less than the specified value |
lessEqual | Possession quantity is less than or equal to the specified value |
greater | Possession quantity is greater than the specified value |
greaterEqual | Possession quantity is greater than or equal to the specified value |
equal | Possession quantity is equal to the specified value |
notEqual | Possession quantity is not equal to the specified value |
{
"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",
})
ConsumeAction
Gs2Limit:CountUpByUserId
count-up by the specify user ID
Actions for which quantity can be specified: YES
Reversible action: YES
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
limitName | string | Name of limit model |
counterName | string | Counter Name |
userId | string | Set #{userId} to replace the currently logged in 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"
}
}
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",
})
AcquireAction
Gs2Limit:CountDownByUserId
count-down by the specify user ID
Actions for which quantity can be specified: YES
Reversible action: YES
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
limitName | string | Name of limit model |
counterName | string | Counter Name |
userId | string | Set #{userId} to replace the currently logged in 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"
}
}
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
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
limitName | string | Name of limit model |
userId | string | Set #{userId} to replace the currently logged in 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"
}
}
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",
})