API Reference of GS2-Distributor SDK for Game Engine

Specifications of models and API references for GS2-SDK for Game Engine

Model

EzConfig

Configration

Set values to be applied to transaction variables

TypeConditionRequireDefaultLimitationDescription
keystring
~ 64 charsName
valuestring~ 51200 charsValue

setDefaultConfig


EzDistributorModel

Delivery Setting Model

A delivery setting is an entity that sets the policy when an entity’s acquisition exceeds its possession quota. By processing acquisitions through GS2-Distributor, overflow resources can be forwarded as GS2-Inbox messages.

TypeConditionRequireDefaultLimitationDescription
namestring
~ 128 charsDelivery setting name
metadatastring~ 2048 charsmetadata
inboxNamespaceIdstring~ 1024 charsGS2-Inbox namespace GRN to transfer overflow resources
whiteListTargetIdsList<string>[]~ 1000 itemsWhitelist of target resource GRNs that can be processed through the distributor

getDistributorModel listDistributorModels


EzDistributeResource

Distribute Resource

TypeConditionRequireDefaultLimitationDescription
actionString Enum
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
~ 128 charsTypes of actions to be performed in the acquire action
requeststring
~ 524288 charsJSON of request

EzStampSheetResult

Transaction execution results

Transaction execution results executed using server-side transaction auto-execution functionality

TypeConditionRequireDefaultLimitationDescription
transactionIdstring
36 ~ 36 charsTransaction ID
taskRequestsList<EzConsumeAction>~ 100 itemsList of consume action request payload
sheetRequestEzAcquireAction
Acquire action request payload
taskResultsList<string>[]~ 100 itemsConsume action execution results
sheetResultstring~ 1048576 charsAcquire action execution results

getStampSheetResult


EzBatchRequestPayload

API Batch Request

TypeConditionRequireDefaultLimitationDescription
requestIdstring
~ 128 charsRequest ID
serviceString Enum
enum {
  “account”,
  “adReward”,
  “auth”,
  “buff”,
  “chat”,
  “datastore”,
  “deploy”,
  “dictionary”,
  “distributor”,
  “enchant”,
  “enhance”,
  “exchange”,
  “experience”,
  “formation”,
  “friend”,
  “gateway”,
  “grade”,
  “guard”,
  “guild”,
  “identifier”,
  “idle”,
  “inbox”,
  “inventory”,
  “jobQueue”,
  “key”,
  “limit”,
  “lock”,
  “log”,
  “loginReward”,
  “lottery”,
  “matchmaking”,
  “megaField”,
  “mission”,
  “money”,
  “money2”,
  “news”,
  “quest”,
  “ranking”,
  “ranking2”,
  “realtime”,
  “schedule”,
  “script”,
  “seasonRating”,
  “serialKey”,
  “showcase”,
  “skillTree”,
  “stamina”,
  “stateMachine”,
  “version”
}
~ 128 charsService
Enumerator String DefinitionDescription
“account”GS2-Account
“adReward”GS2-AdReward
“auth”GS2-Auth
“buff”GS2-Buff
“chat”GS2-Chat
“datastore”GS2-Datastore
“deploy”GS2-Deploy
“dictionary”GS2-Dictionary
“distributor”GS2-Distributor
“enchant”GS2-Enchant
“enhance”GS2-Enhance
“exchange”GS2-Exchange
“experience”GS2-Experience
“formation”GS2-Formation
“friend”GS2-Friend
“gateway”GS2-Gateway
“grade”GS2-Grade
“guard”GS2-Guard
“guild”GS2-Guild
“identifier”GS2-Identifier
“idle”GS2-Idle
“inbox”GS2-Inbox
“inventory”GS2-Inventory
“jobQueue”GS2-JobQueue
“key”GS2-Key
“limit”GS2-Limit
“lock”GS2-Lock
“log”GS2-Log
“loginReward”GS2-LoginReward
“lottery”GS2-Lottery
“matchmaking”GS2-Matchmaking
“megaField”GS2-MegaField
“mission”GS2-Mission
“money”GS2-Money
“money2”GS2-Money2
“news”GS2-News
“quest”GS2-Quest
“ranking”GS2-Ranking
“ranking2”GS2-Ranking2
“realtime”GS2-Realtime
“schedule”GS2-Schedule
“script”GS2-Script
“seasonRating”GS2-SeasonRating
“serialKey”GS2-SerialKey
“showcase”GS2-Showcase
“skillTree”GS2-SkillTree
“stamina”GS2-Stamina
“stateMachine”GS2-StateMachine
“version”GS2-Version
methodNamestring
~ 128 charsMethod Name
parameterstring
~ 10240 charsMethod Name

