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

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
codestringSerial Code
campaignModelNamestringCampaign name
verifyTypeenum [
    “active”,
    “inactive”
]
Verification type
timeOffsetTokenstringTime offset token

Enumeration type definition to specify as verifyType

Enumerator String DefinitionDescription
activeActive
inactiveInactive
{
    "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

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
codestringSerial Code
timeOffsetTokenstringTime 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

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
codestringSerial Code
timeOffsetTokenstringTime 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

TypeDescription
namespaceNamestringNamespace name
campaignModelNamestringCampaign name
metadatastringmetadata
{
    "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",
})