Transaction Action of GS2-SerialKey
VerifyAction
Gs2SerialKey:VerifyCodeByUserId
Verify the validity of the serial code by specifying 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. |
code | string | Serial Code |
campaignModelName | string | Campaign name |
verifyType | enum [ “active”, “inactive” ] | Verification type |
timeOffsetToken | string | Time offset token |
Enumeration type definition to specify as verifyType
Enumerator String Definition | Description |
---|---|
active | Active |
inactive | Inactive |
{
"action": "Gs2SerialKey:VerifyCodeByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User Id",
"code": "[string]Serial Code",
"campaignModelName": "[string]Campaign name",
"verifyType": "[string]Verification type",
"timeOffsetToken": "[string]Time offset token"
}
}
action: Gs2SerialKey:VerifyCodeByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User Id"
code: "[string]Serial Code"
campaignModelName: "[string]Campaign name"
verifyType: "[string]Verification type"
timeOffsetToken: "[string]Time offset token"
transaction.service("serialKey").consume.verify_code_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User Id",
code="[string]Serial Code",
campaignModelName="[string]Campaign name",
verifyType="[string]Verification type",
timeOffsetToken="[string]Time offset token",
})
ConsumeAction
Gs2SerialKey:UseByUserId
Using serial code by specifying user ID
Actions for which quantity can be specified: NO
Reversible action: YES
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
userId | string | Set #{userId} to replace the currently logged in user ID. |
code | string | Serial Code |
timeOffsetToken | string | Time offset token |
{
"action": "Gs2SerialKey:UseByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User Id",
"code": "[string]Serial Code",
"timeOffsetToken": "[string]Time offset token"
}
}
action: Gs2SerialKey:UseByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User Id"
code: "[string]Serial Code"
timeOffsetToken: "[string]Time offset token"
transaction.service("serialKey").consume.use_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User Id",
code="[string]Serial Code",
timeOffsetToken="[string]Time offset token",
})
AcquireAction
Gs2SerialKey:RevertUseByUserId
Serial code set to unused by specifying user ID
Actions for which quantity can be specified: NO
Reversible action: YES
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
userId | string | Set #{userId} to replace the currently logged in user ID. |
code | string | Serial Code |
timeOffsetToken | string | Time offset token |
{
"action": "Gs2SerialKey:RevertUseByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User Id",
"code": "[string]Serial Code",
"timeOffsetToken": "[string]Time offset token"
}
}
action: Gs2SerialKey:RevertUseByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User Id"
code: "[string]Serial Code"
timeOffsetToken: "[string]Time offset token"
transaction.service("serialKey").acquire.revert_use_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User Id",
code="[string]Serial Code",
timeOffsetToken="[string]Time offset token",
})
Gs2SerialKey:IssueOnce
Issue a serial code
Actions for which quantity can be specified: NO
Reversible action: NO
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
campaignModelName | string | Campaign name |
metadata | string | metadata |
{
"action": "Gs2SerialKey:IssueOnce",
"request": {
"namespaceName": "[string]Namespace name",
"campaignModelName": "[string]Campaign name",
"metadata": "[string]metadata"
}
}
action: Gs2SerialKey:IssueOnce
request:
namespaceName: "[string]Namespace name"
campaignModelName: "[string]Campaign name"
metadata: "[string]metadata"
transaction.service("serialKey").acquire.issue_once({
namespaceName="[string]Namespace name",
campaignModelName="[string]Campaign name",
metadata="[string]metadata",
})