Transaction Action of GS2-Exchange

Specification of verify/consume/acquire transaction actions

ConsumeAction

Gs2Exchange:DeleteAwaitByUserId

Delete exchange standby

Whether the action allows quantity specification: NO

Whether the action is reversible: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
awaitNamestringExchange standby name
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Exchange:DeleteAwaitByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "awaitName": "[string]Exchange standby name",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Exchange:DeleteAwaitByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  awaitName: "[string]Exchange standby name"
  timeOffsetToken: "[string]Time offset token"
transaction.service("exchange").consume.delete_await_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    awaitName="[string]Exchange standby name",
    timeOffsetToken="[string]Time offset token",
})

AcquireAction

Gs2Exchange:ExchangeByUserId

Perform exchange by specifying a user ID

Whether the action allows quantity specification: YES

Whether the action is reversible: NO

TypeDescription
namespaceNamestringNamespace name
rateNamestringExchange Rate Model name
userIdstringSet #{userId} to replace the currently logged in user ID.
countintNumber of lots to be exchanged
configConfig[]Set values to be applied to transaction variables
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Exchange:ExchangeByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "rateName": "[string]Exchange Rate Model name",
        "userId": "[string]User ID",
        "count": "[int]Number of lots to be exchanged",
        "config": [
            {
                "key": "[string]Name",
                "value": "[string]Value"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Exchange:ExchangeByUserId
request:
  namespaceName: "[string]Namespace name"
  rateName: "[string]Exchange Rate Model name"
  userId: "[string]User ID"
  count: "[int]Number of lots to be exchanged"
  config: 
    - key: "[string]Name"
      value: "[string]Value"
  timeOffsetToken: "[string]Time offset token"
transaction.service("exchange").acquire.exchange_by_user_id({
    namespaceName="[string]Namespace name",
    rateName="[string]Exchange Rate Model name",
    userId="[string]User ID",
    count="[int]Number of lots to be exchanged",
    config={
        {
            key="[string]Name",
            value="[string]Value"
        }
    },
    timeOffsetToken="[string]Time offset token",
})

Gs2Exchange:IncrementalExchangeByUserId

Perform cost increase type exchange by specifying a user ID

Whether the action allows quantity specification: YES

Whether the action is reversible: NO

TypeDescription
namespaceNamestringNamespace name
rateNamestringCost increase type exchange rate model name
userIdstringSet #{userId} to replace the currently logged in user ID.
countintNumber of lots to be exchanged
configConfig[]Set values to be applied to transaction variables
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Exchange:IncrementalExchangeByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "rateName": "[string]Cost increase type exchange rate model name",
        "userId": "[string]User ID",
        "count": "[int]Number of lots to be exchanged",
        "config": [
            {
                "key": "[string]Name",
                "value": "[string]Value"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Exchange:IncrementalExchangeByUserId
request:
  namespaceName: "[string]Namespace name"
  rateName: "[string]Cost increase type exchange rate model name"
  userId: "[string]User ID"
  count: "[int]Number of lots to be exchanged"
  config: 
    - key: "[string]Name"
      value: "[string]Value"
  timeOffsetToken: "[string]Time offset token"
transaction.service("exchange").acquire.incremental_exchange_by_user_id({
    namespaceName="[string]Namespace name",
    rateName="[string]Cost increase type exchange rate model name",
    userId="[string]User ID",
    count="[int]Number of lots to be exchanged",
    config={
        {
            key="[string]Name",
            value="[string]Value"
        }
    },
    timeOffsetToken="[string]Time offset token",
})

Gs2Exchange:CreateAwaitByUserId

Create exchange standby by specifying user ID

Whether the action allows quantity specification: YES

Whether the action is reversible: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
rateNamestringExchange Rate Model name
countintNumber of exchanges
configConfig[]Default value to apply when obtaining rewards
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Exchange:CreateAwaitByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "rateName": "[string]Exchange Rate Model name",
        "count": "[int]Number of exchanges",
        "config": [
            {
                "key": "[string]Name",
                "value": "[string]Value"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Exchange:CreateAwaitByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  rateName: "[string]Exchange Rate Model name"
  count: "[int]Number of exchanges"
  config: 
    - key: "[string]Name"
      value: "[string]Value"
  timeOffsetToken: "[string]Time offset token"
transaction.service("exchange").acquire.create_await_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    rateName="[string]Exchange Rate Model name",
    count="[int]Number of exchanges",
    config={
        {
            key="[string]Name",
            value="[string]Value"
        }
    },
    timeOffsetToken="[string]Time offset token",
})

Gs2Exchange:AcquireForceByUserId

Get rewarded for waiting for exchange without waiting for the waiting time

Whether the action allows quantity specification: NO

Whether the action is reversible: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
awaitNamestringExchange standby name
configConfig[]Set values to be applied to transaction variables
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Exchange:AcquireForceByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "awaitName": "[string]Exchange standby name",
        "config": [
            {
                "key": "[string]Name",
                "value": "[string]Value"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Exchange:AcquireForceByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  awaitName: "[string]Exchange standby name"
  config: 
    - key: "[string]Name"
      value: "[string]Value"
  timeOffsetToken: "[string]Time offset token"
transaction.service("exchange").acquire.acquire_force_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    awaitName="[string]Exchange standby name",
    config={
        {
            key="[string]Name",
            value="[string]Value"
        }
    },
    timeOffsetToken="[string]Time offset token",
})

Gs2Exchange:SkipByUserId

Skip exchange standby by specifying user ID

Whether the action allows quantity specification: YES

Whether the action is reversible: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
awaitNamestringExchange standby name
skipTypeString Enum
enum {
  “complete”,
  “minutes”,
  “totalRate”,
  “remainRate”
}
Skip type
Enumerator String DefinitionDescription
“complete”Complete skip
“minutes”Skip by specifying time(minutes)
“totalRate”Skip by specifying the percentage of total waiting time
“remainRate”Skip by specifying the percentage of remaining waiting time
minutesintMinutes to skip
ratefloatPercentage of time to skip
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Exchange:SkipByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "awaitName": "[string]Exchange standby name",
        "skipType": "[string]Skip type",
        "minutes": "[int]Minutes to skip",
        "rate": "[float]Percentage of time to skip",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Exchange:SkipByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  awaitName: "[string]Exchange standby name"
  skipType: "[string]Skip type"
  minutes: "[int]Minutes to skip"
  rate: "[float]Percentage of time to skip"
  timeOffsetToken: "[string]Time offset token"
transaction.service("exchange").acquire.skip_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    awaitName="[string]Exchange standby name",
    skipType="[string]Skip type",
    minutes="[int]Minutes to skip",
    rate="[float]Percentage of time to skip",
    timeOffsetToken="[string]Time offset token",
})