batchExecuteApi


EzBatchResultPayload

API Batch Result

TypeConditionRequireDefaultLimitationDescription
requestIdstring
~ 128 charsRequest ID
statusCodeint
100 ~ 1000Status Code
resultPayloadstring
~ 10240 charsResponse

batchExecuteApi


EzAcquireAction

Acquire Action

TypeConditionRequireDefaultLimitationDescription
actionString Enum
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
~ 128 charsTypes of actions to be performed in the acquire action
requeststring
~ 524288 charsJSON of request

ezStampSheetResult


EzConsumeAction

Consume Action

TypeConditionRequireDefaultLimitationDescription
actionString Enum
enum {
"Gs2AdReward:ConsumePointByUserId",
"Gs2Dictionary:DeleteEntriesByUserId",
"Gs2Enhance:DeleteProgressByUserId",
"Gs2Exchange:DeleteAwaitByUserId",
"Gs2Experience:SubExperienceByUserId",
"Gs2Experience:SubRankCapByUserId",
"Gs2Formation:SubMoldCapacityByUserId",
"Gs2Grade:SubGradeByUserId",
"Gs2Guild:DecreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:DecreaseMaximumIdleMinutesByUserId",
"Gs2Inbox:OpenMessageByUserId",
"Gs2Inbox:DeleteMessageByUserId",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2JobQueue:DeleteJobByUserId",
"Gs2Limit:CountUpByUserId",
"Gs2LoginReward:MarkReceivedByUserId",
"Gs2Mission:ReceiveByUserId",
"Gs2Mission:BatchReceiveByUserId",
"Gs2Mission:DecreaseCounterByUserId",
"Gs2Mission:ResetCounterByUserId",
"Gs2Money:WithdrawByUserId",
"Gs2Money:RecordReceipt",
"Gs2Money2:WithdrawByUserId",
"Gs2Money2:VerifyReceiptByUserId",
"Gs2Quest:DeleteProgressByUserId",
"Gs2Ranking2:CreateGlobalRankingReceivedRewardByUserId",
"Gs2Ranking2:CreateClusterRankingReceivedRewardByUserId",
"Gs2Schedule:DeleteTriggerByUserId",
"Gs2SerialKey:UseByUserId",
"Gs2Showcase:IncrementPurchaseCountByUserId",
"Gs2SkillTree:MarkRestrainByUserId",
"Gs2Stamina:DecreaseMaxValueByUserId",
"Gs2Stamina:ConsumeStaminaByUserId",
}
~ 128 charsTypes of actions to be performed in the consume action
requeststring
~ 524288 charsJSON of request

ezStampSheetResult


EzVerifyAction

Verify Action

