Transaction Action of GS2-Grade

Specification of verify/consume/acquire transaction actions

VerifyAction

Gs2Grade:VerifyGradeByUserId

Verify grade by user ID

Actions for which quantity can be specified: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringUser Id
Set #{userId} to replace the currently logged in user ID.
gradeNamestringGrade Model Name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
]
Type of verification
Enumerator String DefinitionDescription
“less”Grade is less than the specified value
“lessEqual”Grade is less than or equal to the specified value
“greater”Grade is greater than the specified value
“greaterEqual”Grade is greater than or equal to the specified value
“equal”Grade is equal to the specified value
“notEqual”Grade is not equal to the specified value
propertyIdstringProperty ID
gradeValuelongCurrent Grade
multiplyValueSpecifyingQuantityboolWhether to multiply the value used for verification when specifying the quantity
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Grade:VerifyGradeByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "gradeName": "[string]Grade Model Name",
        "verifyType": "[string]Type of verification",
        "propertyId": "[string]Property ID",
        "gradeValue": "[long]Current Grade",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Grade:VerifyGradeByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  gradeName: "[string]Grade Model Name"
  verifyType: "[string]Type of verification"
  propertyId: "[string]Property ID"
  gradeValue: "[long]Current Grade"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
transaction.service("grade").consume.verify_grade_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    gradeName="[string]Grade Model Name",
    verifyType="[string]Type of verification",
    propertyId="[string]Property ID",
    gradeValue="[long]Current Grade",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})

Gs2Grade:VerifyGradeUpMaterialByUserId

Verify grade up material by user ID

Actions for which quantity can be specified: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringUser Id
Set #{userId} to replace the currently logged in user ID.
gradeNamestringGrade Model Name
verifyTypeString Enum
enum {
  “match”,
  “notMatch”
]
Type of verification
Enumerator String DefinitionDescription
“match”Grade is equal to the specified value
“notMatch”Grade is not equal to the specified value
propertyIdstringProperty ID
materialPropertyIdstringProperty ID
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Grade:VerifyGradeUpMaterialByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "gradeName": "[string]Grade Model Name",
        "verifyType": "[string]Type of verification",
        "propertyId": "[string]Property ID",
        "materialPropertyId": "[string]Property ID",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Grade:VerifyGradeUpMaterialByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  gradeName: "[string]Grade Model Name"
  verifyType: "[string]Type of verification"
  propertyId: "[string]Property ID"
  materialPropertyId: "[string]Property ID"
  timeOffsetToken: "[string]Time offset token"
transaction.service("grade").consume.verify_grade_up_material_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    gradeName="[string]Grade Model Name",
    verifyType="[string]Type of verification",
    propertyId="[string]Property ID",
    materialPropertyId="[string]Property ID",
    timeOffsetToken="[string]Time offset token",
})

ConsumeAction

Gs2Grade:SubGradeByUserId

Subtract grade by specifying user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
gradeNamestringGrade Model Name
propertyIdstringProperty ID
gradeValuelongLost Grade
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Grade:SubGradeByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "gradeName": "[string]Grade Model Name",
        "propertyId": "[string]Property ID",
        "gradeValue": "[long]Lost Grade",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Grade:SubGradeByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  gradeName: "[string]Grade Model Name"
  propertyId: "[string]Property ID"
  gradeValue: "[long]Lost Grade"
  timeOffsetToken: "[string]Time offset token"
transaction.service("grade").consume.sub_grade_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    gradeName="[string]Grade Model Name",
    propertyId="[string]Property ID",
    gradeValue="[long]Lost Grade",
    timeOffsetToken="[string]Time offset token",
})

AcquireAction

Gs2Grade:AddGradeByUserId

Add grade by specifying user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
gradeNamestringGrade Model Name
propertyIdstringProperty ID
gradeValuelongGained Grade
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Grade:AddGradeByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "gradeName": "[string]Grade Model Name",
        "propertyId": "[string]Property ID",
        "gradeValue": "[long]Gained Grade",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Grade:AddGradeByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  gradeName: "[string]Grade Model Name"
  propertyId: "[string]Property ID"
  gradeValue: "[long]Gained Grade"
  timeOffsetToken: "[string]Time offset token"
transaction.service("grade").acquire.add_grade_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    gradeName="[string]Grade Model Name",
    propertyId="[string]Property ID",
    gradeValue="[long]Gained Grade",
    timeOffsetToken="[string]Time offset token",
})

Gs2Grade:ApplyRankCapByUserId

Apply rank cap to GS2-Experience by user ID

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
gradeNamestringGrade Model Name
propertyIdstringProperty ID
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Grade:ApplyRankCapByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "gradeName": "[string]Grade Model Name",
        "propertyId": "[string]Property ID",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Grade:ApplyRankCapByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  gradeName: "[string]Grade Model Name"
  propertyId: "[string]Property ID"
  timeOffsetToken: "[string]Time offset token"
transaction.service("grade").acquire.apply_rank_cap_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    gradeName="[string]Grade Model Name",
    propertyId="[string]Property ID",
    timeOffsetToken="[string]Time offset token",
})

Gs2Grade:MultiplyAcquireActionsByUserId

Add resources according to the grade of the target property of the grade specified by the user ID

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
gradeNamestringGrade Model Name
propertyIdstringProperty ID
rateNamestringRemuneration addition table name
acquireActionsAcquireAction[]List of Acquire Action
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Grade:MultiplyAcquireActionsByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "gradeName": "[string]Grade Model Name",
        "propertyId": "[string]Property ID",
        "rateName": "[string]Remuneration addition table name",
        "acquireActions": [
            {
                "action": "[string]Types of actions to be performed in the acquire action",
                "request": "[string]JSON of request"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Grade:MultiplyAcquireActionsByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  gradeName: "[string]Grade Model Name"
  propertyId: "[string]Property ID"
  rateName: "[string]Remuneration addition table name"
  acquireActions: 
    - action: "[string]Types of actions to be performed in the acquire action"
      request: "[string]JSON of request"
  timeOffsetToken: "[string]Time offset token"
transaction.service("grade").acquire.multiply_acquire_actions_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    gradeName="[string]Grade Model Name",
    propertyId="[string]Property ID",
    rateName="[string]Remuneration addition table name",
    acquireActions={
        {
            action="[string]Types of actions to be performed in the acquire action",
            request="[string]JSON of request"
        }
    },
    timeOffsetToken="[string]Time offset token",
})