GS2-Showcase Script トリガーリファレンス
拡張スクリプトを呼び出す イベントトリガー のリファレンス
buy
購入実行前にGS2-Scriptを呼び出すイベントトリガー
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| showcase | Showcase | 陳列棚モデル |
| displayItem | DisplayItem | 陳列商品モデル |
| userId | string | 購入を実行しているユーザーID |
| quantity | int | 購入量 |
| config | Config[] | トランザクションの変数に適用する設定値 |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | 購入を許可するか |
実装例
namespace = args.namespace
showcase = args.showcase
displayItem = args.displayItem
userId = args.userId
quantity = args.quantity
config = args.config
result = {
permit=permit
}
buyDone
購入実行後にGS2-Scriptを呼び出すイベントトリガー
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| showcase | Showcase | 陳列棚モデル |
| displayItem | DisplayItem | 陳列商品モデル |
| userId | string | 購入を実行しているユーザーID |
| quantity | int | 購入量 |
| config | Config[] | トランザクションの変数に適用する設定値 |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 |
|---|
実装例
namespace = args.namespace
showcase = args.showcase
displayItem = args.displayItem
userId = args.userId
quantity = args.quantity
config = args.config
result = {
}