Transaction Action of GS2-Lottery

Specification of verify/consume/acquire transaction actions

AcquireAction

Gs2Lottery:DrawByUserId

Execute a lottery by specifying a User ID

Whether the action allows quantity specification: YES

Whether the action is reversible: NO

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
lotteryNamestring
~ 128 charsLottery Model name
Lottery model-specific name. Specified using alphanumeric characters, hyphen (-), underscore (_), and period (.).
userIdstring
~ 128 charsUser ID
Set #{userId} to replace the currently logged in user ID.
countint
1 ~ 1000Number of draws
configList<Config>[]0 ~ 1000 itemsSettings applied to the placeholder on the stamp sheet
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2Lottery:DrawByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "lotteryName": "[string]Lottery Model name",
        "userId": "[string]User ID",
        "count": "[int]Number of draws",
        "config": [
            {
                "key": "[string]Name",
                "value": "[string]Value"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Lottery:DrawByUserId
request:
  namespaceName: "[string]Namespace name"
  lotteryName: "[string]Lottery Model name"
  userId: "[string]User ID"
  count: "[int]Number of draws"
  config: 
    - key: "[string]Name"
      value: "[string]Value"
  timeOffsetToken: "[string]Time offset token"
transaction.service("lottery").acquire.draw_by_user_id({
    namespaceName="[string]Namespace name",
    lotteryName="[string]Lottery Model name",
    userId="[string]User ID",
    count="[int]Number of draws",
    config={
        {
            key="[string]Name",
            value="[string]Value"
        }
    },
    timeOffsetToken="[string]Time offset token",
})

Gs2Lottery:ResetBoxByUserId

Reset box with specified user ID

Whether the action allows quantity specification: NO

Whether the action is reversible: NO

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
prizeTableNamestring
~ 128 charsName of prize table
userIdstring
~ 128 charsUser ID
Set #{userId} to replace the currently logged in user ID.
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2Lottery:ResetBoxByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "prizeTableName": "[string]Name of prize table",
        "userId": "[string]User ID",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Lottery:ResetBoxByUserId
request:
  namespaceName: "[string]Namespace name"
  prizeTableName: "[string]Name of prize table"
  userId: "[string]User ID"
  timeOffsetToken: "[string]Time offset token"
transaction.service("lottery").acquire.reset_box_by_user_id({
    namespaceName="[string]Namespace name",
    prizeTableName="[string]Name of prize table",
    userId="[string]User ID",
    timeOffsetToken="[string]Time offset token",
})