TypeConditionRequireDefaultLimitationDescription
actionString Enum
enum {
"Gs2Dictionary:VerifyEntryByUserId",
"Gs2Distributor:IfExpressionByUserId",
"Gs2Distributor:AndExpressionByUserId",
"Gs2Distributor:OrExpressionByUserId",
"Gs2Enchant:VerifyRarityParameterStatusByUserId",
"Gs2Experience:VerifyRankByUserId",
"Gs2Experience:VerifyRankCapByUserId",
"Gs2Grade:VerifyGradeByUserId",
"Gs2Grade:VerifyGradeUpMaterialByUserId",
"Gs2Guild:VerifyCurrentMaximumMemberCountByGuildName",
"Gs2Guild:VerifyIncludeMemberByUserId",
"Gs2Inventory:VerifyInventoryCurrentMaxCapacityByUserId",
"Gs2Inventory:VerifyItemSetByUserId",
"Gs2Inventory:VerifyReferenceOfByUserId",
"Gs2Inventory:VerifySimpleItemByUserId",
"Gs2Inventory:VerifyBigItemByUserId",
"Gs2Limit:VerifyCounterByUserId",
"Gs2Matchmaking:VerifyIncludeParticipantByUserId",
"Gs2Mission:VerifyCompleteByUserId",
"Gs2Mission:VerifyCounterValueByUserId",
"Gs2Ranking2:VerifyGlobalRankingScoreByUserId",
"Gs2Ranking2:VerifyClusterRankingScoreByUserId",
"Gs2Ranking2:VerifySubscribeRankingScoreByUserId",
"Gs2Schedule:VerifyTriggerByUserId",
"Gs2Schedule:VerifyEventByUserId",
"Gs2SerialKey:VerifyCodeByUserId",
"Gs2Stamina:VerifyStaminaValueByUserId",
"Gs2Stamina:VerifyStaminaMaxValueByUserId",
"Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
"Gs2Stamina:VerifyStaminaRecoverValueByUserId",
"Gs2Stamina:VerifyStaminaOverflowValueByUserId",
}
~ 128 charsTypes of actions to be performed in the verify task
requeststring
~ 524288 charsJSON of request

EzTransactionResult

Transaction execution results

Transaction execution results executed using server-side transaction auto-execution functionality

TypeConditionRequireDefaultLimitationDescription
transactionIdstring
36 ~ 36 charsTransaction ID
verifyResultsList<EzVerifyActionResult>~ 100 itemsList of verify action execution results
consumeResultsList<EzConsumeActionResult>~ 100 itemsList of consume action execution results
acquireResultsList<EzAcquireActionResult>~ 100 itemsList of acquire action execution results

getTransactionResult


EzAcquireActionResult

Acquire action execution result

TypeConditionRequireDefaultLimitationDescription
acquireRequeststring
~ 524288 charsJSON of request
statusCodeint~ 999Status code
acquireResultstring~ 1048576 charsResult payload

ezTransactionResult


EzConsumeActionResult

Consume action execution result

TypeConditionRequireDefaultLimitationDescription
consumeRequeststring
~ 524288 charsJSON of request
statusCodeint~ 999Status code
consumeResultstring~ 1048576 charsResult payload

ezTransactionResult


EzVerifyActionResult

Verify action execution result

TypeConditionRequireDefaultLimitationDescription
verifyRequeststring
~ 524288 charsJSON of request
statusCodeint~ 999Status code
verifyResultstring~ 1048576 charsResult payload

ezTransactionResult


Methods

getDistributorModel

Get delivery settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name
distributorNamestring
~ 128 charsDelivery setting name

Result

TypeDescription
itemEzDistributorModelDelivery Setting

