Transaction Action of GS2-AdReward
Specification of verify/consume/acquire transaction actions
ConsumeAction
Gs2AdReward:ConsumePointByUserId
Consume Points by specifying a user ID
Consumes points from the user. Subtracts a specific number of points from the specified user ID and returns the result.
Whether the action allows quantity specification: YES
Whether the action is reversible: YES
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| point | long | ✓ | 1 ~ 9223372036854775805 | Consume Points | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
{
"action": "Gs2AdReward:ConsumePointByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User ID",
"point": "[long]Consume Points",
"timeOffsetToken": "[string]Time offset token"
}
}action: Gs2AdReward:ConsumePointByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User ID"
point: "[long]Consume Points"
timeOffsetToken: "[string]Time offset token"transaction.service("adReward").consume.consume_point_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User ID",
point="[long]Consume Points",
timeOffsetToken="[string]Time offset token",
})AcquireAction
Gs2AdReward:AcquirePointByUserId
Acquire Point by specifying a user ID
Adds a specific number of points to the specified user ID and returns the result.
Whether the action allows quantity specification: YES
Whether the action is reversible: YES
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| point | long | ✓ | 1 ~ 9223372036854775805 | Acquire Points | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
{
"action": "Gs2AdReward:AcquirePointByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User ID",
"point": "[long]Acquire Points",
"timeOffsetToken": "[string]Time offset token"
}
}action: Gs2AdReward:AcquirePointByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User ID"
point: "[long]Acquire Points"
timeOffsetToken: "[string]Time offset token"transaction.service("adReward").acquire.acquire_point_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User ID",
point="[long]Acquire Points",
timeOffsetToken="[string]Time offset token",
})