Implementation Example

    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).DistributorModel(
        distributorName: "distributor-model-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).DistributorModel(
        distributorName: "distributor-model-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    )->DistributorModel(
        "distributor-model-0001" // distributorName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).DistributorModel(
        distributorName: "distributor-model-0001"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).DistributorModel(
        distributorName: "distributor-model-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    )->DistributorModel(
        "distributor-model-0001" // distributorName
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Distributor::Model::FDistributorModel> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

listDistributorModels

Get list of delivery settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
itemsList<EzDistributorModel>List of delivery settings

Implementation Example

    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    );
    var items = await domain.DistributorModelsAsync(
    ).ToListAsync();
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.DistributorModels(
    );
    List<EzDistributorModel> items = new List<EzDistributorModel>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    );
    const auto It = Domain->DistributorModels(
    );
    TArray<Gs2::UE5::Distributor::Model::FEzDistributorModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // Start event handling
    var callbackId = domain.SubscribeDistributorModels(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeDistributorModels(callbackId);
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.DistributorModels(
    );
    List<EzDistributorModel> items = new List<EzDistributorModel>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    );
    
    // Start event handling
    const auto CallbackId = Domain->SubscribeDistributorModels(
        []() {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    Domain->UnsubscribeDistributorModels(CallbackId);

batchExecuteApi

Batch execution of APIs

Request

TypeConditionRequireDefaultLimitationDescription
requestPayloadsList<EzBatchRequestPayload>
1 ~ 100 itemsBatch request

Result

TypeDescription
resultsList<EzBatchResultPayload>Batch result

Implementation Example

    var domain = gs2.Distributor.Namespace(
        namespaceName: null
    );
    var result = await domain.BatchExecuteApiAsync(
        requestPayloads: new List<Gs2.Unity.Gs2Distributor.Model.EzBatchRequestPayload> {
            new Gs2.Unity.Gs2Distributor.Model.EzBatchRequestPayload() {
                Service = "inventory",
                Method = "describeSimpleItems",
                Request = "{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"inventory-0001\", \"accessToken\": \"accessToken-0001\"}",
            },
            new Gs2.Unity.Gs2Distributor.Model.EzBatchRequestPayload() {
                Service = "exchange",
                Method = "describeRateModels",
                Request = "{\"namespaceName\": \"namespace-0001\"}",
            },
        }
    );
    var results = result.Results;
    var domain = gs2.Distributor.Namespace(
        namespaceName: null
    );
    var future = domain.BatchExecuteApiFuture(
        requestPayloads: new List<Gs2.Unity.Gs2Distributor.Model.EzBatchRequestPayload> {
            new Gs2.Unity.Gs2Distributor.Model.EzBatchRequestPayload() {
                Service = "inventory",
                Method = "describeSimpleItems",
                Request = "{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"inventory-0001\", \"accessToken\": \"accessToken-0001\"}",
            },
            new Gs2.Unity.Gs2Distributor.Model.EzBatchRequestPayload() {
                Service = "exchange",
                Method = "describeRateModels",
                Request = "{\"namespaceName\": \"namespace-0001\"}",
            },
        }
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var results = future.Result.Results;
    const auto Domain = Gs2->Distributor->Namespace(
        nullptr // namespaceName
    );
    const auto Future = Domain->BatchExecuteApi(
        []
        {
            auto v = MakeShared<TArray<TSharedPtr<Gs2::UE5::Distributor::Model::FEzBatchRequestPayload>>>();
            v->Add(
                MakeShared<Gs2::UE5::Distributor::Model::FEzBatchRequestPayload>()
                ->WithService(TOptional<FString>("inventory"))
                ->WithMethod(TOptional<FString>("describeSimpleItems"))
                ->WithRequest(TOptional<FString>("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"inventory-0001\", \"accessToken\": \"accessToken-0001\"}"))
            );
            v->Add(
                MakeShared<Gs2::UE5::Distributor::Model::FEzBatchRequestPayload>()
                ->WithService(TOptional<FString>("exchange"))
                ->WithMethod(TOptional<FString>("describeRateModels"))
                ->WithRequest(TOptional<FString>("{\"namespaceName\": \"namespace-0001\"}"))
            );
            return v;
        }() // requestPayloads
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();
    const auto Results = Result->Results;

freezeMasterData

Issue a Context Stack that holds the information to fix the contents at the time of calling this API in the Master Data.

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token

Result

TypeDescription
newContextStackstringRequest of context in time to freeze the master data

Implementation Example

    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Distribute(
    );
    var result = await domain.FreezeMasterDataAsync(
        accessToken: 
    );
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Distribute(
    );
    var future = domain.FreezeMasterDataFuture(
        accessToken: 
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    )->Distribute(
    );
    const auto Future = Domain->FreezeMasterData(
         // accessToken
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();

freezeMasterDataBySignedTimestamp

Issue a Context Stack that holds the information to fix the contents at the time of signing the timestamp in the Master Data. Signed timestamps can be issued with SignFreezeMasterDataTimestamp.

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
bodystring
~ 1024 charsBody
signaturestring
~ 256 charsSignature
keyIdstring
~ 1024 charsGS2-Key GRN of the cryptographic key used for signature calculation

Result

TypeDescription
newContextStackstringRequest of context in time to freeze the master data

Implementation Example

    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Distribute(
    );
    var result = await domain.FreezeMasterDataBySignedTimestampAsync(
        accessToken: ,
        body: "body",
        signature: "signature",
        keyId: "key-0001"
    );
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Distribute(
    );
    var future = domain.FreezeMasterDataBySignedTimestampFuture(
        accessToken: ,
        body: "body",
        signature: "signature",
        keyId: "key-0001"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    )->Distribute(
    );
    const auto Future = Domain->FreezeMasterDataBySignedTimestamp(
        , // accessToken
        "body", // body
        "signature", // signature
        "key-0001" // keyId
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();

runStampSheet

Run acquire action

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name
stampSheetstring
~ 5242880 charsTransaction
keyIdstring
~ 1024 charsencryption key GRN
contextStackstring~ 32768 charsContext of request

Result

TypeDescription
statusCodeintStatus code
resultstringResponse content

Implementation Example

// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// Runs at the SDK level, so there is no need to explicitly call the API

runStampSheetExpress

Batch execution of verify actions, consume actions, and acquire actions in transactions

Batch execution reduces response time. However, there is no guarantee of a correct retry in the event of failure in the process of transaction execution. It is strongly recommended to keep a log of transaction execution in GS2-Log in case execution fails, so that appropriate action can be taken during customer support.

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name
stampSheetstring
~ 5242880 charsTransaction
keyIdstring
~ 1024 charsencryption key GRN

Result

TypeDescription
verifyTaskResultCodesList<int>Verify action execution status code
verifyTaskResultsList<string>Verify action execution results
taskResultCodesList<int>Consume action execution status code
taskResultsList<string>Consume action execution results
sheetResultCodeintAcquire action execution status code
sheetResultstringAcquire action execution result response content

Implementation Example

// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// Runs at the SDK level, so there is no need to explicitly call the API

runStampSheetExpressWithoutNamespace

Batch execution of verify actions, consume actions, and acquire actions in transactions

Batch execution reduces response time. However, there is no guarantee of a correct retry in the event of failure in the process of transaction execution. It is strongly recommended to keep a log of transaction execution in GS2-Log in case execution fails, so that appropriate action can be taken during customer support.

By omitting the namespace specification, the There are side effects such as logging not being possible and resource overflow processing not being executed.

Request

TypeConditionRequireDefaultLimitationDescription
stampSheetstring
~ 5242880 charsTransaction
keyIdstring
~ 1024 charsencryption key GRN

Result

TypeDescription
verifyTaskResultCodesList<int>Verify action execution status code
verifyTaskResultsList<string>Verify action execution results
taskResultCodesList<int>Consume action execution status code
taskResultsList<string>Consume action execution results
sheetResultCodeintAcquire action execution status code
sheetResultstringAcquire action execution result response content

Implementation Example

// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// Runs at the SDK level, so there is no need to explicitly call the API

runStampSheetWithoutNamespace

Run acquire action without specifying namespace

By omitting the namespace specification, the There are side effects such as logging not being possible and resource overflow processing not being executed.

Request

TypeConditionRequireDefaultLimitationDescription
stampSheetstring
~ 5242880 charsTransaction
keyIdstring
~ 1024 charsencryption key GRN
contextStackstring~ 32768 charsContext of request

Result

TypeDescription
statusCodeintStatus code
resultstringResponse content

Implementation Example

// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// Runs at the SDK level, so there is no need to explicitly call the API

runStampTask

Run consume action

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name
stampTaskstring
~ 5242880 charsConsume Action
keyIdstring
~ 1024 charsencryption key GRN
contextStackstring~ 32768 charsContext of request

Result

TypeDescription
contextStackstringRequest of context reflecting task execution results
statusCodeintStatus code
resultstringResponse content

Implementation Example

// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// Runs at the SDK level, so there is no need to explicitly call the API

runStampTaskWithoutNamespace

Run consume action without specifying namespace

By omitting the namespace specification, the There are side effects such as logging not being possible and resource overflow processing not being executed.

Request

TypeConditionRequireDefaultLimitationDescription
stampTaskstring
~ 5242880 charsConsume Action
keyIdstring
~ 1024 charsencryption key GRN
contextStackstring~ 32768 charsContext of request

Result

TypeDescription
contextStackstringRequest of context reflecting task execution results
statusCodeintStatus code
resultstringResponse content

Implementation Example

// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// Runs at the SDK level, so there is no need to explicitly call the API

runVerifyTask

Run verify action

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name
verifyTaskstring
~ 5242880 charsVerify Action
keyIdstring
~ 1024 charsencryption key GRN
contextStackstring~ 32768 charsContext of request

Result

TypeDescription
contextStackstringRequest of context reflecting task execution results
statusCodeintStatus code
resultstringResponse content

Implementation Example

// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// Runs at the SDK level, so there is no need to explicitly call the API

runVerifyTaskWithoutNamespace

Run verify action without specifying namespace

By omitting the namespace specification, the There are side effects such as logging not being possible and resource overflow processing not being executed.

Request

TypeConditionRequireDefaultLimitationDescription
verifyTaskstring
~ 5242880 charsVerify Action
keyIdstring
~ 1024 charsencryption key GRN
contextStackstring~ 32768 charsContext of request

Result

TypeDescription
contextStackstringRequest of context reflecting task execution results
statusCodeintStatus code
resultstringResponse content

Implementation Example

// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// New Experience ではSDKレベルで実行されるため明示的にAPIを呼び出す必要はありません
// New Experience runs at the SDK level, so there is no need to explicitly call the API
// Runs at the SDK level, so there is no need to explicitly call the API

setDefaultConfig

Issue a Context Stack that holds the default values of Config to be specified in the Transaction Issuance API.

Request

TypeConditionRequireDefaultLimitationDescription
accessTokenstring
~ 128 charsAccess token
configList<EzConfig>
1 ~ 1000 itemsTransaction placeholder applied settings values

Result

TypeDescription
newContextStackstringContext stack reflecting the results of the task

Implementation Example

    var domain = gs2.Distributor.Namespace(
        namespaceName: null
    );
    var result = await domain.SetDefaultConfigAsync(
        accessToken: ,
        config: new List<Gs2.Unity.Gs2Distributor.Model.EzConfig> {
            new Gs2.Unity.Gs2Distributor.Model.EzConfig() {
                Key = "key-0001",
                Value = "value-0001",
            },
            new Gs2.Unity.Gs2Distributor.Model.EzConfig() {
                Key = "key-0002",
                Value = "value-0002",
            },
        }
    );
    var domain = gs2.Distributor.Namespace(
        namespaceName: null
    );
    var future = domain.SetDefaultConfigFuture(
        accessToken: ,
        config: new List<Gs2.Unity.Gs2Distributor.Model.EzConfig> {
            new Gs2.Unity.Gs2Distributor.Model.EzConfig() {
                Key = "key-0001",
                Value = "value-0001",
            },
            new Gs2.Unity.Gs2Distributor.Model.EzConfig() {
                Key = "key-0002",
                Value = "value-0002",
            },
        }
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Distributor->Namespace(
        nullptr // namespaceName
    );
    const auto Future = Domain->SetDefaultConfig(
        , // accessToken
        []
        {
            auto v = MakeShared<TArray<TSharedPtr<Gs2::UE5::Distributor::Model::FEzConfig>>>();
            v->Add(
                MakeShared<Gs2::UE5::Distributor::Model::FEzConfig>()
                ->WithKey(TOptional<FString>("key-0001"))
                ->WithValue(TOptional<FString>("value-0001"))
            );
            v->Add(
                MakeShared<Gs2::UE5::Distributor::Model::FEzConfig>()
                ->WithKey(TOptional<FString>("key-0002"))
                ->WithValue(TOptional<FString>("value-0002"))
            );
            return v;
        }() // config
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();

getStampSheetResult

Get transaction execution results

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
transactionIdstring
36 ~ 36 charsTransaction ID

Result

TypeDescription
itemEzStampSheetResultTransaction execution results

Implementation Example

    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).StampSheetResult(
        transactionId: "cc1985c3-54f0-4fc3-b295-dc30214284ec"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).StampSheetResult(
        transactionId: "cc1985c3-54f0-4fc3-b295-dc30214284ec"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->StampSheetResult(
        "cc1985c3-54f0-4fc3-b295-dc30214284ec" // transactionId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).StampSheetResult(
        transactionId: "cc1985c3-54f0-4fc3-b295-dc30214284ec"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).StampSheetResult(
        transactionId: "cc1985c3-54f0-4fc3-b295-dc30214284ec"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->StampSheetResult(
        "cc1985c3-54f0-4fc3-b295-dc30214284ec" // transactionId
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Distributor::Model::FStampSheetResult> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

getTransactionResult

Get transaction execution results

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
transactionIdstring
36 ~ 36 charsTransaction ID

Result

TypeDescription
itemEzTransactionResultTransaction execution results

Implementation Example

    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).TransactionResult(
        transactionId: "cc1985c3-54f0-4fc3-b295-dc30214284ec"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).TransactionResult(
        transactionId: "cc1985c3-54f0-4fc3-b295-dc30214284ec"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->TransactionResult(
        "cc1985c3-54f0-4fc3-b295-dc30214284ec" // transactionId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).TransactionResult(
        transactionId: "cc1985c3-54f0-4fc3-b295-dc30214284ec"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Distributor.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).TransactionResult(
        transactionId: "cc1985c3-54f0-4fc3-b295-dc30214284ec"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Distributor->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->TransactionResult(
        "cc1985c3-54f0-4fc3-b295-dc30214284ec" // transactionId
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Distributor::Model::FTransactionResult> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

Event Handler

OnAutoRunStampSheetNotification

Notification when transaction auto-execution is complete

NameTypeDescription
namespaceNamestringNamespace name
userIdstringUser Id
transactionIdstringTransaction ID

Implementation Example

    gs2.Distributor.OnAutoRunStampSheetNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var transactionId = notification.TransactionId;
    };
    gs2.Distributor.OnAutoRunStampSheetNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var transactionId = notification.TransactionId;
    };
    Gs2->Distributor->OnAutoRunStampSheetNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto TransactionId = Notification->TransactionIdValue;
    });

OnAutoRunTransactionNotification

Notification when transaction auto-execution is complete

NameTypeDescription
namespaceNamestringNamespace name
userIdstringUser Id
transactionIdstringTransaction ID

Implementation Example

    gs2.Distributor.OnAutoRunTransactionNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var transactionId = notification.TransactionId;
    };
    gs2.Distributor.OnAutoRunTransactionNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var transactionId = notification.TransactionId;
    };
    Gs2->Distributor->OnAutoRunTransactionNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto TransactionId = Notification->TransactionIdValue;
    });